X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fbatch-cust_pay.html;h=11fdeee6106d0fc714e7514600776545fdf40b61;hb=4e956dcc46d5e38e0a8b90638c96736f8b4496d6;hp=d85f3b6c3cae7d3ff2b53906a4bfd6106e2f74a2;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html index d85f3b6c3..11fdeee61 100644 --- a/httemplate/misc/batch-cust_pay.html +++ b/httemplate/misc/batch-cust_pay.html @@ -1,395 +1,133 @@ -<% include("/elements/header.html", 'Quick payment entry', - menubar( - 'Main Menu' => $p, #popurl(1), - ), - ( $cgi->param('error') ? '' : 'onload="addRow()"' ), - ) -%> -% if ( $cgi->param('error') ) { - - <% $cgi->param('error') %>

-% } - - +<% include('/elements/header.html', 'Quick payment entry') %> -
- - +<% include('/elements/error.html') %> - - - - - - - - - -% my $row = 0; -% if ( $cgi->param('error') ) { -% my $param = $cgi->Vars; -% -% for ( $row = 0; exists($param->{"custnum$row"}); $row++ ) { - - - - - - - - - - - - - - - -% } -% } - - -
Cust #CustomerAmountCheck #
- " rownum="<% $row %>"> - - - " rownum="<% $row %>"> - - - - - $" > - - " > - -% if ( $param->{"error$row"} ) { - - Error: <% $param->{"error$row"} %> -% } - -
- - - -
- - -
- - <% include('/elements/xmlhttp.html', - 'url' => $p. 'misc/xmlhttp-cust_main-search.cgi', - 'subs' => [qw( custnum_search smart_search )], + 'url' => $p. 'misc/xmlhttp-cust_main-discount_terms.cgi', + 'subs' => [qw( discount_terms )], ) %> - - - - +%} + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Post payment batch'); + +my $conf = new FS::Conf; +my $money_char = $conf->config('money_char') || '$'; + +my @header = ( '', 'Amount', 'Check #' ); +my @fields = ( sub { "$money_char" }, 'paid', 'payinfo' ); +my @types = ( 'immutable', '', '' ); +my @align = ( 'c', 'r', 'r' ); +my @sizes = ( 0, 8, 10 ); +my @colors = ( '', '', '' ); +my %param = (); +my @footer = ( "$money_char", '_TOTAL', '' ); +my @footer_align = ( 'c', 'r', 'r' ); +my $custnum_update_callback = ''; + +if ( FS::Record->scalar_sql('SELECT COUNT(*) FROM part_pkg_discount') ) { + push @header, ''; + push @fields, 'discount_term'; + push @types, 'immutable'; + push @align, 'r'; + push @sizes, '0'; + push @colors, ''; + push @footer, ''; + push @footer_align, ''; + $custnum_update_callback = 'select_discount_term'; +} + +push @header, ''; +push @fields, 'error'; +push @types, 'immutable'; +push @align, 'l'; +push @sizes, '0'; +push @colors, '#ff0000'; +push @footer, ''; +push @footer_align, ''; + +$m->comp('/elements/handle_uri_query'); + +