X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=92abb7be85ae2a96efe0653570aa86ae4999124a;hb=5e05724a635a22776f1b973f5d7e77989da4e048;hp=c0a679b03252c5079b5c7a9a4750ce1c4ea1f71d;hpb=673b9a458d9138523026963df6fa3b4683e09bae;p=freeside.git
diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi
index c0a679b03..92abb7be8 100755
--- a/httemplate/edit/cust_pay.cgi
+++ b/httemplate/edit/cust_pay.cgi
@@ -1,91 +1,38 @@
-
-<%
+% if ( $link eq 'popup' ) {
+ <% include('/elements/header-popup.html', $title ) %>
+% } else {
+ <% include("/elements/header.html", $title, '') %>
+% }
-my $conf = new FS::Conf;
-
-my($link, $linknum, $paid, $payby, $payinfo, $quickpay, $_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');
- $quickpay = $cgi->param('quickpay');
- $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time;
-} elsif ($cgi->keywords) {
- my($query) = $cgi->keywords;
- $query =~ /^(\d+)$/;
- $link = 'invnum';
- $linknum = $1;
- $paid = '';
- $payby = 'BILL';
- $payinfo = "";
- $quickpay = '';
- $_date = time;
-} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
- $link = 'custnum';
- $linknum = $1;
- $paid = '';
- $payby = 'BILL';
- $payinfo = '';
- $quickpay = $cgi->param('quickpay');
- $_date = time;
-} else {
- die "illegal query ". $cgi->keywords;
-}
-
-my $paybatch = "webui-$_date-$$-". rand() * 2**32;
-
-my $title = 'Post payment';
-$title .= " against Invoice #$linknum" if $link eq 'invnum';
-
-%>
-
-<%= header($title, '') %>
-
-<% if ( $cgi->param('error') ) { %>
-Error: <%= $cgi->param('error') %>
-
-<% } %>
-
-<%= ntable("#cccccc",2) %>
+<% include('/elements/error.html') %>
-