summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-02-23 19:14:40 -0800
committerMark Wells <mark@freeside.biz>2015-02-23 19:14:40 -0800
commitde89844a6491378da978014c844213ad3c3a118e (patch)
tree6c968383916090e64869e17d9f7c1fff6a8de870 /httemplate
parent8549f708d6eda70fbc7463db5dc24e00467e5547 (diff)
option to force one-time charges to be billed separately, #32866
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/process/quick-charge.cgi2
-rw-r--r--httemplate/edit/quick-charge.html28
-rw-r--r--httemplate/view/cust_main/packages/package.html2
-rw-r--r--httemplate/view/cust_main/packages/status.html16
4 files changed, 38 insertions, 10 deletions
diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi
index aa6010ef9..c1e7fc159 100644
--- a/httemplate/edit/process/quick-charge.cgi
+++ b/httemplate/edit/process/quick-charge.cgi
@@ -93,6 +93,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge
'tax_override' => $override,
'quantity' => $quantity,
'start_date' => $start_date,
+ 'separate_bill' => scalar($cgi->param('separate_bill')),
);
} else { # the usual case: new one-time charge
@@ -138,6 +139,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge
: ''
),
'no_auto' => scalar($cgi->param('no_auto')),
+ 'separate_bill' => scalar($cgi->param('separate_bill')),
'pkg' => scalar($cgi->param('pkg')),
'setuptax' => scalar($cgi->param('setuptax')),
'taxclass' => scalar($cgi->param('taxclass')),
diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html
index 64ee97bb9..de427c18c 100644
--- a/httemplate/edit/quick-charge.html
+++ b/httemplate/edit/quick-charge.html
@@ -169,18 +169,22 @@ function bill_now_changed (what) {
noinit => 1,
}
&>
-% }
-% unless ($billed) {
-<TR>
- <TD ALIGN="right"><% mt('Tax exempt') |h %> </TD>
- <TD><INPUT TYPE="checkbox" NAME="setuptax" VALUE="Y" <% $cgi->param('setuptax') ? 'CHECKED' : '' %>></TD>
-</TR>
+ <& /elements/tr-checkbox.html,
+ label => emt('Invoice this charge separately'),
+ field => 'separate_bill',
+ value => 'Y',
+ curr_value => $cust_pkg->get('separate_bill'),
+ &>
+ <TR>
+ <TD ALIGN="right"><% mt('Tax exempt') |h %> </TD>
+ <TD><INPUT TYPE="checkbox" NAME="setuptax" VALUE="Y" <% $cgi->param('setuptax') ? 'CHECKED' : '' %>></TD>
+ </TR>
-<& /elements/tr-select-taxclass.html, 'curr_value' => $part_pkg->get('taxclass') &>
+ <& /elements/tr-select-taxclass.html, 'curr_value' => $part_pkg->get('taxclass') &>
-<& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $part_pkg->get('taxproductnum') &>
-% }
+ <& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $part_pkg->get('taxproductnum') &>
+% }
% } else { # new one-time charge
@@ -280,6 +284,12 @@ function bill_now_changed (what) {
});
</SCRIPT>
+<& /elements/tr-checkbox.html,
+ label => emt('Invoice this charge separately'),
+ field => 'separate_bill',
+ value => 'Y'
+&>
+
% }
% if ( ! $quotationnum && $cust_main->payby =~ /^(CARD|CHEK)$/ ) {
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index f7d7c24c8..a7facee6b 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -377,7 +377,7 @@ sub onetime_change_link {
'actionlabel' => emt('Modify'),
'cust_pkg' => $cust_pkg,
'width' => 690,
- 'height' => 380,
+ 'height' => 440,
);
}
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html
index 971a9cf98..a021f1c25 100644
--- a/httemplate/view/cust_main/packages/status.html
+++ b/httemplate/view/cust_main/packages/status.html
@@ -63,6 +63,8 @@
<% pkg_status_row_noauto( $cust_pkg, %opt ) %>
+ <% pkg_status_row_separate_bill( $cust_pkg, %opt ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt ) %>
% unless ( $cust_pkg->order_date eq $cust_pkg->get('susp') ) { #on hold
@@ -138,6 +140,8 @@
<% pkg_status_row_noauto( $cust_pkg, %opt ) %>
+ <% pkg_status_row_separate_bill( $cust_pkg, %opt ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt ) %>
<% pkg_status_row_if(
@@ -168,6 +172,8 @@
<% pkg_status_row_noauto( $cust_pkg, %opt ) %>
+ <% pkg_status_row_separate_bill( $cust_pkg, %opt ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt ) %>
<% pkg_status_row_if($cust_pkg, emt('Start billing'), 'start_date', %opt) %>
@@ -185,6 +191,8 @@
<% pkg_status_row_noauto( $cust_pkg, %opt ) %>
+ <% pkg_status_row_separate_bill( $cust_pkg, %opt ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt ) %>
<% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
@@ -218,6 +226,8 @@
<% pkg_status_row_noauto( $cust_pkg, %opt ) %>
+ <% pkg_status_row_separate_bill( $cust_pkg, %opt ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt ) %>
<% pkg_status_row($cust_pkg, emt('Setup'), 'setup', %opt) %>
@@ -488,6 +498,12 @@ sub pkg_status_row_noauto {
pkg_status_row_colspan( $cust_pkg, emt("No automatic $what charge"), '');
}
+sub pkg_status_row_separate_bill {
+ my $cust_pkg = shift;
+ return '' unless $cust_pkg->separate_bill;
+ pkg_status_row_colspan( $cust_pkg, emt("Invoiced separately") );
+}
+
sub pkg_status_row_discount {
my( $cust_pkg, %opt ) = @_;