diff options
author | ivan <ivan> | 2010-07-03 01:25:29 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-07-03 01:25:29 +0000 |
commit | 5d20bb4fedd8fe05883966068eb5e06a5a55898b (patch) | |
tree | dfd1307adc4c878fc0e561f6bb1371e769155a7f | |
parent | 7e6cb87778957c7254bd8963eba0521523b1ba14 (diff) |
should fix cancellations in rare circumstances where cached _num_cust_svc becomes inaccurate, RT#8994
-rw-r--r-- | FS/FS/cust_main.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index e22f7eec1..8b366ee72 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2104,6 +2104,9 @@ sub sort_packages { return 1 if !$a_num_cust_svc && $b_num_cust_svc; my @a_cust_svc = $a->cust_svc; my @b_cust_svc = $b->cust_svc; + return 0 if !scalar(@a_cust_svc) && !scalar(@b_cust_svc) + return -1 if scalar(@a_cust_svc) && !scalar(@b_cust_svc); + return 1 if !scalar(@a_cust_svc) && scalar(@b_cust_svc); $a_cust_svc[0]->svc_x->label cmp $b_cust_svc[0]->svc_x->label; } |