X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=3fe43dcbcbd9e83e0347f196b9e56b368b5838d1;hb=fb8915cce4be9520c00cc53c659e34abfb6172e1;hp=ad26bff664de1ced14a7f2c2291c097e3b92776d;hpb=0376f47e1ec2ec9b8702a0e6c5146af9c66beb5e;p=freeside.git diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index ad26bff66..3fe43dcbc 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -1,14 +1,13 @@ -<% include("/elements/header-popup.html", 'One-time charge', '', +<& /elements/header-popup.html, mt('One-time charge'), '', ( $cgi->param('error') ? '' : 'onload="addRow()"' ), - ) -%> +&> - - - - + + + + -<% include('/elements/error.html') %> +<& /elements/error.html &>
@@ -208,6 +255,8 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('One-time charge'); my $conf = new FS::Conf; +my $date_format = $conf->config('date_format') || '%m/%d/%Y'; +my $money_char = $conf->config('money_char') || '$'; $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; my $custnum = $1; @@ -215,7 +264,6 @@ my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); #XXX agent-vi my $format = "%m/%d/%Y %T %z (%Z)"; #false laziness w/REAL_cust_pkg.cgi? my $start_date = $cust_main->next_bill_date; -warn "*** $start_date"; $start_date = $start_date ? time2str($format, $start_date) : ''; my $amount = ''; @@ -232,4 +280,13 @@ $cgi->param('pkg') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]*)$/ or die 'illegal description'; my $pkg = $1; +my $default_terms; +if ( $cust_main->invoice_terms ) { + $default_terms = emt("Customer default ([_1])", $cust_main->invoice_terms); +} else { + $default_terms = emt("Default ([_1])", + ($conf->config('invoice_default_terms') || emt('Payable upon receipt')) + ); +} + %init>