X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=83e4e82ea7d420b10fb09ac662f140ad5eb02233;hp=e7734c1fc111d094366392fc5003495d09fafbcb;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index e7734c1fc..83e4e82ea 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,94 +1,95 @@ -<% - -my $conf = new FS::Conf; - -my %payby = ( - 'BILL' => 'Check', - 'CASH' => 'Cash', - 'WEST' => 'Western Union', - 'MCRD' => 'Manual credit card', -); - -my($link, $linknum, $paid, $payby, $payinfo, $_date); -if ( $cgi->param('error') ) { - $link = $cgi->param('link'); - $linknum = $cgi->param('linknum'); - $paid = $cgi->param('paid'); - $payby = $cgi->param('payby'); - $payinfo = $cgi->param('payinfo'); - $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; -} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { - $link = $cgi->param('popup') ? 'popup' : 'custnum'; - $linknum = $1; - $paid = ''; - $payby = $cgi->param('payby') || 'BILL'; - $payinfo = ''; - $_date = time; -} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { - $link = 'invnum'; - $linknum = $1; - $paid = ''; - $payby = $cgi->param('payby') || 'BILL'; - $payinfo = ""; - $_date = time; -} else { - die "illegal query ". $cgi->keywords; -} - -my $paybatch = "webui-$_date-$$-". rand() * 2**32; - -my $title = 'Post '. $payby{$payby}. ' payment'; -$title .= " against Invoice #$linknum" if $link eq 'invnum'; - -if ( $link eq 'popup' ) { - -%><%= include('/elements/header-popup.html', $title ) %> - -<% } else { %> - -<%= include("/elements/header.html", $title, '') %> - -<% } %> - -<% if ( $cgi->param('error') ) { %> -Error: <%= $cgi->param('error') %> +% +% +%my $conf = new FS::Conf; +% +%my %payby = ( +% 'BILL' => 'Check', +% 'CASH' => 'Cash', +% 'WEST' => 'Western Union', +% 'MCRD' => 'Manual credit card', +%); +% +%my($link, $linknum, $paid, $payby, $payinfo, $_date); +%if ( $cgi->param('error') ) { +% $link = $cgi->param('link'); +% $linknum = $cgi->param('linknum'); +% $paid = $cgi->param('paid'); +% $payby = $cgi->param('payby'); +% $payinfo = $cgi->param('payinfo'); +% $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; +%} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { +% $link = $cgi->param('popup') ? 'popup' : 'custnum'; +% $linknum = $1; +% $paid = ''; +% $payby = $cgi->param('payby') || 'BILL'; +% $payinfo = ''; +% $_date = time; +%} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { +% $link = 'invnum'; +% $linknum = $1; +% $paid = ''; +% $payby = $cgi->param('payby') || 'BILL'; +% $payinfo = ""; +% $_date = time; +%} else { +% die "illegal query ". $cgi->keywords; +%} +% +%my $paybatch = "webui-$_date-$$-". rand() * 2**32; +% +%my $title = 'Post '. $payby{$payby}. ' payment'; +%$title .= " against Invoice #$linknum" if $link eq 'invnum'; +% +%if ( $link eq 'popup' ) { +% +% +<% include('/elements/header-popup.html', $title ) %> +% } else { + + +<% include("/elements/header.html", $title, '') %> +% } +% if ( $cgi->param('error') ) { + +Error: <% $cgi->param('error') %>

-<% } %> +% } + -
- - + + + +% +%my $money_char = $conf->config('money_char') || '$'; +%my $custnum; +%if ( $link eq 'invnum' ) { +% my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) +% or die "unknown invnum $linknum"; +% $custnum = $cust_bill->custnum; +%} elsif ( $link eq 'custnum' ) { +% $custnum = $linknum; +%} +% +% unless ( $link eq 'popup' ) { -<% -my $money_char = $conf->config('money_char') || '$'; -my $custnum; -if ( $link eq 'invnum' ) { - my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) - or die "unknown invnum $linknum"; - $custnum = $cust_bill->custnum; -} elsif ( $link eq 'custnum' ) { - $custnum = $linknum; -} -%> +<% small_custview($custnum, $conf->config('countrydefault')) %> +% } -<% unless ( $link eq 'popup' ) { %> -<%= small_custview($custnum, $conf->config('countrydefault')) %> -<% } %> - +

Payment -<%= ntable("#cccccc", 2) %> +<% ntable("#cccccc", 2) %> Date - "> + "> @@ -102,33 +103,36 @@ Payment Amount - <%= $money_char %> - by <%= $payby{$payby} %> + <% $money_char %> + by <% $payby{$payby} %> +% if ( $payby eq 'BILL' ) { -<% if ( $payby eq 'BILL' ) { %> Check # - + +% } -<% } %> -<% if ( $link eq 'custnum' ) { %> +% if ( $link eq 'custnum' ) { + Auto-apply
to invoices -<% } elsif ( $link eq 'invnum' ) { %> +% } elsif ( $link eq 'invnum' ) { + Apply to - Invoice #<%= $linknum %> only + Invoice #<% $linknum %> only -<% } %> +% } + - +