diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-05-06 06:38:43 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-05-06 06:38:43 -0700 |
commit | 719acce16404ce63773159842f75cce230f34486 (patch) | |
tree | de7c60fd5a4ba749509d2a5bb9e2387f171b9f0f /FS/FS/part_pkg.pm | |
parent | 71b86f3f89e8fdeb7142fa82cdbe3e3afce7a903 (diff) |
commissions on package margin, RT#24086
Diffstat (limited to 'FS/FS/part_pkg.pm')
-rw-r--r-- | FS/FS/part_pkg.pm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index 07f59aa..deba655 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -1610,6 +1610,28 @@ sub unit_setup { $self->option('setup_fee') || 0; } +=item setup_margin + +unit_setup minus setup_cost + +=cut + +sub setup_margin { + my $self = shift; + $self->unit_setup(@_) - $self->setup_cost; +} + +=item recur_margin_permonth + +base_recur_permonth minus recur_cost_permonth + +=cut + +sub recur_margin_permonth { + my $self = shift; + $self->base_recur_permonth(@_) - $self->recur_cost_permonth(@_); +} + =item format OPTION DATA Returns data formatted according to the function 'format' described |