Skip to content

Commit

Permalink
pos_cagnotte_coupon : use pos decimal when set solde cagnotte
Browse files Browse the repository at this point in the history
  • Loading branch information
Laetitia Gangloff committed Jan 14, 2016
1 parent ebec1ae commit 63ef5e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pos_cagnotte_coupon/static/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ openerp.pos_cagnotte_coupon = function (instance) {
//sets the account_cagnotte_id on this payment line
set_coupon: function(coupon){
this.account_cagnotte_id = coupon.id;
this.solde_cagnotte = coupon.solde_cagnotte;
this.solde_cagnotte = coupon.solde_cagnotte.toFixed(this.pos.currency.decimals);
if (coupon.solde_cagnotte <= 0){
coupon.solde_cagnotte = this.get_amount();
coupon.solde_cagnotte = this.toFixed(this.pos.currency.decimals);
}
this.set_amount(Math.min(coupon.solde_cagnotte, this.get_amount()));
},
Expand Down

0 comments on commit 63ef5e0

Please sign in to comment.