From 4c1016415c3522a23edbf85922ee670132654593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 24 Jan 2013 17:22:25 +0100 Subject: [PATCH] [FIX] point_of_sale: add subtotal to printed ticket bzr revid: fva@openerp.com-20130124162225-wv0vgody2xtx2hog --- addons/point_of_sale/static/src/js/models.js | 5 ++--- addons/point_of_sale/static/src/xml/pos.xml | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index fb5c9c6f417..bb5767bf537 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -351,7 +351,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, // sets a discount [0,100]% set_discount: function(discount){ - console.log('set_discount: ',discount); var disc = Math.min(Math.max(parseFloat(discount) || 0, 0),100); this.discount = disc; this.discountStr = '' + disc; @@ -371,7 +370,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal // product's unity of measure properties. Quantities greater than zero will not get // rounded to zero set_quantity: function(quantity){ - console.log('set_quantity: ',quantity); if(quantity === 'remove'){ this.order.removeOrderline(this); return; @@ -472,7 +470,6 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal }, // changes the base price of the product for this orderline set_unit_price: function(price){ - console.log('set_price: ',price); this.price = round(parseFloat(price) || 0, 2); this.trigger('change'); }, @@ -738,10 +735,12 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal return { orderlines: orderlines, paymentlines: paymentlines, + subtotal: this.getSubtotal(), total_with_tax: this.getTotalTaxIncluded(), total_without_tax: this.getTotalTaxExcluded(), total_tax: this.getTax(), total_paid: this.getPaidTotal(), + total_discount: this.getDiscountTotal(), change: this.getChange(), name : this.getName(), client: client ? client.name : null , diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index db63030615f..aca1c8e56df 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -600,6 +600,9 @@
+
Subtotal: + +
Tax: