summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/src/xml/printbill.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/pos_restaurant/static/src/xml/printbill.xml')
-rw-r--r--addons/pos_restaurant/static/src/xml/printbill.xml133
1 files changed, 5 insertions, 128 deletions
diff --git a/addons/pos_restaurant/static/src/xml/printbill.xml b/addons/pos_restaurant/static/src/xml/printbill.xml
index 3e64f249bf3..47fe78fd44f 100644
--- a/addons/pos_restaurant/static/src/xml/printbill.xml
+++ b/addons/pos_restaurant/static/src/xml/printbill.xml
@@ -33,135 +33,12 @@
</span>
</t>
- <t t-name="BillReceipt">
- <div class="pos-receipt">
- <t t-if='receipt.company.logo'>
- <img class="pos-receipt-logo" t-att-src='receipt.company.logo' alt="Logo"/>
- <br/>
+ <t t-extend="OrderReceipt">
+ <t t-jquery='.pos-receipt-order-data' t-operation='append'>
+ <t t-if='receipt.bill === true'>
+ <div>PRO FORMA</div>
</t>
- <t t-if='!receipt.company.logo'>
- <h1 class="pos-receipt-center-align">
- <t t-esc='receipt.company.name' />
- </h1>
- <br/>
- </t>
- <div class="pos-receipt-contact">
- <t t-if='receipt.company.contact_address'>
- <div><t t-esc='receipt.company.contact_address' /></div>
- </t>
- <t t-if='receipt.company.phone'>
- <div>Tel:<t t-esc='receipt.company.phone' /></div>
- </t>
- <t t-if='receipt.company.vat'>
- <div><t t-esc="receipt.company.vat_label or 'Tax ID'"/>:<t t-esc='receipt.company.vat' /></div>
- </t>
- <t t-if='receipt.company.email'>
- <div><t t-esc='receipt.company.email' /></div>
- </t>
- <t t-if='receipt.company.website'>
- <div><t t-esc='receipt.company.website' /></div>
- </t>
- <t t-if='receipt.header'>
- <div><t t-esc='receipt.header' /></div>
- </t>
- <t t-if='receipt.cashier'>
- <div class='cashier'>
- <div>--------------------------------</div>
- <div>Served by <t t-esc='receipt.cashier' /></div>
- </div>
- </t>
- </div>
- <br /><br />
-
- <!-- Orderlines -->
-
- <div class='orderlines'>
- <t t-foreach='receipt.orderlines' t-as='line'>
- <t t-set='simple' t-value='line.discount === 0 and line.unit_name === "Units" and line.quantity === 1' />
- <t t-if='simple'>
- <div>
- <t t-esc='line.product_name' />
- <span t-esc='widget.format_currency_no_symbol(line.price_display)' class="pos-receipt-right-align"/>
- </div>
- </t>
- <t t-if='!simple'>
- <div><t t-esc='line.product_name' /></div>
- <t t-if='line.discount !== 0'>
- <div class="pos-receipt-left-padding">Discount: <t t-esc='line.discount'/>%</div>
- </t>
- <div class="pos-receipt-left-padding">
- <t t-esc='Math.round(line.quantity * 1000) / 1000' />
- <t t-if='line.unit_name !== "Units"'>
- <t t-esc='line.unit_name' />
- </t>
- x
- <t t-esc='widget.format_currency_no_symbol(line.price)'/>
- <span t-esc='widget.format_currency_no_symbol(line.price_display)' class="price-display pos-receipt-right-align"/>
- </div>
- </t>
- </t>
- </div>
-
- <!-- Subtotal -->
- <t t-set='taxincluded' t-value='Math.abs(receipt.subtotal - receipt.total_with_tax) &lt;= 0.000001' />
- <t t-if='!taxincluded'>
- <div class="pos-receipt-right-align">--------</div>
- <br/>
- <div>Subtotal<span t-esc='widget.format_currency_no_symbol(receipt.subtotal)' class="pos-receipt-right-align"/></div>
- <t t-foreach='receipt.tax_details' t-as='tax'>
- <div>
- <t t-esc='tax.name' />
- <span t-esc='widget.format_currency_no_symbol(tax.amount)' class="pos-receipt-right-align"/>
- </div>
- </t>
- </t>
-
- <!-- Total -->
-
- <div class="pos-receipt-right-align">--------</div>
- <br/>
- <div class="pos-receipt-amount">
- TOTAL
- <span t-esc='widget.format_currency_no_symbol(receipt.total_with_tax)' class="pos-receipt-right-align"/>
- </div>
- <br/><br/>
-
- <!-- Extra Payment Info -->
-
- <t t-if='receipt.total_discount'>
- <div>
- Discounts
- <span t-esc='widget.format_currency_no_symbol(receipt.total_discount)' class="pos-receipt-right-align"/>
- </div>
- </t>
- <t t-if='taxincluded'>
- <t t-foreach='receipt.tax_details' t-as='tax'>
- <div>
- <t t-esc='tax.name' />
- <span t-esc='widget.format_currency_no_symbol(tax.amount)' class="pos-receipt-right-align"/>
- </div>
- </t>
- </t>
-
- <!-- Footer -->
- <t t-if='receipt.footer_html'>
- <t t-raw='receipt.footer_html' class="pos-receipt-center-align"/>
- </t>
-
- <t t-if='!receipt.footer_html and receipt.footer'>
- <br/>
- <t t-esc='receipt.footer' class="pos-receipt-center-align"/>
- <br/>
- <br/>
- </t>
-
- <br/>
- <div class="pos-receipt-order-data">
- <div><t t-esc='receipt.name' /></div>
- <div><t t-esc='receipt.date.localestring' /></div>
- </div>
-
- </div>
+ </t>
</t>
</templates>