X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=83f3cb8720285f9ffbd5ecb6f663a90782538fdd;hb=a34643588e65fc3272ec7bb2865aeb05a620dfc8;hp=6669b9de48c33a916c7a0cbb9e9e7c2fdd19d926;hpb=c00273147a2d400779fcdaf34f171b2180faa453;p=freeside.git diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 6669b9de4..83f3cb872 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,19 +1,17 @@ <% -# +# use strict; -use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); +use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid $quickpay ); use Date::Format; use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::Conf; use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl ntable); +use FS::CGI qw(header popurl ntable small_custview); my $conf = new FS::Conf; -my $countrydefault = $conf->config('countrydefault') || 'US'; - $cgi = new CGI; cgisuidsetup($cgi); @@ -23,6 +21,7 @@ if ( $cgi->param('error') ) { $paid = $cgi->param('paid'); $payby = $cgi->param('payby'); $payinfo = $cgi->param('payinfo'); + $quickpay = $cgi->param('quickpay'); } elsif ($cgi->keywords) { my($query) = $cgi->keywords; $query =~ /^(\d+)$/; @@ -31,28 +30,31 @@ if ( $cgi->param('error') ) { $paid = ''; $payby = 'BILL'; $payinfo = ""; + $quickpay = ''; } elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { $link = 'custnum'; $linknum = $1; $paid = ''; $payby = 'BILL'; $payinfo = ''; + $quickpay = $cgi->param('quickpay'); } else { die "illegal query ". $cgi->keywords; } $_date = time; $p1 = popurl(1); -print header("Enter payment", ''); +print header("Post payment", ''); print qq!Error: !, $cgi->param('error'), - "" + "

" if $cgi->param('error'); print < + END my $custnum; @@ -94,7 +96,7 @@ if ( $link eq 'invnum' ) { } } - print ''; + print '

'; $custnum = $cust_bill->custnum; @@ -102,54 +104,24 @@ if ( $link eq 'invnum' ) { $custnum = $linknum; } -print "

Customer #$custnum". ntable('#e8e8e8'); -my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) - or die "unknown custnum $custnum"; - -print ''. ntable("#cccccc",2). - 'Billing'. - $cust_main->getfield('last'). ', '. $cust_main->first. '
'; -print $cust_main->company. '
' if $cust_main->company; -print $cust_main->address1. '
'; -print $cust_main->address2. '
' if $cust_main->address2; -print $cust_main->city. ', '. $cust_main->state. ' '. $cust_main->zip. '
'; -print $cust_main->country. '
' if $cust_main->country - && $cust_main->country ne $countrydefault; - -print ''. - ''; - -if ( defined $cust_main->dbdef_table->column('ship_last') ) { - - print ''. ntable("#cccccc",2). - 'Service'. - $cust_main->getfield('ship_last'). ', '. $cust_main->ship_first. '
'; - print $cust_main->ship_company. '
' if $cust_main->ship_company; - print $cust_main->ship_address1. '
'; - print $cust_main->ship_address2. '
' if $cust_main->ship_address2; - print $cust_main->ship_city. ', '. $cust_main->ship_state. ' '. $cust_main->ship_zip. '
'; - print $cust_main->ship_country. '
' - if $cust_main->ship_country && $cust_main->ship_country ne $countrydefault; - - print ''. - ''; -} - -print ''; +print small_custview($custnum, $conf->config('countrydefault')); +print qq!!; +print qq!!; print '

Payment'. ntable("#cccccc", 2). 'Date'. - time2str("%D",$_date). ''. - qq!!; + time2str("%D",$_date). ''; print qq!Amount\$!; -print qq!Payby$payby!; +print qq!Payby$payby!; #payinfo (check # now as payby="BILL" hardcoded.. what to do later?) print qq!Check #!; +print qq!Auto-apply
to invoices!; + #paybatch print qq!!; @@ -157,10 +129,6 @@ print <
-END - -print <