summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-09-18 09:51:55 -0700
committerIvan Kohler <ivan@freeside.biz>2014-09-18 09:51:55 -0700
commit705de04c6659330be111fbbd5149ae5587402196 (patch)
tree3b6947c5107a4072bde803c7743cb44fa1855265
parent8a3252f9dd5f851d088142e9753289a4e7ab7934 (diff)
fix prospet quotation creation, fallout from #25561
-rw-r--r--FS/FS/quotation.pm4
-rw-r--r--httemplate/elements/quotations.html2
2 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/quotation.pm b/FS/FS/quotation.pm
index 9d4785780..e72e6cf4d 100644
--- a/FS/FS/quotation.pm
+++ b/FS/FS/quotation.pm
@@ -118,6 +118,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;
}
diff --git a/httemplate/elements/quotations.html b/httemplate/elements/quotations.html
index 0cf150022..1d80a48ea 100644
--- a/httemplate/elements/quotations.html
+++ b/httemplate/elements/quotations.html
@@ -55,7 +55,7 @@ if ( $opt{cust_main} ) {
$new_query = 'custnum='. $opt{cust_main}->custnum;
@quotations = $opt{cust_main}->quotation;
} elsif ( $opt{prospect_main} ) {
- $new_query = 'quotationnum='. $opt{prospect_main}->quotationnum;
+ $new_query = 'prospectnum='. $opt{prospect_main}->prospectnum;
@quotations = $opt{prospect_main}->quotation;
} else {
die 'guru meditation #&&: neither cust_main nor prospect_main specified';