[freeside-commits] branch master updated. 30ee235522ce53a21dd3c1597000663d25685ac4

Ivan ivan at 420.am
Wed Jan 30 00:28:45 PST 2013


The branch, master has been updated
       via  30ee235522ce53a21dd3c1597000663d25685ac4 (commit)
      from  c3a7e8855edbe4f836543184d5a7543e04255a43 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 30ee235522ce53a21dd3c1597000663d25685ac4
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 30 00:28:40 2013 -0800

    add lpr override to invocie reminder send, RT#18549

diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index b3ae290..41124bc 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1330,6 +1330,8 @@ invoice and all older invoices is greater than the specified amount.
 
 I<notice_name>, if specified, overrides "Invoice" as the name of the sent document (templates from 10/2009 or newer required)
 
+I<lpr>, if specified, is passed to 
+
 =cut
 
 sub queueable_send {
@@ -1354,6 +1356,7 @@ sub send {
   my( $template, $invoice_from, $notice_name );
   my $agentnums = '';
   my $balance_over = 0;
+  my $lpr = '';
 
   if ( ref($_[0]) ) {
     my $opt = shift;
@@ -1364,6 +1367,7 @@ sub send {
     $invoice_from = $opt->{'invoice_from'};
     $balance_over = $opt->{'balance_over'} if $opt->{'balance_over'};
     $notice_name = $opt->{'notice_name'};
+    $lpr = $opt->{'lpr'}
   } else {
     $template = scalar(@_) ? shift : '';
     if ( scalar(@_) && $_[0]  ) {
@@ -1397,10 +1401,12 @@ sub send {
     if ( grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list or !@invoicing_list )
     && ! $self->invoice_noemail;
 
+  $opt{'lpr'} = $lpr;
   #$self->print_invoice(\%opt)
   $self->print(\%opt)
     if grep { $_ eq 'POST' } @invoicing_list; #postal
 
+  #this has never been used post-$ORIGINAL_ISP afaik
   $self->fax_invoice(\%opt)
     if grep { $_ eq 'FAX' } @invoicing_list; #fax
 
@@ -1564,14 +1570,16 @@ sub print {
   return if $self->hide;
   my $conf = $self->conf;
 
-  my( $template, $notice_name );
+  my( $template, $notice_name, $lpr );
   if ( ref($_[0]) ) {
     my $opt = shift;
     $template = $opt->{'template'} || '';
     $notice_name = $opt->{'notice_name'} || 'Invoice';
+    $lpr = $opt->{'lpr'}
   } else {
     $template = scalar(@_) ? shift : '';
     $notice_name = 'Invoice';
+    $lpr = '';
   }
 
   my %opt = (
@@ -1587,6 +1595,7 @@ sub print {
     do_print(
       $self->lpr_data(\%opt),
       'agentnum' => $self->cust_main->agentnum,
+      'lpr'      => $lpr,
     );
   }
 }
diff --git a/FS/FS/part_event/Action/cust_bill_send_reminder.pm b/FS/FS/part_event/Action/cust_bill_send_reminder.pm
index 2ba8136..073bb8f 100644
--- a/FS/FS/part_event/Action/cust_bill_send_reminder.pm
+++ b/FS/FS/part_event/Action/cust_bill_send_reminder.pm
@@ -11,9 +11,10 @@ sub eventtable_hashref {
 
 sub option_fields {
   (
-    'notice_name'  => 'Reminder name',
-    #'notes' => { 'label' => 'Reminder notes' }, 
+    'notice_name' => 'Reminder name',
+    #'notes'      => { 'label' => 'Reminder notes' }, 
     #include standard notes?  no/prepend/append
+    'lpr'         => 'Optional alternate print command',
   );
 }
 
@@ -25,7 +26,10 @@ sub do_action {
   #my $cust_main = $self->cust_main($cust_bill);
   #my $cust_main = $cust_bill->cust_main;
 
-  $cust_bill->send({ 'notice_name' => $self->option('notice_name') });
+  $cust_bill->send({
+    'notice_name' => $self->option('notice_name'),
+    'lpr'         => $self->option('lpr'),
+  });
 }
 
 1;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_bill.pm                                 |   11 ++++++++++-
 FS/FS/part_event/Action/cust_bill_send_reminder.pm |   10 +++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list