X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fbatch-cust_pay.html;h=2e798652d735fa6cf50cfa2a497ede58e9d1fb9f;hb=39b842eecba98e7d86b45ea50548a4c5546090d8;hp=89dd68a622972abef916763429875631ad694ee2;hpb=2a6aa24137ddd389c1e644f5ece325c5b5dbaf3a;p=freeside.git diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html index 89dd68a62..2e798652d 100644 --- a/httemplate/misc/batch-cust_pay.html +++ b/httemplate/misc/batch-cust_pay.html @@ -1,28 +1,135 @@ -<% include("/elements/header.html", 'Quick payment entry', - menubar( 'Main Menu' => $p ), - ) -%> +<% include('/elements/header.html', 'Quick payment entry') %> <% include('/elements/error.html') %> -
+ + +<% include('/elements/xmlhttp.html', + 'url' => $p. 'misc/xmlhttp-cust_main-discount_terms.cgi', + 'subs' => [qw( discount_terms )], + ) +%> + + + + + +<% include( "/elements/customer-table.html", + name_singular => 'payment', + header => \@header, + fields => \@fields, + type => \@types, + align => \@align, + size => \@sizes, + color => \@colors, + param => \%param, + footer => \@footer, + footer_align => \@footer_align, + custnum_update_callback => $custnum_update_callback, + ) +%>
- +
- - + +%if ( $cgi->param('error') ) { + +%} + +<% 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 = ( 'paid', 'payinfo' ); +my @types = ( '', '' ); +my @align = ( 'r', 'r' ); +my @sizes = ( 8, 10 ); +my @colors = ( '', '' ); +my %param = (); +my @footer = ( '_TOTAL', '' ); +my @footer_align = ( 'r', 'r' ); +my $custnum_update_callback = ''; + +if ( FS::Record->scalar_sql('SELECT COUNT(*) FROM part_pkg_discount') ) { + #push @header, '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, 'Error'; +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'); + +