depriciate cust_pay_batch.trancode
authorivan <ivan>
Tue, 30 Oct 2001 19:05:27 +0000 (19:05 +0000)
committerivan <ivan>
Tue, 30 Oct 2001 19:05:27 +0000 (19:05 +0000)
web interface to view pending batch

FS/FS/cust_pay_batch.pm
bin/fs-setup
httemplate/browse/cust_pay_batch.cgi [new file with mode: 0755]
httemplate/docs/schema.html
httemplate/index.html

index 671cd71..6acb4fe 100644 (file)
@@ -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
 
index f3889f0..4df3773 100755 (executable)
@@ -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 (executable)
index 0000000..7779bd0
--- /dev/null
@@ -0,0 +1,68 @@
+<%
+#<!-- $Id: cust_pay_batch.cgi,v 1.1 2001-10-30 19:05:27 ivan Exp $ -->
+
+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(), <<END;
+      <TR>
+        <TH>#</TH>
+        <TH><font size=-1>inv#</font></TH>
+        <TH COLSPAN=2>Customer</TH>
+        <TH>Card name</TH>
+        <TH>Card</TH>
+        <TH>Exp</TH>
+        <TH>Amount</TH>
+      </TR>
+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! ( <A HREF="$p/edit/cust_pay_batch.cgi?jobnum=$jobnum&action=new">retry</A> |!.
+#      qq! <A HREF="$p/edit/cust_pay_batch.cgi?jobnum$jobnum&action=del">remove </A> )!;
+#  }
+  my $cardnum = $cust_pay_batch->{cardnum};
+  $cardnum =~ s/.{4}$/xxxx/;
+  print <<END;
+      <TR>
+        <TD>$cust_pay_batch->{paybatchnum}</TD>
+        <TD><A HREF="../view/cust_bill.cgi?$cust_pay_batch->{invnum}">$cust_pay_batch->{invnum}</TD>
+        <TD><A HREF="../view/cust_main.cgi?$cust_pay_batch->{custnum}">$cust_pay_batch->{custnum}</TD>
+        <TD>$cust_pay_batch->{last}, $cust_pay_batch->{last}</TD>
+        <TD>$cust_pay_batch->{payname}</TD>
+        <TD>$cardnum</TD>
+        <TD>$cust_pay_batch->{exp}</TD>
+        <TD align="right">\$$cust_pay_batch->{amount}</TD>
+      </TR>
+END
+
+}
+
+print <<END;
+    </TABLE>
+  </BODY>
+</HTML>
+END
+
+%>
index 145d55f..a5bf16c 100644 (file)
       </ul>
     <li><a name="cust_pay_batch" href="man/FS/cust_pay_batch.html">cust_pay_batch</a> - Pending batch
       <ul>
-        <li>trancode - 77 for charges
+        <li>paybatchnum
         <li>cardnum
         <li>exp - card expiration
         <li>amount
index 236b72b..97016e6 100644 (file)
@@ -60,6 +60,7 @@
             </UL>
           <LI><A HREF="browse/nas.cgi">NAS ports</A>
           <LI><A HREF="browse/queue.cgi">Joe queue</A>
+          <LI><A HREF="browse/cust_pay_batch.cgi">Pending credit card batch</A>
         </ul>
     </ul>
     <hr noshade>