summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml
blob: 94a8e45e697d84a52a255d2fd16a08535d4d4cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

    <t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
        <xpath expr="//div[hasclass('pos-receipt-order-data')]" position="inside">
            <t t-if="props.isBill">
                <div>PRO FORMA</div>
            </t>
        </xpath>
        <xpath expr="//div[hasclass('receipt-change')]" position="attributes">
            <attribute name="t-if">!props.isBill</attribute>
        </xpath>
        <xpath expr="//div[hasclass('cashier')]" position="after">
            <t t-if="receipt.table">
                at table <t t-esc="receipt.table" />
            </t>
            <t t-if="receipt.table and receipt.customer_count">
                <div>Guests: <t t-esc="receipt.customer_count" /></div>
            </t>
        </xpath>
        <xpath expr="//div[hasclass('before-footer')]" position="after">
            <t t-if="props.isBill and env.pos.config.set_tip_after_payment">
                <div class="tip-form">
                    <div class="title">For convenience, we are providing the following gratuity calculations:</div>
                    <div class="percentage-options">
                        <div class="option">
                            <div>15%</div>
                            <div class="amount">
                                <t t-esc="env.pos.format_currency(receipt.total_with_tax * 0.15)"></t>
                            </div>
                        </div>
                        <div class="option">
                            <div>20%</div>
                            <div class="amount">
                                <t t-esc="env.pos.format_currency(receipt.total_with_tax * 0.20)"></t>
                            </div>
                        </div>
                        <div class="option">
                            <div>25%</div>
                            <div class="amount">
                                <t t-esc="env.pos.format_currency(receipt.total_with_tax * 0.25)"></t>
                            </div>
                        </div>
                    </div>
                </div>
            </t>
        </xpath>
    </t>

</templates>