summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main
diff options
context:
space:
mode:
authormark <mark>2011-01-19 00:41:00 +0000
committermark <mark>2011-01-19 00:41:00 +0000
commit581d4b07156ba59e7445235305872c74aa97c6d9 (patch)
tree16e5e67ea875dc1caa0e15d0d0d2c410ceadbdbf /FS/FS/cust_main
parentb25e6036d8c3e3c921eaa9a24d1899e08b80f905 (diff)
deferred prorate billing, RT#10630
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r--FS/FS/cust_main/Billing.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index c47e630c8..aeb0c51d5 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -897,6 +897,7 @@ sub _make_lines {
'discounts' => \@discounts,
'real_pkgpart' => $real_pkgpart,
'freq_override' => $options{freq_override} || '',
+ 'setup_fee' => 0,
);
my $method = $options{cancel} ? 'calc_cancel' : 'calc_recur';
@@ -926,6 +927,14 @@ sub _make_lines {
}
+ if ( $param{'setup_fee'} ) {
+ # Add an additional setup fee at the billing stage.
+ # Used for prorate_defer_bill.
+ $setup += $param{'setup_fee'};
+ $unitsetup += $param{'setup_fee'};
+ $lineitems++;
+ }
+
}
warn "\$setup is undefined" unless defined($setup);