[freeside-commits] branch FREESIDE_3_BRANCH updated. 137d53fa8148996a844dff0f179f8c06afe9e592
Ivan
ivan at 420.am
Sat Apr 2 16:24:59 PDT 2016
The branch, FREESIDE_3_BRANCH has been updated
via 137d53fa8148996a844dff0f179f8c06afe9e592 (commit)
from 4178a13c1fc66dc732b6236a32df132316466856 (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 137d53fa8148996a844dff0f179f8c06afe9e592
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Apr 2 16:24:58 2016 -0700
invoice mode in PDF spools, RT#39587
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 8dff768..031c1f2 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -147,6 +147,10 @@ sub print_latex {
$template ||= $self->_agent_template
if $self->can('_agent_template');
+ #the new way
+ $self->set('mode', $params{mode})
+ if $params{mode};
+
my $pkey = $self->primary_key;
my $tmp_template = $self->table. '.'. $self->$pkey. '.XXXXXXXX';
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 42be02a..f207d35 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1128,9 +1128,8 @@ sub queueable_email {
my $self = qsearchs('cust_bill', { 'invnum' => $opt{invnum} } )
or die "invalid invoice number: " . $opt{invnum};
- if ( $opt{mode} ) {
- $self->set('mode', $opt{mode});
- }
+ $self->set('mode', $opt{mode})
+ if $opt{mode};
my %args = map {$_ => $opt{$_}}
grep { $opt{$_} }
@@ -1271,6 +1270,10 @@ sub batch_invoice {
batchnum => $bill_batch->batchnum,
invnum => $self->invnum,
});
+ if ( $self->mode ) {
+ $opt->{mode} ||= $self->mode;
+ $opt->{mode} = $opt->{mode}->modenum if ref $opt->{mode};
+ }
return $cust_bill_batch->insert($opt);
}
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Template_Mixin.pm | 4 ++++
FS/FS/cust_bill.pm | 9 ++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list