projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
search by state (and county, country), RT#30312
[freeside.git]
/
FS
/
FS
/
cust_pkg.pm
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
2a41bb6
..
17505dd
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-2818,7
+2818,7
@@
sub cust_svc_unsorted {
sub cust_svc_unsorted_arrayref {
my $self = shift;
sub cust_svc_unsorted_arrayref {
my $self = shift;
- return
()
unless $self->num_cust_svc(@_);
+ return
[]
unless $self->num_cust_svc(@_);
my %opt = ();
if ( @_ && $_[0] =~ /^\d+/ ) {
my %opt = ();
if ( @_ && $_[0] =~ /^\d+/ ) {
@@
-3182,7
+3182,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?
tie my %statuscolor, 'Tie::IxHash',
'on hold' => '7E0079', #purple!
'not yet billed' => '009999', #teal? cyan?
- 'one-time charge' => '000000',
+ 'one-time charge' => '0000
CC', #blue #'0000
00',
'active' => '00CC00',
'suspended' => 'FF9900',
'cancelled' => 'FF0000',
'active' => '00CC00',
'suspended' => 'FF9900',
'cancelled' => 'FF0000',
@@
-3195,6
+3195,11
@@
sub statuses {
keys %statuscolor;
}
keys %statuscolor;
}
+sub statuscolors {
+ #my $self = shift;
+ \%statuscolor;
+}
+
=item statuscolor
Returns a hex triplet color string for this package's status.
=item statuscolor
Returns a hex triplet color string for this package's status.
@@
-4052,7
+4057,7
@@
sub apply_usage {
minutes => min($cust_pkg_usage->minutes, $minutes),
});
$cust_pkg_usage->set('minutes',
minutes => min($cust_pkg_usage->minutes, $minutes),
});
$cust_pkg_usage->set('minutes',
- sprintf('%.0f', $cust_pkg_usage->minutes - $cdr_cust_pkg_usage->minutes)
+ $cust_pkg_usage->minutes - $cdr_cust_pkg_usage->minutes
);
$error = $cust_pkg_usage->replace || $cdr_cust_pkg_usage->insert;
$minutes -= $cdr_cust_pkg_usage->minutes;
);
$error = $cust_pkg_usage->replace || $cdr_cust_pkg_usage->insert;
$minutes -= $cdr_cust_pkg_usage->minutes;