Vijaykumar Baladaniya has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1099410-vba into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1099410-vba/+merge/143444

Hello Sir,

    I have improve the code of points of sale for NaN appears when entering a 
discount in a session.

Thanks,
 vba
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1099410-vba/+merge/143444
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1099410-vba.
=== modified file 'point_of_sale/static/src/js/models.js'
--- point_of_sale/static/src/js/models.js	2013-01-11 14:42:19 +0000
+++ point_of_sale/static/src/js/models.js	2013-01-16 07:36:22 +0000
@@ -359,7 +359,7 @@
         // product's unity of measure properties. Quantities greater than zero will not get 
         // rounded to zero
         set_quantity: function(quantity){
-            if(_.isNaN(quantity)){
+            if((_.isNaN(quantity)) || quantity == 0){
                 this.order.removeOrderline(this);
             }else if(quantity !== undefined){
                 this.quantity = Math.max(0,quantity);
@@ -803,7 +803,7 @@
             this.updateTarget();
         },
         deleteLastChar: function() {
-            var tempNewBuffer = this.get('buffer').slice(0, -1);
+            var tempNewBuffer = this.get('buffer').slice(0, -1) || "0";
 
             if(!tempNewBuffer){
                 this.set({ buffer: "0" });

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to