diff options
author | ivan <ivan> | 2007-07-13 23:52:32 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-07-13 23:52:32 +0000 |
commit | bd8d2cd5fd7035e2775c72113aaeb6abc84dd73f (patch) | |
tree | 151eb3134d10671c3827c0ab0ee01ee2229a2583 /FS/bin | |
parent | b257263d76ee23b94aefd5529de36c4b1b6d39ab (diff) |
fix race condition where ->apply_payments_and_credits could double-apply in rare cases
Diffstat (limited to 'FS/bin')
-rw-r--r-- | FS/bin/freeside-prepaidd | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/bin/freeside-prepaidd b/FS/bin/freeside-prepaidd index 73f7523c4..a68db3913 100644 --- a/FS/bin/freeside-prepaidd +++ b/FS/bin/freeside-prepaidd @@ -52,9 +52,11 @@ while (1) { warn "Error billing customer #". $cust_main->custnum; next; } - #$b_error = $cust_main->apply_payments_and_credits; - $b_error = $cust_main->apply_payments; - $b_error = $cust_main->apply_credits; + $b_error = $cust_main->apply_payments_and_credits; + if ( $b_error ) { + warn "Error applying payments&credits, customer #". $cust_main->custnum; + next; + } $work_cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $work_cust_pkg->pkgnum } ); |