From 9410e9f656b950a9d4b383a3992fa50bb7a270db Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 15 Oct 2001 14:58:03 +0000 Subject: date editing --- httemplate/edit/process/REAL_cust_pkg.cgi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 httemplate/edit/process/REAL_cust_pkg.cgi (limited to 'httemplate/edit/process/REAL_cust_pkg.cgi') diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi new file mode 100755 index 000000000..4f33f6b38 --- /dev/null +++ b/httemplate/edit/process/REAL_cust_pkg.cgi @@ -0,0 +1,20 @@ +<% +# + +my $pkgnum = $cgi->param('pkgnum') or die; +my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +my %hash = $old->hash; +$hash{'setup'} = $cgi->param('setup') ? str2time($cgi->param('setup')) : ''; +$hash{'bill'} = $cgi->param('bill') ? str2time($cgi->param('bill')) : ''; +my $new = new FS::cust_pkg \%hash; + +my $error = $new->replace($old); + +if ( $error ) { + $cgi->param('error', $error); + print $cgi->redirect(popurl(2). "REAL_cust_pkg.cgi?". $cgi->query_string ); +} else { + print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $pkgnum); +} + +%> -- cgit v1.2.1 From 22a35047ecdffff80110e06cc08fc84f9ddba9b0 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 13:21:31 +0000 Subject: removed from all files to fix any redirects, whew Mason handler.pl overrides CGI::redirect fixed strict; problems in edit/part_pkg.cgi & edit/process/part_pkg.cgi --- httemplate/edit/process/REAL_cust_pkg.cgi | 1 - 1 file changed, 1 deletion(-) (limited to 'httemplate/edit/process/REAL_cust_pkg.cgi') diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi index 4f33f6b38..6bed85c19 100755 --- a/httemplate/edit/process/REAL_cust_pkg.cgi +++ b/httemplate/edit/process/REAL_cust_pkg.cgi @@ -1,5 +1,4 @@ <% -# my $pkgnum = $cgi->param('pkgnum') or die; my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -- cgit v1.2.1 From 1f8d7610c245ecb21667aa656ce083420e5bb797 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 8 Jul 2002 13:07:40 +0000 Subject: edit expiration dates --- httemplate/edit/process/REAL_cust_pkg.cgi | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/edit/process/REAL_cust_pkg.cgi') diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi index 6bed85c19..2e0352c76 100755 --- a/httemplate/edit/process/REAL_cust_pkg.cgi +++ b/httemplate/edit/process/REAL_cust_pkg.cgi @@ -5,6 +5,7 @@ my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); my %hash = $old->hash; $hash{'setup'} = $cgi->param('setup') ? str2time($cgi->param('setup')) : ''; $hash{'bill'} = $cgi->param('bill') ? str2time($cgi->param('bill')) : ''; +$hash{'expire'} = $cgi->param('expire') ? str2time($cgi->param('expire')) : ''; my $new = new FS::cust_pkg \%hash; my $error = $new->replace($old); -- cgit v1.2.1 From f3b8b72d2a07683b2deb2774f29407e25e725b5a Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 1 Apr 2003 01:22:25 +0000 Subject: correct last_bill problems with $0 invoice (non-existant) edge cases --- httemplate/edit/process/REAL_cust_pkg.cgi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'httemplate/edit/process/REAL_cust_pkg.cgi') diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi index 2e0352c76..7f5c5e49c 100755 --- a/httemplate/edit/process/REAL_cust_pkg.cgi +++ b/httemplate/edit/process/REAL_cust_pkg.cgi @@ -5,6 +5,8 @@ my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); my %hash = $old->hash; $hash{'setup'} = $cgi->param('setup') ? str2time($cgi->param('setup')) : ''; $hash{'bill'} = $cgi->param('bill') ? str2time($cgi->param('bill')) : ''; +$hash{'last_bill'} = + $cgi->param('last_bill') ? str2time($cgi->param('last_bill')) : ''; $hash{'expire'} = $cgi->param('expire') ? str2time($cgi->param('expire')) : ''; my $new = new FS::cust_pkg \%hash; -- cgit v1.2.1 From e3f327b2af9e6a591bae41d315fda731ec7f5128 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 22 Mar 2004 11:05:58 +0000 Subject: remove everything that links to package view also, closes: Bug#569 --- httemplate/edit/process/REAL_cust_pkg.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process/REAL_cust_pkg.cgi') diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi index 7f5c5e49c..3d697ddfd 100755 --- a/httemplate/edit/process/REAL_cust_pkg.cgi +++ b/httemplate/edit/process/REAL_cust_pkg.cgi @@ -16,7 +16,9 @@ if ( $error ) { $cgi->param('error', $error); print $cgi->redirect(popurl(2). "REAL_cust_pkg.cgi?". $cgi->query_string ); } else { - print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $pkgnum); + my $custnum = $new->custnum; + print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum". + "#cust_pkg$pkgnum" ); } %> -- cgit v1.2.1