[freeside-commits] freeside/httemplate/view/cust_main/payment_history payment.html, 1.12, 1.13

Erik Levinson levinse at wavetail.420.am
Sat May 21 09:43:31 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history
In directory wavetail.420.am:/tmp/cvs-serv659/httemplate/view/cust_main/payment_history

Modified Files:
	payment.html 
Log Message:
fix regression caused by internationalization/localization, RT12515

Index: payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/payment.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- payment.html	18 May 2011 01:06:28 -0000	1.12
+++ payment.html	21 May 2011 16:43:28 -0000	1.13
@@ -33,18 +33,26 @@
 
 my $apply = '';
 
+my $italicize_otaker = 0;
 my $otaker = $cust_pay->otaker;
-$otaker = '<i>auto billing</i>'          if $otaker eq 'fs_daily';
-$otaker = '<i>customer self-service</i>' if $otaker eq 'fs_selfservice';
+if ( $otaker eq 'fs_daily' ) {
+    $otaker = 'auto billing';
+    $italicize_otaker = 1;
+}
+if ( $otaker eq 'fs_selfservice' ) {
+    $otaker = 'customer self-service';
+    $italicize_otaker = 1;
+}
 
 my $payment = emt("Payment by [_1]",$otaker);
+$payment =~ s/$otaker/<i>$otaker<\/i>/ if $italicize_otaker;
 
 if (    scalar(@cust_bill_pay)   == 0
      && scalar(@cust_pay_refund) == 0 ) {
   #completely unapplied
-  $payment = '<B><FONT COLOR="#FF0000">' 
-                . emt("Unapplied Payment by [_1]",$otaker)
-                . '</FONT></B>';
+  $payment = emt("Unapplied Payment by [_1]",$otaker);
+  $payment =~ s/$otaker/<i>$otaker<\/i>/ if $italicize_otaker;
+  $payment = '<B><FONT COLOR="#FF0000">'.$payment.'</FONT></B>';
   if ( $curuser->access_right('Apply payment') ) {
     if ( $cust_pay->cust_main->total_owed > 0 ) {
       $apply = ' ('.



More information about the freeside-commits mailing list