X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fquotation_pkg_detail.html;h=ae09b9c6a3b7d44cf18e35b7fcb1faeb6fc0cea1;hp=80a9044205ea727353d7c398868fccd126629aa7;hb=9db332d80967969856c5b5fe8b6ac91304734b04;hpb=49432ea28e2f6b274d614b8317fc18c423211e4f diff --git a/httemplate/edit/quotation_pkg_detail.html b/httemplate/edit/quotation_pkg_detail.html index 80a904420..ae09b9c6a 100644 --- a/httemplate/edit/quotation_pkg_detail.html +++ b/httemplate/edit/quotation_pkg_detail.html @@ -21,6 +21,20 @@ <% $part_pkg->comment |h %> + + + + + + + % my $row = 0; % for ( @details ) { @@ -111,6 +125,21 @@ my $part_pkg = $quotation_pkg->part_pkg; my @details = $quotation_pkg->details; +my $copy_on_order = 0; +if (@details) { + + # currently, they should either all have this flag, or none + # but just in case, erring on the side of not copying to invoice + # unless every existing detail has copy_on_order + # (anyway, user has to submit change, this is just for autofill) + + my @quotation_pkg_detail = $quotation_pkg->quotation_pkg_detail; + my @copy_on_order = grep { $_->copy_on_order } @quotation_pkg_detail; + $copy_on_order = 1 if @copy_on_order; + my @no_copy_on_order = grep { !$_->copy_on_order } @quotation_pkg_detail; + $copy_on_order = 0 if @no_copy_on_order; +} + my $title = ( scalar(@details) ? 'Edit ' : 'Add ' ). 'Quotation Details';