[interchange] Allow to override item tax calculation with tax value in $Items as tax rates may vary between items.
Stefan Hornburg <[email protected]>
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 4acb1f0b7e2474cb32f2935006e91bcef295bd40 Author: Stefan Hornburg (Racke) <[email protected]> Date: Tue Oct 30 12:57:00 2012 +0100 Allow to override item tax calculation with tax value in $Items as tax rates may vary between items. lib/Vend/Payment/PaypalExpress.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff --git a/lib/Vend/Payment/PaypalExpress.pm b/lib/Vend/Payment/PaypalExpress.pm index d5d632d..364efa2 100644 --- a/lib/Vend/Payment/PaypalExpress.pm +++ b/lib/Vend/Payment/PaypalExpress.pm @@ -1088,7 +1088,7 @@ return $Tag->deliver({ location => $redirecturl }); description => Vend::Data::item_description($item), amount => Vend::Data::item_price($item), comment => Vend::Data::item_field($item, 'comment'), - tax => (Vend::Data::item_price($item)/$itemTotal * $taxTotal), + tax => exists $item->{'tax'} ? $item->{'tax'} : (Vend::Data::item_price($item)/$itemTotal * $taxTotal), rpAmount => Vend::Data::item_field($item, 'rpamount'), };