Debian Codegraph @

addons/pos_hr/static/src/app/components/popups/closing_popup/closing_popup.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <templates id="template" xml:space="preserve">
3 <t t-name="pos_hr.ClosePosPopup" t-inherit="point_of_sale.ClosePosPopup" t-inherit-mode="extension">
4 <xpath expr="//div[hasclass('payment-methods-overview')]" position="attributes">
5 <attribute name="t-if">!pos.config.module_pos_hr</attribute>
6 </xpath>
7 <xpath expr="//div[hasclass('payment-methods-overview')]" position="after">
8 <t t-if="pos.config.module_pos_hr">
9 <div t-if="pos.config.cash_control and pos.config.module_pos_hr" class="w-100 mb-3">
10 <t t-set="diff" t-value="getDifference(props.default_cash_details.id)" />
11 <t t-set="counted" t-value="state.payments[props.default_cash_details.id]?.counted || '0'" />
12 <div class="d-flex align-items-center justify-content-between fs-3">
13 <span t-esc="props.default_cash_details.name" />
14 <span t-esc="env.utils.formatCurrency(props.default_cash_details.amount)" />
15 </div>
16 <div class="d-flex align-items-center justify-content-between text-muted border-start ps-2">
17 <span>Opening</span>
18 <span t-esc="env.utils.formatCurrency(props.default_cash_details.opening)" />
19 </div>
20 <t t-set="amountByEmployee" t-value="props.default_cash_details.amount_per_employee" />
21 <PaymentMethodBreakdown title.translate="Payments" total_amount="props.default_cash_details.payment_amount" transactions="props.default_cash_details.amount_per_employee"/>
22 <PaymentMethodBreakdown title.translate="Cash in/out" total_amount="getMovesTotalAmount()" transactions="props.default_cash_details.moves_per_employee"/>
23 <div class="d-flex align-items-center justify-content-between text-muted border-start ps-2">
24 <span>Counted</span>
25 <span t-esc="env.utils.formatCurrency(env.utils.parseValidFloat(counted))" />
26 </div>
27 <div class="d-flex align-items-center justify-content-between text-muted border-start ps-2" t-att-class="{'text-danger fw-bold': diff}">
28 <span>Difference</span>
29 <span class="cash-difference" t-esc="env.utils.formatCurrency(diff)" />
30 </div>
31 </div>
32 <div class="w-100 mb-3" t-foreach="props.non_cash_payment_methods" t-as="pm" t-key="pm.id">
33 <t t-set="_showDiff" t-value="pm.type === 'bank' and pm.number !== 0" />
34 <t t-set="diff" t-value="_showDiff ? getDifference(pm.id) : 0" />
35 <t t-set="counted" t-value="_showDiff ? env.utils.parseValidFloat(state.payments[pm.id].counted) : 0" />
36 <div class="d-flex align-items-center justify-content-between fs-3">
37 <span t-esc="pm.name" />
38 <span t-esc="env.utils.formatCurrency(pm.amount)" />
39 </div>
40 <PaymentMethodBreakdown title.translate="Payments" total_amount="pm.amount" transactions="pm.amount_per_employee"/>
41 <div class="d-flex align-items-center justify-content-between text-muted border-start ps-2" t-att-class="{'text-danger fw-bold': diff}">
42 <span>Difference</span>
43 <span t-esc="env.utils.formatCurrency(diff)" />
44 </div>
45 </div>
46 </t>
47 </xpath>
48 </t>
49 </templates>