package FS::quotation_pkg;
+use base qw( FS::TemplateItem_Mixin FS::Record );
use strict;
-use base qw( FS::TemplateItem_Mixin FS::Record );
-use FS::Record qw( qsearchs ); #qsearch
-use FS::part_pkg;
-use FS::cust_location;
-use FS::quotation;
use FS::quotation_pkg_discount; #so its loaded when TemplateItem_Mixin needs it
=head1 NAME
$self->SUPER::check;
}
-sub part_pkg {
- my $self = shift;
- qsearchs('part_pkg', { 'pkgpart' => $self->pkgpart } );
-}
-
sub desc {
my $self = shift;
$self->part_pkg->pkg;
} elsif ( $type eq 'R' ) {
return ($recur);
} else {
- return ($setup, $recur);
+ #return ($setup, $recur);
+ return ($self);
}
}
}
+=item cust_main
+
+Returns the customer (L<FS::cust_main> object).
+
+=cut
+
+sub cust_main {
+ my $self = shift;
+ my $quotation = FS::quotation->by_key($self->quotationnum) or return '';
+ $quotation->cust_main;
+}
+
=back
=head1 BUGS