diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 488ad056cf3..458fbca1da6 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1848,6 +1848,16 @@ class Orderline extends PosModel { return this.get_base_price(); } } + get_taxed_lst_unit_price(){ + var lst_price = this.get_lst_price(); + if (this.pos.config.iface_tax_included === 'total') { + var product = this.get_product(); + var taxes_ids = product.taxes_id; + var product_taxes = this.get_taxes_after_fp(taxes_ids); + return this.compute_all(product_taxes, lst_price, 1, this.pos.currency.rounding).total_included; + } + return lst_price; + } get_price_without_tax(){ return this.get_all_prices().priceWithoutTax; } diff --git a/addons/point_of_sale/static/src/xml/Screens/ProductScreen/Orderline.xml b/addons/point_of_sale/static/src/xml/Screens/ProductScreen/Orderline.xml index 9cfead35289..ca9f441a4cc 100644 --- a/addons/point_of_sale/static/src/xml/Screens/ProductScreen/Orderline.xml +++ b/addons/point_of_sale/static/src/xml/Screens/ProductScreen/Orderline.xml @@ -37,9 +37,9 @@ at + env.pos.round_decimals_currency(props.line.get_unit_display_price()) < env.pos.round_decimals_currency(props.line.get_taxed_lst_unit_price())"> - +