projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sales commission on invoices: allow commission based on cost, #25847
[freeside.git]
/
FS
/
FS
/
part_pkg.pm
diff --git
a/FS/FS/part_pkg.pm
b/FS/FS/part_pkg.pm
index
e4927a3
..
d2f2f86
100644
(file)
--- a/
FS/FS/part_pkg.pm
+++ b/
FS/FS/part_pkg.pm
@@
-1665,7
+1665,7
@@
recur_cost divided by freq (only supported for monthly and longer frequencies)
sub recur_cost_permonth {
my($self, $cust_pkg) = @_;
return 0 unless $self->freq =~ /^\d+$/ && $self->freq > 0;
sub recur_cost_permonth {
my($self, $cust_pkg) = @_;
return 0 unless $self->freq =~ /^\d+$/ && $self->freq > 0;
- sprintf('%.2f',
$self->recur_cost
/ $self->freq );
+ sprintf('%.2f',
($self->recur_cost || 0)
/ $self->freq );
}
=item cust_bill_pkg_recur CUST_PKG
}
=item cust_bill_pkg_recur CUST_PKG
@@
-1710,7
+1710,7
@@
unit_setup minus setup_cost
sub setup_margin {
my $self = shift;
sub setup_margin {
my $self = shift;
- $self->unit_setup(@_) -
$self->setup_cost
;
+ $self->unit_setup(@_) -
($self->setup_cost || 0)
;
}
=item recur_margin_permonth
}
=item recur_margin_permonth