[freeside-commits] freeside/FS/FS cust_main.pm,1.428,1.429
Ivan,,,
ivan at wavetail.420.am
Thu Jun 18 03:07:32 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv29916
Modified Files:
cust_main.pm
Log Message:
uuh, don't bomb out if there *isn't* a postal fee package
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.428
retrieving revision 1.429
diff -u -d -r1.428 -r1.429
--- cust_main.pm 15 Jun 2009 20:43:57 -0000 1.428
+++ cust_main.pm 18 Jun 2009 10:07:29 -0000 1.429
@@ -2436,28 +2436,33 @@
my $postal_pkg = $self->charge_postal_fee();
if ( $postal_pkg && !ref( $postal_pkg ) ) {
+
$dbh->rollback if $oldAutoCommit;
return "can't charge postal invoice fee for customer ".
$self->custnum. ": $postal_pkg";
- }
- foreach my $part_pkg ( $postal_pkg->part_pkg->self_and_bill_linked ) {
- my $error =
- $self->_make_lines( 'part_pkg' => $part_pkg,
- 'cust_pkg' => $postal_pkg,
- 'precommit_hooks' => \@precommit_hooks,
- 'line_items' => \@cust_bill_pkg,
- 'setup' => \$total_setup,
- 'recur' => \$total_recur,
- 'tax_matrix' => \%taxlisthash,
- 'time' => $time,
- 'options' => \%options,
- );
- if ($error) {
- $dbh->rollback if $oldAutoCommit;
- return $error;
+ } elsif ( $postal_pkg ) {
+
+ foreach my $part_pkg ( $postal_pkg->part_pkg->self_and_bill_linked ) {
+ my $error =
+ $self->_make_lines( 'part_pkg' => $part_pkg,
+ 'cust_pkg' => $postal_pkg,
+ 'precommit_hooks' => \@precommit_hooks,
+ 'line_items' => \@cust_bill_pkg,
+ 'setup' => \$total_setup,
+ 'recur' => \$total_recur,
+ 'tax_matrix' => \%taxlisthash,
+ 'time' => $time,
+ 'options' => \%options,
+ );
+ if ($error) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
}
+
}
+
}
warn "having a look at the taxes we found...\n" if $DEBUG > 2;
More information about the freeside-commits
mailing list