| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<templates id="template" xml:space="preserve"> |
| 3 |
<t t-name="point_of_sale.CustomerDisplay"> |
| 4 |
<t t-set="bgImgSrc" t-value="session.customer_display_bg_img ? 'url(/web/image/pos.config/' + pos.config.id + '/customer_display_bg_img)' : 'none'" /> |
| 5 |
<div class="o_customer_display d-flex h-100"> |
| 6 |
<div class="o_customer_display_sidebar d-flex flex-column align-items-center justify-content-center gap-2 p-4 bg-view" t-att-style="session.has_bg_img ? `background-image: url(/web/image/pos.config/${session.config_id}/customer_display_bg_img); min-width: 30%; min-height: 15%;` : ``"> |
| 7 |
<div t-if="!session.has_bg_img" class="o_customer_display_logo d-flex mw-50 mw-md-100 p-2 rounded-3 bg-white"> |
| 8 |
<img class="img-fluid" t-attf-src="/logo?company={{session.company_id}}"/> |
| 9 |
</div> |
| 10 |
<div class="position-absolute bottom-0 mb-4 d-none d-lg-flex align-items-center ps-3 pe-2 py-1 rounded-3 text-bg-dark small">Powered by <OdooLogo style="'width: 3rem;'" monochrome="true"/></div> |
| 11 |
</div> |
| 12 |
<div class="o_customer_display_main d-flex flex-column flex-grow-1 overflow-auto"> |
| 13 |
<div t-if="Object.keys(order).length and order.lines.length > 0 and !order.finalized" class="d-flex flex-column flex-grow-1 rounded-3 bg-white overflow-hidden"> |
| 14 |
<div t-ref="scrollable" style="scroll-snap-type: y mandatory;" class="gap-0 p-0 mx-2 pb-3 bg-view order-container d-flex flex-column flex-grow-1 overflow-y-auto text-start"> |
| 15 |
<li t-foreach="order.lines" t-as="line" t-key="line_index" class="orderline position-relative d-flex align-items-center p-2 lh-sm cursor-pointer o_customer_display_orderline bg-white fs-3 rounded-0" t-attf-class="{{ line.comboParent ? 'orderline-combo ms-4 fst-italic' : '' }} {{ line.isSelected ? 'selected' : '' }}"> |
| 16 |
<div class="o_line_container d-flex align-items-center justify-content-center"> |
| 17 |
<img t-attf-style="border-radius: 1rem;" t-att-src="`/web/image/product.product/${line.productId}/image_128`"/> |
| 18 |
</div> |
| 19 |
<div class="d-flex flex-column w-100 gap-1"> |
| 20 |
<div class="d-flex justify-content-between"> |
| 21 |
<div class="product-name d-inline-block flex-grow-1 fw-bolder pe-1 text-truncate"> |
| 22 |
<span class="text-wrap" t-esc="line.productName"/> |
| 23 |
</div> |
| 24 |
<div class="product-price price fw-bolder" t-esc="line.price" /> |
| 25 |
</div> |
| 26 |
<ul class="info-list d-flex flex-column p-0"> |
| 27 |
<li class="price-per-unit"> |
| 28 |
<span class="qty px-1 border rounded text-bg-view fw-bolder me-1" t-esc="line.qty"/> |
| 29 |
x |
| 30 |
<t t-if="line.price !== 0"> |
| 31 |
<t t-esc="line.unitPrice" /> |
| 32 |
</t> |
| 33 |
/ |
| 34 |
<t t-if="line.unit" t-esc="line.unit" /> |
| 35 |
</li> |
| 36 |
<li t-if="line.price !== 0 and line.discount and line.discount !== '0' and !props.basic_receipt"> |
| 37 |
<t t-esc="line.price_without_discount"/> With a <em><t t-esc="line.discount" />% </em> discount |
| 38 |
</li> |
| 39 |
<li t-if="line.customerNote" class="customer-note w-100 p-2 mt-2 rounded text-break text-bg-warning bg-opacity-25"> |
| 40 |
<i class="fa fa-sticky-note me-1" role="img" aria-label="Customer Note" title="Customer Note"/> |
| 41 |
<t t-esc="line.customerNote" /> |
| 42 |
</li> |
| 43 |
<div class="internal-note-container d-flex gap-2 p-2"> |
| 44 |
<TagsList tags="getInternalNotes()"/> |
| 45 |
</div> |
| 46 |
<li t-foreach="line.packLotLines or []" t-as="lot" t-key="lot_index" t-esc="lot" /> |
| 47 |
<t t-slot="default" /> |
| 48 |
</ul> |
| 49 |
</div> |
| 50 |
</li> |
| 51 |
<div t-if="props.generalCustomerNote" |
| 52 |
t-attf-class="{{ props.screenName == 'ReceiptScreen' ? 'mt-1 bg-opacity-75 p-0' : 'customer-note w-100 p-2 mt-2 rounded text-break text-bg-warning bg-opacity-25 mt-0'}}"> |
| 53 |
<div class="row flex-wrap w-100 m-0"> <!-- Add w-100 and remove margins --> |
| 54 |
<div class="col-auto px-1"> |
| 55 |
<i class="fa fa-sticky-note me-1 fa-lg" role="img" |
| 56 |
aria-label="Customer Note" title="Customer Note"/> |
| 57 |
</div> |
| 58 |
<div class="col ps-0"> |
| 59 |
<t t-foreach="props.generalCustomerNote.split('\n')" t-as="subNote" |
| 60 |
t-key="subNote_index"> |
| 61 |
<div class="d-inline text-break"> |
| 62 |
<t t-esc="subNote"/><br/> |
| 63 |
</div> |
| 64 |
</t> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
</div> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
<div t-elif="order.finalized" class="d-flex flex-column align-items-center justify-content-center h-100 w-100"> |
| 71 |
<h1 class="display-2 w-75 mt-2 fw-bold text-center text-muted">Thank you.</h1> |
| 72 |
</div> |
| 73 |
<div t-else="" class="d-flex flex-column align-items-center justify-content-center h-100 w-100"> |
| 74 |
<h1 class="display-2 w-75 mt-2 fw-bold text-center text-muted">Welcome.</h1> |
| 75 |
</div> |
| 76 |
<div t-if="order.scaleData"> |
| 77 |
<t t-set-slot="header"> |
| 78 |
<h4 class="modal-title text-break text-center w-100" t-att-class="{ 'me-auto': env.isSmall }"> |
| 79 |
<span class="me-2">Weighing Product:</span> |
| 80 |
<t t-esc="order.scaleData.product.name"/> |
| 81 |
</h4> |
| 82 |
</t> |
| 83 |
<div class="d-flex flex-column px-3"> |
| 84 |
<div class="d-flex justify-content-between align-items-center mb-2"> |
| 85 |
<div class="w-60 fs-5 me-2 form-control-plaintext">Gross Weight:</div> |
| 86 |
<div class="weight fs-5 js-weight text-end form-control-plaintext" t-esc="order.scaleData.grossWeight"></div> |
| 87 |
</div> |
| 88 |
<div class="d-flex justify-content-between align-items-center mb-2"> |
| 89 |
<div class="w-60 fs-5 me-2 form-control-plaintext">Tare Weight:</div> |
| 90 |
<div class="weight fs-5 js-weight text-end form-control-plaintext" t-esc="order.scaleData.tare"></div> |
| 91 |
</div> |
| 92 |
<div class="d-flex justify-content-between align-items-center mb-2"> |
| 93 |
<div class="w-60 fs-5 me-2 form-control-plaintext">Net Weight:</div> |
| 94 |
<div class="text-end fs-5 form-control-plaintext" t-esc="order.scaleData.netWeight"></div> |
| 95 |
</div> |
| 96 |
<div class="d-flex px-5 flex-row gap-2 m-2 align-items-center"> |
| 97 |
<div class="product-price w-50 fs-5 text-center" t-esc="order.scaleData.unitPrice"/> |
| 98 |
<div class="computed-price fd-flex flex-grow-1 p-2 rounded text-center text-bg-info bg-opacity-25 text-info fs-5 fw-bold" t-esc="order.scaleData.totalPrice" /> |
| 99 |
</div> |
| 100 |
</div> |
| 101 |
</div> |
| 102 |
|
| 103 |
<div t-if="order.amount and !order.finalized" class="py-3 px-4 bg-view border-top"> |
| 104 |
<div class="d-flex flex-column justify-content-center gap-1 w-100 w-sm-50 ms-auto"> |
| 105 |
<div class="d-flex flex-column gap-1 fw-bolder lh-sm"> |
| 106 |
<div t-if="order.subtotal" class="row fs-5 text-muted"> |
| 107 |
<div class="col text-end">Subtotal</div> |
| 108 |
<div class="col text-end" t-esc="order.subtotal"/> |
| 109 |
</div> |
| 110 |
<div t-if="order.amountTaxes" class="row fs-5 text-muted"> |
| 111 |
<div class="col text-end">Taxes</div> |
| 112 |
<div class="col text-end" t-esc="order.amountTaxes"/> |
| 113 |
</div> |
| 114 |
<div class="row fs-2"> |
| 115 |
<div class="col text-end">Total</div> |
| 116 |
<div class="col text-end" t-esc="order.amount"/> |
| 117 |
</div> |
| 118 |
</div> |
| 119 |
<div t-foreach="order.paymentLines or []" t-as="line" t-key="line_index" class="row"> |
| 120 |
<div class="col text-end" t-esc="line.name" /> |
| 121 |
<div class="col text-end" t-esc="line.amount"/> |
| 122 |
</div> |
| 123 |
<div class="row" t-if="order.change"> |
| 124 |
<div class="col text-end">Change</div> |
| 125 |
<div class="col text-end" t-esc="order.change"/> |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
</div> |
| 129 |
<div class="d-flex justify-content-center" t-att-class="{ 'bg-view': order.amount and !order.finalized }"> |
| 130 |
<div class=" bottom-0 mb-4 d-flex align-items-center ps-3 pe-2 py-1 rounded-3 small">Powered by <OdooLogo style="'width: 3rem;'"/></div> |
| 131 |
</div> |
| 132 |
</div> |
| 133 |
</div> |
| 134 |
<MainComponentsContainer /> |
| 135 |
</t> |
| 136 |
</templates> |