diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-03-25 12:59:42 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-03-25 12:59:42 -0700 |
commit | 0692ff47a2eac65616bf24104a51e558506f1b8f (patch) | |
tree | b4ca73b7e1ca7454a94122df92e8c7a36ca0c0cd /FS/FS/part_pkg/currency_fixed.pm | |
parent | 9979b45f11a865efaa04f6938207b1243d042831 (diff) |
fix quotations vs. currency_fixed price plan, RT#26810, RT#21565
Diffstat (limited to 'FS/FS/part_pkg/currency_fixed.pm')
-rw-r--r-- | FS/FS/part_pkg/currency_fixed.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/FS/FS/part_pkg/currency_fixed.pm b/FS/FS/part_pkg/currency_fixed.pm index bbd95e872..41d7a657e 100644 --- a/FS/FS/part_pkg/currency_fixed.pm +++ b/FS/FS/part_pkg/currency_fixed.pm @@ -54,9 +54,10 @@ sub calc_setup { use FS::Conf; sub calc_currency_option { - my($self, $optionname, $cust_pkg, $sdate, $details, $param) = @_; + my($self, $optionname, $cust_or_quotation_pkg, $sdate, $details, $param) = @_; - my($currency, $amount) = $cust_pkg->part_pkg_currency_option($optionname); + my($currency, $amount) = + $cust_or_quotation_pkg->part_pkg_currency_option($optionname); return sprintf('%.2f', $amount ) unless $currency; $param->{'billed_currency'} = $currency; @@ -73,9 +74,10 @@ sub calc_currency_option { } sub base_recur { - my( $self, $cust_pkg, $sdate, $details, $param ) = @_; - $param ||= {}; - $self->calc_currency_option('recur_fee', $cust_pkg, $sdate, $details, $param); + my( $self, $cust_or_quotation_pkg, $sdate, $details, $param ) = @_; + $self->calc_currency_option( + 'recur_fee', $cust_or_quotation_pkg, $sdate, $details, $param || {} + ); } sub can_discount { 0; } #can't discount yet (percentage would work, but amount?) |