diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 09becbfd4..33fbe504a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,5 +1,6 @@ 7.9.5 - fixed #11556: New cart doesn't work with other forms on the same page + - fixed #11557: Shop credit deduction calculated incorrectly 7.9.4 - We're shipping underscore.js now for its suite of extremely handy utility diff --git a/lib/WebGUI/Shop/Cart.pm b/lib/WebGUI/Shop/Cart.pm index 668b68c81..ddfe644d9 100644 --- a/lib/WebGUI/Shop/Cart.pm +++ b/lib/WebGUI/Shop/Cart.pm @@ -1183,7 +1183,7 @@ sub www_view { $var{totalPrice} = $var{subtotalPrice} + $var{shippingPrice} + $var{tax}; my $credit = WebGUI::Shop::Credit->new($session, $posUser->userId); $var{ inShopCreditAvailable } = $credit->getSum; - $var{ inShopCreditDeduction } = $credit->calculateDeduction($var{totalPrice}); + $var{ inShopCreditDeduction } = $self->calculateShopCreditDeduction($var{totalPrice}); $var{ totalPrice } = $self->formatCurrency($var{totalPrice} + $var{inShopCreditDeduction}); foreach my $field (qw/subtotalPrice inShopCreditAvailable inShopCreditDeduction totalPrice shippingPrice tax/) { $var{$field} = sprintf q|%s|, $field, $var{$field};