User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.

Differences

This shows you the differences between the selected revision and the current version of the page.

wiki:template_-_no_labels 2014/12/12 23:02 wiki:template_-_no_labels 2016/10/11 06:15 current
Line 1: Line 1:
 +==== Template - No Labels ====
 +This is modified to remove the labels and rearrange the Invoice Summary, add a PAID stamp which displays only when the $invoice.owing amount equals zero, plus add a PayPal button (passes $customer.name,$invoice.id and $invoice.total to PayPal)which works in both print preview and PDF but only when $invoice.owing amount is NOT equal to zero.
 +
 +==== Version tested against ====
 +20080629 stable
 +
 +==== Developed by ====
 +seesaw
 +
 +Chris Straughton
 +
 +==== To Edit ====
 +Search for these items and replace with your details.
 +
 +**Your Name** (this is the name your cheques are made payable to) *optional
 +
 +**[email protected]%2ecom** (this is the email address that paypal link will send payment to)
 +
 +==== File Edit ====
 +**style.css**  (edit this file and add the following code (edit the path-to-paid.gif)
 +<code>.rec {
 +background-image: url("path-to-paid.gif");
 +background-repeat: no-repeat;
 +background-position: 55% 10%;
 +}
 +</code>
 +
 +**paid.gif**  (save this image to your server in the path detailed above)
 +
 +{{:wiki:paid.gif|}}
 +
 +
 +==== Template ====
 +
 +<code><html>
 +<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 +<link rel="stylesheet" type="text/css" href="{$css}">
 +<title>{$customer.name} - {$preference.pref_inv_wording} {$LANG.number_short}{$invoice.index_id}</title>
 +</head> {php}
 +global $customer;
 +{/php}
 +
 +      {if $invoice.owing == 0.00 }
 +<body class="rec">
 +
 +
 +        {else}
 +<body>
 +        {/if}
 +<br>
 +<div id="container">
 + <div id="header">
 + </div>
 +
 + <table width="100%" align="center">
 + <tr>
 + <th align="left"><span><h1>{$preference.pref_inv_heading}</h1></span></th><td colspan="5"><img src="{$logo}"
 +
 +border="0" hspace="0" align="right"></td>
 +
 + </tr>
 + </table>
 +
 +
 +
 +<!-- Biller section - start -->
 + 
 +<table class="right">       
 +
 +       
 +     
 +<tr >
 +<td class='tbl1-right' align='right' >{$biller.street_address}</td>
 +</tr> 
 +
 +
 +<tr >
 +<td class='tbl1-right' align='right' >{$biller.street_address2}</td>
 +</tr> 
 +<tr >
 +<td class='tbl1-right' align='right'> {$biller.city}
 +        </td>
 +</tr> <tr>
 +
 +<td class='tbl1-right' align='right' >{$biller.zip_code}</td>
 + </tr>
 +<tr><td class='tbl1-right' align='right' >{$biller.phone}</td></tr>
 +<tr><td class='tbl1-right' align='right' ><a href="mailto:{$biller.email}">{$biller.email}</a></td></tr>
 +<tr><td class='tbl1-right' align='right' >{$biller.custom_field1}</td></tr>   
 +</table>
 +<!-- Biller section - end -->
 +
 +
 +<br>
 +<!-- Customer section - start --> <table class="left">
 +
 +   
 + <tr>
 + <td class="tbl1-left tbl1-top tbl1-bottom col11" ><b></b></td>
 + <td class="tbl1-top tbl1-bottom col11 tbl1-right" colspan="3"><b>{$customer.name}</b></td>
 + </tr>
 +
 +        {if $customer.attention != null }
 +    <tr>
 +            <td class='tbl1-left'></td>
 + <td align=left class='tbl1-right' colspan="3" >{$customer.attention}</td>
 +                </tr>
 +      {/if}
 +        {if $customer.street_address != null }
 +    <tr >
 +            <td class='tbl1-left'></td>
 + <td class='tbl1-right' align=left colspan="3">{$customer.street_address}</td>
 +    </tr> 
 +        {/if}
 +        {if $customer.street_address2 != null}
 +                {if $customer.street_address == null}
 +    <tr>
 +            <td class='tbl1-left'></td>
 + <td class='tbl1-right' align=left colspan="3">{$customer.street_address2}</td>
 +    </tr> 
 +                {/if}
 +                {if $customer.street_address != null}
 +    <tr>
 + <td class='tbl1-left'></td>
 + <td class='tbl1-right' align=left colspan="3">{$customer.street_address2}</td>
 +    </tr> 
 +                {/if}
 +        {/if}
 +
 + {merge_address field1=$customer.city field2=$customer.state field3=$customer.zip_code street1=$customer.street_address
 +
 +street2=$customer.street_addtess2 class1="tbl1-left" class2="tbl1-right" colspan="3"}
 +
 +        {if $customer.country != null}
 +    <tr>
 +            <td class='tbl1-left'></td>
 + <td class='tbl1-right' colspan="3">{$customer.country}</td>
 +    </tr>
 +        {/if}
 +
 +{if $customer.phone != null}
 +    <tr>
 +            <td class='tbl1-left'></td>
 + <td class='tbl1-right' colspan="3">{$customer.phone}</td>
 +
 +    </tr>
 +        {/if}
 +
 +{if $customer.mobile_phone != null}
 +    <tr>
 +            <td class='tbl1-left'></td>
 + <td class='tbl1-right' colspan="3">{$customer.mobile_phone}</td>
 +    </tr>
 +        {/if}
 +
 +{if $customer.email != null}
 +    <tr>
 +            <td class='tbl1-left'></td>
 + <td class='tbl1-right' colspan="3"><a href="mailto:{$customer.email}">{$customer.email}</a></td>
 +    </tr>
 +        {/if}
 +
 +
 +
 + {print_if_not_null label=$customFieldLabels.customer_cf1 field=$customer.custom_field1 class1='tbl1-left' class2='tbl1-right'
 +
 +colspan="3"}
 + {print_if_not_null label=$customFieldLabels.customer_cf2 field=$customer.custom_field2 class1='tbl1-left' class2='tbl1-right'
 +
 +colspan="3"}
 + {print_if_not_null label=$customFieldLabels.customer_cf3 field=$customer.custom_field3 class1='tbl1-left' class2='tbl1-right'
 +
 +colspan="3"}
 + {print_if_not_null label=$customFieldLabels.customer_cf4 field=$customer.custom_field4 class1='tbl1-left' class2='tbl1-right'
 +
 +colspan="3"}
 +
 + <tr>
 + <td class="tbl1-top" colspan="4"></td>
 + </tr>
 + </table>
 +
 + <br><!-- Customer section - end -->
 +
 +<br>
 +<!-- Summary - start -->
 +<table width=100% >
 +<tr>
 +<td align="center" colspan=5 class="col11 tbl1"><b>{$preference.pref_inv_wording} {$LANG.summary}</b></td>
 +</tr>
 +<tr class="col1">
 +<td width=20% align="center"><b>{$preference.pref_inv_wording} {$LANG.number_short}</b></td>
 +<td width=20% align="center"><b>{$preference.pref_inv_wording} {$LANG.date}</b></td>
 +
 +<!-- Show the Invoice Custom Fields if valid -->
 +
 +{ if $invoice.custom_field1 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf1}</td>
 + <td class="tbl1-left">{$invoice.custom_field1}</td>
 + {/if}
 + { if $invoice.custom_field2 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf2}</td>
 + <td class="tbl1-left">{$invoice.custom_field2}</td>
 + {/if}
 + { if $invoice.custom_field3 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf3}</td>
 + <td class="tbl1-left">{$invoice.custom_field3}</td>
 + {/if}
 + { if $invoice.custom_field4 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf4}</td>
 + <td class="tbl1-left">{$invoice.custom_field4}</td>{/if}
 +
 +<td width=20% align="center"><b>{$LANG.total}</b></td>
 +<td width=20% align="center"><b>{$LANG.paid}</b></td>
 +<td width=20% align="center"><b>{$LANG.owing}</b></td>
 +</tr>
 +
 +<tr class="col11">
 +<td width=20% align="center">{$invoice.index_id}</td>
 +<td width=20% align="center">{$invoice.date}</td>
 +
 +<!-- Show the Invoice Custom Fields if valid -->
 + { if $invoice.custom_field1 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf1}:</td> <td
 +
 +class="tbl1-left">{$invoice.custom_field1}</td> {/if} { if $invoice.custom_field2 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf2}</td>
 +
 +<td class="tbl1-left">{$invoice.custom_field2}</td>
 + {/if} { if $invoice.custom_field3 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf3}</td>
 +
 +<td class="tbl1-left">{$invoice.custom_field3}</td>
 + {/if} { if $invoice.custom_field4 != null}
 + <td nowrap class="tbl1-left">{$customFieldLabels.invoice_cf4}</td>
 +
 +<td class="tbl1-left">{$invoice.custom_field4}</td> {/if}
 +
 +<td width=20% align="center">{$preference.pref_currency_sign}{$invoice.total|number_format:2}</td>
 +<td width=20% align="center">{$preference.pref_currency_sign}{$invoice.paid|number_format:2}</td>
 +<td width=20% align="center">{$preference.pref_currency_sign}{$invoice.owing|number_format:2}</td>
 +</tr>
 +</table>
 +
 +<!-- Summary - end -->
 +<br>
 +
 +<!-- Invoice items - start --> <table class="left" width="100%">
 + <tr>
 + <td colspan="6"><br /></td>
 + </tr>
 +
 + {if $invoice.type_id == 2 }
 + <tr class="col1">
 + <td class="tbl1 "><b>{$LANG.quantity_short}</b></td>
 + <td class="tbl1 "><b>{$LANG.description}</b></td>
 + <td class="tbl1 "><b>{$LANG.unit_price}</b></td>
 + <td class="tbl1 "><b>{$LANG.gross_total}</b></td>
 + <td class="tbl1 "><b>{$LANG.tax}</b></td>
 + <td class="tbl1 " align="right"><b>{$LANG.total_uppercase}</b></td>
 + </tr>
 +
 + {foreach from=$invoiceItems item=invoiceItem}
 +
 + <tr class="tbl1" >
 + <td class="tbl1">{$invoiceItem.quantity|number_format:2}</td>
 + <td class="tbl1">{$invoiceItem.product.description}</td>
 + <td class="tbl1">{$preference.pref_currency_sign}{$invoiceItem.unit_price|number_format:2}</td>
 + <td class="tbl1">{$preference.pref_currency_sign}{$invoiceItem.gross_total|number_format:2}</td>
 + <td class="tbl1">{$preference.pref_currency_sign}{$invoiceItem.tax_amount|number_format:2}</td>
 + <td class="tbl1" align="right">{$preference.pref_currency_sign}{$invoiceItem.total|number_format:2}</td>
 + </tr>
 +            <tr>
 +                <td class="tbl1-left"></td>
 + <td class="tbl1-right" colspan="5">
 + <table width="100%">
 + <tr>
 +
 + {inv_itemised_cf label=$customFieldLabels.product_cf1 field=$invoiceItem.product.custom_field1}
 + {do_tr number=1 class="blank-class"}
 + {inv_itemised_cf label=$customFieldLabels.product_cf2 field=$invoiceItem.product.custom_field2}
 + {do_tr number=2 class="blank-class"}
 + {inv_itemised_cf label=$customFieldLabels.product_cf3 field=$invoiceItem.product.custom_field3}
 + {do_tr number=3 class="blank-class"}
 + {inv_itemised_cf label=$customFieldLabels.product_cf4 field=$invoiceItem.product.custom_field4}
 + {do_tr number=4 class="blank-class"}
 +
 + </tr>
 + </table>
 +                </td>
 +            </tr>
 +            {/foreach}
 + {/if}
 +
 + {if $invoice.type_id == 3 }
 + <tr class="tbl1 col1">
 + <td class="tbl1"><b>{$LANG.quantity_short}</b></td>
 + <td class="tbl1"><b>{$LANG.item}</b></td>
 + <td class="tbl1"><b>{$LANG.unit_price}</b></td>
 + <td class="tbl1"><b>{$LANG.gross_total}</b></td>
 + <td class="tbl1"><b>{$LANG.tax}</b></td>
 + <td align="right" class="tbl1"><b>{$LANG.total_uppercase}</b></td>
 + </tr>
 +
 + {foreach from=$invoiceItems item=invoiceItem}
 +
 + <tr class="tbl1-left tbl1-right">
 + <td class="tbl1-left" >{$invoiceItem.quantity|number_format:2}</td>
 + <td>{$invoiceItem.product.description}</td>
 + <td class="tbl1-right" colspan="4"></td>
 + </tr>
 +
 +            <tr>     
 +                <td class="tbl1-left"></td>
 + <td class="tbl1-right" colspan="5">
 +                    <table width="100%">
 +                        <tr>
 +
 + {inv_itemised_cf label=$customFieldLabels.product_cf1 field=$invoiceItem.product.custom_field1}
 + {do_tr number=1 class="blank-class"}
 + {inv_itemised_cf label=$customFieldLabels.product_cf2 field=$invoiceItem.product.custom_field2}
 + {do_tr number=2 class="blank-class"}
 + {inv_itemised_cf label=$customFieldLabels.product_cf3 field=$invoiceItem.product.custom_field3}
 + {do_tr number=3 class="blank-class"}
 + {inv_itemised_cf label=$customFieldLabels.product_cf4 field=$invoiceItem.product.custom_field4}
 + {do_tr number=4 class="blank-class"}
 +
 +                        </tr>
 +                    </table>
 +                </td>
 +            </tr>
 +
 + <tr class="tbl1-left tbl1-right">
 + <td class="tbl1-left"></td>
 + <td class="tbl1-right" colspan="5"><font size=1>{$invoiceItem.description}</font></td>
 + </tr>
 + <tr class="tbl1-left tbl1-right tbl1-bottom">
 + <td class="tbl1-left tbl1-bottom" ></td>
 + <td class="tbl1-bottom"></td>
 + <td class="tbl1-bottom">{$preference.pref_currency_sign}{$invoiceItem.unit_price|number_format:2}</td>
 + <td class="tbl1-bottom">{$preference.pref_currency_sign}{$invoiceItem.gross_total|number_format:2}</td>
 + <td class="tbl1-bottom ">{$preference.pref_currency_sign}{$invoiceItem.tax_amount|number_format:2}</td>
 + <td align="right" class="tbl1-right
 +
 +tbl1-bottom">{$preference.pref_currency_sign}{$invoiceItem.total|number_format:2}</td>
 + </tr>
 + {/foreach}
 + {/if}
 +
 + {if $invoice.type_id == 1 }
 +     <table class="left" width="100%">
 +
 +                <tr class="tbl1 col1" >
 +                    <td class="tbl1 col11 tbl1-right" colspan="6"><b>{$LANG.description}</b></td>
 +                </tr>
 +               
 +          {foreach from=$invoiceItems item= invoiceItem}
 +
 +     <tr class="tbl1-left tbl1-right">
 +                    <td class="tbl1-left tbl1-right" colspan="6">{$invoiceItem.description}</td>
 +                </tr>
 +                <tr class="tbl1-left tbl1-right">
 +                    <td colspan="6" class="tbl1-left tbl1-right"><br></td>
 +                </tr>
 +
 + {/foreach}
 + {/if}
 +
 +{if ($invoice.type_id == 2 && $invoice.note != "") || ($invoice.type_id == 3 && $invoice.note != "" )  }
 +
 + <tr>
 + <td class="tbl1-left tbl1-right" colspan="6"><br></td>
 + </tr>
 + <tr>
 + <td class="tbl1-left tbl1-right" colspan="6" align="left"><b>{$LANG.notes}:</b></td>
 + </tr>
 + <tr>
 + <td class="tbl1-left tbl1-right" colspan="6">{$invoice.note}</td>
 + </tr>
 +
 +{/if}
 +
 + <tr class="tbl1-left tbl1-right">
 + <td class="tbl1-left tbl1-right" colspan="6" ><br></td>
 + </tr>
 +
 + <tr>
 + <td class="tbl1-left" colspan="2"></td>
 + <td align="right" colspan="3">{$LANG.gross_total}</td>
 +{php}  global $invoice; $this->assign('invoice_gross_total', $invoice[total] - $invoice[total_tax]); {/php}
 +{if $invoice.type_id == 1} <!-- Only Type 1 is a single entry - hence last row gross is valid as gross_total - see Invoice 2 in sample
 +
 +data-->
 + <td align="right" class="tbl1-right">{$preference.pref_currency_sign}{$invoiceItems.0.gross_total|number_format:2}</td>
 +{else}
 + <td align="right" class="tbl1-right">{$preference.pref_currency_sign}{$invoice_gross_total|number_format:2}</td>
 +{/if}
 + </tr>
 + <tr class="tbl1-left tbl1-right">
 + <td class="tbl1-left" colspan="2"></td>
 + <td align="right" colspan="3">{$LANG.tax_total}</td>
 + <td align="right" class="tbl1-right" >{$preference.pref_currency_sign}{$invoice.total_tax|number_format:2}</td>
 + </tr>
 + <tr class="tbl1-left tbl1-right">
 + <td class="tbl1-left tbl1-right" colspan="6" ><br></td>
 + </tr>
 + <tr class="tbl1-left tbl1-right tbl1-bottom">
 + <td class="tbl1-left tbl1-bottom" colspan="2"></td>
 + <td class="tbl1-bottom" align="right" colspan="3"><b>{$preference.pref_inv_wording} {$LANG.amount}</b></td>
 + <td  class="tbl1-bottom tbl1-right"
 +
 +align="right"><u>{$preference.pref_currency_sign}{$invoice.total|number_format:2}</u></td>
 + </tr>
 + <tr>
 + <td colspan="6"><br /><br /></td>
 + </tr>
 +
 +
 +<!-- invoice items section - end -->
 +
 +<!-- invoice details section - start -->
 +
 + <tr>
 + <td class="tbl1-left tbl1-right" colspan="6"><i>{$preference.pref_inv_detail_line}</i></td>
 + </tr>
 + <tr>
 + <td class="tbl1-left tbl1-right" colspan="6">{$preference.pref_inv_payment_method}</td>
 + </tr>
 + <tr>
 + <td class="tbl1-left tbl1-right" colspan="6">{$preference.pref_inv_payment_line1_name}
 +
 +{$preference.pref_inv_payment_line1_value}</td>
 + </tr>
 + <tr>
 + <td class="tbl1-left tbl1-bottom tbl1-right" colspan="6">{$preference.pref_inv_payment_line2_name}
 +
 +{$preference.pref_inv_payment_line2_value}</td>
 + </tr>
 + <tr>
 + <td><br></td>
 + </tr>{if $invoice.owing == 0.00 }<tr align=center><td colspan=6>--- paid with thanks ---<br><br></td>{else}<tr><td colspan=6><div
 +
 +align="center" style="font-family: arial; font-size: 11pt; color: blue">Please make cheques payable to</td></tr><tr><td colspan=6><div
 +
 +align="center" style="font-family: arial; font-size: 12pt; color: red"><b>Your Name</b><br><br></td></tr><tr><td width=100%
 +
 +colspan=6><div align="center" style="font-family: arial; font-size: 11pt; color: blue">Secure Online Payment via PayPal
 +
 +<br>
 +{php} print '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&[email protected]%2ecom&item_name='.$customer[name].' -
 +
 +Invoice No: ' .
 +
 +$invoice[id].'&amount='.$invoice[total].'&no_shipping=0&no_note=1&currency_code=GBP&lc=GB&bn=PP%2dBuyNowBF&charset=UTF%2d8"
 +
 +target="_blank"><img src="https://www.paypal.com/en_GB/i/btn/btn_paynow_LG.gif" border=0></a>'; {/php}
 +</div><br><br>
 +
 +
 +</td></tr>{/if}
 +
 +
 + <tr>
 + <td colspan="6"><div style="font-size:8pt;" align="center">{$biller.footer}</div></td>
 + </tr>
 +
 + <!-- invoice details section - end -->
 +
 +</table>
 +
 +<div id="footer"></div>
 +
 +</div>
 +
 +</body>
 +</html></code>
 +
 +==== Preview ====
 +
 +{{:wiki:no_label_preview.png|}} {{:wiki:no_label_preview_1.png|}}
 +
 +~~DISCUSSION~~
 +
 +
 
 |