[freeside-commits] freeside/httemplate/view/cust_main/payment_history voided_payment.html, 1.4, 1.5 credit.html, 1.5, 1.6 payment.html, 1.6, 1.7

Ivan,,, ivan at wavetail.420.am
Mon Mar 8 02:57:08 PST 2010


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

Modified Files:
	voided_payment.html credit.html payment.html 
Log Message:
proper use of date_format config for international date formats, RT#7009

Index: voided_payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/voided_payment.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- voided_payment.html	5 Oct 2009 16:57:27 -0000	1.4
+++ voided_payment.html	8 Mar 2010 10:57:06 -0000	1.5
@@ -1,10 +1,12 @@
 <DEL>Payment <% $info %></DEL>
-<I>voided <% time2str("%D", $cust_pay_void->void_date) %>
+<I>voided <% time2str($date_format, $cust_pay_void->void_date) %>
 by <% $cust_pay_void->otaker %></I><% $unvoid %>
 <%init>
 
 my( $cust_pay_void, %opt ) = @_;
 
+my $date_format = $opt{'date_format'} || '%m/%d/%Y';
+
 my $curuser = $FS::CurrentUser::CurrentUser;
 
 my $payby = $cust_pay_void->payby;

Index: payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/payment.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- payment.html	26 Oct 2009 07:12:12 -0000	1.6
+++ payment.html	8 Mar 2010 10:57:06 -0000	1.7
@@ -4,6 +4,8 @@
 
 my( $cust_pay, %opt ) = @_;
 
+my $date_format = $opt{'date_format'} || '%m/%d/%Y';
+
 my $conf = new FS::Conf;
 my $curuser = $FS::CurrentUser::CurrentUser;
 
@@ -87,7 +89,7 @@
           && scalar(@cust_pay_refund) == 1
           && $cust_pay->unapplied == 0     ) {
   #applied to one refund
-  $desc .= ' refunded on '. time2str("%D", $cust_pay_refund[0]->_date);
+  $desc .= ' refunded on '. time2str($date_format, $cust_pay_refund[0]->_date);
 } else {
   #complicated
   $desc .= '<BR>';
@@ -98,11 +100,11 @@
                '$'. $app->amount.
                ' '. $app->applied_to_invoice.
                '<BR>';
-               #' on '. time2str("%D", $cust_bill_pay->_date).
+               #' on '. time2str($date_format, $cust_bill_pay->_date).
     } elsif ( $app->isa('FS::cust_pay_refund') ) {
       $desc .= '&nbsp;&nbsp;'.
                '$'. $app->amount.
-               ' refunded on '. time2str("%D", $app->_date).
+               ' refunded on '. time2str($date_format, $app->_date).
                '<BR>';
     } else {
       die "$app is not a FS::cust_bill_pay or FS::cust_pay_refund";

Index: credit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history/credit.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- credit.html	26 Oct 2009 07:12:12 -0000	1.5
+++ credit.html	8 Mar 2010 10:57:06 -0000	1.6
@@ -4,6 +4,8 @@
 
 my( $cust_credit, %opt ) = @_;
 
+my $date_format = $opt{'date_format'} || '%m/%d/%Y';
+
 my $conf = new FS::Conf;
 my $curuser = $FS::CurrentUser::CurrentUser;
 
@@ -64,7 +66,7 @@
           && scalar(@cust_credit_refund) == 1
           && $cust_credit->credited == 0      ) {
   #applied to one refund
-  $desc .= ' refunded on '.  time2str("%D", $cust_credit_refund[0]->_date);
+  $desc .= ' refunded on '.  time2str($date_format, $cust_credit_refund[0]->_date);
 } else {
   #complicated
   $desc .= '<BR>';
@@ -75,11 +77,11 @@
                '$'. $app->amount.
                ' '. $app->applied_to_invoice.
                '<BR>';
-               #' on '. time2str("%D", $app->_date).
+               #' on '. time2str($date_format, $app->_date).
     } elsif ( $app->isa('FS::cust_credit_refund') ) {
       $desc .= '&nbsp;&nbsp;'.
                '$'. $app->amount.
-               ' refunded on '. time2str("%D", $app->_date).
+               ' refunded on '. time2str($date_format, $app->_date).
                '<BR>';
     } else {
       die "$app is not a FS::cust_credit_bill or a FS::cust_credit_refund";



More information about the freeside-commits mailing list