summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
authorivan <ivan>2010-03-18 07:59:52 +0000
committerivan <ivan>2010-03-18 07:59:52 +0000
commite078ca418dcf3c7b92efcd371ce761df3314c369 (patch)
treea296537d522a47cf083db299fa016c818881a4db /httemplate/view/cust_main
parentca68d3b10051450d8523f54cc4e579bb0d8a6cc2 (diff)
disable auto-billing of specific customer packages, RT#6378
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r--httemplate/view/cust_main/one_time_charge_link.html2
-rw-r--r--httemplate/view/cust_main/order_pkg_link.html2
-rw-r--r--httemplate/view/cust_main/packages/status.html29
3 files changed, 30 insertions, 3 deletions
diff --git a/httemplate/view/cust_main/one_time_charge_link.html b/httemplate/view/cust_main/one_time_charge_link.html
index 4ce8a28a3..b3defa294 100644
--- a/httemplate/view/cust_main/one_time_charge_link.html
+++ b/httemplate/view/cust_main/one_time_charge_link.html
@@ -80,7 +80,7 @@ function taxoverridequickchargemagic() {
'actionlabel' => 'One-time charge',
'color' => '#333399',
'width' => 763,
- 'height' => 408,
+ 'height' => 460, #more for more room for lines of add'l description?
})
%>
diff --git a/httemplate/view/cust_main/order_pkg_link.html b/httemplate/view/cust_main/order_pkg_link.html
index 0c53f2a59..30c86a757 100644
--- a/httemplate/view/cust_main/order_pkg_link.html
+++ b/httemplate/view/cust_main/order_pkg_link.html
@@ -6,7 +6,7 @@
'cust_main' => $cust_main,
'closetext' => 'Close',
'width' => 763,
- 'height' => 476,
+ 'height' => 538,
)
%>
<%init>
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html
index 7b1b53add..a6868434b 100644
--- a/httemplate/view/cust_main/packages/status.html
+++ b/httemplate/view/cust_main/packages/status.html
@@ -42,6 +42,8 @@
)
%>
+ <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
% unless ( $cust_pkg->get('setup') ) {
@@ -76,7 +78,9 @@
<% pkg_status_row_colspan( $cust_pkg, 'Not&nbsp;yet&nbsp;billed&nbsp;(one-time&nbsp;charge)', '', 'colspan'=>$colspan, %opt ) %>
- <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+ <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
+ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row_if(
$cust_pkg,
@@ -100,6 +104,8 @@
<% pkg_status_row_colspan($cust_pkg, "Not&nbsp;yet&nbsp;billed&nbsp;($billed_or_prepaid&nbsp;". myfreq($part_pkg). ')', '', 'colspan'=>$colspan, %opt ) %>
+ <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row_if($cust_pkg, 'Start billing', 'start_date', %opt) %>
@@ -114,6 +120,8 @@
<% pkg_status_row($cust_pkg, 'Billed', 'setup', %opt) %>
+ <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
% } else {
@@ -138,6 +146,8 @@
%>
% }
+ <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
<% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row($cust_pkg, 'Setup', 'setup', %opt) %>
@@ -290,6 +300,23 @@ sub pkg_status_row_changed {
$html;
}
+sub pkg_status_row_noauto {
+ my( $cust_pkg, %opt ) = @_;
+ my $part_pkg = $opt{'part_pkg'};
+ return '' unless $cust_pkg->no_auto || $part_pkg->no_auto;
+
+ #inefficient, should be passed in
+ my $cust_main = $cust_pkg->cust_main;
+
+ return '' unless $cust_main->payby =~ /^(CARD|CHEK)$/;
+ my $what = lc(FS::payby->shortname($cust_main->payby));
+
+ pkg_status_row_colspan( $cust_pkg, "No automatic $what charge", '',
+ 'colspan' => $opt{'colspan'},
+ #%opt,
+ );
+}
+
sub pkg_status_row_discount {
my( $cust_pkg, %opt ) = @_;