summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorjeff <jeff>2008-08-06 04:05:54 +0000
committerjeff <jeff>2008-08-06 04:05:54 +0000
commitc1e4b5a725a27b26a9e4211923959c469955276f (patch)
tree1d3ff88460531c45bd37baf5d9fe00fe1a262537 /FS
parent5a218e8d28a8fd7c486ca84413b13bae5a987f76 (diff)
fix bug(s) introduced with billing loop refactor
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index b74c75d..8873a5b 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -2092,9 +2092,11 @@ sub bill {
my $real_pkgpart = $cust_pkg->pkgpart;
my %hash = $cust_pkg->hash;
- my $old_cust_pkg = new FS::cust_pkg \%hash;
foreach my $part_pkg ( $cust_pkg->part_pkg->self_and_bill_linked ) {
+
+ $cust_pkg->set($_, $hash{$_}) foreach qw ( setup last_bill bill );
+
my $error =
$self->_make_lines( 'part_pkg' => $part_pkg,
'cust_pkg' => $cust_pkg,
@@ -2302,13 +2304,12 @@ sub _make_lines {
my %hash = $cust_pkg->hash;
my $old_cust_pkg = new FS::cust_pkg \%hash;
- $cust_pkg->pkgpart($part_pkg->pkgpart);
- $cust_pkg->set($_, $hash{$_}) foreach qw( setup last_bill bill );
-
my @details = ();
my $lineitems = 0;
+ $cust_pkg->pkgpart($part_pkg->pkgpart);
+
###
# bill setup
###