diff options
author | Mark Wells <mark@freeside.biz> | 2015-02-05 16:17:55 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-02-05 16:18:03 -0800 |
commit | 7bc49d6e6a03b181ca2392d69e5f717e54d2f907 (patch) | |
tree | 19982fce80130d44aad8d17f99e94b4922093836 /FS/FS/quotation_pkg.pm | |
parent | 795a733714d398d4a3d427de1448b7daaf92399d (diff) |
fix creation of custom discounts on quotations, and ordering of discounted quoted packages, #33099
Diffstat (limited to 'FS/FS/quotation_pkg.pm')
-rw-r--r-- | FS/FS/quotation_pkg.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/quotation_pkg.pm b/FS/FS/quotation_pkg.pm index 3813fb2..ea8f4e0 100644 --- a/FS/FS/quotation_pkg.pm +++ b/FS/FS/quotation_pkg.pm @@ -103,8 +103,11 @@ otherwise returns false. =cut +use Data::Dumper; #XXX DEBUG sub insert { my ($self, %options) = @_; + warn Dumper($self); + warn Dumper(\%options); my $dbh = dbh; my $oldAutoCommit = $FS::UID::AutoCommit; @@ -251,6 +254,9 @@ sub estimate { # XXX the order of applying discounts is ill-defined, which matters # if there are percentage and amount discounts on the same package. + # + # but right now there can only be one discount on any package, so + # it doesn't matter foreach my $pkg_discount ($self->quotation_pkg_discount) { my $discount = $pkg_discount->discount; |