<TR>
<TD ALIGN="right">Date</TD>
<TD COLSPAN=2>
- <INPUT TYPE="text" NAME="_date" ID="_date_text" VALUE="<% time2str("%m/%d/%Y %r",$_date) %>">
+ <INPUT TYPE="text" NAME="_date" ID="_date_text" VALUE="<% time2str($date_format.' %r',$_date) %>">
<IMG SRC="../images/calendar.png" ID="_date_button" STYLE="cursor: pointer" TITLE="Select date">
</TD>
</TR>
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "_date_text",
- ifFormat: "%m/%d/%Y",
+ ifFormat: "<% $date_format %>",
button: "_date_button",
align: "BR"
});
my $conf = new FS::Conf;
-my $money_char = $conf->config('money_char') || '$';
+my $money_char = $conf->config('money_char') || '$';
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Post payment');
$paid = $cgi->param('paid');
$payby = $cgi->param('payby');
$payinfo = $cgi->param('payinfo');
- $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time;
+ $_date = $cgi->param('_date') ? parse_datetime($cgi->param('_date')) : time;
} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
$link = $cgi->param('popup') ? 'popup' : 'custnum';
$linknum = $1;