[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Jun 16 14:39:57 UTC 2008
User: heins
Date: 2008-06-16 14:39:57 GMT
Modified: lib/Vend Tag: STABLE_5_4-branch Interpolate.pm
Log:
* Fix deficiency in Levies, where multiple handling modes separated by null
would not work as in the old subtotal calculation model.
Revision Changes Path
No revision
No revision
2.261.2.7 interchange/lib/Vend/Interpolate.pm
rev 2.261.2.7, prev_rev 2.261.2.6
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.261.2.6
retrieving revision 2.261.2.7
diff -u -r2.261.2.6 -r2.261.2.7
--- Interpolate.pm 30 Mar 2007 12:15:28 -0000 2.261.2.6
+++ Interpolate.pm 16 Jun 2008 14:39:57 -0000 2.261.2.7
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.261.2.6 2007-03-30 12:15:28 pajamian Exp $
+# $Id: Interpolate.pm,v 2.261.2.7 2008-06-16 14:39:57 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.261.2.6 $, 10);
+$VERSION = substr(q$Revision: 2.261.2.7 $, 10);
@EXPORT = qw (
@@ -5847,8 +5847,21 @@
if(not $sort = $l->{sort}) {
$sort = $type eq 'handling' ? 100 : 500;
}
- $cost = shipping($mode);
- $l->{description} = tag_shipping_desc($mode);
+ $l->{description} = '';
+
+ my @modes = split /\0/, $mode;
+ for my $m (@modes) {
+ $cost += shipping($m);
+ if($l->{description}) {
+ if($l->{multi_description}) {
+ $l->{description} = $l->{multi_description};
+ }
+ else {
+ $l->{description} .= ', ' if $l->{description};
+ $l->{description} .= tag_shipping_desc($m);
+ }
+ }
+ }
}
elsif($type eq 'custom') {
my $sub;
More information about the interchange-cvs
mailing list