[interchange] Have taxable_amount() check for item-level discounts too

Jon Jensen interchange-cvs at icdevgroup.org
Mon Jul 11 20:34:16 UTC 2011


commit a3f2836d8c7fe5952113e1b8b37c5067032b9ecc
Author: Josh Lavin <josh at perusion.com>
Date:   Mon Jul 11 14:16:40 2011 -0500

    Have taxable_amount() check for item-level discounts too

 lib/Vend/Interpolate.pm |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/Vend/Interpolate.pm b/lib/Vend/Interpolate.pm
index c02f6f1..f16c6e1 100644
--- a/lib/Vend/Interpolate.pm
+++ b/lib/Vend/Interpolate.pm
@@ -5365,11 +5365,11 @@ sub taxable_amount {
 		$item =	$Vend::Items->[$i];
 		next if is_yes( $item->{mv_nontaxable} );
 		next if is_yes( item_field($item, $Vend::Cfg->{NonTaxableField}) );
-		unless (%$::Discounts) {
-			$taxable += item_subtotal($item);
+		if (%$::Discounts or $item->{mv_discount}) {
+			$taxable += apply_discount($item);
 		}
 		else {
-			$taxable += apply_discount($item);
+			$taxable += item_subtotal($item);
 		}
     }
 



More information about the interchange-cvs mailing list