svc_broadband rewrite
[freeside.git] / FS / FS / cust_bill.pm
index 4831519..c661baa 100644 (file)
@@ -36,6 +36,11 @@ $FS::UID::callback{'FS::cust_bill'} = sub {
   $invoice_from = $conf->config('invoice_from');
   $smtpmachine = $conf->config('smtpmachine');
 
+  ( $bop_processor,$bop_login, $bop_password, $bop_action ) = ( '', '', '', '');
+  @bop_options = ();
+  ( $ach_processor,$ach_login, $ach_password, $ach_action ) = ( '', '', '', '');
+  @ach_options = ();
+
   if ( $conf->exists('business-onlinepayment') ) {
     ( $bop_processor,
       $bop_login,
@@ -662,6 +667,10 @@ sub realtime_lec {
 
 sub realtime_bop {
   my( $self, $method, $processor, $login, $password, $action, $options ) = @_;
+
+  #trim an extraneous blank line
+  pop @$options if scalar(@$options) % 2 && $options->[-1] =~ /^\s*$/;
+
   my $cust_main = $self->cust_main;
   my $amount = $self->owed;
 
@@ -1048,11 +1057,12 @@ sub print_text {
 
   #setup template variables
   package FS::cust_bill::_template; #!
-  use vars qw( $invnum $date $page $total_pages @address $overdue @buf );
+  use vars qw( $invnum $date $page $total_pages @address $overdue @buf $agent );
 
   $invnum = $self->invnum;
   $date = $self->_date;
   $page = 1;
+  $agent = $self->cust_main->agent->agent;
 
   if ( $FS::cust_bill::invoice_lines ) {
     $total_pages =
@@ -1120,7 +1130,7 @@ sub print_text {
 
 =head1 VERSION
 
-$Id: cust_bill.pm,v 1.58 2002-12-23 14:22:48 steve Exp $
+$Id: cust_bill.pm,v 1.61 2003-01-10 07:41:05 ivan Exp $
 
 =head1 BUGS