feat: display kitchen and customer notes on basic receipts for line items and orders
This commit is contained in:
parent
2224b0c26f
commit
7e8fb46164
@ -68,12 +68,32 @@
|
||||
<attribute name="t-if">!props.basic_receipt || (!line.is_reward_line && line.price_unit >= 0 && line.qty >= 0 && line.displayPrice >= 0)</attribute>
|
||||
</xpath>
|
||||
|
||||
<!-- Show order note on basic receipt -->
|
||||
<!-- Show customer note and kitchen note (internal note) ONLY on basic receipt -->
|
||||
<xpath expr="//li[@t-if='line.customerNote']" position="replace">
|
||||
<li t-if="line.customer_note || line.customerNote" class="customer-note w-100 p-2 my-1 rounded text-break">
|
||||
<i class="fa fa-sticky-note me-1" role="img" aria-label="Customer Note" title="Customer Note"/>
|
||||
<t t-esc="line.customer_note || line.customerNote" />
|
||||
</li>
|
||||
<t t-if="props.basic_receipt">
|
||||
<li t-if="line.customer_note || line.customerNote" class="customer-note w-100 p-2 my-1 rounded text-break">
|
||||
<i class="fa fa-sticky-note me-1" role="img" aria-label="Customer Note" title="Customer Note"/>
|
||||
<t t-esc="line.customer_note || line.customerNote" />
|
||||
</li>
|
||||
<t t-set="parsedInternalNotes" t-value="env.services.pos ? env.services.pos.getStrNotes(line.note || '[]') : (typeof line.note === 'string' ? line.note : '')" />
|
||||
<li t-if="parsedInternalNotes" class="internal-note w-100 p-2 my-1 rounded text-break" style="background-color: #f8f9fa; border-left: 3px solid #6c757d;">
|
||||
<i class="fa fa-cutlery me-1" role="img" aria-label="Kitchen Note" title="Kitchen Note"/>
|
||||
<t t-esc="parsedInternalNotes" />
|
||||
</li>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<!-- Show order-level internal and customer notes ONLY on basic receipt -->
|
||||
<xpath expr="//OrderDisplay" position="after">
|
||||
<t t-if="props.basic_receipt">
|
||||
<t t-set="orderInternalNote" t-value="env.services.pos ? env.services.pos.getStrNotes(order.internal_note || '[]') : (typeof order.internal_note === 'string' ? order.internal_note : '')" />
|
||||
<div t-if="orderInternalNote" class="order-internal-note p-2 my-2 rounded text-break" style="background-color: #f8f9fa; border-left: 3px solid #6c757d; font-size: 85%;">
|
||||
<strong>Order Note: </strong><t t-esc="orderInternalNote" />
|
||||
</div>
|
||||
<div t-if="order.general_customer_note" class="order-customer-note p-2 my-2 rounded text-break" style="background-color: #fff3cd; border-left: 3px solid #ffc107; font-size: 85%;">
|
||||
<strong>Customer Note: </strong><t t-esc="order.general_customer_note" />
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<!-- Hide Address (Branch Address) -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user