From 51984ac3d3da3006809c6866fdecd4ad83610731 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 30 Jul 2001 07:36:04 +0000 Subject: templates!!! --- httemplate/edit/cust_pay.cgi | 101 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100755 httemplate/edit/cust_pay.cgi (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi new file mode 100755 index 000000000..33320648c --- /dev/null +++ b/httemplate/edit/cust_pay.cgi @@ -0,0 +1,101 @@ +<% +# +# $Id: cust_pay.cgi,v 1.1 2001-07-30 07:36:04 ivan Exp $ +# +# Usage: cust_pay.cgi invnum +# http://server.name/path/cust_pay.cgi?invnum +# +# some hooks for modifications as well as additions, but needs work. +# +# ivan@voicenet.com 96-dec-11 +# +# rewrite ivan@sisd.com 98-mar-16 +# +# $Log: cust_pay.cgi,v $ +# Revision 1.1 2001-07-30 07:36:04 ivan +# templates!!! +# +# Revision 1.6 1999/02/28 00:03:35 ivan +# removed misleading comments +# +# Revision 1.5 1999/01/25 12:09:56 ivan +# yet more mod_perl stuff +# +# Revision 1.4 1999/01/19 05:13:37 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1999/01/18 09:41:27 ivan +# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl +# (good idea anyway) +# +# Revision 1.2 1998/12/17 06:17:03 ivan +# fix double // in relative URLs, s/CGI::Base/CGI/; +# + +use strict; +use vars qw( $cgi $invnum $p1 $_date $payby $payinfo $paid ); +use Date::Format; +use CGI; +use CGI::Carp qw(fatalsToBrowser); +use FS::UID qw(cgisuidsetup); +use FS::CGI qw(header popurl); + +$cgi = new CGI; +cgisuidsetup($cgi); + +if ( $cgi->param('error') ) { + $invnum = $cgi->param('invnum'); + $paid = $cgi->param('paid'); + $payby = $cgi->param('payby'); + $payinfo = $cgi->param('payinfo'); +} else { + my ($query) = $cgi->keywords; + $query =~ /^(\d+)$/; + $invnum = $1; + $paid = ''; + $payby = "BILL"; + $payinfo = ""; +} +$_date = time; + +$p1 = popurl(1); +print $cgi->header( '-expires' => 'now' ), header("Enter payment", ''); + +print qq!Error: !, $cgi->param('error'), + "" + if $cgi->param('error'); + +print < +
+END
+
+print qq!Invoice #$invnum!;
+
+print qq!
Date: !, time2str("%D",$_date), qq!!; + +print qq!
Amount \$!; + +print qq!
Payby: $payby!; + +#payinfo (check # now as payby="BILL" hardcoded.. what to do later?) +print qq!
Check #!; + +#paybatch +print qq!!; + +print < +
+ +END + +print < + + +END + +%> -- cgit v1.2.1 From 3d671921441ba8422650b54435a1959ad1d4c71d Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 21 Aug 2001 02:31:57 +0000 Subject: remove $Log$ messages. whew. --- httemplate/edit/cust_pay.cgi | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 33320648c..d1823d4b3 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,37 +1,5 @@ <% -# -# $Id: cust_pay.cgi,v 1.1 2001-07-30 07:36:04 ivan Exp $ -# -# Usage: cust_pay.cgi invnum -# http://server.name/path/cust_pay.cgi?invnum -# -# some hooks for modifications as well as additions, but needs work. -# -# ivan@voicenet.com 96-dec-11 -# -# rewrite ivan@sisd.com 98-mar-16 -# -# $Log: cust_pay.cgi,v $ -# Revision 1.1 2001-07-30 07:36:04 ivan -# templates!!! -# -# Revision 1.6 1999/02/28 00:03:35 ivan -# removed misleading comments -# -# Revision 1.5 1999/01/25 12:09:56 ivan -# yet more mod_perl stuff -# -# Revision 1.4 1999/01/19 05:13:37 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 09:41:27 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.2 1998/12/17 06:17:03 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# +# use strict; use vars qw( $cgi $invnum $p1 $_date $payby $payinfo $paid ); -- cgit v1.2.1 From fbcb45dfe5a1bce7981fe4527176b9fdf2ec54b7 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 3 Sep 2001 22:07:39 +0000 Subject: fix more bugs --- httemplate/edit/cust_pay.cgi | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index d1823d4b3..c83f585d1 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,8 +1,8 @@ <% -# +# use strict; -use vars qw( $cgi $invnum $p1 $_date $payby $payinfo $paid ); +use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); use Date::Format; use CGI; use CGI::Carp qw(fatalsToBrowser); @@ -13,17 +13,27 @@ $cgi = new CGI; cgisuidsetup($cgi); if ( $cgi->param('error') ) { - $invnum = $cgi->param('invnum'); + $link = $cgi->param('link'); + $linknum = $cgi->param('linknum'); $paid = $cgi->param('paid'); $payby = $cgi->param('payby'); $payinfo = $cgi->param('payinfo'); -} else { - my ($query) = $cgi->keywords; +} elsif ($cgi->keywords) { + my($query) = $cgi->keywords; $query =~ /^(\d+)$/; - $invnum = $1; + $link = 'invnum'; + $linknum = $1; $paid = ''; - $payby = "BILL"; + $payby = 'BILL'; $payinfo = ""; +} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { + $link = 'custnum'; + $linknum = $1; + $paid = ''; + $payby = 'BILL'; + $payinfo = ''; +} else { + die "illegal query ". $cgi->keywords; } $_date = time; @@ -36,10 +46,15 @@ print qq!Error: !, $cgi->param('error'), print < -
+    
+    
 END
 
-print qq!Invoice #$invnum!;
+if ( $link eq 'invnum' ) {
+  print "Invoice #$linknum";
+} elsif ( $link eq 'custnum' ) {
+  print "Customer #$linknum";
+}
 
 print qq!
Date: !, time2str("%D",$_date), qq!!; -- cgit v1.2.1 From 91387f8f489e561deaf1de052d80ef800a4970a3 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 26 Oct 2001 10:24:56 +0000 Subject: cache foo *sigh* --- httemplate/edit/cust_pay.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index c83f585d1..a9506c8ed 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); @@ -38,7 +38,7 @@ if ( $cgi->param('error') ) { $_date = time; $p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("Enter payment", ''); +print $cgi->header( @FS::CGI::header ), header("Enter payment", ''); print qq!Error: !, $cgi->param('error'), "" -- cgit v1.2.1 From c14a267229fc0d6f2d2afdebab3bd34d825df2ef Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Oct 2001 14:54:07 +0000 Subject: get rid of header foo in individual templates --- httemplate/edit/cust_pay.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index a9506c8ed..3c0dbb2fe 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); @@ -38,7 +38,7 @@ if ( $cgi->param('error') ) { $_date = time; $p1 = popurl(1); -print $cgi->header( @FS::CGI::header ), header("Enter payment", ''); +print header("Enter payment", ''); print qq!Error: !, $cgi->param('error'), "" -- cgit v1.2.1 From c00273147a2d400779fcdaf34f171b2180faa453 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 21 Dec 2001 21:40:24 +0000 Subject: add name/address to post payment screen get rid of some $-0.00 yay for ieee fp --- httemplate/edit/cust_pay.cgi | 105 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 95 insertions(+), 10 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 3c0dbb2fe..6669b9de4 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,13 +1,18 @@ <% -# +# use strict; use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); use Date::Format; use CGI; use CGI::Carp qw(fatalsToBrowser); +use FS::Conf; use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl); +use FS::CGI qw(header popurl ntable); + +my $conf = new FS::Conf; + +my $countrydefault = $conf->config('countrydefault') || 'US'; $cgi = new CGI; cgisuidsetup($cgi); @@ -44,32 +49,112 @@ print qq!Error: !, $cgi->param('error'), "" if $cgi->param('error'); -print < END +my $custnum; if ( $link eq 'invnum' ) { - print "Invoice #$linknum"; + + my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) + or die "unknown invnum $linknum"; + print "Invoice #$linknum". ntable("#cccccc",2). + 'Date'. + time2str("%D", $cust_bill->_date). ''. + 'Items'; + foreach ( $cust_bill->cust_bill_pkg ) { #false laziness with FS::cust_bill + if ( $_->pkgnum ) { + + my($cust_pkg)=qsearchs('cust_pkg', { 'pkgnum', $_->pkgnum } ); + my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->pkgpart}); + my($pkg)=$part_pkg->pkg; + + if ( $_->setup != 0 ) { + print "$pkg Setup
"; # $money_char. sprintf("%10.2f",$_->setup); + print join('
', + map { " ". $_->[0]. ": ". $_->[1] } $cust_pkg->labels + ). '
'; + } + + if ( $_->recur != 0 ) { + print + "$pkg (" . time2str("%x",$_->sdate) . " - " . + time2str("%x",$_->edate) . ")
"; + #$money_char. sprintf("%10.2f",$_->recur) + print join('
', + map { '--->'. $_->[0]. ": ". $_->[1] } $cust_pkg->labels + ). '
'; + } + + } else { #pkgnum Tax + print "Tax
" # $money_char. sprintf("%10.2f",$_->setup) + if $_->setup != 0; + } + + } + print ''; + + $custnum = $cust_bill->custnum; + } elsif ( $link eq 'custnum' ) { - print "Customer #$linknum"; + $custnum = $linknum; } -print qq!
Date: !, time2str("%D",$_date), qq!!; +print "

Customer #$custnum". ntable('#e8e8e8'); +my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) + or die "unknown custnum $custnum"; + +print ''. ntable("#cccccc",2). + 'Billing'. + $cust_main->getfield('last'). ', '. $cust_main->first. '
'; +print $cust_main->company. '
' if $cust_main->company; +print $cust_main->address1. '
'; +print $cust_main->address2. '
' if $cust_main->address2; +print $cust_main->city. ', '. $cust_main->state. ' '. $cust_main->zip. '
'; +print $cust_main->country. '
' if $cust_main->country + && $cust_main->country ne $countrydefault; + +print ''. + ''; + +if ( defined $cust_main->dbdef_table->column('ship_last') ) { + + print ''. ntable("#cccccc",2). + 'Service'. + $cust_main->getfield('ship_last'). ', '. $cust_main->ship_first. '
'; + print $cust_main->ship_company. '
' if $cust_main->ship_company; + print $cust_main->ship_address1. '
'; + print $cust_main->ship_address2. '
' if $cust_main->ship_address2; + print $cust_main->ship_city. ', '. $cust_main->ship_state. ' '. $cust_main->ship_zip. '
'; + print $cust_main->ship_country. '
' + if $cust_main->ship_country && $cust_main->ship_country ne $countrydefault; + + print ''. + ''; +} + +print ''; + + +print '

Payment'. ntable("#cccccc", 2). + 'Date'. + time2str("%D",$_date). ''. + qq!!; -print qq!
Amount \$!; +print qq!Amount\$!; -print qq!
Payby: $payby!; +print qq!Payby$payby!; #payinfo (check # now as payby="BILL" hardcoded.. what to do later?) -print qq!
Check #!; +print qq!Check #!; #paybatch print qq!!; print < +
END -- cgit v1.2.1 From c6b853b4f0516450b3e27acd281f667eadaec9f4 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Dec 2001 02:33:30 +0000 Subject: fix service display for duplicates --- httemplate/edit/cust_pay.cgi | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 6669b9de4..dfef3c542 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); @@ -121,15 +121,23 @@ print ''. if ( defined $cust_main->dbdef_table->column('ship_last') ) { + my $pre = $cust_main->ship_last ? 'ship_' : ''; + print ''. ntable("#cccccc",2). 'Service'. - $cust_main->getfield('ship_last'). ', '. $cust_main->ship_first. '
'; - print $cust_main->ship_company. '
' if $cust_main->ship_company; - print $cust_main->ship_address1. '
'; - print $cust_main->ship_address2. '
' if $cust_main->ship_address2; - print $cust_main->ship_city. ', '. $cust_main->ship_state. ' '. $cust_main->ship_zip. '
'; - print $cust_main->ship_country. '
' - if $cust_main->ship_country && $cust_main->ship_country ne $countrydefault; + $cust_main->get("${pre}last"). ', '. + $cust_main->get("${pre}first"). '
'; + print $cust_main->get("${pre}company"). '
' + if $cust_main->get("${pre}company"); + print $cust_main->get("${pre}address1"). '
'; + print $cust_main->get("${pre}address2"). '
' + if $cust_main->get("${pre}address2"); + print $cust_main->get("${pre}city"). ', '. + $cust_main->get("${pre}state"). ' '. + $cust_main->get("${pre}ship_zip"). '
'; + print $cust_main->get("${pre}country"). '
' + if $cust_main->get("${pre}country") + && $cust_main->get("${pre}country") ne $countrydefault; print ''. ''; -- cgit v1.2.1 From d0f483f47168e01eb6c28e8fc99a62050b245132 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Dec 2001 04:25:04 +0000 Subject: auto-apply payments and credits, post credit UI overhaul --- httemplate/edit/cust_pay.cgi | 66 ++++++++------------------------------------ 1 file changed, 11 insertions(+), 55 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index dfef3c542..7f70802c3 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); @@ -8,12 +8,10 @@ use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::Conf; use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl ntable); +use FS::CGI qw(header popurl ntable small_custview); my $conf = new FS::Conf; -my $countrydefault = $conf->config('countrydefault') || 'US'; - $cgi = new CGI; cgisuidsetup($cgi); @@ -43,10 +41,10 @@ if ( $cgi->param('error') ) { $_date = time; $p1 = popurl(1); -print header("Enter payment", ''); +print header("Post payment", ''); print qq!Error: !, $cgi->param('error'), - "" + "


" if $cgi->param('error'); print <
Customer #$custnum". ntable('#e8e8e8'); -my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) - or die "unknown custnum $custnum"; - -print ''. ntable("#cccccc",2). - 'Billing'. - $cust_main->getfield('last'). ', '. $cust_main->first. '
'; -print $cust_main->company. '
' if $cust_main->company; -print $cust_main->address1. '
'; -print $cust_main->address2. '
' if $cust_main->address2; -print $cust_main->city. ', '. $cust_main->state. ' '. $cust_main->zip. '
'; -print $cust_main->country. '
' if $cust_main->country - && $cust_main->country ne $countrydefault; - -print ''. - ''; - -if ( defined $cust_main->dbdef_table->column('ship_last') ) { - - my $pre = $cust_main->ship_last ? 'ship_' : ''; - - print ''. ntable("#cccccc",2). - 'Service'. - $cust_main->get("${pre}last"). ', '. - $cust_main->get("${pre}first"). '
'; - print $cust_main->get("${pre}company"). '
' - if $cust_main->get("${pre}company"); - print $cust_main->get("${pre}address1"). '
'; - print $cust_main->get("${pre}address2"). '
' - if $cust_main->get("${pre}address2"); - print $cust_main->get("${pre}city"). ', '. - $cust_main->get("${pre}state"). ' '. - $cust_main->get("${pre}ship_zip"). '
'; - print $cust_main->get("${pre}country"). '
' - if $cust_main->get("${pre}country") - && $cust_main->get("${pre}country") ne $countrydefault; - - print ''. - ''; -} - -print ''; +print small_custview($custnum, $conf->config('countrydefault')); +print qq!!; +print qq!!; print '

Payment'. ntable("#cccccc", 2). 'Date'. - time2str("%D",$_date). ''. - qq!!; + time2str("%D",$_date). ''; print qq!Amount\$!; -print qq!Payby$payby!; +print qq!Payby$payby!; #payinfo (check # now as payby="BILL" hardcoded.. what to do later?) print qq!Check #!; +print qq!Auto-apply
to invoices!; + #paybatch print qq!!; @@ -165,10 +125,6 @@ print <
-END - -print < -- cgit v1.2.1 From f91771606ce8a2bb4f2fa44e7bf54c9b7c945db6 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Dec 2001 05:19:01 +0000 Subject: expedited check entry --- httemplate/edit/cust_pay.cgi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 7f70802c3..38654e98d 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,8 +1,8 @@ <% -# +# use strict; -use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid ); +use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid $quickpay ); use Date::Format; use CGI; use CGI::Carp qw(fatalsToBrowser); @@ -21,6 +21,7 @@ if ( $cgi->param('error') ) { $paid = $cgi->param('paid'); $payby = $cgi->param('payby'); $payinfo = $cgi->param('payinfo'); + $quickpay = $cgi->param('quickpay'); } elsif ($cgi->keywords) { my($query) = $cgi->keywords; $query =~ /^(\d+)$/; @@ -29,12 +30,14 @@ if ( $cgi->param('error') ) { $paid = ''; $payby = 'BILL'; $payinfo = ""; + $quickpay = ''; } elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { $link = 'custnum'; $linknum = $1; $paid = ''; $payby = 'BILL'; $payinfo = ''; + $quickpay = $cgi->param('quickpay'); } else { die "illegal query ". $cgi->keywords; } @@ -51,6 +54,7 @@ print < + END my $custnum; -- cgit v1.2.1 From a34643588e65fc3272ec7bb2865aeb05a620dfc8 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Dec 2001 06:02:48 +0000 Subject: UI --- httemplate/edit/cust_pay.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 38654e98d..83f3cb872 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid $quickpay ); @@ -96,7 +96,7 @@ if ( $link eq 'invnum' ) { } } - print ''; + print '

'; $custnum = $cust_bill->custnum; -- cgit v1.2.1 From 1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 30 Jan 2002 14:18:09 +0000 Subject: remove use Module; and $cgi = new CGI; &cgisuidsetup(); from all templates. should work better under Mason. --- httemplate/edit/cust_pay.cgi | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 83f3cb872..2794e2218 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,20 +1,9 @@ + <% -# - -use strict; -use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid $quickpay ); -use Date::Format; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::Conf; -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl ntable small_custview); my $conf = new FS::Conf; -$cgi = new CGI; -cgisuidsetup($cgi); - +my($link, $linknum, $paid, $payby, $payinfo, $quickpay); if ( $cgi->param('error') ) { $link = $cgi->param('link'); $linknum = $cgi->param('linknum'); @@ -41,9 +30,9 @@ if ( $cgi->param('error') ) { } else { die "illegal query ". $cgi->keywords; } -$_date = time; +my $_date = time; -$p1 = popurl(1); +my $p1 = popurl(1); print header("Post payment", ''); print qq!Error: !, $cgi->param('error'), -- 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/cust_pay.cgi | 1 - 1 file changed, 1 deletion(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 2794e2218..6738dcd38 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,4 +1,3 @@ - <% my $conf = new FS::Conf; -- cgit v1.2.1 From a4c96748eb6eab29a70f3a944c6520283a635c78 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 16:05:22 +0000 Subject: *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. --- httemplate/edit/cust_pay.cgi | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 6738dcd38..27d36eb54 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,3 +1,4 @@ + <% my $conf = new FS::Conf; -- cgit v1.2.1 From ddb53fcc9fc80561354b97e4e7803004990138d0 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 18:56:49 +0000 Subject: use unique tokens to prevent double-submission of payments in the web UI (closes: Bug#320) --- httemplate/edit/cust_pay.cgi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 27d36eb54..f6ae7b299 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -32,6 +32,8 @@ if ( $cgi->param('error') ) { } my $_date = time; +my $paybatch = "webui-$_date-$$-". rand() * 2**32; + my $p1 = popurl(1); print header("Post payment", ''); @@ -111,11 +113,12 @@ print qq!Check #Auto-apply
to invoices!; +print ""; + #paybatch -print qq!!; +print qq!!; print <
-- cgit v1.2.1