| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<templates id="template" xml:space="preserve"> |
| 3 |
|
| 4 |
<t t-name="point_of_sale.ReceiptScreen"> |
| 5 |
<div class="receipt-screen screen h-100 bg-100"> |
| 6 |
<div class="screen-content d-flex flex-column h-100"> |
| 7 |
<div class="default-view d-flex flex-lg-row flex-column overflow-hidden flex-grow-1"> |
| 8 |
<div class="actions d-flex flex-column justify-content-between flex-lg-grow-1 flex-grow-0 flex-shrink-1 flex-basis-0 border-end"> |
| 9 |
<div class="o_payment_successful d-flex flex-column w-100 w-xxl-75 p-3 pt-xxl-5 mx-auto"> |
| 10 |
<div class="d-flex flex-column align-items-center mb-3 p-1 p-lg-3 border border-success rounded-3 bg-success-subtle text-success fs-3"> |
| 11 |
<i t-if="!ui.isSmall" class="fa fa-fw fa-2x fa-check-circle"/> |
| 12 |
<span class="fs-3 fw-bolder"> |
| 13 |
<t t-if="currentOrder.isRefund">Refund Initiated</t> |
| 14 |
<t t-else="">Payment Successful</t> |
| 15 |
</span> |
| 16 |
<div class="fs-4 fw-bold d-flex justify-content-center align-items-center gap-2"> |
| 17 |
<span t-esc="orderAmountPlusTip" /> |
| 18 |
<span t-if="this.pos.canEditPayment(currentOrder)" class="edit-order-payment badge bg-success text-white rounded cursor-pointer pt-1" t-on-click="() => this.pos.orderDetails(this.currentOrder)">Edit Payment</span> |
| 19 |
</div> |
| 20 |
</div> |
| 21 |
<div class="receipt-options d-flex flex-column gap-2"> |
| 22 |
<div class="d-flex gap-1"> |
| 23 |
<button class="button print btn btn-lg btn-secondary w-100 py-3" t-on-click="() => doFullPrint.call()"> |
| 24 |
<i t-attf-class="fa {{doFullPrint.status === 'loading' ? 'fa-fw fa-spin fa-circle-o-notch' : 'fa-print'}} me-1" />Print Full Receipt |
| 25 |
</button> |
| 26 |
<button t-if="pos.config.basic_receipt" class="button print btn btn-lg btn-secondary w-100 py-3" t-on-click="() => doBasicPrint.call()"> |
| 27 |
<i t-attf-class="fa {{doBasicPrint.status === 'loading' ? 'fa-fw fa-spin fa-circle-o-notch' : 'fa-print'}} me-1" />Print Basic Receipt |
| 28 |
</button> |
| 29 |
</div> |
| 30 |
<div class="d-flex flex-column gap-2"> |
| 31 |
<div class="d-flex"> |
| 32 |
<input type="text" class="send-receipt-email-input o_input position-relative p-3 border border-end-0 rounded-start-2 text-body" t-attf-placeholder="e.g. [email protected]" t-model="state.email" /> |
| 33 |
<div> |
| 34 |
<button t-att-style="`width: ${this.ui.isSmall ? '4rem' : '8rem'}`" class="btn btn-primary btn-lg lh-lg rounded-start-0 h-100" t-att-disabled="!isValidEmail" t-on-click="() => this.actionSendReceiptOnEmail()"> |
| 35 |
<i t-attf-class="fa {{sendReceipt.status === 'loading' and sendReceipt.lastArgs?.[0]?.name === 'Email' ? 'fa-fw fa-spin fa-circle-o-notch' : 'fa-paper-plane'}}" /> |
| 36 |
</button> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
<div class="d-flex"> |
| 40 |
<input t-if="showPhoneInput()" type="text" class="send-receipt-phone-input o_input position-relative p-3 border border-end-0 rounded-2 text-body" t-attf-placeholder="e.g. 0123456789" t-model="state.phone" /> |
| 41 |
<div class="sending-receipt-management d-flex gap-1" /> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
<div class="notice text-center"> |
| 45 |
<t t-set="usedMethod" t-value="sendReceipt.lastArgs?.[0]?.name" /> |
| 46 |
<div t-if="sendReceipt.status === 'loading'" class="text-info">Sending <t t-esc="usedMethod"/> in progress</div> |
| 47 |
<div t-if="sendReceipt.status === 'success'" class="text-success"> |
| 48 |
<t t-if="this.currentOrder.is_invoiced">Receipt and invoice sent successfully</t> |
| 49 |
<t t-else="">Receipt sent successfully</t></div> |
| 50 |
<div t-if="sendReceipt.status === 'error'" class="text-danger">Sending <t t-esc="usedMethod"/> failed. Please try again</div> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
</div> |
| 54 |
<div id="action_btn_desktop" t-if="!ui.isSmall" class="validation-buttons d-flex w-100 gap-2 p-2 sticky-bottom"> |
| 55 |
<button class="button next validation btn btn-primary btn-lg w-100 py-4 lh-lg" t-att-class="{ highlight: !locked }" t-on-click="() => this.pos.orderDone(this.currentOrder)" name="done"> |
| 56 |
New Order |
| 57 |
</button> |
| 58 |
</div> |
| 59 |
</div> |
| 60 |
<div class="pos-receipt-container d-flex flex-grow-1 flex-lg-grow-0 w-100 w-lg-50 user-select-none justify-content-center bg-200 text-center overflow-hidden"> |
| 61 |
<div t-att-class="{ 'w-50': !ui.isSmall }" class="d-inline-block m-2 m-lg-3 p-3 border rounded text-start overflow-y-auto"> |
| 62 |
<OrderReceipt order="this.currentOrder" /> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
<div id="action_btn_mobile" t-if="ui.isSmall" class="switchpane d-flex gap-2 p-2"> |
| 67 |
<div class="btn-switchpane validation-button btn btn-primary btn-lg py-3 flex-fill lh-lg" t-att-class="{ highlight: !locked }" t-on-click="() => this.pos.orderDone(this.currentOrder)" name="done"> |
| 68 |
New Order |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</div> |
| 73 |
</t> |
| 74 |
|
| 75 |
</templates> |