[freeside-commits] freeside/FS/FS Conf.pm, 1.299, 1.300 cust_bill.pm, 1.247, 1.248
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Jul 20 16:01:14 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv22596/FS/FS
Modified Files:
Conf.pm cust_bill.pm
Log Message:
config setting to have emailed invoices include call details #5275
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.299
retrieving revision 1.300
diff -u -d -r1.299 -r1.300
--- Conf.pm 17 Jul 2009 01:44:24 -0000 1.299
+++ Conf.pm 20 Jul 2009 23:01:12 -0000 1.300
@@ -2098,6 +2098,13 @@
},
{
+ 'key' => 'voip-cdr_email',
+ 'section' => '',
+ 'description' => 'Include the call details on emailed invoices even if the customer is configured for not printing them on the invoices.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'svc_forward-arbitrary_dst',
'section' => '',
'description' => "Allow forwards to point to arbitrary strings that don't necessarily look like email addresses. Only used when using forwards for weird, non-email things.",
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.247
retrieving revision 1.248
diff -u -d -r1.247 -r1.248
--- cust_bill.pm 20 Jul 2009 14:26:12 -0000 1.247
+++ cust_bill.pm 20 Jul 2009 23:01:12 -0000 1.248
@@ -605,6 +605,8 @@
'subject' => (($args{'subject'}) ? $args{'subject'} : 'Invoice'),
);
+ my %cdrs = ( 'unsquelch_cdr' => $conf->exists('voip-cdr_email') );
+
if (ref($args{'to'}) eq 'ARRAY') {
$return{'to'} = $args{'to'};
} else {
@@ -643,7 +645,7 @@
if ( ref($args{'print_text'}) eq 'ARRAY' ) {
$data = $args{'print_text'};
} else {
- $data = [ $self->print_text('', $args{'template'}) ];
+ $data = [ $self->print_text('', $args{'template'}, %cdrs) ];
}
}
@@ -690,7 +692,11 @@
' </title>',
' </head>',
' <body bgcolor="#e8e8e8">',
- $self->print_html('', $args{'template'}, $content_id),
+ $self->print_html({ time => '',
+ template => $args{'template'},
+ cid => $content_id,
+ %cdrs,
+ }),
' </body>',
'</html>',
],
@@ -723,7 +729,7 @@
$related->add_part($image);
- my $pdf = build MIME::Entity $self->mimebuild_pdf('', $args{'template'});
+ my $pdf = build MIME::Entity $self->mimebuild_pdf('', $args{'template'}, %cdrs);
$return{'mimeparts'} = [ $related, $pdf ];
@@ -751,7 +757,7 @@
#mime parts arguments a la MIME::Entity->build().
$return{'mimeparts'} = [
- { $self->mimebuild_pdf('', $args{'template'}) }
+ { $self->mimebuild_pdf('', $args{'template'}, %cdrs) }
];
}
@@ -771,7 +777,7 @@
if ( ref($args{'print_text'}) eq 'ARRAY' ) {
$return{'body'} = $args{'print_text'};
} else {
- $return{'body'} = [ $self->print_text('', $args{'template'}) ];
+ $return{'body'} = [ $self->print_text('', $args{'template'}, %cdrs) ];
}
}
@@ -1611,11 +1617,12 @@
=cut
sub print_text {
- my( $self, $today, $template ) = @_;
+ my( $self, $today, $template, %opt ) = @_;
my %params = ( 'format' => 'template' );
$params{'time'} = $today if $today;
$params{'template'} = $template if $template;
+ $params{'unsquelch_cdr'} = $opt{'unsquelch_cdr'} if $opt{'unsquelch_cdr'};
$self->print_generic( %params );
}
@@ -1636,11 +1643,12 @@
=cut
sub print_latex {
- my( $self, $today, $template ) = @_;
+ my( $self, $today, $template, %opt ) = @_;
my %params = ( 'format' => 'latex' );
$params{'time'} = $today if $today;
$params{'template'} = $template if $template;
+ $params{'unsquelch_cdr'} = $opt{'unsquelch_cdr'} if $opt{'unsquelch_cdr'};
$template ||= $self->_agent_template;
More information about the freeside-commits
mailing list