X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fcust_pay_batch.cgi;h=d90a033135de819e1d4080a4d4a5950328b7855d;hp=7779bd0c3377cf0ba2db2def454ec23e1d81803a;hb=83178acdc79de25f98c3e7eee9a4de1a17eaf9f4;hpb=20c1183d2673b62bd0e29eb65f0a9a2c974b8027 diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi index 7779bd0c3..d90a03313 100755 --- a/httemplate/browse/cust_pay_batch.cgi +++ b/httemplate/browse/cust_pay_batch.cgi @@ -1,26 +1,22 @@ -<% -# - -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(), < +<%= header("Pending credit card batch", menubar( 'Main Menu' => $p,)) %> + +
+Download batch in format
+

+ +
+Upload results
+Filename
+Format
+
+

+ +<%= &table() %> # inv# @@ -30,39 +26,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 - -%>