X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Forder_pkg.html;h=1efe7456e944c47b0c61ab4f67af2565072e04b3;hb=bb7e827141c9ed68f30765c9ca2ddcd1d760ad2d;hp=851c31c0fd802517505b50de956a5e967b58808b;hpb=2372bdb860f7cb926b61a69a75c38997819b4923;p=freeside.git diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 851c31c0f..1efe7456e 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -30,7 +30,7 @@ <% mt('Sales') |h %> % } % if ( $show_sales_table ) { - <% ntable("#cccccc") %> + % } <& /elements/tr-select-sales.html, @@ -53,7 +53,7 @@ % } <% mt('Package') |h %> -<% ntable("#cccccc") %> +
% if ( $part_pkg ) { @@ -136,18 +136,16 @@

-<& /misc/cust_pkg_usageprice.html, +<& /elements/table-cust_pkg_usageprice.html, 'pkgpart' => $pkgpart &> -
- % my $discount_cust_pkg = $curuser->access_right('Discount customer package'); % my $waive_setup_fee = $curuser->access_right('Waive setup fee'); % % if ( $discount_cust_pkg || $waive_setup_fee ) { <% mt('Discounting') |h %> - <% ntable("#cccccc") %> + <& /elements/tr-select-pkg-discount.html &>

@@ -158,7 +156,7 @@ % my $contact_title = $lock_locationnum ? 'Contact' % : 'Contact and Location'; <% mt($contact_title) |h %> -<% ntable("#cccccc") %> + <& /elements/tr-select-contact.html, 'cgi' => $cgi, @@ -197,6 +195,52 @@ % } +% if ($quotationnum) { +
+<% mt('Quotation details') |h %> +
+ + + + +<& /edit/elements/detail-table.html, + id => 'QuotationDetailTable', + details => $details->{'quotation_detail'}, + field => 'quotation_detail', + &> +
+ +
+% } else { +
+<% mt('Invoice details') |h %> + +<& /edit/elements/detail-table.html, + id => 'InvoiceDetailTable', + details => $details->{'invoice_detail'}, + field => 'invoice_detail', + &> +
+ +
+<% mt('Package comments') |h %> + +<& /edit/elements/detail-table.html, + id => 'PackageCommentTable', + details => $details->{'package_comment'}, + field => 'package_comment', + &> +
+% } + +
% my $onclick = $cgi->param('lock_locationnum') % ? 'document.OrderPkgForm.submit()' @@ -246,6 +290,23 @@ if ( $cgi->param('quotationnum') =~ /^(\d+)$/ ) { $quotationnum = $1; } +my $details = { + 'invoice_detail' => [], + 'package_comment' => [], + 'quotation_detail' => [], +}; +foreach my $field ( $cgi->param ) { + foreach my $detailtype ( keys %$details ) { + if ($field =~ /^$detailtype(\d+)$/) { + $details->{$detailtype}->[$1] = $cgi->param($field); + } + } +} +foreach my $detailtype ( keys %$details ) { + @{ $details->{$detailtype} } = grep { length($_) } @{ $details->{$detailtype} }; +} +my $copy_on_order = $cgi->param('copy_on_order'); + die 'no custnum or prospectnum' unless $cust_main || $prospect_main; my $agent = $cust_main ? $cust_main->agent