proper use of date_format config for international date formats, RT#7009
[freeside.git] / httemplate / edit / cust_credit.cgi
index febf281..dc80847 100755 (executable)
@@ -14,7 +14,7 @@
 
   <TR>
     <TD ALIGN="right">Date</TD>
-    <TD BGCOLOR="#ffffff"><% time2str("%D",$_date) %></TD>
+    <TD BGCOLOR="#ffffff"><% time2str($date_format, $_date) %></TD>
   </TR>
 
   <TR>
 </FORM>
 </BODY>
 </HTML>
-<%once>
+<%init>
 
 my $conf = new FS::Conf;
-
-</%once>
-<%init>
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
 
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Post credit');