diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 1160fcf9807..b2621118d4a 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -433,6 +433,10 @@ var PosDB = core.Class.extend({ } } + // Only necessary when we store a new, validated order. Orders + // that where already stored should already have been removed. + this.remove_unpaid_order(order); + orders.push({id: order_id, data: order}); this.save('orders',orders); return order_id; diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index fb6c2a71a43..3a8d20a839b 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1861,7 +1861,7 @@ var PaymentScreenWidget = ScreenWidget.extend({ } // if the change is too large, it's probably an input error, make the user confirm. - if (!force_validation && (order.get_total_with_tax() * 1000 < order.get_total_paid())) { + if (!force_validation && order.get_total_with_tax() > 0 && (order.get_total_with_tax() * 1000 < order.get_total_paid())) { this.gui.show_popup('confirm',{ title: _t('Please Confirm Large Amount'), body: _t('Are you sure that the customer wants to pay') +