From 85c6cb69b90583a8314e9c4a6d73600d4f2750cf Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 30 Sep 2007 00:25:19 +0000 Subject: [PATCH] fix argument stickiness on date editing errors (especially because resetting them pops up the error confirmation) --- httemplate/edit/REAL_cust_pkg.cgi | 55 +++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index 7a9e030e9..99a3f3098 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -2,6 +2,10 @@ % %my $error =''; %my $pkgnum = ''; +%my($susp,$adjourn,$cancel,$expire, $pkg, $comment, $setup, $bill, $otaker); +% +%my( $cust_pkg, $part_pkg ); +% %if ( $cgi->param('error') ) { % $error = $cgi->param('error'); % $pkgnum = $cgi->param('pkgnum'); @@ -12,16 +16,42 @@ % from $bill until now. Are you sure you want to do this? ". % ''; % } +% +% $susp = $cgi->param('susp'); +% $adjourn = $cgi->param('adjourn'); +% $cancel = $cgi->param('cancel'); +% $expire = $cgi->param('expire'); +% $pkg = $cgi->param('pkg'); +% $comment = $cgi->param('comment'); +% $setup = $cgi->param('setup'); +% $bill = $cgi->param('bill'); +% $otaker = $cgi->param('otaker'); +% +% #get package record +% $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +% die "No package!" unless $cust_pkg; +% $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); +% %} else { % my($query) = $cgi->keywords; % $query =~ /^(\d+)$/ or die "no pkgnum"; % $pkgnum = $1; -%} % -%#get package record -%my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -%die "No package!" unless $cust_pkg; -%my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); +% #get package record +% $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +% die "No package!" unless $cust_pkg; +% $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); +% +% ($susp,$adjourn,$cancel,$expire)=( +% $cust_pkg->getfield('susp'), +% $cust_pkg->getfield('adjourn'), +% $cust_pkg->getfield('cancel'), +% $cust_pkg->getfield('expire'), +% ); +% ($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); +% ($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); +% $otaker = $cust_pkg->getfield('otaker'); +%} % %if ( $error ) { % #$cust_pkg->$_(str2time($cgi->param($_)) foreach qw(setup bill); @@ -47,21 +77,6 @@ -% -% -%#print info -%my($susp,$adjourn,$cancel,$expire)=( -% $cust_pkg->getfield('susp'), -% $cust_pkg->getfield('adjourn'), -% $cust_pkg->getfield('cancel'), -% $cust_pkg->getfield('expire'), -%); -%my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -%my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -%my $otaker = $cust_pkg->getfield('otaker'); -% -% -
-- 2.11.0