From 157e8bdba110b7aac022bd2c2f7b377d3c5b2f85 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 29 Jun 2004 04:02:45 +0000 Subject: add cust_pay_refund table to refund payments --- httemplate/docs/upgrade10.html | 20 ++++++++++++---- httemplate/edit/cust_bill_pay.cgi | 8 +++---- httemplate/edit/process/cust_bill_pay.cgi | 24 ++++++++++++++----- httemplate/view/cust_main.cgi | 40 ++++++++++++++++++++++--------- 4 files changed, 66 insertions(+), 26 deletions(-) (limited to 'httemplate') diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html index c2b88be32..1d099646f 100644 --- a/httemplate/docs/upgrade10.html +++ b/httemplate/docs/upgrade10.html @@ -113,8 +113,8 @@ select setval('public.part_pkg_temp_pkgpart_seq', ( select max(pkgpart) from par Or on Pg versions that don't support DROP CONSTRAINT and ADD PRIMARY KEY (tested on 7.1 and 7.2 so far): DROP INDEX part_pkg_temp_pkey; CREATE UNIQUE INDEX part_pkg_pkey ON part_pkg (pkgpart); -7.1?: select setval('part_pkg_temp_pkgpart_seq', ( select max(pkgpart) from part_pkg) ); -7.2: select setval('part_pkg_pkgpart_seq', ( select max(pkgpart) from part_pkg) ); +probably this one?: select setval('part_pkg_temp_pkgpart_seq', ( select max(pkgpart) from part_pkg) ); +probably not this one?: select setval('part_pkg_pkgpart_seq', ( select max(pkgpart) from part_pkg) ); CREATE TABLE h_part_pkg_temp ( historynum serial NOT NULL, @@ -148,9 +148,19 @@ select setval('public.h_part_pkg_temp_historynum_seq', ( select max(historynum) Or on Pg versions that don't support DROP CONSTRAINT and ADD PRIMARY KEY (tested on 7.1 and 7.2 so far): DROP INDEX h_part_pkg_temp_pkey; CREATE UNIQUE INDEX h_part_pkg_pkey ON h_part_pkg (historynum); -7.1?: select setval('h_part_pkg_temp_historynum_seq', ( select max(historynum) from h_part_pkg) ); -7.2: select setval('h_part_pkg_historynum_seq', ( select max(historynum) from h_part_pkg) ); - +probably this one?: select setval('h_part_pkg_temp_historynum_seq', ( select max(historynum) from h_part_pkg) ); +probably not this one?: select setval('h_part_pkg_historynum_seq', ( select max(historynum) from h_part_pkg) ); + +CREATE TABLE cust_pay_refund ( + payrefundnum serial NOT NULL, + paynum int NOT NULL, + refundnum int NOT NULL, + _date int NOT NULL, + amount decimal(10,2) NOT NULL, + PRIMARY KEY (payrefundnum) +); +CREATE INDEX cust_pay_refund1 ON cust_pay_refund(paynum); +CREATE INDEX cust_pay_refund2 ON cust_pay_refund(refundnum); DROP INDEX cust_bill_pkg1; diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi index 8cdf4509a..24bce308a 100755 --- a/httemplate/edit/cust_bill_pay.cgi +++ b/httemplate/edit/cust_bill_pay.cgi @@ -59,10 +59,10 @@ foreach my $cust_bill ( @cust_bill ) { END } -# if ( cust_bill == "Refund" ) { -# what.form.amount.value = "$credited"; -# } print < END @@ -75,7 +75,7 @@ foreach my $cust_bill ( @cust_bill ) { ' - '. time2str("%D",$cust_bill->_date). ' - $'. $cust_bill->owed; } -#print qq!