X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Forder_pkg.html;h=39cb2f4d6185022748872adb40474aff6301f5ea;hb=9972d7caa7a3e1a29dc4201e0c7256ba093ea705;hp=080ba41d927d8f66071517a7ce09f335902c4d13;hpb=8861d46820af163c7de7839178b6120c9b32ab2c;p=freeside.git diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 080ba41d9..39cb2f4d6 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -5,16 +5,7 @@ } &> -<& /elements/xmlhttp.html, - 'url' => $p.'misc/xmlhttp-part_pkg_usageprice.html', - 'subs' => [ 'get_part_pkg_usageprice' ], -&> - - - - - - +<& /elements/init_calendar.html &> @@ -81,57 +72,73 @@ <& /elements/tr-input-pkg-quantity.html, curr_value => $quantity &> -% if ( $cust_main && $cust_main->payby =~ /^(CARD|CHEK)$/ ) { -% my $what = lc(FS::payby->shortname($cust_main->payby)); +% unless ( $quotationnum ) { + +% if ( $cust_main && $cust_main->payby =~ /^(CARD|CHEK)$/ ) { +% my $what = lc(FS::payby->shortname($cust_main->payby)); + + <% mt("Disable automatic $what charge") |h %> + + +% } + - <% mt("Disable automatic $what charge") |h %> - + <% mt('Start') |h %> + + param('start') eq '' ? 'CHECKED' : ''%> + <% $pkgpart ? '' : 'DISABLED' %> + >Now +   + param('start') eq 'on_hold' ? 'CHECKED' : ''%> + <% $pkgpart ? '' : 'DISABLED' %> + >On hold +   + param('start') eq 'date' ? 'CHECKED' : ''%> + <% $pkgpart ? '' : 'DISABLED' %> + >On date + + <& /elements/input-date-field.html, + { 'name' => 'start_date', + 'format' => $date_format, + 'value' => '', + 'noinit' => 1, + } + &> + + -% } - - - <% mt('Start date') |h %> - - <& /elements/input-date-field.html,{ - 'name' => 'start_date', - 'format' => $date_format, - 'value' => '', - 'noinit' => 1, - } &> - - (<% mt('leave blank to start immediately') |h %>) - - - - - <% mt('Contract end date') |h %> - - <& /elements/input-date-field.html,{ - 'name' => 'contract_end', - 'format' => $date_format, - 'value' => '', - 'noinit' => 1, - } &> - - -
+ + <% mt('Contract end date') |h %> + + <& /elements/input-date-field.html,{ + 'name' => 'contract_end', + 'format' => $date_format, + 'value' => '', + 'noinit' => 1, + } &> + + -%#so: -%# - hide until you selecdt a pacakge with add-ons -%# -lookup and display the available add-ons when -%# -add them to the (recur if there is one, otherwise setup) price and display magically like processing fees do on edit/cust_pay.cgi +% } -%# better label? - - +

- +<% include('/misc/cust_pkg_usageprice.html', + 'pkgpart' => $pkgpart + ) %>
% my $discount_cust_pkg = $curuser->access_right('Discount customer package'); @@ -140,22 +147,7 @@ % if ( $discount_cust_pkg || $waive_setup_fee ) { <% mt('Discounting') |h %> <% ntable("#cccccc") %> - -% if ( $waive_setup_fee ) { - - <% mt('Waive setup fee') |h %> - - -% } - -% if ( $discount_cust_pkg ) { - <& /elements/tr-select-discount.html, - 'element_etc' => 'DISABLED', - 'colspan' => 7, - 'cgi' => $cgi, - &> -% } - + <& /elements/tr-select-pkg-discount.html &>
% } @@ -204,6 +196,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()' @@ -253,6 +291,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