X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FTemplate_Mixin.pm;h=e597e73a31dcb765f22f642d775a4f928c1b12f0;hb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;hp=ad49ac80692d974749cfe7b1a9abdd6edbed35f4;hpb=ddddcba7554c00271135c3e69d7d5ad5039b6707;p=freeside.git diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index ad49ac806..e597e73a3 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -106,7 +106,7 @@ sub print_latex { $params{'time'} = $today if $today; $params{'template'} = $template if $template; $params{$_} = $opt{$_} - foreach grep $opt{$_}, qw( unsquelch_cdr notice_name ); + foreach grep $opt{$_}, qw( unsquelch_cdr notice_name no_date no_number ); $template ||= $self->_agent_template if $self->can('_agent_template'); @@ -445,9 +445,15 @@ sub print_generic { 'agent' => &$escape_function($cust_main->agent->agent), #invoice/quotation info - 'invnum' => $self->invnum, + 'no_number' => $params{'no_number'}, + 'invnum' => ( $params{'no_number'} ? '' : $self->invnum ), 'quotationnum' => $self->quotationnum, - 'date' => time2str($date_format, $self->_date), + 'no_date' => $params{'no_date'}, + '_date' => ( $params{'no_date'} ? '' : $self->_date ), + 'date' => ( $params{'no_date'} + ? '' + : time2str($date_format, $self->_date) + ), 'today' => time2str($date_format_long, $today), 'terms' => $self->terms, 'template' => $template, #params{'template'}, @@ -647,7 +653,7 @@ sub print_generic { push @credits, { '_date' => $cust_credit->_date, 'date' => time2str($date_format, $cust_credit->_date), - 'creditreason'=> $cust_credit->cust_credit->reason, + 'creditreason'=> $cust_credit->reason, 'amount' => sprintf('%.2f', $cust_credit->amount), }; } @@ -794,7 +800,7 @@ sub print_generic { $adjust_section->{'sort_weight'} = $adjust_weight; my $unsquelched = $params{unsquelch_cdr} || $cust_main->squelch_cdr ne 'Y'; - my $multisection = $conf->exists($tc.'_sections', $cust_main->agentnum); + my $multisection = $conf->exists($tc.'sections', $cust_main->agentnum); $invoice_data{'multisection'} = $multisection; my $late_sections = []; my $extra_sections = [];