proper use of date_format config for international date formats, RT#7009
[freeside.git] / httemplate / view / cust_main / payment_history.html
index 56a2c4d..0dc4c41 100644 (file)
 
    <TR ID="balance_forward_row">
      <TD CLASS="grid" BGCOLOR="#dddddd">
-       <% time2str("%D",$date) %>
+       <% time2str($date_format, $date) %>
      </TD>
 
      <TD CLASS="grid" BGCOLOR="#dddddd">
-       <I>Starting balance on <% time2str("%D",$date) %></I>
+       <I>Starting balance on <% time2str($date_format, $date) %></I>
        (<A HREF="javascript:void(0);" onClick="show_history();">show prior history</A>)
      </TD>
 
         <A NAME="<% $target %>">
 % } 
 
-      <% time2str("%D",$item->{'date'}) %>
+      <% time2str($date_format, $item->{'date'}) %>
 % if ( $target && $target{$target} == 1 ) { 
 
         </A>
@@ -355,6 +355,7 @@ my( $cust_main ) = @_;
 my $custnum = $cust_main->custnum;
 
 my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
 
 my $curuser = $FS::CurrentUser::CurrentUser;
 
@@ -376,7 +377,7 @@ my @history = ();
 
 my %opt = (
   ( map { $_ => scalar($conf->config($_)) }
-        qw( card_refund-days )
+        qw( card_refund-days date_format )
   ),
   ( map { $_ => $conf->exists($_) } 
         qw( deleteinvoices deletepayments deleterefunds pkg-balances )