projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
FS
/
FS
/
cust_pkg.pm
diff --git
a/FS/FS/cust_pkg.pm
b/FS/FS/cust_pkg.pm
index
b1cdf45
..
915f229
100644
(file)
--- a/
FS/FS/cust_pkg.pm
+++ b/
FS/FS/cust_pkg.pm
@@
-1,5
+1,5
@@
package FS::cust_pkg;
package FS::cust_pkg;
-use base qw( FS::cust_pkg::Search
+use base qw( FS::cust_pkg::Search
FS::cust_pkg::API
FS::otaker_Mixin FS::cust_main_Mixin FS::Sales_Mixin
FS::contact_Mixin FS::location_Mixin
FS::m2m_Common FS::option_Common
FS::otaker_Mixin FS::cust_main_Mixin FS::Sales_Mixin
FS::contact_Mixin FS::location_Mixin
FS::m2m_Common FS::option_Common
@@
-2799,7
+2799,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+/ ) {
@@
-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?
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',
@@
-3176,6
+3176,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.
@@
-4015,7
+4020,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;