freeside/httemplate/edit/process cust_bill_pay.cgi,1.3,1.4
ivan
ivan at pouncequick.420.am
Mon Jun 28 21:02:50 PDT 2004
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory pouncequick:/tmp/cvs-serv2036/httemplate/edit/process
Modified Files:
cust_bill_pay.cgi
Log Message:
add cust_pay_refund table to refund payments
Index: cust_bill_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_bill_pay.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cust_bill_pay.cgi 10 Feb 2002 13:21:31 -0000 1.3
+++ cust_bill_pay.cgi 29 Jun 2004 04:02:45 -0000 1.4
@@ -11,12 +11,24 @@
my $custnum = $cust_main->custnum;
-my $new = new FS::cust_bill_pay ( {
- map {
- $_, scalar($cgi->param($_));
- #} qw(custnum _date amount invnum)
- } fields('cust_bill_pay')
-} );
+my $new;
+if ($cgi->param('invnum') =~ /^Refund$/) {
+ $new = new FS::cust_refund ( {
+ 'reason' => 'Refunding payment', #enter reason in UI
+ 'refund' => $cgi->param('amount'),
+ 'payby' => 'BILL',
+ #'_date' => $cgi->param('_date'),
+ 'payinfo' => 'Cash', #enter payinfo in UI
+ 'paynum' => $paynum,
+ } );
+} else {
+ $new = new FS::cust_bill_pay ( {
+ map {
+ $_, scalar($cgi->param($_));
+ #} qw(custnum _date amount invnum)
+ } fields('cust_bill_pay')
+ } );
+}
my $error = $new->insert;
More information about the freeside-commits
mailing list