summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-01-31 16:29:38 -0800
committerMark Wells <mark@freeside.biz>2015-01-31 16:29:54 -0800
commit1c2774bbe1aefb37fb69c8643443c02a650282f8 (patch)
tree87482ee388aa4f9227ceea3e2d28015f965f0d28 /FS
parentf7ee9056e343a1e0f576c2b2989fb066decb8264 (diff)
discounts + quotations, #33099
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/quotation_pkg.pm16
-rw-r--r--FS/FS/quotation_pkg_discount.pm13
2 files changed, 27 insertions, 2 deletions
diff --git a/FS/FS/quotation_pkg.pm b/FS/FS/quotation_pkg.pm
index 28677d0dc..914e1ce4e 100644
--- a/FS/FS/quotation_pkg.pm
+++ b/FS/FS/quotation_pkg.pm
@@ -2,7 +2,7 @@ package FS::quotation_pkg;
use strict;
use base qw( FS::TemplateItem_Mixin FS::Record );
-use FS::Record qw( qsearchs dbh ); #qsearch
+use FS::Record qw( qsearch qsearchs dbh );
use FS::part_pkg;
use FS::cust_location;
use FS::quotation;
@@ -227,7 +227,7 @@ sub estimate {
if ( $self->waive_setup eq 'Y' || $self->{'_NO_SETUP_KLUDGE'} ) {
$unitsetup = '0.00';
} else {
- $unitsetup = $part_pkg->base_setup;
+ $unitsetup = $part_pkg->option('setup_fee',1) || '0.00'; # XXX 3.x only
}
if ( $self->{'_NO_RECUR_KLUDGE'} ) {
$unitrecur = '0.00';
@@ -414,6 +414,18 @@ sub cust_main {
$quotation->cust_main;
}
+#stub for 3.x
+
+sub quotation {
+ my $self = shift;
+ FS::quotation->by_key($self->quotationnum);
+}
+
+sub quotation_pkg_discount {
+ my $self = shift;
+ qsearch('quotation_pkg_discount', { quotationpkgnum => $self->quotationpkgnum });
+}
+
=back
=head1 BUGS
diff --git a/FS/FS/quotation_pkg_discount.pm b/FS/FS/quotation_pkg_discount.pm
index 15b1bfeb8..24cb204a5 100644
--- a/FS/FS/quotation_pkg_discount.pm
+++ b/FS/FS/quotation_pkg_discount.pm
@@ -3,6 +3,8 @@ package FS::quotation_pkg_discount;
use strict;
use base qw( FS::Record );
use FS::Record qw( qsearch qsearchs );
+use FS::quotation_pkg;
+use FS::discount;
use FS::Maketext 'mt';
=head1 NAME
@@ -161,6 +163,17 @@ sub description {
return $desc;
}
+#stub for 3.x
+sub quotation_pkg {
+ my $self = shift;
+ FS::quotation_pkg->by_key($self->quotationpkgnum);
+}
+
+sub discount {
+ my $self = shift;
+ FS::discount->by_key($self->discountnum);
+}
+
=head1 BUGS
=head1 SEE ALSO