X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fquotation_pkg.pm;h=c98e0f98b8cce0672c290027726bfcdbf8736d2d;hb=a0e00fa0547e99893c735ab3dbdacdb2bb054f5a;hp=efff9683fe63885ac4790cbc018d789b87b852e4;hpb=821f900c5a594cdf3cff082e5d527eade23f2e18;p=freeside.git diff --git a/FS/FS/quotation_pkg.pm b/FS/FS/quotation_pkg.pm index efff9683f..c98e0f98b 100644 --- a/FS/FS/quotation_pkg.pm +++ b/FS/FS/quotation_pkg.pm @@ -1,11 +1,9 @@ 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 @@ -130,6 +128,8 @@ sub check { $self->SUPER::check; } +#it looks redundant with a v4.x+ auto-generated method, but need to override +# FS::TemplateItem_Mixin's version sub part_pkg { my $self = shift; qsearchs('part_pkg', { 'pkgpart' => $self->pkgpart } ); @@ -201,6 +201,18 @@ sub cust_bill_pkg_display { } +=item cust_main + +Returns the customer (L object). + +=cut + +sub cust_main { + my $self = shift; + my $quotation = FS::quotation->by_key($self->quotationnum) or return ''; + $quotation->cust_main; +} + =back =head1 BUGS