[interchange-cvs] interchange - heins modified
lib/Vend/Interpolate.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Oct 31 13:00:38 EST 2005
User: heins
Date: 2005-10-31 18:00:38 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Fix bug where VAT was being calculated on item price before discount.
Revision Changes Path
2.257 +5 -5 interchange/lib/Vend/Interpolate.pm
rev 2.257, prev_rev 2.256
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.256
retrieving revision 2.257
diff -u -r2.256 -r2.257
--- Interpolate.pm 18 Oct 2005 15:38:47 -0000 2.256
+++ Interpolate.pm 31 Oct 2005 18:00:38 -0000 2.257
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.256 2005/10/18 15:38:47 jon Exp $
+# $Id: Interpolate.pm,v 2.257 2005/10/31 18:00:38 mheins Exp $
#
# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -28,7 +28,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.256 $, 10);
+$VERSION = substr(q$Revision: 2.257 $, 10);
@EXPORT = qw (
@@ -5393,7 +5393,7 @@
for(@$ary) {
next unless $_->[0];
push @taxes, $_->[0];
- }
+ }
}
else {
@taxes = $type;
@@ -5420,7 +5420,7 @@
if($t =~ /^(\d+(?:\.\d+)?)\s*(\%)$/) {
my $rate = $1;
$rate /= 100 if $2;
- $rate = $rate / (1 + $rate) if $Vend::Cfg->{TaxInclusive};
+ $rate = $rate / (1 + $rate) if $Vend::Cfg->{TaxInclusive};
my $amount = Vend::Interpolate::taxable_amount();
$total += ($rate * $amount);
}
@@ -5441,7 +5441,7 @@
$rate =~ s/\s*%\s*$// and $rate /= 100;
next if $rate <= 0;
$rate = $rate / (1 + $rate) if $Vend::Cfg->{TaxInclusive};
- my $sub = Vend::Data::item_subtotal($item);
+ my $sub = discount_subtotal($item);
#::logDebug("item $item->{code} subtotal=$sub");
$total += $sub * $rate;
#::logDebug("tax total=$total");
More information about the interchange-cvs
mailing list