[freeside-commits] freeside/FS/FS cust_bill.pm,1.307,1.308
Ivan,,,
ivan at wavetail.420.am
Fri Feb 4 18:38:39 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv7940
Modified Files:
cust_bill.pm
Log Message:
add some debug tracing to invoice generation, RT#11452
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -w -d -r1.307 -r1.308
--- cust_bill.pm 23 Jan 2011 04:56:09 -0000 1.307
+++ cust_bill.pm 5 Feb 2011 02:38:37 -0000 1.308
@@ -2217,6 +2217,9 @@
'template' => [ '{', '}' ],
);
+ warn "$me print_generic creating template\n"
+ if $DEBUG > 1;
+
#create the template
my $template = $params{template} ? $params{template} : $self->_agent_template;
my $templatefile = "invoice_$format";
@@ -2234,12 +2237,18 @@
@invoice_template = _translate_old_latex_format(@invoice_template);
}
+ warn "$me print_generic creating T:T object\n"
+ if $DEBUG > 1;
+
my $text_template = new Text::Template(
TYPE => 'ARRAY',
SOURCE => \@invoice_template,
DELIMITERS => $delimiters{$format},
);
+ warn "$me print_generic compiling T:T object\n"
+ if $DEBUG > 1;
+
$text_template->compile()
or die "Can't compile $templatefile: $Text::Template::ERROR\n";
@@ -2353,6 +2362,8 @@
);
my $embolden_function = $embolden_functions{$format};
+ warn "$me generating template variables\n"
+ if $DEBUG > 1;
# generate template variables
my $returnaddress;
@@ -2406,6 +2417,9 @@
}
+ warn "$me generating invoice data\n"
+ if $DEBUG > 1;
+
my $agentnum = $self->cust_main->agentnum;
my %invoice_data = (
@@ -2528,7 +2542,9 @@
}
$invoice_data{'summarypage'} = $summarypage;
- #do variable substitution in notes, footer, smallfooter
+ warn "$me substituting variables in notes, footer, smallfooter\n"
+ if $DEBUG > 1;
+
foreach my $include (qw( notes footer smallfooter coupon )) {
my $inc_file = $conf->key_orbase("invoice_${format}$include", $template);
@@ -2599,6 +2615,9 @@
$invoice_data{'buf'} = \@buf;
$invoice_data{'sections'} = \@sections;
+ warn "$me generating sections\n"
+ if $DEBUG > 1;
+
my $previous_section = { 'description' => 'Previous Charges',
'subtotal' => $other_money_char.
sprintf('%.2f', $pr_total),
@@ -2669,6 +2688,9 @@
)
{
+ warn "$me adding previous balances\n"
+ if $DEBUG > 1;
+
foreach my $line_item ( $self->_items_previous ) {
my $detail = {
@@ -2703,6 +2725,9 @@
}
if ( $conf->exists('svc_phone-did-summary') ) {
+ warn "$me adding DID summary\n"
+ if $DEBUG > 1;
+
my ($didsummary,$minutes) = $self->_did_summary;
my $didsummary_desc = 'DID Activity Summary (Past 30 days)';
push @detail_items,
@@ -2714,6 +2739,9 @@
foreach my $section (@sections, @$late_sections) {
+ warn "$me adding $section section\n"
+ if $DEBUG > 1;
+
# begin some normalization
$section->{'subtotal'} = $section->{'amount'}
if $multisection
@@ -2798,6 +2826,9 @@
unshift @sections, $previous_section if $pr_total;
}
+ warn "$me adding taxes\n"
+ if $DEBUG > 1;
+
foreach my $tax ( $self->_items_tax ) {
$taxtotal += $tax->{'amount'};
More information about the freeside-commits
mailing list