summaryrefslogtreecommitdiff
path: root/FS/FS/quotation_pkg.pm
diff options
context:
space:
mode:
authorJeremy Davis <jeremyd@freeside.biz>2014-11-24 12:50:55 -0500
committerJeremy Davis <jeremyd@freeside.biz>2014-11-24 12:50:55 -0500
commit52013c89319153749cd7c485fa4a67a957abcf3f (patch)
tree11f8470174109051382f540dba1fe3b297e6201a /FS/FS/quotation_pkg.pm
parent4a56e0d606cb6071a5830966687284b277f1fd2d (diff)
Ticket #32336 Unit prices not showing on quotations
Diffstat (limited to 'FS/FS/quotation_pkg.pm')
-rw-r--r--FS/FS/quotation_pkg.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/FS/FS/quotation_pkg.pm b/FS/FS/quotation_pkg.pm
index 79cce80..33c761e 100644
--- a/FS/FS/quotation_pkg.pm
+++ b/FS/FS/quotation_pkg.pm
@@ -164,6 +164,26 @@ sub recur {
sprintf('%.2f', $recur);
}
+sub unitsetup {
+ my $self = shift;
+ return '0.00' if $self->waive_setup eq 'Y' || $self->{'_NO_SETUP_KLUDGE'};
+ my $part_pkg = $self->part_pkg;
+ my $setup = $part_pkg->option('setup_fee');
+
+ #XXX discounts
+ sprintf('%.2f', $setup);
+}
+
+sub unitrecur {
+ my $self = shift;
+ return '0.00' if $self->{'_NO_RECUR_KLUDGE'};
+ my $part_pkg = $self->part_pkg;
+ my $recur = $part_pkg->can('base_recur') ? $part_pkg->base_recur
+ : $part_pkg->option('recur_fee');
+ #XXX discounts
+ sprintf('%.2f', $recur);
+}
+
=item part_pkg_currency_option OPTIONNAME
Returns a two item list consisting of the currency of this quotation's customer