[freeside-commits] freeside/FS/FS/cust_main Billing_Realtime.pm, 1.14, 1.15

Erik Levinson levinse at wavetail.420.am
Sun Jan 23 14:53:22 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/cust_main
In directory wavetail.420.am:/tmp/cvs-serv2777/FS/FS/cust_main

Modified Files:
	Billing_Realtime.pm 
Log Message:
fix annoying warnings caused by prev commits for RT11237

Index: Billing_Realtime.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Billing_Realtime.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- Billing_Realtime.pm	23 Jan 2011 04:56:10 -0000	1.14
+++ Billing_Realtime.pm	23 Jan 2011 22:53:20 -0000	1.15
@@ -322,7 +322,9 @@
   ###
 
   my $cc_surcharge = 0;
-  my $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage');
+  my $cc_surcharge_pct = 0;
+  $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage') 
+    if $conf->config('credit-card-surcharge-percentage');
   
   # always add cc surcharge if called from event 
   if($options{'cc_surcharge_from_event'} && $cc_surcharge_pct > 0) {
@@ -335,10 +337,9 @@
 				 # amount as post-surcharge
     $cc_surcharge = $options{'amount'} - ($options{'amount'} / ( 1 + $cc_surcharge_pct/100 ));
   }
-  if ( $cc_surcharge > 0) {
-      $cc_surcharge = sprintf("%.2f",$cc_surcharge);
+  
+  $cc_surcharge = sprintf("%.2f",$cc_surcharge) if $cc_surcharge > 0;
       $options{'cc_surcharge'} = $cc_surcharge;
-  }
  
 
   if ( $DEBUG ) {



More information about the freeside-commits mailing list