diff --git a/addons/point_of_sale/static/src/app/store/models.js b/addons/point_of_sale/static/src/app/store/models.js
index 066eb51595e..8d9a4fbf183 100644
--- a/addons/point_of_sale/static/src/app/store/models.js
+++ b/addons/point_of_sale/static/src/app/store/models.js
@@ -778,6 +778,7 @@ export class Orderline extends PosModel {
price_without_tax: this.get_price_without_tax(),
price_with_tax_before_discount: this.get_price_with_tax_before_discount(),
tax: this.get_tax(),
+ tax_details: this.get_tax_details(),
product_description: this.get_product().description,
product_description_sale: this.get_product().description_sale,
pack_lot_lines: this.get_lot_lines(),
@@ -995,7 +996,10 @@ export class Orderline extends PosModel {
);
all_taxes.taxes.forEach(function (tax) {
taxtotal += tax.amount;
- taxdetail[tax.id] = tax.amount;
+ taxdetail[tax.id] = {
+ amount: tax.amount,
+ base: tax.base,
+ };
});
return {
@@ -2299,7 +2303,10 @@ export class Order extends PosModel {
var ldetails = line.get_tax_details();
for (var id in ldetails) {
if (Object.hasOwnProperty.call(ldetails, id)) {
- details[id] = (details[id] || 0) + ldetails[id];
+ details[id] = {
+ amount: (details[id]?.amount || 0) + ldetails[id].amount,
+ base: (details[id]?.base || 0) + ldetails[id].base,
+ };
}
}
});
@@ -2307,7 +2314,8 @@ export class Order extends PosModel {
for (var id in details) {
if (Object.hasOwnProperty.call(details, id)) {
fulldetails.push({
- amount: details[id],
+ amount: details[id].amount,
+ base: details[id].base,
tax: this.pos.taxes_by_id[id],
name: this.pos.taxes_by_id[id].name,
});
diff --git a/addons/point_of_sale/static/src/css/pos_receipts.css b/addons/point_of_sale/static/src/css/pos_receipts.css
index 9ac97fdb1bc..cb76d7d8dde 100644
--- a/addons/point_of_sale/static/src/css/pos_receipts.css
+++ b/addons/point_of_sale/static/src/css/pos_receipts.css
@@ -13,6 +13,11 @@
.pos-receipt .pos-receipt-right-align {
float: right;
+ display: flex;
+}
+
+.pos-receipt .pos-receipt-right-align .tax-letter{
+ margin-left: 0.5em;
}
.pos-receipt .pos-receipt-center-align {
@@ -81,3 +86,10 @@
.responsive-price > .pos-receipt-right-align {
margin-left: auto;
}
+
+.pos-receipt .pos-receipt-taxes {
+ display: grid;
+ grid-template-columns: min-content min-content auto auto auto;
+ width: 100%;
+ justify-items: end;
+}