forked from Mapan/odoo17e
[custom] font size for point of sale receipt
This commit is contained in:
parent
28c904f96a
commit
4397d8f2ce
@ -2,7 +2,7 @@
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="point_of_sale.OrderWidget">
|
||||
<t t-if="props.lines?.length">
|
||||
<div t-ref="scrollable" class="order-container bg-view overflow-y-auto flex-grow-1 d-flex flex-column text-start">
|
||||
<div style="font-size: 12px" t-ref="scrollable" class="order-container bg-view overflow-y-auto flex-grow-1 d-flex flex-column text-start">
|
||||
<t t-foreach="props.lines" t-as="line" t-key="line_index">
|
||||
<t t-slot="default" line="line"/>
|
||||
</t>
|
||||
|
||||
@ -5,10 +5,10 @@
|
||||
<div class="popup close-pos-popup">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Closing Session</h4>
|
||||
<div class="total-orders fw-bolder">
|
||||
<!-- <div class="total-orders fw-bolder">
|
||||
Total <t t-esc="props.orders_details.quantity"/> orders:
|
||||
<span class="amount" t-esc="env.utils.formatCurrency(props.orders_details.amount)"/>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<main class="modal-body">
|
||||
<div class="payment-methods-overview overflow-auto">
|
||||
@ -16,16 +16,16 @@
|
||||
<thead>
|
||||
<tr class="text-dark">
|
||||
<th>Payment Method</th>
|
||||
<th>Expected</th>
|
||||
<!-- <th>Expected</th>
|
||||
<th style="width:20%">Counted</th>
|
||||
<th>Difference</th>
|
||||
<th>Difference</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<t t-if="pos.config.cash_control">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td t-esc="props.default_cash_details.name"/>
|
||||
<td t-esc="env.utils.formatCurrency(props.default_cash_details.amount)"/>
|
||||
<!-- <td t-esc="env.utils.formatCurrency(props.default_cash_details.amount)"/> -->
|
||||
<td class="d-flex">
|
||||
<Input tModel="[state.payments[props.default_cash_details.id], 'counted']"
|
||||
callback.bind="(value) => this.setManualCashInput(value)"
|
||||
@ -34,11 +34,11 @@
|
||||
<i class="fa fa-money fa-2x" role="img" title="Open the money details popup"/>
|
||||
</div>
|
||||
</td>
|
||||
<td t-esc="env.utils.formatCurrency(getDifference(props.default_cash_details.id))"
|
||||
t-att-class="{'warning text-danger fw-bolder': !env.utils.floatIsZero(getDifference(props.default_cash_details.id))}"/>
|
||||
<!-- <td t-esc="env.utils.formatCurrency(getDifference(props.default_cash_details.id))"
|
||||
t-att-class="{'warning text-danger fw-bolder': !env.utils.floatIsZero(getDifference(props.default_cash_details.id))}"/> -->
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="cash-overview border-start small text-muted">
|
||||
<!-- <tbody class="cash-overview border-start small text-muted">
|
||||
<tr>
|
||||
<td>Opening</td>
|
||||
<td class="align-top" t-esc="env.utils.formatCurrency(props.default_cash_details.opening)"/>
|
||||
@ -61,9 +61,9 @@
|
||||
</td>
|
||||
<td class="align-top" t-esc="env.utils.formatCurrency(Math.abs(props.default_cash_details.payment_amount))"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tbody> -->
|
||||
</t>
|
||||
<tbody t-if="props.other_payment_methods.length > 0">
|
||||
<!-- <tbody t-if="props.other_payment_methods.length > 0">
|
||||
<tr t-foreach="props.other_payment_methods" t-as="pm" t-key="pm.id">
|
||||
<td t-esc="pm.name"/>
|
||||
<td t-esc="env.utils.formatCurrency(pm.amount)"/>
|
||||
@ -75,7 +75,7 @@
|
||||
<td t-if="_showDiff" t-esc="env.utils.formatCurrency(getDifference(pm.id))"
|
||||
t-att-class="{'warning text-danger fw-bolder': getDifference(pm.id)}"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tbody> -->
|
||||
</table>
|
||||
</div>
|
||||
<div class="notes-container d-flex flex-column flex-sm-row gap-3 border-top mt-3 pt-3">
|
||||
@ -113,4 +113,4 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
</templates>
|
||||
@ -10,6 +10,7 @@
|
||||
<i class="fa fa-sticky-note me-1" role="img" aria-label="Customer Note" title="Customer Note"/>
|
||||
<t t-esc="line.customerNote" />
|
||||
</li>
|
||||
|
||||
<ul t-if="line.pack_lot_lines">
|
||||
<li t-foreach="line.pack_lot_lines" t-as="lot" t-key="lot.cid">
|
||||
<t t-if="lot.order_line.product.tracking == 'lot'">
|
||||
@ -19,59 +20,55 @@
|
||||
SN <t t-esc="lot.lot_name"/>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</Orderline>
|
||||
</OrderWidget>
|
||||
|
||||
<!-- Total -->
|
||||
<div class="pos-receipt-right-align">--------</div>
|
||||
<br/>
|
||||
<div class="pos-receipt-amount">
|
||||
<div style="font-size: 10px" class="pos-receipt-amount">
|
||||
TOTAL
|
||||
<span t-esc="props.formatCurrency(props.data.amount_total)" class="pos-receipt-right-align"/>
|
||||
</div>
|
||||
<t t-if="props.data.rounding_applied">
|
||||
<div class="pos-receipt-amount">
|
||||
<div style="font-size: 10px" class="pos-receipt-amount">
|
||||
Rounding
|
||||
<span t-esc='props.formatCurrency(props.data.rounding_applied)' class="pos-receipt-right-align"/>
|
||||
<span style="font-size: 10px" t-esc='props.formatCurrency(props.data.rounding_applied)' class="pos-receipt-right-align"/>
|
||||
</div>
|
||||
<div class="pos-receipt-amount">
|
||||
<div style="font-size: 10px" class="pos-receipt-amount">
|
||||
To Pay
|
||||
<span t-esc='props.formatCurrency(props.data.amount_total + props.data.rounding_applied)' class="pos-receipt-right-align"/>
|
||||
<span style="font-size: 10px" t-esc='props.formatCurrency(props.data.amount_total + props.data.rounding_applied)' class="pos-receipt-right-align"/>
|
||||
</div>
|
||||
</t>
|
||||
<br/><br/>
|
||||
|
||||
<!-- Payment Lines -->
|
||||
|
||||
<div class="paymentlines" t-foreach="props.data.paymentlines" t-as="line" t-key="line_index">
|
||||
<div style="font-size: 10px" class="paymentlines" t-foreach="props.data.paymentlines" t-as="line" t-key="line_index">
|
||||
<t t-esc="line.name" />
|
||||
<span t-esc="props.formatCurrency(line.amount, false)" class="pos-receipt-right-align"/>
|
||||
<span style="font-size: 10px" t-esc="props.formatCurrency(line.amount, false)" class="pos-receipt-right-align"/>
|
||||
</div>
|
||||
|
||||
<div class="pos-receipt-amount receipt-change mt-2">
|
||||
<div style="font-size: 10px" class="pos-receipt-amount receipt-change mt-2">
|
||||
CHANGE
|
||||
<span t-esc="props.formatCurrency(props.data.change)" class="pos-receipt-right-align"/>
|
||||
<span style="font-size: 10px" t-esc="props.formatCurrency(props.data.change)" class="pos-receipt-right-align"/>
|
||||
</div>
|
||||
|
||||
<!-- Extra Payment Info -->
|
||||
|
||||
<t t-if="props.data.total_discount">
|
||||
<div>
|
||||
<div style="font-size: 10px">
|
||||
Discounts
|
||||
<span t-esc="props.formatCurrency(props.data.total_discount)" class="pos-receipt-right-align"/>
|
||||
<span style="font-size: 10px" t-esc="props.formatCurrency(props.data.total_discount)" class="pos-receipt-right-align"/>
|
||||
</div>
|
||||
</t>
|
||||
<div t-if="props.data.tax_details.length > 0" class="pos-receipt-taxes">
|
||||
<div style="font-size: 10px" t-if="props.data.tax_details.length > 0" class="pos-receipt-taxes">
|
||||
<span />
|
||||
<span>PB1</span>
|
||||
<span>Tax</span>
|
||||
<span>Amount</span>
|
||||
<span>Base</span>
|
||||
<span>Total</span>
|
||||
<t t-foreach="props.data.tax_details" t-as="tax" t-key="tax.tax.id">
|
||||
<span t-esc="tax.tax.letter || ''"/>
|
||||
<span t-if="tax.tax.amount_type != 'fixed'"><t t-esc="tax.tax.amount"/>%</span>
|
||||
<span t-else="" t-esc="tax.tax.name"/>
|
||||
<span><t t-esc="tax.tax.amount"/>%</span>
|
||||
<span t-esc="props.formatCurrency(tax.amount, false)" />
|
||||
<span t-esc="props.formatCurrency(tax.base, false)" />
|
||||
<span t-esc="props.formatCurrency(tax.amount + tax.base, false)" />
|
||||
@ -88,15 +85,15 @@
|
||||
<div class="before-footer" />
|
||||
|
||||
<div t-if="props.data.pos_qr_code">
|
||||
<br /><br />
|
||||
<div class="pos-receipt-order-data mb-2">
|
||||
<br />
|
||||
<div style="font-size: 10px" class="pos-receipt-order-data mb-2">
|
||||
Scan me to request an invoice for your purchase.
|
||||
</div>
|
||||
<img id="posqrcode" t-att-src="props.data.pos_qr_code" class="pos-receipt-qrcode"/>
|
||||
<img id="posqrcode" t-att-src="props.data.pos_qr_code" class="pos-receipt-logo"/>
|
||||
</div>
|
||||
|
||||
<div t-if="props.data.ticket_code">
|
||||
<br /><br />
|
||||
<br />
|
||||
<div class="pos-receipt-order-data">
|
||||
You can go to <t t-out="props.data.base_url"/>/pos/ticket and use the code below to request an invoice online
|
||||
</div>
|
||||
@ -106,11 +103,8 @@
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div t-if="props.data.footer" class="pos-receipt-center-align" style="white-space:pre-line">
|
||||
<br/>
|
||||
<div t-if="props.data.footer" class="pos-receipt-center-align" style="white-space:normal">
|
||||
<t t-esc="props.data.footer" />
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<div class="after-footer">
|
||||
@ -124,20 +118,18 @@
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<t t-if="props.data.shippingDate">
|
||||
<t style="font-size: 9px" t-if="props.shippingDate">
|
||||
<div class="pos-receipt-order-data">
|
||||
Expected delivery:
|
||||
<div><t t-esc="props.data.shippingDate" /></div>
|
||||
<div><t t-esc="props.shippingDate" /></div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<br/>
|
||||
<div class="pos-receipt-order-data">
|
||||
<div style="font-size: 9px" class="pos-receipt-order-data">
|
||||
<p>Powered by Odoo</p>
|
||||
<div t-esc="props.data.name" />
|
||||
<div id="order-date" t-esc="props.data.date" />
|
||||
<div t-esc="props.data.date" />
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</templates>
|
||||
@ -1,29 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="point_of_sale.ReceiptHeader">
|
||||
<img t-attf-src="/web/image?model=res.company&id={{props.data.company.id}}&field=logo" alt="Logo" class="pos-receipt-logo"/>
|
||||
<br/>
|
||||
<img t-attf-src="/web/image?model=res.company&id={{props.data.company.id}}&field=logo" alt="Logo" class="pos-receipt-logo" width="60" height="120"/>
|
||||
<h1 class="tracking-number text-center" style="font-size: 100px" t-if="props.data.trackingNumber and props.data.bigTrackingNumber" t-esc="props.data.trackingNumber" />
|
||||
<div class="pos-receipt-contact">
|
||||
<!-- contact address -->
|
||||
<div t-if="props.data.company.partner_id?.[1]" t-esc="props.data.company.partner_id[1]" />
|
||||
<!-- <div t-if="props.data.company.partner_id?.[1]" t-esc="props.data.company.partner_id[1]" /> -->
|
||||
<t t-if="props.data.company.phone">
|
||||
<div>Tel:<t t-esc="props.data.company.phone" /></div>
|
||||
<!-- <div>Tel:<t t-esc="props.data.company.phone" /></div> -->
|
||||
</t>
|
||||
<t t-if="props.data.company.vat">
|
||||
<div><t t-esc="props.data.company.country?.vat_label || 'Tax ID'"/>: <t t-esc="props.data.company.vat" /></div>
|
||||
<!-- <div><t t-esc="props.data.company.country?.vat_label || 'Tax ID'"/>: <t t-esc="props.data.company.vat" /></div> -->
|
||||
</t>
|
||||
<!--
|
||||
<div t-if="props.data.company.email" t-esc="props.data.company.email" />
|
||||
<div t-if="props.data.company.website" t-esc="props.data.company.website" />
|
||||
<div t-if="props.data.header" style="white-space:pre-line" t-esc="props.data.header" />
|
||||
<div t-if="props.data.header" style="white-space:pre-line" t-esc="props.data.header" /> -->
|
||||
<div t-if="props.data.cashier" class="cashier">
|
||||
<div>--------------------------------</div>
|
||||
<div>Served by <t t-esc="props.data.cashier" /></div>
|
||||
<!--
|
||||
<div>Served by <t t-esc="props.data.cashier" /></div> -->
|
||||
</div>
|
||||
<div class="fw-bolder" t-if="props.data.trackingNumber and !props.data.bigTrackingNumber">
|
||||
<span class="fs-2" t-esc="props.data.trackingNumber" />
|
||||
</div>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br />
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
@ -9,25 +9,22 @@
|
||||
<span class="pos-receipt-center-align">
|
||||
<div>--------------------------------</div>
|
||||
<br/>
|
||||
<div t-esc='_loyaltyStat.program.name' class="pos-receipt-title" />
|
||||
<br />
|
||||
<div style="font-size: 10px" t-esc='_loyaltyStat.program.name' class="pos-receipt-title" />
|
||||
</span>
|
||||
<t t-if='_loyaltyStat.points.won'>
|
||||
<div><t t-esc="_loyaltyStat.points.name"/> Won: <span t-esc='_loyaltyStat.points.won' class="pos-receipt-right-align"/></div>
|
||||
<div style="font-size: 10px"><t t-esc="_loyaltyStat.points.name"/> Won: <span t-esc='_loyaltyStat.points.won' class="pos-receipt-right-align"/></div>
|
||||
</t>
|
||||
<t t-if='_loyaltyStat.points.spent'>
|
||||
<div><t t-esc="_loyaltyStat.points.name"/> Spent: <span t-esc='_loyaltyStat.points.spent' class="pos-receipt-right-align"/></div>
|
||||
<div style="font-size: 10px"><t t-esc="_loyaltyStat.points.name"/> Spent: <span t-esc='_loyaltyStat.points.spent' class="pos-receipt-right-align"/></div>
|
||||
</t>
|
||||
<!-- Don't use points.total, it's wrong in this context (after the order synced). -->
|
||||
<!-- Show balance as it's updated during _postPushOrderResolve. -->
|
||||
<t t-if='_loyaltyStat.points.balance'>
|
||||
<div>Balance <t t-esc="_loyaltyStat.points.name"/>: <span t-esc='_loyaltyStat.points.balance' class="pos-receipt-right-align"/></div>
|
||||
<div style="font-size: 10px">Balance <t t-esc="_loyaltyStat.points.name"/>: <span t-esc='_loyaltyStat.points.balance' class="pos-receipt-right-align"/></div>
|
||||
</t>
|
||||
<br />
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="props.data.partner">
|
||||
<br/>
|
||||
<div>Customer <span t-esc='props.data.partner.name' class='pos-receipt-right-align'/></div>
|
||||
</t>
|
||||
<t t-if="props.data.new_coupon_info and props.data.new_coupon_info.length !== 0">
|
||||
@ -64,4 +61,4 @@
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
</templates>
|
||||
Loading…
Reference in New Issue
Block a user