diff options
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/docs/schema.html | 14 | ||||
-rw-r--r-- | httemplate/docs/upgrade10.html | 18 | ||||
-rwxr-xr-x | httemplate/misc/void-cust_pay.cgi | 16 |
3 files changed, 47 insertions, 1 deletions
diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index 8a27e0118..8dee8ad9e 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -176,6 +176,20 @@ <li>paybatch - text field for tracking card processor batches <li>closed - books closed flag, empty or `Y' </ul> + <li><a name="cust_pay-void" href="man/FS/cust_pay_void.html">cust_pay_void</a> - Voided payments. + <ul> + <li>paynum - primary key + <li>custnum - <a href="#cust_main">customer</a> + <li>paid - amount + <li>_date + <li>payby - CARD, CHEK, LECB, BILL, or COMP + <li>payinfo - card number, P.O.#, or comp issuer + <li>paybatch - text field for tracking card processor batches + <li>closed - books closed flag, empty or `Y' + <li>void_date + <li>reason + <li>otaker - order taker + </ul> <li><a name="cust_bill_pay" href="man/FS/cust_bill_pay.html">cust_bill_pay</a> - Applicaton of a payment to a specific invoice. <ul> <li>billpaynum diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html index 1d099646f..8922d198f 100644 --- a/httemplate/docs/upgrade10.html +++ b/httemplate/docs/upgrade10.html @@ -162,6 +162,22 @@ CREATE TABLE cust_pay_refund ( CREATE INDEX cust_pay_refund1 ON cust_pay_refund(paynum); CREATE INDEX cust_pay_refund2 ON cust_pay_refund(refundnum); +CREATE TABLE cust_pay_void ( + paynum int NOT NULL, + custnum int NOT NULL, + paid decimal(10,2) NOT NULL, + _date int, + payby char(4) NOT NULL, + payinfo varchar(80), + paybatch varchar(80), + closed char(1), + void_date int, + reason varchar(80), + otaker varchar(32) NOT NULL, + PRIMARY KEY (paynum) +); +CREATE INDEX cust_pay_void1 ON cust_pay_void(custnum); + DROP INDEX cust_bill_pkg1; ALTER TABLE cust_bill_pkg ADD itemdesc varchar(80) NULL; @@ -228,7 +244,7 @@ optionally: mandatory again: dbdef-create username -create-history-tables username cust_bill_pkg_detail router part_svc_router addr_block svc_broadband acct_snarf svc_external +create-history-tables username cust_bill_pkg_detail router part_svc_router addr_block svc_broadband acct_snarf svc_external cust_pay_refund cust_pay_void dbdef-create username apache - fix <Files> sections to include .html also diff --git a/httemplate/misc/void-cust_pay.cgi b/httemplate/misc/void-cust_pay.cgi new file mode 100755 index 000000000..4eec60892 --- /dev/null +++ b/httemplate/misc/void-cust_pay.cgi @@ -0,0 +1,16 @@ +<% + +#untaint paynum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/ || die "Illegal paynum"; +my $paynum = $1; + +my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum}); +my $custnum = $cust_pay->custnum; + +my $error = $cust_pay->void; +eidiot($error) if $error; + +print $cgi->redirect($p. "view/cust_main.cgi?". $custnum); + +%> |