summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-06-23 15:39:34 -0700
committerIvan Kohler <ivan@freeside.biz>2014-06-23 15:39:34 -0700
commit7e2ab49f83c119aeeaf7142e369b93bef9fdafd0 (patch)
tree9d9690642b6e9ab2d2d4a2d9af4bce8e1bd0d965 /FS
parent3cd31aafeee3516bbea80e4b426dd1f3282bacf6 (diff)
option to disable customer/package counts on agent browser, RT#29748
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/agent.pm22
-rw-r--r--FS/FS/cust_pkg.pm7
3 files changed, 35 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 9404c0691..f4027374a 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5755,6 +5755,13 @@ and customer address. Include units.',
'type' => 'checkbox',
},
+ {
+ 'key' => 'agent-disable_counts',
+ 'section' => 'UI',
+ 'description' => 'On the agent browse page, disable the customer and package counts. Typically used for very large databases when this page takes too long to render.',
+ 'type' => 'checkbox',
+ },
+
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index 721749956..2c06a0576 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -618,6 +618,28 @@ sub num_cancel_cust_pkg {
shift->num_pkg_sql(FS::cust_pkg->cancel_sql);
}
+=item num_on_hold_cust_pkg
+
+Returns the number of inactive customer packages (one-time packages otherwise
+unsuspended/uncancelled) for this agent.
+
+=cut
+
+sub num_on_hold_cust_pkg {
+ shift->num_pkg_sql(FS::cust_pkg->on_hold_sql);
+}
+
+=item num_not_yet_billed_cust_pkg
+
+Returns the number of inactive customer packages (one-time packages otherwise
+unsuspended/uncancelled) for this agent.
+
+=cut
+
+sub num_not_yet_billed_cust_pkg {
+ shift->num_pkg_sql(FS::cust_pkg->not_yet_billed_sql);
+}
+
=item generate_reg_codes NUM PKGPART_ARRAYREF
Generates the specified number of registration codes, allowing purchase of the
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index bf423cd77..af1bd835e 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -3163,7 +3163,7 @@ Class method that returns the list of possible status strings for packages
tie my %statuscolor, 'Tie::IxHash',
'on hold' => '7E0079', #purple!
'not yet billed' => '009999', #teal? cyan?
- 'one-time charge' => '000000',
+ 'one-time charge' => '0000CC', #blue #'000000',
'active' => '00CC00',
'suspended' => 'FF9900',
'cancelled' => 'FF0000',
@@ -3176,6 +3176,11 @@ sub statuses {
keys %statuscolor;
}
+sub statuscolors {
+ #my $self = shift;
+ \%statuscolor;
+}
+
=item statuscolor
Returns a hex triplet color string for this package's status.