X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_credit.cgi;h=18416c5fbcfd8511e6fc28a17855f9c116fcb116;hb=17c42abd0c3c836c3ae511867f1cac2417b6907e;hp=068144547a75e9c6dbcbca67f9a2570d5c9d8911;hpb=b5dbd9e1bcbb701a20ed23e723b1e0105fd7c1a1;p=freeside.git
diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi
index 068144547..18416c5fb 100755
--- a/httemplate/edit/cust_credit.cgi
+++ b/httemplate/edit/cust_credit.cgi
@@ -1,4 +1,4 @@
-<& /elements/header-popup.html, emt('Enter Credit') &>
+<& /elements/header-popup.html, mt('Enter Credit') &>
<& /elements/error.html &>
@@ -6,26 +6,35 @@
-
-
<% 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 +43,7 @@
|
+
% if ( $conf->exists('credits-auto-apply-disable') ) {
@@ -65,6 +75,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"
@@ -73,7 +85,6 @@ die "access denied"
my $custnum = $cgi->param('custnum');
my $amount = $cgi->param('amount');
my $_date = time;
-my $otaker = getotaker;
my $p1 = popurl(1);
%init>