Skip to content

Commit

Permalink
fixed bug for no tax output
Browse files Browse the repository at this point in the history
  • Loading branch information
webben-de committed Feb 2, 2016
1 parent cc17079 commit 6867502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ngCart.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ angular.module('ngCart', ['ngCart.directives'])
};
};

this.addItem = function (id, name, price, quantity, data) {
this.addItem = function (id, name, price, quantity, data, tax) {

var inCart = this.getItemById(id);

Expand All @@ -47,7 +47,7 @@ angular.module('ngCart', ['ngCart.directives'])
inCart.setQuantity(quantity, false);
$rootScope.$broadcast('ngCart:itemUpdated', inCart);
} else {
var newItem = new ngCartItem(id, name, price, quantity, data);
var newItem = new ngCartItem(id, name, price, quantity, data, tax);
this.$cart.items.push(newItem);
$rootScope.$broadcast('ngCart:itemAdded', newItem);
}
Expand Down Expand Up @@ -202,7 +202,7 @@ angular.module('ngCart', ['ngCart.directives'])

this.$save = function () {
return store.set('cart', JSON.stringify(this.getCart()));
}
};

}])

Expand Down

0 comments on commit 6867502

Please sign in to comment.