[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Jun 16 14:39:08 UTC 2008
User: heins
Date: 2008-06-16 14:39:08 GMT
Modified: lib/Vend Tag: STABLE_5_6-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.303.2.1 interchange/lib/Vend/Interpolate.pm
rev 2.303.2.1, prev_rev 2.303
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.303
retrieving revision 2.303.2.1
diff -u -r2.303 -r2.303.2.1
--- Interpolate.pm 13 May 2008 22:33:15 -0000 2.303
+++ Interpolate.pm 16 Jun 2008 14:39:07 -0000 2.303.2.1
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.303 2008-05-13 22:33:15 jon Exp $
+# $Id: Interpolate.pm,v 2.303.2.1 2008-06-16 14:39:07 mheins Exp $
#
# Copyright (C) 2002-2008 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -28,7 +28,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.303 $, 10);
+$VERSION = substr(q$Revision: 2.303.2.1 $, 10);
@EXPORT = qw (
@@ -5923,8 +5923,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