[FIX] point_of_sale: currency and decimal precision on ESC/POS receipt
Decimals were either hardcoded or not set at all. opw-741752
This commit is contained in:
@@ -715,7 +715,7 @@
|
||||
<t t-if='simple'>
|
||||
<line>
|
||||
<left><t t-esc='line.product_name' /></left>
|
||||
<right><value><t t-esc='line.price_display' /></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='line.price_display' /></value></right>
|
||||
</line>
|
||||
</t>
|
||||
<t t-if='!simple'>
|
||||
@@ -725,19 +725,19 @@
|
||||
</t>
|
||||
<line indent='1'>
|
||||
<left>
|
||||
<value value-decimals='3' value-autoint='on'>
|
||||
<value t-att-value-decimals='pos.dp["Product Unit of Measure"]' value-autoint='on'>
|
||||
<t t-esc='line.quantity' />
|
||||
</value>
|
||||
<t t-if='line.unit_name !== "Unit(s)"'>
|
||||
<t t-esc='line.unit_name' />
|
||||
</t>
|
||||
x
|
||||
<value value-decimals='2'>
|
||||
<value t-att-value-decimals='pos.dp["Product Price"]'>
|
||||
<t t-esc='line.price' />
|
||||
</value>
|
||||
</left>
|
||||
<right>
|
||||
<value><t t-esc='line.price_display' /></value>
|
||||
<value t-att-value-decimals='pos.currency.decimals'><t t-esc='line.price_display' /></value>
|
||||
</right>
|
||||
</line>
|
||||
</t>
|
||||
@@ -749,11 +749,11 @@
|
||||
<t t-set='taxincluded' t-value='Math.abs(receipt.subtotal - receipt.total_with_tax) <= 0.000001' />
|
||||
<t t-if='!taxincluded'>
|
||||
<line><right>--------</right></line>
|
||||
<line><left>Subtotal</left><right> <value><t t-esc="receipt.subtotal" /></value></right></line>
|
||||
<line><left>Subtotal</left><right><value t-att-value-decimals='pos.currency.decimals'><t t-esc="receipt.subtotal" /></value></right></line>
|
||||
<t t-foreach='receipt.tax_details' t-as='tax'>
|
||||
<line>
|
||||
<left><t t-esc='tax.name' /></left>
|
||||
<right><value><t t-esc='tax.amount' /></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='tax.amount' /></value></right>
|
||||
</line>
|
||||
</t>
|
||||
</t>
|
||||
@@ -763,7 +763,7 @@
|
||||
<line><right>--------</right></line>
|
||||
<line class='total' size='double-height'>
|
||||
<left><pre> TOTAL</pre></left>
|
||||
<right><value><t t-esc='receipt.total_with_tax' /></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='receipt.total_with_tax' /></value></right>
|
||||
</line>
|
||||
<br/><br/>
|
||||
|
||||
@@ -772,14 +772,14 @@
|
||||
<t t-foreach='paymentlines' t-as='line'>
|
||||
<line>
|
||||
<left><t t-esc='line.name' /></left>
|
||||
<right><value><t t-esc='line.get_amount()'/></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='line.get_amount()'/></value></right>
|
||||
</line>
|
||||
</t>
|
||||
<br/>
|
||||
|
||||
<line size='double-height'>
|
||||
<left><pre> CHANGE</pre></left>
|
||||
<right><value><t t-esc='receipt.change' /></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='receipt.change' /></value></right>
|
||||
</line>
|
||||
<br/>
|
||||
|
||||
@@ -788,19 +788,19 @@
|
||||
<t t-if='receipt.total_discount'>
|
||||
<line>
|
||||
<left>Discounts</left>
|
||||
<right><value><t t-esc='receipt.total_discount'/></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='receipt.total_discount'/></value></right>
|
||||
</line>
|
||||
</t>
|
||||
<t t-if='taxincluded'>
|
||||
<t t-foreach='receipt.tax_details' t-as='tax'>
|
||||
<line>
|
||||
<left><t t-esc='tax.name' /></left>
|
||||
<right><value><t t-esc='tax.amount' /></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='tax.amount' /></value></right>
|
||||
</line>
|
||||
</t>
|
||||
<line>
|
||||
<left>Total Taxes</left>
|
||||
<right><value><t t-esc='receipt.total_tax'/></value></right>
|
||||
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='receipt.total_tax'/></value></right>
|
||||
</line>
|
||||
</t>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user