2 <& /elements/header-popup.html, 'Error' &>
3 <FONT COLOR="#ff0000"><B><% $error |h %></B></FONT><BR><BR>
4 <CENTER><INPUT TYPE="BUTTON" VALUE="OK" onClick="parent.cClick()"></CENTER>
7 <& /elements/header-popup.html, $action &>
8 <SCRIPT TYPE="text/javascript">
15 my $curuser = $FS::CurrentUser::CurrentUser;
18 unless $curuser->access_right('Generate quotation');
20 $cgi->param('pkgnum') =~ /^(\d+)$/ or die 'illegal pkgnum';
23 my $quotation_pkg = qsearchs({
24 'table' => 'quotation_pkg',
25 'addl_from' => 'LEFT JOIN quotation USING ( quotationnum )'.
26 'LEFT JOIN cust_main USING ( custnum )',
27 'hashref' => { 'quotationpkgnum' => $pkgnum },
28 'extra_sql' => ' AND '. $curuser->agentnums_sql,
31 'table' => 'quotation_pkg',
32 'addl_from' => 'LEFT JOIN quotation USING ( quotationnum )'.
33 'LEFT JOIN prospect_main USING ( prospectnum )',
34 'hashref' => { 'quotationpkgnum' => $pkgnum },
35 'extra_sql' => ' AND '. $curuser->agentnums_sql,
39 my @orig_details = $quotation_pkg->details();
41 my $action = 'Quotation details'.
42 ( scalar(@orig_details) ? ' changed ' : ' added ' );
44 my $param = $cgi->Vars;
46 for ( my $row = 0; exists($param->{"detail$row"}); $row++ ) {
47 push @details, $param->{"detail$row"}
48 if $param->{"detail$row"} =~ /\S/;
51 my $error = $quotation_pkg->set_details(
53 copy_on_order => scalar($cgi->param('copy_on_order')) ? 'Y' : ''