A template used for creating invoices in PDF format.
Kuvaus
PDF printout templates are now PDF themes.
From now on, the HTML templates for PDF printouts are defined in PDF themes, which are separate from the store theme. PDF themes are installed in the store's themes/print folder.
Any PDF templates included in the store themes will continue to function. However, we recommend you to create a designated PDF theme out of the printouts as soon as possible.
The invoice template is used only if one of MyCashflow's built-in payment services (Anticipated payment and Invoice) has been selected as the order payment method.
Invoices can be printed in the admin panel, in the {OrderDownloadInvoice}
tag.
It is often useful to add information regarding previous payments to the invoice – especially if the order is invoiced in installments.
You can see the template's HTML output in the admin panel by defining the page's URL address in the following way:
/flow/kuitti.php?t=invoice&tilaus=ORDERNUMBER&pdf=false
The template's HTML file is converted intothe PDF format by using the Prince XML program, which has a robust CSS support and, to some extent, supports JavaScript as well.
To see instructions for designers, check the program's user guide.
Sivupohjan ominaisuudet
- Sivupohjan sijainti
- themes/print/THEME/invoice.html
- Sivupohjan URL
- The printouts do not have a URL address.
- Asetettu näkyvyys
Toteutus oletusteemassa
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{%Invoice} {OrderNumber}</title>
<link rel="stylesheet" type="text/css" href="{ThemeUrl}/css/printables.css?date=20170803"/>
</head>
<body>
<div id="ReceiptHeader">
<div id="Logo">
{Logo}
</div>
<div id="ReceiptTitle">
<h4>{ShopName}</h4>
<h1>{%Invoice} {OrderNumber}</h1>
</div>
</div>
<div id="InfoWrapper">
<div id="ShippingAddress">
{OrderShippingCompany(after:'<br/>')}
{OrderShippingName(after:'<br/>')}
{OrderShippingAddress(after:'<br/>')}
{OrderShippingZip}
{OrderShippingCity(after:'<br/>')}
{OrderShippingCountry(after:'<br/>')}
{OrderShippingEmail(after:'<br/>')}
{OrderShippingPhone}
</div>
<div id="OrderInfo">
<dl>
<dt>{%CheckoutCustomerInformation}</dt>
<dd>{OrderCustomerInformation}</dd>
</dl>
{OrderInfo}
</div>
</div>
{OrderProducts(
before: '
<div id="PrintProducts">
<table>
<thead>
<tr>
<th scope="col" class="CartProduct">{%Product}</th>
<th scope="col">{%ShippingDate}</th>
<th scope="col">{%Quantity}</th>
<th scope="col">{%Price}</th>
<th scope="col" class="CartTotal">{%Total}</th>
</tr>
</thead>
',
helper: '{{
<tr>
<th class="CartProduct">
<h3>
{OrderProductName}
{OrderProductVariation(before: ' <br/><em class="ProductVariation">',after:'</em>')}
{OrderProductDownloadLink(before: ' <br/><span style="font-weight: normal;">{%ProductDownload}: </span><strong class="ProductDownloadLink">',after:'</strong>')}
</h3>
{OrderProductCode(
before: '<dl><dt>{%ProductCode}</dt><dd>',
after: '</dd></dl>'
)}
{OrderProductWarranty(
before: '<dl><dt>{%Warranty}</dt><dd>',
after: ' {%Months}</dd></dl>'
)}
{OrderProductChoices}
</th>
<td>{OrderProductShippingStatus}</td>
<td>{OrderProductQuantity}</td>
<td>
{OrderProductPrice(
after: '<br><small>{%VAT} {OrderProductTaxRate(after:'%')}</small>',
before: '{OrderProductComparePrice(before: '<span style="color: #888; text-decoration: line-through;">', after: '</span>')} '
)}
</td>
<td class="CartTotal">
{OrderProductTotal(
after: '<br><small>{OrderProductTotalTax}</small>'
)}
</td>
</tr>
}}',
after: '
<tfoot>
<tr class="CartTotal">
<th scope="row" colspan="4">{%CheckoutProductsTotal} <br><small>{%VAT}</small></th>
<td class="CartTotal">
{OrderSubTotal}<br>
<small>{OrderSubtotalTax}</small>
</td>
</tr>
{OrderShippingCosts(
before: '<tr class="CartTotal"><th scope="row" colspan="4">{%ShippingCosts}: {OrderShippingMethod}<br><small>{%VAT} {OrderShippingCostsTaxRate(after:'%')}</small></th><td class="CartTotal">',
after: '<br><small>{OrderShippingCostsTax}</small></td></tr>'
)}
{OrderPaymentCosts(
before: '<tr class="CartTotal"><th scope="row" colspan="4">{%PaymentCosts}: {OrderPaymentMethod}<br><small>{%VAT} {OrderPaymentCostsTaxRate(after:'%')}</small></th><td class="CartTotal">',
after: '<br><small>{OrderPaymentCostsTax}</small></td></tr>'
)}
<tr class="CartTotal" id="FullTotal">
<th scope="row" colspan="4">{%Total} <br><small>{%VAT}</small></th>
<td class="CartTotal">
{OrderTotal}<br>
<small>{OrderTax}</small>
</td>
</tr>
</tfoot>
</table>
</div>
'
)}
<div id="VatInfo">
{OrderTotalsByTaxRate}
{OrderVATDescription}
</div>
<table id="PaymentDetails">
<tr>
<td width="10%">{%InvoiceRecipientAccountNumber}</td>
<td width="30%">{ContactBankAccount}</td>
<td width="60%" colspan="3" rowspan="3" id="OrderPaymentTransactions">
<h4>{%InvoiceBankTransfer}</h4>
<p>{%InvoicePaymentReferenceInfo}</p>
<h4>{%OrderPaymentTransactions}</h4>
{OrderPaymentTransactions}
</td>
</tr>
<tr>
<td width="10%">{%InvoiceRecipientName}</td>
<td width="30%">{ContactCompany}</td>
</tr>
<tr>
<td rowspan="3">{%InvoicePayer}</td>
<td rowspan="3">{OrderCustomerInformation}</td>
</tr>
<tr>
<td width="10%">{%PaymentReference}</td>
<td width="50%" colspan="2">{OrderPaymentReference}</td>
</tr>
<tr>
<td width="10%">{%InvoiceDueDate}</td>
<td width="25%">{OrderDueDate(expiry:'14')}</td>
<td width="25%" id="OrderOpenTotal">{OrderOpenTotal}</td>
</tr>
</table>
<div id="ReceiptContact">
<p id="PrintContactAddress">
{ContactCompany}
{ContactBusinessID(
before: ' (',
after: ')'
)}
<br>
{ContactStreetAddress1(
after: '
{ContactStreetAddress2(
before: ', '
)}
'
)}
<br>
{ContactZip} {ContactCity(after:', ')} {ContactCountry}
</p>
<p id="PrintContactElectrical">
{ContactEmail(after:'<br>')}
{ContactInternet(after:'<br>')}
{ContactPhone(after:'<br>')}
</p>
<div id="PrintBanner">
{Banners(
name: 'print',
sort: 'random',
limit: 1,
helper: '{{
{BannerText}
}}'
)}
</div>
</div>
</body>
</html>