X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fquotation.pm;h=19be00670bf0a53c8a94ab7076e04e3cb6b60212;hb=4386d67b6b49d2915be38ccfefae474e95849611;hp=7f53e313055f6c33c67db7a093480e782e14d1d6;hpb=ae732741cb031ddb6c99156a8804cac3e7500f76;p=freeside.git diff --git a/FS/FS/quotation.pm b/FS/FS/quotation.pm index 7f53e3130..19be00670 100644 --- a/FS/FS/quotation.pm +++ b/FS/FS/quotation.pm @@ -120,6 +120,10 @@ sub check { $self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum; + return 'prospectnum or custnum must be specified' + if ! $self->prospectnum + && ! $self->custnum; + $self->SUPER::check; } @@ -284,6 +288,15 @@ sub order { } +=item quotation_pkg + +=cut + +sub quotation_pkg { + my $self = shift; + qsearch('quotation_pkg', { 'quotationnum' => $self->quotationnum } ); +} + =back =head1 CLASS METHODS