-% if ( $cust_pkg ) {
+% if ( $cust_pkg ) { #modify one-time charge
% my $field = '/elements/tr-input-text.html';
@@ -167,12 +180,30 @@ function bill_now_changed (what) {
noinit => 1,
}
&>
-% }
+
+ <& /elements/tr-checkbox.html,
+ label => emt('Invoice this charge separately'),
+ field => 'separate_bill',
+ value => 'Y',
+ curr_value => $cust_pkg->get('separate_bill'),
+ &>
+
+ <% mt('Tax exempt') |h %> |
+ param('setuptax') ? 'CHECKED' : '' %>> |
+
+
+ <& /elements/tr-select-taxclass.html, 'curr_value' => $part_pkg->get('taxclass') &>
+
+ <& /elements/tr-select-taxproduct.html,
+ 'label' => emt('Tax product'),
+ 'curr_value' => $part_pkg->get('taxproductnum')
+ &>
+% }
% } else { # new one-time charge
- <% mt('Amount to charge') |h %> |
+ <% mt('Amount to charge') |h %> |
<% $money_char %>exists('invoice-unitprice') ) {
|
- <% mt('Quantity') |h %> |
+ <% mt('Quantity') |h %> |
$classnum &>
- |
- <% mt('Invoice now') |h %> |
-
- param('bill_now') ? 'CHECKED' : '' %>
- onClick = "bill_now_changed(this);"
- onChange = "bill_now_changed(this);"
- >
- <% mt('with terms') |h %>
- <& /elements/select-terms.html,
- 'curr_value' => scalar($cgi->param('invoice_terms')),
- 'disabled' => ( $cgi->param('bill_now') ? 0 : 1 ),
- 'agentnum' => $cust_main->agentnum,
- &>
- |
-
+% unless ( $quotationnum ) {
-%# false laziness w/misc/order_pkg.html
-
- <% mt('Charge date') |h %> |
-
- param('bill_now')
- ? 'STYLE = "background-color:#dddddd" DISABLED'
- : ''
- %>
- >
-
- param('bill_now') ? '' : 'STYLE="display:none"' %>
- >
- (<% mt('leave blank to charge immediately') |h %>)
- |
-
+
+ <% mt('Invoice now') |h %> |
+
+ param('bill_now') ? 'CHECKED' : '' %>
+ onClick = "bill_now_changed(this);"
+ onChange = "bill_now_changed(this);"
+ >
+ <% mt('with terms') |h %>
+ <& /elements/select-terms.html,
+ 'curr_value' => scalar($cgi->param('invoice_terms')),
+ 'disabled' => ( $cgi->param('bill_now') ? 0 : 1 ),
+ 'agentnum' => $cust_or_prospect->agentnum,
+ &>
+ |
+
-
+% # false laziness w/misc/order_pkg.html
+
+ <% mt('Charge date') |h %> |
+
+ param('bill_now')
+ ? 'STYLE = "background-color:#dddddd" DISABLED'
+ : ''
+ %>
+ >
+
+ param('bill_now') ? '' : 'STYLE="display:none"' %>
+ >
+ (<% mt('leave blank to charge immediately') |h %>)
+ |
+
+
+
+
+<& /elements/tr-checkbox.html,
+ label => emt('Invoice this charge separately'),
+ field => 'separate_bill',
+ value => 'Y'
+&>
-% if ( $cust_main->payby =~ /^(CARD|CHEK)$/ ) {
+% }
+
+% if ( ! $quotationnum && $cust_main->payby =~ /^(CARD|CHEK)$/ ) {
% my $what = lc(FS::payby->shortname($cust_main->payby));
<% mt("Disable automatic $what charge") |h %> |
@@ -274,20 +315,25 @@ function bill_now_changed (what) {
% }
- <% mt('Tax exempt') |h %> |
+ <% mt('Tax exempt') |h %> |
param('setuptax') ? 'CHECKED' : '' %>> |
-<& /elements/tr-select-taxclass.html, 'curr_value' => $cgi->param('taxclass') &>
+<& /elements/tr-select-taxclass.html, 'curr_value' => scalar($cgi->param('taxclass')) &>
-<& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $cgi->param('taxproductnum') &>
+<& /elements/tr-select-taxproduct.html,
+ 'label' => emt('Tax product'),
+ 'curr_value' => scalar($cgi->param('taxproductnum')),
+&>
-<& /elements/tr-select-taxoverride.html, 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override') &>
+<& /elements/tr-select-taxoverride.html,
+ 'curr_value' => scalar($cgi->param('tax_override')),
+&>
% } # if !$cust_pkg
- <% mt('Description') |h %> |
+ <% mt('Description') |h %> |
|
+% my $row = 0;
+% # quotation details are handled by quotation_pkg_detail records, added via link from view/quotation.html
+% # the details below get attached to the part_pkg record, and there's no way to edit that from quotations
+% unless ($quotationnum) {
|
<% mt('Optional additional description (also printed on invoice):') |h %> |
-% my $row = 0;
-% foreach (@description) {
+% foreach (@description) {
|
@@ -321,8 +370,9 @@ function bill_now_changed (what) {
>
|
-% $row++;
-% }
+% $row++;
+% }
+% }
@@ -396,8 +446,11 @@ function bill_now_changed (what) {
-