diff options
author | ivan <ivan> | 2008-04-01 09:19:36 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-04-01 09:19:36 +0000 |
commit | a55606be98045495c92ae6359483437170023294 (patch) | |
tree | fc7be2959dd03cbf3cd11ea33ed1ab29e79c721a | |
parent | 0c449daf0d4bcb064515454bd4e8166d612dee8c (diff) |
don't show services on invoices that are newer than the invoice, closes: #3032
-rw-r--r-- | FS/FS/cust_bill.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 3c69632..f0863c4 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2419,6 +2419,8 @@ sub _items_cust_bill_pkg { my @b = (); foreach my $cust_bill_pkg ( @$cust_bill_pkg ) { + my $cust_pkg = $cust_bill_pkg->cust_pkg; + my $desc = $cust_bill_pkg->desc; if ( $cust_bill_pkg->pkgnum > 0 ) { @@ -2426,7 +2428,7 @@ sub _items_cust_bill_pkg { if ( $cust_bill_pkg->setup != 0 ) { my $description = $desc; $description .= ' Setup' if $cust_bill_pkg->recur != 0; - my @d = $cust_bill_pkg->cust_pkg->h_labels_short($self->_date); + my @d = $cust_pkg->h_labels_short($self->_date); push @d, $cust_bill_pkg->details if $cust_bill_pkg->recur == 0; push @b, { description => $description, @@ -2449,8 +2451,11 @@ sub _items_cust_bill_pkg { pkgnum => $cust_bill_pkg->pkgnum, amount => sprintf("%.2f", $cust_bill_pkg->recur), ext_description => - [ $cust_bill_pkg->cust_pkg->h_labels_short( $cust_bill_pkg->edate, - $cust_bill_pkg->sdate), + #at least until cust_bill_pkg has "past" ranges in addition to + #the "future" sdate/edate ones... see #3032 + [ $cust_pkg->h_labels_short( $self->_date ), + #$cust_bill_pkg->edate, + #$cust_bill_pkg->sdate), $cust_bill_pkg->details, ], }; |