Bei derfolgenden Nach der vierten Position erfolgt ein Pagebreak. Auf den Folgeseiten nach jeder fünften Position.
Nach Wunsch kann der Pagebreak auch bei weniger Positionen erfolgen.
Des Weiteren können nun auch manuelle Positionen auf der Rechnung ausgegeben werden.
Bei der folgenden Rechnung handelt es sich um ein Muster.
Hier wird nach jeder 3. Position ein Pagebreak erzwungen.
Codeblock | ||||
---|---|---|---|---|
| ||||
<table width="100%" cellpadding="1" cellspacing="1" border="0" style="font-family: Arial;"> <tr> <td colspan="8"> {if $orderObject->get('InvoiceAdressName')} {if $orderObject->get('InvoiceAdressCompany1')}{$orderObject->get('InvoiceAdressCompany1')}<br> {/if} {if $orderObject->get('InvoiceAdressCompany2')}{$orderObject->get('InvoiceAdressCompany2')}<br> {/if} {if $orderObject->get('InvoiceAdressName')}{$orderObject->get('InvoiceAdressName')}<br> {/if} {if $orderObject->get('InvoiceAdressStreet')}{$orderObject->get('InvoiceAdressStreet')}<br> {/if} {if $orderObject->get('InvoiceAdressZIP')}{$orderObject->get('InvoiceAdressZIP')} {if $orderObject->get('InvoiceAdressTown')}{$orderObject->get('InvoiceAdressTown')}<br> {/if}{/if} {if $orderObject->get('InvoiceAdressCountry')}{$orderObject->get('InvoiceAdressCountry')}<br>{/if} {else} {if $orderObject->get('order_DeliverAdressCompany')}{$orderObject->get('order_DeliverAdressCompany')}<br> {/if} {if $orderObject->get('order_DeliverAdressCompany2')}{$orderObject->get('order_DeliverAdressCompany2')}<br> {/if} {if $orderObject->get('order_DeliverAdressName')}{$orderObject->get('order_DeliverAdressName')}<br> {/if} {if $orderObject->get('order_DeliverAdressStreet')}{$orderObject->get('order_DeliverAdressStreet')}<br> {/if} {if $orderObject->get('order_DeliverAdressZIP')}{$orderObject->get('order_DeliverAdressZIP')} {if $orderObject->get('order_DeliverAdressTown')}{$orderObject->get('order_DeliverAdressTown')}<br> {/if}{/if} {if $orderObject->get('order_DeliverAdressCountry')}{$orderObject->get('order_DeliverAdressCountry')}<br> {/if} {/if} <br><br> <br> <br> <br> <br> <span style="float:right"> {if $orderObject->get('date_of_invoice')=="0000-00-00"} {$orderObject->get('cdate')|date_format:"%d.%m.%Y"} {else} {$orderObject->get('date_of_invoice')|date_format:"%d.%m.%Y"} {/if} </span> <strong style="font-size:15pt">Rechnung</strong><br> <br> {if $orderObject->getInvoiceNumber()} Rechnungs-Nr. {$orderObject->getInvoiceNumber()}{else}Rechnungs-Nr. {$orderObject->get('invoice_number')}<br>{/if} Auftrags-Nr. {$orderObject->getOrderCode()}<br> {if $orderObject->getCustomerUser() && $orderObject->getCustomerUser()->get('customer_user_kundennummer')}Kunden-Nr.{$orderObject->getCustomerUser()->get('customer_user_kundennummer')}{/if} <br> <br> <br> <br> Sehr geehrte Damen und Herren,<br> <br> für Ihre Bestellung vom {$orderObject->get('cdate')|date_format:"%d.%m.%Y"} bei {$ShopURL} mit der Auftragsnummer {$OrderCode} erlauben wir uns in Rechnung zu stellen: <br> <br> <br> <br></td> </tr> <tr> <td>Pos.</td> <td width="20"> </td> <td>Artikelnummer</td> <td width="20"> </td> <td>Produkt</td> <td align="right">Menge</td> <td width="20" align="right"></td> <td align="right"> Summe</td> </tr> {if isset($countPos)} {assign var="countPos" value="0"} {/if} {counter print=false start=1 skip=1 assign=countPos} {foreach from=$orderObject->getOrderCart() item=item key=cartId} {if $item->get('aid')>0} <tr style="padding:3px;"> <td colspan="8" height="1" bgcolor="#000000"></td> </tr> <tr style="padding:3px;"> <td valign="top">{$countPos}</td> <td valign="top"> </td> <td valign="top">{$item->get('aid')}</td> <td valign="top"> </td> <td valign="top"> {$item->get('s_desc')} <br> <span class="small">{$item->getArticle()->get('article_fulldesc')}</span></br></td> <td align="right" valign="top" nowrap> {$item->get('quantity_value')} Stück</td> <td align="right" valign="top"></td> <td align="right" valign="top" nowrap> {($item->get('s_ntotal')/100)|string_format:"%.2f"} EUR</td> </tr> {foreach from=$item->getChildItems() item=childItem key=childId} <tr style="font-size:5pt"> <td></td> <td></td> <td> </td> <td valign="top" class="small" > </td> <td valign="top" class="small" >{$childItem->get('s_desc')}</td> <td align="right" valign="top"> </td> <td align="right" valign="top"></td> <td align="right" valign="top" nowrap >{($childItem->get('s_ntotal')/100)|string_format:"%.2f"} EUR</td> </tr> {/foreach} {if $countPos == 4 } EUR</td> </table> <div style="PAGE-BREAK-AFTER: always;"></div> <table width="100%" cellpadding="1" cellspacing="1" border="0" style="font-family: Arial;"> {if $countPos < $orderObject->countOrderCartPosition()} <tr > <td>Pos.</td> <td width="20"> </td> <td>Artikelnummer</td> <td width="20"> </td> <td>Produkt</td> <td align="right">Menge</td> <td width="20" align="right"></td> <td align="right"> Summe</td> </tr> {else} <tr><td colspan="8"></td><tr> {/if} {/if} {if $countPos == 9 } </table> <div style="PAGE-BREAK-AFTER: always;"></div> <table width="100%" cellpadding="1" cellspacing="1" border="0" style="font-family: Arial;"> {if $countPos < $orderObject->countOrderCartPosition()} <tr > <td>Pos.</td> <td width="20"> </td> <td>Artikelnummer</td> <td width="20"> </td> <td>Produkt</td> <td align="right">Menge</td> <td width="20" align="right"></td> <td align="right"> Summe</td> </tr> {else} <tr><td colspan="8"></td><tr> {/if} {/if} {if $countPos == 14 } </table> <div style="PAGE-BREAK-AFTER: always;"></div> <table width="100%" cellpadding="1" cellspacing="1" border="0" style="font-family: Arial;"> {if $countPos < $orderObject->countOrderCartPosition()} <tr > <td>Pos.</td> <td width="20"> </td> <td>Artikelnummer</td> <td width="20"> </td> <td>Produkt</td> <td align="right">Menge</td> <td width="20" align="right"></td> <td align="right"> Summe</td> </tr> {else} <tr><td colspan="8"></td><tr> <{/tr>if} {/foreachif} {if $countPos % 3 == 19 0} </table> <div style="PAGE-BREAK-AFTER: always;"></div> <table width="100%" cellpadding="1" cellspacing="1" border="0" style="font-family: Arial;"> {if $countPos < $orderObject->countOrderCartPosition()} <tr > <td>Pos.</td> <td width="20"> </td> <td>Artikelnummer</td> <td width="20"> </td> <td>Produkt</td> <td align="right">Menge</td> <td width="20" align="right"></td> <td align="right"> Summe</td> </tr> {else} <tr><td colspan="8"></td><tr> {/if} {/if} {counter} {/if} {/foreach} <tr> <td colspan="8" height="1" bgcolor="#000000"></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td colspan="2">Versand & Verpackung</td> <td align="right"></td> <td align="right">{$orderObject->getTotalShipping()|string_format:"%.2f"} EUR</td> </tr> <tr> <td colspan="8" height="1" bgcolor="#000000"></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td colspan="2"> Nettopreis</td> <td align="right"></td> <td align="right" nowrap> {$NetTotal|string_format:"%.2f"} EUR</td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td colspan="2"> 19.00% MwSt</td> <td align="right"></td> <td align="right" nowrap> {$VAT|string_format:"%.2f"} EUR</td> </tr> <tr> <td colspan="8" height="1" bgcolor="#000000"></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td colspan="2"> Gesamtpreis</td> <td></td> <td align="right" nowrap> {$Total|string_format:"%.2f"} EUR</td> </tr> <tr > <td colspan="8" height="1" bgcolor="#000000"></td> </tr> <tr> <td colspan="8"> </td> </tr> </table> <br><br> {if $orderObject->getPayment()}Bezahlung durch {$orderObject->getPayment()->get('payment_desc')}<br><br>{/if} {foreach from=$orderObject->getPaymentFields() item=paymentField} {$paymentField->get('feldname')} : {$paymentField->get('wert')}<br> {/foreach} <br> Ohne Abzug von Skonto. <br><br> {if $orderObject->getPayment()}{$orderObject->getPayment()->get('payment_info_mail')}{/if} |