|
6 | 6 | <ReceiptHeader data="props.data.headerData" />
|
7 | 7 | <OrderWidget lines="props.data.orderlines" t-slot-scope="scope">
|
8 | 8 | <t t-set="line" t-value="scope.line"/>
|
9 |
| - <Orderline line="omit(scope.line, 'customerNote')" class="{ 'px-0': true }" showTaxGroupLabels="showTaxGroupLabels"> |
| 9 | + <Orderline basic_receipt="props.basic_receipt" line="omit(scope.line, 'customerNote')" class="{ 'px-0': true }" showTaxGroupLabels="showTaxGroupLabels"> |
10 | 10 | <li t-if="line.customerNote" class="customer-note w-100 p-2 my-1 rounded text-break">
|
11 | 11 | <i class="fa fa-sticky-note me-1" role="img" aria-label="Customer Note" title="Customer Note"/>
|
12 | 12 | <t t-esc="line.customerNote" />
|
13 | 13 | </li>
|
14 | 14 | </Orderline>
|
15 | 15 | </OrderWidget>
|
| 16 | + <t t-if="!props.basic_receipt"> |
| 17 | + <div t-if="props.data.tax_details.length > 0" class="pos-receipt-taxes"> |
| 18 | + <div class="text-center">--------------------------------</div> |
| 19 | + <div class="d-flex"> |
| 20 | + <span t-if="showTaxGroupLabels" class="me-2" style="visibility: hidden;">A</span> |
| 21 | + <span class="fw-bolder">Untaxed Amount</span> |
| 22 | + <span t-esc="props.formatCurrency(props.data.total_without_tax)" class="ms-auto"/> |
| 23 | + </div> |
| 24 | + |
| 25 | + <div t-foreach="props.data.tax_details" t-as="tax" t-key="tax.id" class="d-flex"> |
| 26 | + <t t-if="showTaxGroupLabels"> |
| 27 | + <span t-if="tax.tax_group_id.pos_receipt_label" t-esc="tax.tax_group_id.pos_receipt_label" class="me-2"/> |
| 28 | + <span t-else="" class="me-2" style="visibility: hidden;">A</span> |
| 29 | + </t> |
| 30 | + <span> |
| 31 | + <span t-esc="tax.name"/> |
| 32 | + on |
| 33 | + <span t-esc="props.formatCurrency(tax.base)"/> |
| 34 | + </span> |
| 35 | + <span t-esc="props.formatCurrency(tax.amount)" class="ms-auto"/> |
| 36 | + </div> |
| 37 | + </div> |
16 | 38 |
|
17 |
| - <div t-if="props.data.tax_details.length > 0" class="pos-receipt-taxes"> |
| 39 | + <!-- Total --> |
18 | 40 | <div class="text-center">--------------------------------</div>
|
19 |
| - <div class="d-flex"> |
20 |
| - <span t-if="showTaxGroupLabels" class="me-2" style="visibility: hidden;">A</span> |
21 |
| - <span class="fw-bolder">Untaxed Amount</span> |
22 |
| - <span t-esc="props.formatCurrency(props.data.total_without_tax)" class="ms-auto"/> |
| 41 | + <div class="pos-receipt-amount"> |
| 42 | + TOTAL |
| 43 | + <span t-esc="props.formatCurrency(props.data.amount_total)" class="pos-receipt-right-align"/> |
23 | 44 | </div>
|
24 |
| - |
25 |
| - <div t-foreach="props.data.tax_details" t-as="tax" t-key="tax.id" class="d-flex"> |
26 |
| - <t t-if="showTaxGroupLabels"> |
27 |
| - <span t-if="tax.tax_group_id.pos_receipt_label" t-esc="tax.tax_group_id.pos_receipt_label" class="me-2"/> |
28 |
| - <span t-else="" class="me-2" style="visibility: hidden;">A</span> |
29 |
| - </t> |
30 |
| - <span> |
31 |
| - <span t-esc="tax.name"/> |
32 |
| - on |
33 |
| - <span t-esc="props.formatCurrency(tax.base)"/> |
34 |
| - </span> |
35 |
| - <span t-esc="props.formatCurrency(tax.amount)" class="ms-auto"/> |
| 45 | + <t t-if="props.data.rounding_applied"> |
| 46 | + <div class="pos-receipt-amount"> |
| 47 | + Rounding |
| 48 | + <span t-esc='props.formatCurrency(props.data.rounding_applied)' class="pos-receipt-right-align"/> |
| 49 | + </div> |
| 50 | + <div class="pos-receipt-amount"> |
| 51 | + To Pay |
| 52 | + <span t-esc='props.formatCurrency(props.data.amount_total + props.data.rounding_applied)' class="pos-receipt-right-align"/> |
36 | 53 | </div>
|
37 |
| - </div> |
| 54 | + </t> |
38 | 55 |
|
39 |
| - <!-- Total --> |
40 |
| - <div class="text-center">--------------------------------</div> |
41 |
| - <div class="pos-receipt-amount"> |
42 |
| - TOTAL |
43 |
| - <span t-esc="props.formatCurrency(props.data.amount_total)" class="pos-receipt-right-align"/> |
44 |
| - </div> |
45 |
| - <t t-if="props.data.rounding_applied"> |
46 |
| - <div class="pos-receipt-amount"> |
47 |
| - Rounding |
48 |
| - <span t-esc='props.formatCurrency(props.data.rounding_applied)' class="pos-receipt-right-align"/> |
| 56 | + <!-- Payment Lines --> |
| 57 | + |
| 58 | + <div class="paymentlines text-start" t-foreach="props.data.paymentlines" t-as="line" t-key="line_index"> |
| 59 | + <t t-esc="line.name" /> |
| 60 | + <span t-esc="props.formatCurrency(line.amount)" class="pos-receipt-right-align"/> |
49 | 61 | </div>
|
50 |
| - <div class="pos-receipt-amount"> |
51 |
| - To Pay |
52 |
| - <span t-esc='props.formatCurrency(props.data.amount_total + props.data.rounding_applied)' class="pos-receipt-right-align"/> |
53 |
| - </div> |
54 |
| - </t> |
55 | 62 |
|
56 |
| - <!-- Payment Lines --> |
| 63 | + <div t-if="props.data.change != 0" class="pos-receipt-amount receipt-change"> |
| 64 | + CHANGE |
| 65 | + <span t-esc="props.formatCurrency(props.data.change)" class="pos-receipt-right-align"/> |
| 66 | + </div> |
57 | 67 |
|
58 |
| - <div class="paymentlines text-start" t-foreach="props.data.paymentlines" t-as="line" t-key="line_index"> |
59 |
| - <t t-esc="line.name" /> |
60 |
| - <span t-esc="props.formatCurrency(line.amount)" class="pos-receipt-right-align"/> |
61 |
| - </div> |
| 68 | + <!-- Extra Payment Info --> |
62 | 69 |
|
63 |
| - <div t-if="props.data.change != 0" class="pos-receipt-amount receipt-change"> |
64 |
| - CHANGE |
65 |
| - <span t-esc="props.formatCurrency(props.data.change)" class="pos-receipt-right-align"/> |
66 |
| - </div> |
| 70 | + <t t-if="props.data.total_discount"> |
| 71 | + <div class="text-center"> |
| 72 | + Discounts |
| 73 | + <span t-esc="props.formatCurrency(props.data.total_discount)" class="pos-receipt-right-align"/> |
| 74 | + </div> |
| 75 | + </t> |
67 | 76 |
|
68 |
| - <!-- Extra Payment Info --> |
| 77 | + <div class="before-footer" /> |
69 | 78 |
|
70 |
| - <t t-if="props.data.total_discount"> |
71 |
| - <div class="text-center"> |
72 |
| - Discounts |
73 |
| - <span t-esc="props.formatCurrency(props.data.total_discount)" class="pos-receipt-right-align"/> |
| 79 | + <div t-if="props.data.pos_qr_code"> |
| 80 | + <br/> |
| 81 | + <div class="pos-receipt-order-data mb-2"> |
| 82 | + Need an invoice for your purchase ? |
| 83 | + </div> |
74 | 84 | </div>
|
75 |
| - </t> |
76 | 85 |
|
77 |
| - <div class="before-footer" /> |
78 |
| - |
79 |
| - <div t-if="props.data.pos_qr_code"> |
80 |
| - <br/> |
81 |
| - <div class="pos-receipt-order-data mb-2"> |
82 |
| - Need an invoice for your purchase ? |
| 86 | + <div t-if="['qr_code', 'qr_code_and_url'].includes(props.data.headerData.company.point_of_sale_ticket_portal_url_display_mode) and props.data.pos_qr_code" class="mb-2"> |
| 87 | + <img id="posqrcode" t-att-src="props.data.pos_qr_code" class="pos-receipt-logo"/> |
83 | 88 | </div>
|
84 |
| - </div> |
85 | 89 |
|
86 |
| - <div t-if="['qr_code', 'qr_code_and_url'].includes(props.data.headerData.company.point_of_sale_ticket_portal_url_display_mode) and props.data.pos_qr_code" class="mb-2"> |
87 |
| - <img id="posqrcode" t-att-src="props.data.pos_qr_code" class="pos-receipt-logo"/> |
88 |
| - </div> |
89 |
| - |
90 |
| - <div t-if="props.data.pos_qr_code"> |
91 |
| - <div class="pos-receipt-order-data"> |
92 |
| - Unique Code: <t t-esc="props.data.ticket_code"/> |
| 90 | + <div t-if="props.data.pos_qr_code"> |
| 91 | + <div class="pos-receipt-order-data"> |
| 92 | + Unique Code: <t t-esc="props.data.ticket_code"/> |
| 93 | + </div> |
93 | 94 | </div>
|
94 |
| - </div> |
95 | 95 |
|
96 |
| - <div t-if="['url', 'qr_code_and_url'].includes(props.data.headerData.company.point_of_sale_ticket_portal_url_display_mode) and props.data.pos_qr_code"> |
97 |
| - <div class="pos-receipt-order-data" t-attf-class="{{ props.data.ticket_portal_url_display_mode === 'qr_code_and_url' ? 'mt-3' : '' }}"> |
98 |
| - Portal URL: <t t-out="props.data.base_url"/>/pos/ticket |
| 96 | + <div t-if="['url', 'qr_code_and_url'].includes(props.data.headerData.company.point_of_sale_ticket_portal_url_display_mode) and props.data.pos_qr_code"> |
| 97 | + <div class="pos-receipt-order-data" t-attf-class="{{ props.data.ticket_portal_url_display_mode === 'qr_code_and_url' ? 'mt-3' : '' }}"> |
| 98 | + Portal URL: <t t-out="props.data.base_url"/>/pos/ticket |
| 99 | + </div> |
99 | 100 | </div>
|
100 |
| - </div> |
| 101 | + </t> |
101 | 102 |
|
102 | 103 | <!-- Footer -->
|
103 | 104 | <div t-if="props.data.footer" class="pos-receipt-center-align" style="white-space:pre-line">
|
|
0 commit comments