Fix display of the shop credit deduction when there's a recurring item in the cart. Fixes bug #11557

This commit is contained in:
Colin Kuskie 2010-05-05 18:29:03 -07:00
parent eb9d32f6f5
commit f04cf29300
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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|<span id="%sWrap">%s</span>|, $field, $var{$field};