From 68a69a9700156b5539315fc4c22e13873278f192 Mon Sep 17 00:00:00 2001 From: Martin Kamerbeek Date: Wed, 15 Jul 2009 14:15:06 +0000 Subject: [PATCH] Fixed a bug in my purchases where tarnsaction amounts were shown that did not take into account the in store credit used in the transaction. --- docs/changelog/7.x.x.txt | 3 +++ lib/WebGUI/Account/Shop.pm | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ae57d30b8..f3996c479 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -13,6 +13,9 @@ - fixed a bug in the Ogone pay driver where for certain combinations of tax rates and in store credit a rounding error would prevent checkout at Ogone. ( Martin Kamerbeek / Oqapi ) + - fixed a bug in My Purchases where in store credit would not be taken into + account in the overview yielding zero or neagtive transaction amounts on + the screen. ( Martin Kamerbeek / Oqapi ) 7.7.14 - fixed #10606: shelf selector diff --git a/lib/WebGUI/Account/Shop.pm b/lib/WebGUI/Account/Shop.pm index 39134b813..c80b25a52 100644 --- a/lib/WebGUI/Account/Shop.pm +++ b/lib/WebGUI/Account/Shop.pm @@ -197,8 +197,8 @@ sub www_managePurchases { push @{$var->{transactions}}, { %{$transaction->get}, viewDetailUrl => $self->getUrl('op=account;module=shop;do=viewTransaction;transactionId='.$id), - amount => sprintf("%.2f", $transaction->get('amount')), - amountMinusTax => sprintf( '%.2f', $transaction->get('amount') - $transaction->get('taxes') ), + amount => sprintf( '%.2f', $transaction->get('amount') - $transaction->get('shopCreditDeduction') ), + amountMinusTax => sprintf( '%.2f', $transaction->get('amount') - $transaction->get('shopCreditDeduction') - $transaction->get('taxes') ), }; }