X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquotation_pkg_detail.html;h=c1f9b2b196c4f8a1a2fdc07f98b251a72418f026;hb=1fc8addc56f8daf12397da568eb1ac1b27fd3984;hp=2fc42028087176cea81fcaad05ba1d9684ab0552;hpb=b6f16a22bd93ec66ffbb1da30e63f7e950b3b819;p=freeside.git diff --git a/httemplate/edit/process/quotation_pkg_detail.html b/httemplate/edit/process/quotation_pkg_detail.html index 2fc420280..c1f9b2b19 100644 --- a/httemplate/edit/process/quotation_pkg_detail.html +++ b/httemplate/edit/process/quotation_pkg_detail.html @@ -1,12 +1,12 @@ % if ( $error ) { -<% header('Error') %> +<& /elements/header-popup.html, 'Error' &> <% $error |h %>

% } else { -<% header($action) %> +<& /elements/header-popup.html, $action &> % } @@ -26,8 +26,16 @@ my $quotation_pkg = qsearchs({ 'LEFT JOIN cust_main USING ( custnum )', 'hashref' => { 'quotationpkgnum' => $pkgnum }, 'extra_sql' => ' AND '. $curuser->agentnums_sql, +}) +|| qsearchs({ + 'table' => 'quotation_pkg', + 'addl_from' => 'LEFT JOIN quotation USING ( quotationnum )'. + 'LEFT JOIN prospect_main USING ( prospectnum )', + 'hashref' => { 'quotationpkgnum' => $pkgnum }, + 'extra_sql' => ' AND '. $curuser->agentnums_sql, }); + my @orig_details = $quotation_pkg->details(); my $action = 'Quotation details'. @@ -40,6 +48,9 @@ for ( my $row = 0; exists($param->{"detail$row"}); $row++ ) { if $param->{"detail$row"} =~ /\S/; } -my $error = $quotation_pkg->set_details(@details); +my $error = $quotation_pkg->set_details( + details => \@details, + copy_on_order => scalar($cgi->param('copy_on_order')) ? 'Y' : '' + );