From 20c1183d2673b62bd0e29eb65f0a9a2c974b8027 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Oct 2001 19:05:27 +0000 Subject: depriciate cust_pay_batch.trancode web interface to view pending batch --- httemplate/browse/cust_pay_batch.cgi | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 httemplate/browse/cust_pay_batch.cgi (limited to 'httemplate/browse/cust_pay_batch.cgi') diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi new file mode 100755 index 000000000..7779bd0c3 --- /dev/null +++ b/httemplate/browse/cust_pay_batch.cgi @@ -0,0 +1,68 @@ +<% +# + +use strict; +use vars qw( $cgi $p ); # $part_referral ); +use CGI; +use CGI::Carp qw(fatalsToBrowser); +use Date::Format; +use FS::UID qw(cgisuidsetup); +use FS::Record qw(qsearch); +use FS::CGI qw(header menubar popurl table); +use FS::queue; + +$cgi = new CGI; + +&cgisuidsetup($cgi); + +$p = popurl(2); + +print header("Pending credit card batch", menubar( + 'Main Menu' => $p, +# 'Add new referral' => "../edit/part_referral.cgi", +)), &table(), < + # + inv# + Customer + Card name + Card + Exp + Amount + +END + +foreach my $cust_pay_batch ( sort { + $a->getfield('paybatchnum') <=> $b->getfield('paybatchnum') +} qsearch('cust_pay_batch',{}) ) { +# my $date = time2str( "%a %b %e %T %Y", $queue->_date ); +# my $status = $hashref->{status}; +# if ( $status eq 'failed' || $status eq 'locked' ) { +# $status .= +# qq! ( retry |!. +# qq! remove )!; +# } + my $cardnum = $cust_pay_batch->{cardnum}; + $cardnum =~ s/.{4}$/xxxx/; + print < + $cust_pay_batch->{paybatchnum} + $cust_pay_batch->{invnum} + $cust_pay_batch->{custnum} + $cust_pay_batch->{last}, $cust_pay_batch->{last} + $cust_pay_batch->{payname} + $cardnum + $cust_pay_batch->{exp} + \$$cust_pay_batch->{amount} + +END + +} + +print < + + +END + +%> -- 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/browse/cust_pay_batch.cgi | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'httemplate/browse/cust_pay_batch.cgi') diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index 7779bd0c3..960843adf 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -1,21 +1,5 @@ + <% -# - -use strict; -use vars qw( $cgi $p ); # $part_referral ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use Date::Format; -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch); -use FS::CGI qw(header menubar popurl table); -use FS::queue; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); print header("Pending credit card batch", menubar( 'Main Menu' => $p, -- 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/browse/cust_pay_batch.cgi | 1 - 1 file changed, 1 deletion(-) (limited to 'httemplate/browse/cust_pay_batch.cgi') diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index 960843adf..220296724 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -1,4 +1,3 @@ - <% print header("Pending credit card batch", menubar( -- 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/browse/cust_pay_batch.cgi | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/browse/cust_pay_batch.cgi') diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index 220296724..608a58d0d 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -1,3 +1,4 @@ + <% print header("Pending credit card batch", menubar( -- cgit v1.2.1 From aac3f675b2bb9d6a90cb2c6b9c85951961475376 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 21 Sep 2003 01:22:20 +0000 Subject: add link to preliminary batch download --- httemplate/browse/cust_pay_batch.cgi | 69 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'httemplate/browse/cust_pay_batch.cgi') diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index 608a58d0d..f9d0921a1 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -1,10 +1,15 @@ -<% +<%= header("Pending credit card batch", menubar( 'Main Menu' => $p,)) %> + +
+ +Download batch in format +

-print header("Pending credit card batch", menubar( - 'Main Menu' => $p, -# 'Add new referral' => "../edit/part_referral.cgi", -)), &table(), < # inv# @@ -14,39 +19,35 @@ print header("Pending credit card batch", menubar( Exp Amount -END - -foreach my $cust_pay_batch ( sort { - $a->getfield('paybatchnum') <=> $b->getfield('paybatchnum') -} qsearch('cust_pay_batch',{}) ) { -# my $date = time2str( "%a %b %e %T %Y", $queue->_date ); -# my $status = $hashref->{status}; -# if ( $status eq 'failed' || $status eq 'locked' ) { -# $status .= -# qq! (
retry |!. -# qq! remove )!; -# } - my $cardnum = $cust_pay_batch->{cardnum}; - $cardnum =~ s/.{4}$/xxxx/; - print <paybatchnum <=> $b->paybatchnum } + qsearch('cust_pay_batch', {} ) +) { + my $cardnum = $cust_pay_batch->cardnum; + #$cardnum =~ s/.{4}$/xxxx/; + $cardnum = 'x'x(length($cardnum)-4). substr($cardnum,(length($cardnum)-4)); + + $cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/; + my( $mon, $year ) = ( $2, $1 ); + $mon = "0$mon" if $mon < 10; + my $exp = "$mon/$year"; + +%> + - $cust_pay_batch->{paybatchnum} - $cust_pay_batch->{invnum} - $cust_pay_batch->{custnum} - $cust_pay_batch->{last}, $cust_pay_batch->{last} - $cust_pay_batch->{payname} - $cardnum - $cust_pay_batch->{exp} - \$$cust_pay_batch->{amount} + <%= $cust_pay_batch->paybatchnum %> + <%= $cust_pay_batch->invnum %> + <%= $cust_pay_batch->custnum %> + <%= $cust_pay_batch->get('last'). ', '. $cust_pay_batch->first %> + <%= $cust_pay_batch->payname %> + <%= $cardnum %> + <%= $exp %> + $<%= $cust_pay_batch->amount %> -END -} +<% } %> -print < -END - -%> -- cgit v1.2.1 From c8f80bd5aaeb0f3844a7cece4bfe250d4f89f745 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 28 Sep 2003 02:36:18 +0000 Subject: add upload of batch result from TD Canada Trust some global.asa / handler.pl enhancements --- httemplate/browse/cust_pay_batch.cgi | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'httemplate/browse/cust_pay_batch.cgi') diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index f9d0921a1..d90a03313 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -2,11 +2,18 @@ <%= header("Pending credit card batch", menubar( 'Main Menu' => $p,)) %> - Download batch in format + +

+ +
+Upload results
+Filename
+Format
+


<%= &table() %> -- cgit v1.2.1 From 2c0d7675caacd5891b7f699c92260d321b4d03b5 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 22 Dec 2003 21:37:04 +0000 Subject: add total cards & amount to pending batch screen --- httemplate/browse/cust_pay_batch.cgi | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'httemplate/browse/cust_pay_batch.cgi') diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index d90a03313..3420e97b6 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -14,8 +14,24 @@ Format
-

+
+ +<% + my $statement = "SELECT SUM(amount) from cust_pay_batch"; + my $sth = dbh->prepare($statement) or die dbh->errstr. "doing $statement"; + $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; + my $total = $sth->fetchrow_arrayref->[0]; + + my $c_statement = "SELECT COUNT(*) from cust_pay_batch"; + my $c_sth = dbh->prepare($c_statement) + or die dbh->errstr. "doing $c_statement"; + $c_sth->execute or die "Error executing \"$c_statement\": ". $c_sth->errstr; + my $cards = $c_sth->fetchrow_arrayref->[0]; +%> +<%= $cards %> credit card payments batched
+$<%= sprintf("%.2f", $total) %> total in pending batch
+
<%= &table() %> # -- cgit v1.2.1