X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=116eeebd651f739c3d805a3b6b625c972b1df687;hb=62b18c75989a1b00a25079f8f110992aaad81bba;hp=83f3cb8720285f9ffbd5ecb6f663a90782538fdd;hpb=a34643588e65fc3272ec7bb2865aeb05a620dfc8;p=freeside.git diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 83f3cb872..116eeebd6 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,137 +1,182 @@ -<% -# - -use strict; -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 small_custview); +% if ( $link eq 'popup' ) { + <& /elements/header-popup.html, $title &> +% } else { + <& /elements/header.html, $title, '' &> +% } -my $conf = new FS::Conf; +<& /elements/init_calendar.html &> -$cgi = new CGI; -cgisuidsetup($cgi); +<& /elements/error.html &> -if ( $cgi->param('error') ) { - $link = $cgi->param('link'); - $linknum = $cgi->param('linknum'); - $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+)$/; - $link = 'invnum'; - $linknum = $1; - $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; +% unless ( $link eq 'popup' ) { + <% small_custview($custnum, $conf->config('countrydefault')) %> +% } -$p1 = popurl(1); -print header("Post payment", ''); +
-} elsif ( $link eq 'custnum' ) { - $custnum = $linknum; -} +% if ( $link eq 'popup' ) { +