summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/part_pkg/flat.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm
index c9f285898..7837acc96 100644
--- a/FS/FS/part_pkg/flat.pm
+++ b/FS/FS/part_pkg/flat.pm
@@ -98,7 +98,12 @@ sub calc_setup {
my $quantity = $cust_pkg->quantity || 1;
- sprintf("%.2f", $quantity * $self->unit_setup($cust_pkg, $sdate, $details) );
+ my $charge = $quantity * $self->unit_setup($cust_pkg, $sdate, $details);
+
+ my $param = { 'setup_charge' => $charge };
+ my $discount = $self->calc_discount($cust_pkg, $sdate, $details, $param);
+
+ sprintf('%.2f', $charge - $discount);
}
sub unit_setup {