diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml
index 55873887210..03a7decd81e 100644
--- a/addons/point_of_sale/report/pos_receipt.rml
+++ b/addons/point_of_sale/report/pos_receipt.rml
@@ -104,12 +104,18 @@
|
[[ repeatIn(o.lines,'line') ]]
[[ line.product_id.name ]]
+
+ With a [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]) % discount.
+
+
+
+
|
[[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]]
|
- [[o.state=='cancel' and o.statement_ids and '-' or '']][[ '%.2f' % net(line.id) ]] [[company.currency_id.symbol]] [[ line and line.discount == 0.0 and removeParentNode('font') ]] ([[ '%.2f' % line.discount ]]%) [[company.currency_id.symbol]]
+ [[o.state=='cancel' and o.statement_ids and '-' or '']][[ '%.2f' % net(line.id) ]] [[company.currency_id.symbol]]
|
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/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 1ad03c5ead1..1f8a35c3105 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -966,6 +966,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
this.$('#payment-paid-total').html(paidTotal.toFixed(2));
this.$('#payment-remaining').html(remaining.toFixed(2));
this.$('#payment-change').html(change.toFixed(2));
+ if((currentOrder.selected_orderline == undefined))
+ remaining = 1
+
if(this.pos_widget.action_bar){
this.pos_widget.action_bar.set_button_disabled('validation', remaining > 0);
}
diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml
index 854dd61cc1b..89d0a93fef2 100644
--- a/addons/point_of_sale/static/src/xml/pos.xml
+++ b/addons/point_of_sale/static/src/xml/pos.xml
@@ -541,8 +541,9 @@