From 20c1183d2673b62bd0e29eb65f0a9a2c974b8027 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Oct 2001 19:05:27 +0000 Subject: [PATCH] depriciate cust_pay_batch.trancode web interface to view pending batch --- FS/FS/cust_pay_batch.pm | 6 ++-- bin/fs-setup | 4 +-- httemplate/browse/cust_pay_batch.cgi | 68 ++++++++++++++++++++++++++++++++++++ httemplate/docs/schema.html | 2 +- httemplate/index.html | 1 + 5 files changed, 74 insertions(+), 7 deletions(-) create mode 100755 httemplate/browse/cust_pay_batch.cgi diff --git a/FS/FS/cust_pay_batch.pm b/FS/FS/cust_pay_batch.pm index 671cd710a..6acb4fefb 100644 --- a/FS/FS/cust_pay_batch.pm +++ b/FS/FS/cust_pay_batch.pm @@ -37,8 +37,6 @@ following fields are currently supported: =item paybatchnum - primary key (automatically assigned) -=item trancode - 77 for charges - =item cardnum =item exp - card expiration @@ -120,7 +118,7 @@ sub check { my $error = $self->ut_numbern('paybatchnum') - || $self->ut_numbern('trancode') + || $self->ut_numbern('trancode') #depriciated || $self->ut_number('cardnum') || $self->ut_money('amount') || $self->ut_number('invnum') @@ -191,7 +189,7 @@ sub check { =head1 VERSION -$Id: cust_pay_batch.pm,v 1.3 2001-10-02 16:00:30 jeff Exp $ +$Id: cust_pay_batch.pm,v 1.4 2001-10-30 19:05:27 ivan Exp $ =head1 BUGS diff --git a/bin/fs-setup b/bin/fs-setup index f3889f0dc..4df3773af 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: fs-setup,v 1.65 2001-10-24 15:29:30 ivan Exp $ +# $Id: fs-setup,v 1.66 2001-10-30 19:05:27 ivan Exp $ #to delay loading dbdef until we're ready BEGIN { $FS::Record::setup_hack = 1; } @@ -462,7 +462,7 @@ sub tables_hash_hack { 'state', 'varchar', '', $char_d, 'zip', 'varchar', '', 10, 'country', 'char', '', 2, - 'trancode', 'int', '', '', +# 'trancode', 'int', '', '', 'cardnum', 'varchar', '', 16, #'exp', @date_type, 'exp', 'varchar', '', 11, 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 + +%> diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index 145d55fc2..a5bf16c37 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -127,7 +127,7 @@
  • cust_pay_batch - Pending batch
      -
    • trancode - 77 for charges +
    • paybatchnum
    • cardnum
    • exp - card expiration
    • amount diff --git a/httemplate/index.html b/httemplate/index.html index 236b72b20..97016e680 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -60,6 +60,7 @@
  • NAS ports
  • Joe queue +
  • Pending credit card batch
    -- 2.11.0