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

Jon Jensen <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit a3f2836d8c7fe5952113e1b8b37c5067032b9ecc
Author: Josh Lavin <[email protected]>
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);
 		}
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.