Page 1 of 1

Documents (Invoices) templates

Posted: Wed Oct 13, 2010 8:46 pm
by rulez22
Does anyone have a proper sample of Documents, Templates. Those samples that come with the script are not very user friendly?
Can you upload some examples please?
Thanks!

Re: Documents (Invoices) templates

Posted: Thu Oct 21, 2010 5:30 am
by kyomar
something like this? It's basic but does a good job for me (hope for you and others as well).

Copy/paste following html code into one of your documents. Change text according to your needs.

Markus

<table frame="VOID" cellspacing="0" cols="4" rules="NONE" border="0">
<colgroup>
<col width="400">
<col width="85">
<col width="85">
<col width="100"></colgroup>
<tbody>
<tr>
<td height="20" align="left"><font size="4"><strong>your company name</strong></font></td>
<td colspan="3" align="right"><b><font size="4" color="#8394C9">INVOICE</font></b></td>
</tr>
<tr>
<td height="30" align="left"><em>your company slogan</em></td>
<td colspan="3" align="right">DATE: [today]</td>
</tr>
<tr>
<td height="15" align="left">address</td>
<td colspan="3" align="right">INVOICE #: [document_progressive_number]</td>
</tr>
<tr>
<td height="15" align="left">city</td>
<td colspan="3" align="right">Reservation Code: [reservation_code]</td>
</tr>
<tr>
<td height="15" align="left">state, province</td>
</tr>
<tr>
<td height="15" align="left">post code, country</td>
</tr>
<tr>
<td height="15" align="left">Phone: your phone number</td>
</tr>
<tr>
<td height="15" align="left">your website address</td>
</tr>
<tr>
<td height="15" align="left"><br></td>
</tr>
<tr>
<td style="border-bottom: 1px solid #000000" height="17" align="left" bgcolor="#3B4E87"><strong><font color="white">BILL TO:</font></strong></td>
</tr>
<tr>
<td height="17" align="left">[name] [surname]</td>
</tr>
<tr>
<td height="17" align="left">[street] [street_number]</td>
</tr>
<tr>
<td height="17" align="left">[city] [region] [postal_code]</td>
</tr>
<tr>
<td height="17" align="left">[nation]</td>
</tr>
<tr>
<td height="17" align="left">[email]</td>
</tr>
<tr>
<td height="17" align="left"><br></td>
</tr>
<tr>
<td style="border-bottom: 1px solid #000000" height="17" align="left" bgcolor="#3B4E87"><strong><font color="white">Description</font></strong></td>
<td style="border-bottom: 1px solid #000000" align="center" bgcolor="#3B4E87"><strong><font color="white">Nights</font></strong></td>
<td style="border-bottom: 1px solid #000000" align="center" bgcolor="#3B4E87"><strong><font color="white">People</font></strong></td>
<td style="border-bottom: 1px solid #000000" align="center" bgcolor="#3B4E87"><strong><font color="white">Amount (JPY)</font></strong></td>
</tr>
<tr>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" height="17" align="left">[rate_name] ([starting_date] ~ [ending_date])</td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="center">[periods_num]</td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="center">[people_num]</td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="right" bgcolor="#E4E8F3">[rate_price_p]</td>
</tr>
[r3]
<tr>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" height="17" align="left">[extra_cost_name]</td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="center"></td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="center"></td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="right" bgcolor="#E4E8F3">[extra_cost_value_p]</td>
</tr>
[/r3]
<tr>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" height="17" align="left">Miscellaneous:</td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="center"><br></td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="center"><br></td>
<td style="border-left: 1px solid #000000; border-right: 1px solid #000000" align="right" bgcolor="#E4E8F3">-[discount_p]</td>
</tr>
<tr>
<td style="border-top: 1px solid #000000" height="17" align="center"><br></td>
<td style="border-top: 1px solid #000000" align="left"></td>
<td style="border-top: 1px solid #000000" align="left"><strong>TOTAL</strong></td>
<td style="border-top: 1px solid #000000" align="right" bgcolor="#E4E8F3">[price_tot_p]</td>
</tr>
<tr>
<td style="border-bottom: 1px solid #666666" height="17" align="left" bgcolor="silver"><b>OTHER COMMENTS</b></td>
<td align="left"><br></td>
<td align="left">VAT (5.0%)</td>
<td align="right">included</td>
</tr>
<tr>
<td style="border-top: 1px solid #666666; border-left: 1px solid #666666; border-right: 1px solid #666666" height="20" align="left" valign="top">comment 1</td>
<td align="left"><br></td>
<td align="left">Payments*</td>
<td align="right" bgcolor="#E4E8F3">[paid_p]</td>
</tr>
<tr>
<td style="border-left: 1px solid #666666; border-right: 1px solid #666666" height="17" align="left" valign="top">comment 2</td>
<td align="left"><br></td>
</tr>
<tr>
<td style="border-left: 1px solid #666666; border-right: 1px solid #666666" height="17" align="left" valign="top">comment 3</td>
<td align="left"><br></td>
<td align="left"><b>Rest To Pay</b></td>
<td align="right" bgcolor="#E4E8F3"><b>[rest_to_pay_p]</b></td>
</tr>
<tr>
<td style="border-left: 1px solid #666666; border-right: 1px solid #666666" height="17" align="left" valign="top">Notes:<br/>[comment]</td>
<td align="left"><br></td>
</tr>
<tr>
<td style="border-bottom: 1px solid #666666; border-left: 1px solid #666666; border-right: 1px solid #666666" height="17" align="left" valign="top">*Payment details:<br/>[all_payments_p]</td>
<td align="left"><br></td>
</tr>
<tr>
<td colspan="4" height="17" align="center"></td>
<td align="left"><br></td>
</tr>
<tr>
<td colspan="4" height="17" align="center"></td>
<td align="left"><br></td>
</tr>
<tr>
<td colspan="4" height="17" align="center">If you have any questions about this invoice, please contact:</td>
<td align="left"><br></td>
</tr>
<tr>
<td colspan="4" height="17" align="center">your email address</td>
</tr>
<tr>
<td height="17" align="left"><br></td>
</tr>
<tr>
<td colspan="6" height="20" align="center"><b><em><font size="3">Thank You For Your Booking!</font></em></b></td>
</tr>
</tbody>
</table>

Re: Documents (Invoices) templates

Posted: Thu Oct 21, 2010 1:53 pm
by rulez22
Wow, that looks fantastic!
Thanks man!
Marco, maybe you should include it in default setup?

Re: Documents (Invoices) templates

Posted: Fri Oct 22, 2010 1:38 am
by kyomar
I am glad you like it. Php-Residence is such a nice piece of software that it deserves more contributions/support from the various users. Marco, please feel free to include it.

Markus

Re: Documents (Invoices) templates

Posted: Mon Nov 01, 2010 6:11 am
by bluealmondhostel
awesome!

Re: Documents (Invoices) templates

Posted: Fri Mar 04, 2011 2:50 pm
by pernesarin
The template is very fine but to be a valid invoice it needs the daily price for the selected rate..does somebody know what variable to insert to do this?

Re: Documents (Invoices) templates

Posted: Mon Mar 14, 2011 2:19 am
by kyomar
When I created this template I tried to show daily prices but couldn't find out how to insert them. I guess we need Marco's help in this case - please Marco.

Re: Documents (Invoices) templates

Posted: Mon Apr 23, 2012 8:31 pm
by Xristiaan
Pretty nice example, very instructive

Chris

Re: Documents (Invoices) templates

Posted: Tue Dec 11, 2012 6:57 pm
by marco
A variable with daily prices in dates repetitions is in my TODO list for 2.0.3.

Regards,
Marco

Re: Documents (Invoices) templates

Posted: Fri Jan 04, 2013 12:15 pm
by Prokophs
You can use this template to email it from the system directly to the guest.
It is unbreakable also when sending to gmail ;-)

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Voucher or Invoice</title>
</head>
<body style="background-color:#e5e5e5; padding:20px; font-family:Arial, Helvetica, sans-serif; font-size:12px;">
<div id="page" style="width:700px; margin:0 auto; background-color:#f9f9f9; padding:20px; box-shadow:0 0 0.7in -0.25in #888">
    
    <div id="header" style="width:100%; background-color:#aaa; text-align:center; border-radius:2px;">
        <h3 style="font-weight:normal; color:#fff; letter-spacing:2px; text-transform:uppercase; padding:5px 0; font-size:150%;">Voucher</h3>
    </div>
    
    <hr class="break" style="width:100%; height:1px; border:none; margin:20px 0; clear:both;" />
  
    <div id="structureData" style="width:100%; text-align:right">
        <h3 style="font-weight:normal; font-size:140%;">Hotel Name</h3>
        <p>
            address line 1<br />
            address line 2<br />
            Phone<br />
            <a href="website">www.website.com</a>
        </p>
    </div>
    
    <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
    
    <div id="content">
        
        <div id="guestDetails" style="float:left; width:50%; height:100px;">
            <table style="width:100%">
                <tr><td colspan="2" style="font-weight:normal; text-align:left; padding:5px 5px 5px 0px;">Guest</td></tr>
                <tr>
                    <td colspan="2" style="text-align:left; padding:5px 5px 5px 0px;">[name] [surname]</td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align:left; padding:5px 5px 5px 0px;">[email]</td>
                </tr>
            </table>
        </div>
        
        <div id="voucherDetails" style="float:right; width:50%; height:100px; text-align:right;">
            <table style="float:right;">
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px; width:126px;">Voucher #</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px; width:124px;">[reservation_number]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Date</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">[today]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount Due</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[rest_to_pay_p]</td>
                </tr>
            </table>
        </div>
        
        <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
        
        <div id="bookingDetails" style="width:100%; display:inline;">
            
            <div id="bookingDescription" style="float:left; width:280px;">
                <table style="width:100%">
                    <tr><td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Description</td></tr>
                    <tr><td style="text-align:left;">[rate_name] ([starting_date] ~ [ending_date])</td></tr>
                    <tr><td style="text-align:left;">[sel_extra_cost_name]</td></tr>
                </table>
            </div>
            
            <div id="bookingNights" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:center; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Nights</td></tr>
                    <tr><td style="text-align:center;">[periods_num]</td></tr>
                </table>
            </div>
            
            <div id="bookingPeople" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:center; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">People</td></tr>
                    <tr><td style="text-align:center;">[people_num]</td></tr>
                </table>
            </div>
            
            <div id="bookingAmount" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:right; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount</td></tr>
                    <tr><td style="text-align:right;">€[rate_price_p]</td></tr>
                    <tr><td style="text-align:right;">€[sel_extra_cost_value_p]</td></tr>
                    <tr><td style="text-align:right;">-€[discount_p]</td></tr>
                </table>
            </div>
            
        </div>
        
        <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
        
        <div id="bookingAmount" style="width:100%;">
            <table style="float:right">
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px; width:124px;">Total</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px; width:126px;">€[price_tot_p]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount Paid</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[paid_p]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Balance Due</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[rest_to_pay_p]</td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr><td>&nbsp;</td></tr>
            </table>
        </div>
        
        <hr class="break" style="width:100%; height:1px; color:#bbb; background-color:#bbb; border:none; margin:30px 0; clear:both;" />
        
    <p>
      Thank you for your booking.<br />
      If you have any questions, please feel free to contact us at <a href="mailto:youremail">youremail</a>.
    </p>

    <hr class="break" style="width:100%; height:1px; color:#bbb; background-color:#bbb; border:none; margin:30px 0; clear:both;" />
    <p>
      <center><small>This communication is for the exclusive use of the addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient any use, copying, disclosure, dissemination or distribution is strictly prohibited.
      </small></center>
    </p>
  </div><!--end content-->
</div><!--end page-->
</body>

</html>

Re: Documents (Invoices) templates

Posted: Thu Dec 18, 2014 4:55 pm
by ashish
Hey
I am aware this is a very old thread but I found this useful, so thought I should give back.

If the problem with daily rates is still not resolved, this is what I did.

1. Create a new variable, say [daily_rate_price]
2. Create a new Condition "Put [daily_rate_price] equal to [rate_price] / [periods_num] (rounded to 0.01)."
3. Now the variable [daily_rate_price] holds the daily rate

Regards
Ashish

Re: Documents (Invoices) templates

Posted: Sun Jan 06, 2019 1:16 pm
by mdb91
Q2 SOLVED:

Create custom var [extra_cost_numdays]
Put [extra_cost_numdays] equal to [extra_cost_value] / [extra_cost_max_daily_value] (rounded to 1) only inside repetitions of extra costs.

Hello everyone!

I used this template as well and so far it is working well for me. I had some difficulty showing the extra costs correctly, after a repetition code ([r3/r3]) I managed to do that.

2 questions however:

1. Is there a way to order the extra costs in this file? (Extra beds, Discounts).
2. In the reservation I can choose days for extra costs. EX: €10,00 for X days multiplied by 1. I would the X te correspond with the Nights column for extra costs. Any ideas?

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Invoice</title>
</head>
<body style="background-color:#e5e5e5; padding:20px; font-family:Arial, Helvetica, sans-serif; font-size:12px;">
<div id="page" style="width:700px; margin:0 auto; background-color:#f9f9f9; padding:20px; box-shadow:0 0 0.7in -0.25in #888">
   
    <div id="header" style="width:100%; background-color:#aaa; text-align:center; border-radius:2px;">
        <h3 style="font-weight:normal; color:#fff; letter-spacing:2px; text-transform:uppercase; padding:5px 0; font-size:150%;">Invoice</h3>
    </div>

    <hr class="break" style="width:100%; height:1px; border:none; margin:20px 0; clear:both;" />

    <div id="logo" style="width:100%; text-align:center">
        <img src="http://osdoisgalos.com/img/logo.png" alt="Hotel Logo" style="width:426px;height:85px;">
    </div>

    <hr class="break" style="width:100%; height:1px; border:none; margin:20px 0; clear:both;" />
 
    <div id="structureData" style="width:100%; text-align:right">
        <h3 style="font-weight:normal; font-size:140%;">[structure_name]</h3>
        <p>
            [structure_address]<br />
            [structure_postal_code] [structure_city]<br />
            T: [structure_telephone]<br />
            M: +351 915467768<br />
            <a href="website">[structure_website]</a>
        </p>
    </div>
   
    <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
   
    <div id="content">
       
        <div id="guestDetails" style="float:left; width:50%; height:100px;">
            <table style="width:100%">
                <tr><td colspan="2" style="font-weight:normal; text-align:left; padding:5px 5px 5px 0px;">Guest</td></tr>
                <tr>
                    <td colspan="2" style="text-align:left; padding:5px 5px 5px 0px;">[name], [surname]</td>
                </tr>
                 <tr>
                    <td colspan="2" style="text-align:left; padding:5px 5px 5px 0px;">[street], [postal_code] [city], [nation]</td>
                </tr>
                 <tr>
                    <td colspan="2" style="text-align:left; padding:5px 5px 5px 0px;">[telephone], [email]</td>
                </tr>
            </table>
        </div>
       
        <div id="voucherDetails" style="float:right; width:50%; height:100px; text-align:right;">
            <table style="float:right;">
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px; width:126px;">Voucher #</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px; width:124px;">[reservation_number]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Date</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">[today]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount Due</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[rest_to_pay_p]</td>
                </tr>
            </table>
        </div>
       
        <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
       
        <div id="bookingDetails" style="width:100%; display:inline;">
           
            <div id="bookingDescription" style="float:left; width:280px;">
                <table style="width:100%">
                    <tr><td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Description</td></tr>
                    <tr><td style="text-align:left;">[rate_name] ([starting_date] - [ending_date])</td></tr>
<tr><td style="text-align:left;">[r3][extra_cost_name]<br>
[/r3]</td></tr>                  
                </table>
            </div>
           
            <div id="bookingNights" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:center; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Nights</td></tr>
                    <tr><td style="text-align:center;">[periods_num]</td></tr>
<tr><td style="text-align:center;">[extra_cost_days]</td></tr>
<tr><td style="text-align:center;">[r3][periods_num]<br>
[/r3]</td></tr>
                </table>
            </div>
           
            <div id="bookingPeople" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:center; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">People</td></tr>
                    <tr><td style="text-align:center;">[people_num]</td></tr>
                </table>
            </div>
           
            <div id="bookingAmount" style="float:left; width:140px;">
                <table style="width:100%">
                    <tr><td style="text-align:right; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount</td></tr>
                    <tr><td style="text-align:right;">€ [rate_price_p]</td></tr>
                    <tr><td style="text-align:right;">[r3]€ [extra_cost_value]<br>
[/r3]</td></tr>
                </table>
            </div>
           
        </div>
       
        <hr class="break" style="width:100%; height:1px; border:none; margin:30px 0; clear:both;" />
       
        <div id="bookingAmount" style="width:100%;">
            <table style="float:right">
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px; width:124px;">Total</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px; width:126px;">€[price_tot_p]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Amount Paid</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[paid_p]</td>
                </tr>
                <tr>
                    <td style="text-align:left; border:1px solid #bbb; padding:5px; background-color:#ddd; border-radius:2px">Balance Due</td>
                    <td style="text-align:right; border:1px solid #bbb; padding:5px; border-radius:2px">€[rest_to_pay_p]</td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr><td>&nbsp;</td></tr>
            </table>
        </div>
       
        <hr class="break" style="width:100%; height:1px; color:#bbb; background-color:#bbb; border:none; margin:30px 0; clear:both;" />
       
    <p>
      Thank you for your booking.<br />
The deposit is refundable up to 1 month before arrival in mid/low season and 2 months before arrival in high season (01/07/2019-09/09/2019).<br /> 
In case of no-show the deposit will not be refunded and the reservation will be cancelled.<br />    
If you have any questions, please feel free to contact us at <a href="mailto:youremail">[structure_email]</a>.
    </p>

    <hr class="break" style="width:100%; height:1px; color:#bbb; background-color:#bbb; border:none; margin:30px 0; clear:both;" />
    <p>
      <center><small>This communication is for the exclusive use of the addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient any use, copying, disclosure, dissemination or distribution is strictly prohibited.
      </small></center>
    </p>
  </div><!--end content-->
</div><!--end page-->
</body>

</html>

Re: Documents (Invoices) templates

Posted: Fri Feb 22, 2019 1:10 am
by ddam
mdb91 wrote: Sun Jan 06, 2019 1:16 pm 1. Is there a way to order the extra costs in this file? (Extra beds, Discounts).
If I understand you right, you want to change the order of extra-costs inside this document ? Just do the following:
  • open a text editor (e.g. notepad), copy/paste the text from your hoteldruid document, save and close
  • open that file with a word processor (e.g. libreoffice writer), change it to what you like, save and close
  • open the file again with the text editor and copy/paste everything back into your hoteldruid document
mdb91 wrote: Sun Jan 06, 2019 1:16 pm 2. In the reservation I can choose days for extra costs. EX: €10,00 for X days multiplied by 1. I would the X te correspond with the Nights column for extra costs. Any ideas?
Please rephrase, not sure what you mean.