From: Bill Erickson Date: Fri, 20 Feb 2015 20:33:35 +0000 (-0500) Subject: LP#1198465 fine generator billing sort repairs. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fdbwells%2F1198465_cstore_fines_gen_rebase;p=working%2FEvergreen.git LP#1198465 fine generator billing sort repairs. 1. cstore expects order_by's to be delineated by object class 2. CStoreEditor requires all params that are passed through to cstore to be contained within the first parameter to a search_*, etc. calls, so wrap the query and order_by clauses in an array. Without these changes, the fine generator would generate duplicate billings when voided billings were present. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm index 2c47c4cda8..19b27875cd 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm @@ -451,12 +451,12 @@ sub generate_fines { " (user ".$c->usr.").\n". "\tItem was due on or before: ".localtime($due)."\n") if $conn; - my @fines = @{$e->search_money_billing( + my @fines = @{$e->search_money_billing([ { xact => $c->id, btype => 1, billing_ts => { '>' => $c->$due_date_method } }, - { order_by => 'billing_ts DESC'} - )}; + { order_by => {mb => 'billing_ts DESC'}} + ])}; my $f_idx = 0; my $fine = $fines[$f_idx] if (@fines);