[interchange] Allow to override item tax calculation with tax value in $Items as tax rates may vary between items.
Stefan Hornburg
interchange-cvs at icdevgroup.org
Tue Oct 30 11:58:47 UTC 2012
commit 4acb1f0b7e2474cb32f2935006e91bcef295bd40
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
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'),
};
More information about the interchange-cvs
mailing list