X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_credit.cgi;h=c8e697809d72d45a9d94f0bbed733e1e4c1dddca;hb=5b77b3d0c9aa2d0fa15ca5284d7e34ed68f4ee12;hp=6e8a9c9892e76fad982982e5404699d128d33983;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi index 6e8a9c989..c8e697809 100755 --- a/httemplate/edit/cust_credit.cgi +++ b/httemplate/edit/cust_credit.cgi @@ -6,26 +6,36 @@ - <% ntable("#cccccc", 2) %> - - <% mt('Date') |h %> - <% time2str($date_format, $_date) %> - +% my %date_args = ( +% 'name' => '_date', +% 'label' => emt('Date'), +% 'value' => $_date, +% 'format' => $date_format. ' %r', +% ); +% if ( $FS::CurrentUser::CurrentUser->access_right('Backdate credit') ) { + + <& /elements/tr-input-date-field.html, \%date_args &> + +% } else { + + <& /elements/tr-fixed-date.html, \%date_args &> + +% } <% mt('Amount') |h %> - $ + <% $money_char |h %> <& /elements/tr-select-reason.html, 'field' => 'reasonnum', 'reason_class' => 'R', - 'control_button' => "document.getElementById('confirm_credit_button')", + 'control_button' => 'confirm_credit_button', 'cgi' => $cgi, &> @@ -34,6 +44,7 @@ + % if ( $conf->exists('credits-auto-apply-disable') ) { @@ -65,6 +76,8 @@ <%init> my $conf = new FS::Conf; + +my $money_char = $conf->config('money_char') || '$'; my $date_format = $conf->config('date_format') || '%m/%d/%Y'; die "access denied"