|
|
@ -1,6 +1,6 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<odoo> |
|
|
|
<!-- Sub Categories --> |
|
|
|
<!-- Examples for receipt design: which can be used or modified --> |
|
|
|
<record id="pos_receipt_design1" model="pos.receipt"> |
|
|
|
<field name="name">Design 1</field> |
|
|
|
<field name="design_receipt"><![CDATA[<div class="pos-receipt"> |
|
|
@ -38,68 +38,65 @@ |
|
|
|
<br /> |
|
|
|
</t> |
|
|
|
<div> |
|
|
|
<table class='receipt-orderlines' style="font-size:15px; border-style: double; |
|
|
|
border-left: none;border-right: none;border-bottom: none;width: 100%;"> |
|
|
|
<table class='receipt-orderlines' style="font-size:15px; border-style:double; border-left:none; border-right:none; border-bottom:none; width:100%;"> |
|
|
|
<colgroup> |
|
|
|
<col width='40%' /> |
|
|
|
<col width='30%' /> |
|
|
|
<col width='30%' /> |
|
|
|
</colgroup> |
|
|
|
<tr style="border-bottom: 1px dashed black;"> |
|
|
|
<tr style="border-bottom:1px dashed black;"> |
|
|
|
<th style="text-align:left;">Product</th> |
|
|
|
<th style="text-align:center;">Qty</th> |
|
|
|
<th style="text-align:center;">Amount</th> |
|
|
|
<th style="text-align:right;">Qty</th> |
|
|
|
<th style="text-align:right;">Amount</th> |
|
|
|
</tr> |
|
|
|
<tr t-foreach="props.orderlines" t-as="orderline" t-key="index_orderlines"> |
|
|
|
<td style="padding-top: 1%;padding-bottom: 1%;"> |
|
|
|
<td style="padding-top:1%; padding-bottom:1%; text-align:left;"> |
|
|
|
<t t-esc="orderline.get_product().display_name"/> |
|
|
|
<t t-if="orderline.get_discount() > 0"> |
|
|
|
<div style="font-size: 12px;font-style: italic;color: #808080;"> |
|
|
|
<div style="font-size:12px; font-style:italic; color:#808080;"> |
|
|
|
<t t-esc="orderline.get_discount()"/>% discount |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
<t t-if="orderline.customerNote"> |
|
|
|
<div style="font-size: 14px;" t-esc="orderline.customerNote"/> |
|
|
|
<div style="font-size:14px;" t-esc="orderline.customerNote"/> |
|
|
|
</t> |
|
|
|
</td> |
|
|
|
<td class="pos-center-align"> |
|
|
|
<td style="text-align:right; font-size:14px;"> |
|
|
|
<t t-esc="orderline.get_quantity_str_with_unit()"/> |
|
|
|
</td> |
|
|
|
<td class="pos-center-align"> |
|
|
|
<t t-esc="orderline.get_display_price()"/> |
|
|
|
<td style="text-align:right; font-size:14px;"> |
|
|
|
<t t-esc="env.utils.formatCurrency(orderline.get_display_price())"/> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
<div style="padding-top: 6px;"> |
|
|
|
<div style="padding-top:6px;"> |
|
|
|
<!-- Subtotal --> |
|
|
|
<t t-set='taxincluded' t-value='Math.abs(props.receipt.amount_total - props.receipt.total_with_tax) <= 0.000001' /> |
|
|
|
<t t-if='!taxincluded'> |
|
|
|
<br/> |
|
|
|
<div style="font-weight: 700; font-size: 14px; border-top:1px dashed;"><span style="margin-left: 40%;">Subtotal : </span><span t-esc='props.receipt.amount_total' class="pos-receipt-right-align"/></div> |
|
|
|
<div style="font-weight:700; font-size:14px; border-top:1px dashed;"><span style="margin-left:40%;">Subtotal : </span><span t-esc='env.utils.formatCurrency(props.data.total_without_tax)' class="pos-receipt-right-align"/></div> |
|
|
|
<t t-foreach='props.receipt.tax_details' t-as='tax' t-key="index_tax_details"> |
|
|
|
<div style="font-weight: 700; font-size: 14px;"> |
|
|
|
<span style="margin-left: 40%;"><t t-esc='tax.name' /></span> |
|
|
|
<span t-esc='tax.amount' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-weight:700; font-size:14px;"> |
|
|
|
<span style="margin-left:40%;"><t t-esc='tax.name' /></span> |
|
|
|
<span t-esc='env.utils.formatCurrency(tax.amount)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
</t> |
|
|
|
<!-- Total --> |
|
|
|
<br/> |
|
|
|
<div style="font-weight: 700; font-size: 14px;"> |
|
|
|
<span style="margin-left: 40%;">TOTAL : </span> |
|
|
|
<span t-esc='props.receipt.amount_total' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-weight:700; font-size:14px;"> |
|
|
|
<span style="margin-left:40%;">TOTAL : </span> |
|
|
|
<span t-esc='env.utils.formatCurrency(props.receipt.amount_total)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class='before-footer' /> |
|
|
|
<br/> |
|
|
|
<br/> |
|
|
|
<br/><br/> |
|
|
|
<!-- Footer --> |
|
|
|
<div class="pos-receipt-order-data"> |
|
|
|
<div><t t-esc="props.receipt.name" /></div> |
|
|
|
<div><t t-esc="props.receipt.name" /> |
|
|
|
</div> |
|
|
|
<t t-if="props.receipt.date"> |
|
|
|
<div><t t-esc="props.receipt.date" /></div> |
|
|
|
</t> |
|
|
@ -107,9 +104,8 @@ |
|
|
|
<div><t t-esc="props.receipt.date" /></div> |
|
|
|
</t> |
|
|
|
</div> |
|
|
|
|
|
|
|
<br/><br/> |
|
|
|
<div style="font-size: 14px; text-align: center;"> |
|
|
|
<div style="font-size:14px; text-align:center;"> |
|
|
|
Thank You... Please Visit Again ... |
|
|
|
</div> |
|
|
|
</div>]]></field> |
|
|
@ -117,13 +113,13 @@ |
|
|
|
<record id="pos_receipt_design2_demo" model="pos.receipt"> |
|
|
|
<field name="name">Design 2</field> |
|
|
|
<field name="design_receipt"><![CDATA[<div class="pos-receipt"> |
|
|
|
<div style="font-size:13px; text-align: center;"> |
|
|
|
<div style="font-size:13px; text-align:center;"> |
|
|
|
<t t-esc="env.services.pos.company.name"/><br /> |
|
|
|
Phone: <t t-esc="env.services.pos.company.phone || ''"/><br /> |
|
|
|
Phone:<t t-esc="env.services.pos.company.phone || ''"/><br /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<br/> |
|
|
|
<div style="font-size:13px; text-align: center;"> |
|
|
|
<div style="font-size:13px; text-align:center;"> |
|
|
|
Date : |
|
|
|
<t t-if="props.receipt.date"> |
|
|
|
<t t-esc="props.receipt.date"/> |
|
|
@ -135,10 +131,10 @@ |
|
|
|
Order : <t t-esc="props.order[0].name"/><br /> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
<div style="font-size:13px; text-align: center;"> |
|
|
|
<div style="font-size:13px; text-align:center;"> |
|
|
|
Cashier : <t t-esc='props.receipt.headerData.cashier' /><br /> |
|
|
|
<t t-if="props.order[0].partner"> |
|
|
|
Customer : <t t-esc='props.order[0].partner.name' style="font-style: bold" /> |
|
|
|
Customer : <t t-esc='props.order[0].partner.name' style="font-style:bold" /> |
|
|
|
</t> |
|
|
|
<br /> |
|
|
|
</div> |
|
|
@ -150,104 +146,104 @@ |
|
|
|
<br /> |
|
|
|
</t> |
|
|
|
<div> |
|
|
|
<table class='receipt-orderlines' style="font-size:15px; border-style: double; |
|
|
|
border-left: none;border-right: none;border-bottom: none;width: 100%;"> |
|
|
|
<table class='receipt-orderlines' style="font-size:15px; border-style:double; |
|
|
|
border-left:none; border-right:none; border-bottom:none; width:100%;"> |
|
|
|
<colgroup> |
|
|
|
<col width='40%' /> |
|
|
|
<col width='30%' /> |
|
|
|
<col width='30%' /> |
|
|
|
</colgroup> |
|
|
|
<tr style="border-bottom: 1px dashed black;"> |
|
|
|
<tr style="border-bottom:1px dashed black;"> |
|
|
|
<th style="text-align:left;">Product</th> |
|
|
|
<th style="text-align:center;">Qty</th> |
|
|
|
<th style="text-align:center;">Amount</th> |
|
|
|
<th style="text-align:right;">Qty</th> |
|
|
|
<th style="text-align:right;">Amount</th> |
|
|
|
</tr> |
|
|
|
<tr t-foreach="props.orderlines" t-as="orderline" t-key="index_props_orderlines"> |
|
|
|
<td style="padding-top: 1%;padding-bottom: 1%;"> |
|
|
|
<td style="padding-top:1%; padding-bottom:1%; text-align:left;"> |
|
|
|
<t t-esc="orderline.get_product().display_name"/> |
|
|
|
<t t-if="orderline.get_discount() > 0"> |
|
|
|
<div style="font-size: 12px;font-style: italic;color: #808080;"> |
|
|
|
<div style="font-size:12px; font-style:italic; color:#808080;"> |
|
|
|
<t t-esc="orderline.get_discount()"/>% discount |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
<t t-if="orderline.customerNote"> |
|
|
|
<div style="font-size: 14px;" t-esc="orderline.customerNote"/> |
|
|
|
<div style="font-size:14px;" t-esc="orderline.customerNote"/> |
|
|
|
</t> |
|
|
|
</td> |
|
|
|
<td class="pos-center-align"> |
|
|
|
<td style="text-align:right;"> |
|
|
|
<t t-esc="orderline.get_quantity_str_with_unit()"/> |
|
|
|
</td> |
|
|
|
<td class="pos-center-align"> |
|
|
|
<t t-esc="orderline.get_display_price()"/> |
|
|
|
<td style="text-align:right;"> |
|
|
|
<t t-esc="env.utils.formatCurrency(orderline.get_display_price())"/> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
<div style="padding-top: 6px;"> |
|
|
|
<div style="padding-top:6px;"> |
|
|
|
<!-- Subtotal --> |
|
|
|
<t t-set='taxincluded' t-value='Math.abs(props.receipt.amount_total - props.receipt.total_with_tax) <= 0.000001' /> |
|
|
|
<t t-if='!taxincluded'> |
|
|
|
<br/> |
|
|
|
<div style="font-weight: 700; font-size: 14px; border-top:1px dashed;"><span style="margin-left: 40%;">Subtotal : </span><span t-esc='props.receipt.amount_total' class="pos-receipt-right-align"/></div> |
|
|
|
<div style="font-weight:700; font-size:14px; border-top:1px dashed;"><span style="margin-left:40%;">Subtotal : </span><span t-esc='env.utils.formatCurrency(props.data.total_without_tax)' class="pos-receipt-right-align"/></div> |
|
|
|
<t t-foreach='props.receipt.tax_details' t-as='tax' t-key="index_tax_details"> |
|
|
|
<div style="font-weight: 700; font-size: 14px;"> |
|
|
|
<span style="margin-left: 40%;"><t t-esc='tax.name' /></span> |
|
|
|
<span t-esc='tax.amount' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-weight:700; font-size:14px;"> |
|
|
|
<span style="margin-left:40%;"><t t-esc='tax.name' /></span> |
|
|
|
<span t-esc='env.utils.formatCurrency(tax.amount)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
</t> |
|
|
|
<!-- Total --> |
|
|
|
<br/> |
|
|
|
<div style="font-weight: 700; font-size: 14px;"> |
|
|
|
<span style="margin-left: 40%;">TOTAL : </span> |
|
|
|
<span t-esc='props.receipt.amount_total' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-weight:700; font-size:14px;"> |
|
|
|
<span style="margin-left:40%;">TOTAL : </span> |
|
|
|
<span t-esc='env.utils.formatCurrency(props.receipt.amount_total)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
<br/><br/> |
|
|
|
</div> |
|
|
|
<!-- Payment Lines --> |
|
|
|
<t t-foreach='props.paymentlines' t-as='line' t-key="index_paymentlines"> |
|
|
|
<div style="font-size: 14px;border-top:1px dashed;padding-top: 5px;"> |
|
|
|
<span style="margin-left: 40%;"><t t-esc='line.name' /></span> |
|
|
|
<span t-esc='line.get_amount()' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-size:14px; border-top:1px dashed; padding-top:5px;"> |
|
|
|
<span style="margin-left:40%;"><t t-esc='line.name' /></span> |
|
|
|
<span t-esc='env.utils.formatCurrency(line.get_amount())' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
<br/> |
|
|
|
<div class="receipt-change" style="font-size: 14px;"> |
|
|
|
<span style="margin-left: 40%;">CHANGE : </span> |
|
|
|
<span t-esc='props.receipt.change' class="pos-receipt-right-align"/> |
|
|
|
<div class="receipt-change" style="font-size:14px;"> |
|
|
|
<span style="margin-left:40%;">CHANGE : </span> |
|
|
|
<span t-esc='env.utils.formatCurrency(props.receipt.change)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
<br/> |
|
|
|
<!-- Extra Payment Info --> |
|
|
|
<t t-if='props.receipt.total_discount'> |
|
|
|
<div style="font-size: 14px; border-top:1px dashed;padding-top: 5px;"> |
|
|
|
<span style="margin-left: 40%;">Discounts : </span> |
|
|
|
<span t-esc='props.receipt.total_discount' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-size:14px; border-top:1px dashed; padding-top:5px;"> |
|
|
|
<span style="margin-left:40%;">Discounts : </span> |
|
|
|
<span t-esc='env.utils.formatCurrency(props.receipt.total_discount)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
<t t-if='taxincluded'> |
|
|
|
<t t-foreach='props.receipt.tax_details' t-as='tax' t-key="index_receipt_tax_details"> |
|
|
|
<div style="font-size: 14px;"> |
|
|
|
<span style="margin-left: 40%;"><t t-esc='tax.name' /></span> |
|
|
|
<span t-esc='tax.amount' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-size:14px;"> |
|
|
|
<span style="margin-left:40%;"><t t-esc='tax.name' /></span> |
|
|
|
<span t-esc='env.utils.formatCurrency(tax.amount)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
<div style="font-size: 14px;"> |
|
|
|
<span style="margin-left: 40%;">Total Taxes : </span> |
|
|
|
<span t-esc='props.receipt.total_tax' class="pos-receipt-right-align"/> |
|
|
|
<div style="font-size:14px;"> |
|
|
|
<span style="margin-left:40%;">Total Taxes : </span> |
|
|
|
<span t-esc='penv.utils.formatCurrency(rops.receipt.total_tax)' class="pos-receipt-right-align"/> |
|
|
|
</div> |
|
|
|
</t> |
|
|
|
<div class='before-footer' /> |
|
|
|
<!-- Footer --> |
|
|
|
<div t-if='props.receipt.footer_html' style="text-align: center; font-size: 14px;"> |
|
|
|
<div t-if='props.receipt.footer_html' style="text-align:center; font-size:14px;"> |
|
|
|
<t t-raw='props.receipt.footer_html'/> |
|
|
|
</div> |
|
|
|
<div t-if='!props.receipt.footer_html and props.receipt.footer' style="text-align: center;font-size: 14px;"> |
|
|
|
<div t-if='!props.receipt.footer_html and props.receipt.footer' style="text-align:center; font-size:14px;"> |
|
|
|
<br/> |
|
|
|
<t t-esc='props.receipt.footer'/> |
|
|
|
<br/><br/> |
|
|
|
</div> |
|
|
|
<div class='after-footer' style="font-size: 14px;"> |
|
|
|
<div class='after-footer' style="font-size:14px;"> |
|
|
|
<t t-foreach='props.paymentlines' t-as='line' t-key="index_payment"> |
|
|
|
<t t-if='line.ticket'> |
|
|
|
<br /> |
|
|
@ -258,7 +254,7 @@ |
|
|
|
</t> |
|
|
|
</div> |
|
|
|
<br/><br/> |
|
|
|
<div style="font-size: 14px; text-align: center;"> |
|
|
|
<div style="font-size:14px; text-align:center;"> |
|
|
|
Thank You... Please Visit Again ... |
|
|
|
</div> |
|
|
|
</div>]]></field> |