From 5b48e0894e293cb811a52b236186ad0b7f7e2b50 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Fri, 5 Oct 2012 16:35:04 +0530 Subject: [PATCH] [IMP]discount shows grey and small font under product and total discount amt shows after tax bzr revid: sgo@tinyerp.com-20121005110504-63l1uzxi0fomn4ic --- addons/point_of_sale/static/src/css/pos.css | 5 +++++ addons/point_of_sale/static/src/js/models.js | 5 +++++ addons/point_of_sale/static/src/xml/pos.xml | 14 ++++++-------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index cbb625c02d7..5881fb30f17 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -102,6 +102,11 @@ border: 1px solid #cecbcb; border-radius: 4px; } +.point-of-sale .pos-disc-font { + font-size: 12px; + font-style:italic; + color: #808080; +} /* ********* The black header bar ********* */ diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 2c6f4e8b6e0..fd46476dbe2 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -614,6 +614,11 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal return sum + orderLine.get_price_with_tax(); }), 0); }, + getDiscountTotal: function() { + return (this.get('orderLines')).reduce((function(sum, orderLine) { + return sum + (orderLine.get_list_price() * (orderLine.get_discount()/100) * orderLine.get_quantity()); + }), 0); + }, getTotalTaxExcluded: function() { return (this.get('orderLines')).reduce((function(sum, orderLine) { return sum + orderLine.get_price_without_tax(); diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 49864f8ae68..cbaf1423b1b 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -555,8 +555,8 @@ -
  • - % discount +
  • + With a % discount
  • @@ -564,12 +564,7 @@ - - -
  • - - -
  • -
    + @@ -578,6 +573,9 @@ Tax: + Discount: + + Total: