-my $status_statuscol = sub {
- #conceptual false laziness with cust_main::status...
- my $row = shift;
-
- my $status = 'unknown';
- if ( $row->num_pkgs_sql == 0 ) {
- $status = 'prospect';
- } elsif ( $row->active_pkgs > 0 ) {
- $status = 'active';
- } elsif ( $row->inactive_pkgs > 0 ) {
- $status = 'inactive';
- } elsif ( $row->suspended_pkgs > 0 ) {
- $status = 'suspended';
- } elsif ( $row->cancelled_pkgs > 0 ) {
- $status = 'cancelled'
- }
-
- ( ucfirst($status), $FS::cust_main::statuscolor{$status} );
-};
-