[interchange-cvs] interchange - ton modified lib/Vend/Util.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Tue Feb 21 07:18:39 EST 2006


User:      ton
Date:      2006-02-21 12:18:38 GMT
Modified:  lib/Vend Util.pm
Log:
	Apply Mike's patch:
	Add display option to [item-price] and [item subtotal]

Revision  Changes    Path
2.92      +13 -2     interchange/lib/Vend/Util.pm


rev 2.92, prev_rev 2.91
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.91
retrieving revision 2.92
diff -u -r2.91 -r2.92
--- Util.pm	16 Feb 2006 21:44:10 -0000	2.91
+++ Util.pm	21 Feb 2006 12:18:38 -0000	2.92
@@ -1,6 +1,6 @@
 # Vend::Util - Interchange utility functions
 #
-# $Id: Util.pm,v 2.91 2006/02/16 21:44:10 kwalsh Exp $
+# $Id: Util.pm,v 2.92 2006/02/21 12:18:38 ton Exp $
 # 
 # Copyright (C) 2002-2005 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -88,7 +88,7 @@
 use Vend::File;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.91 $, 10);
+$VERSION = substr(q$Revision: 2.92 $, 10);
 
 my $Eval_routine;
 my $Eval_routine_file;
@@ -472,6 +472,17 @@
 
 	if($pd and $convert) {
 		$amount = $amount / $pd;
+	}
+
+	my $hash;
+	if(
+		$noformat =~ /\w+=\w\w/
+			and
+		ref($hash = get_option_hash($noformat)) eq 'HASH'
+	)
+	{
+		$opt->{display} ||= $hash->{display};
+		$noformat = $opt->{noformat} = $hash->{noformat};
 	}
 
 	return $amount if $noformat;








More information about the interchange-cvs mailing list