Comment 26 for bug 1174498

Revision history for this message
Jason Boyer (jboyer) wrote :

Good news, bad news.

Good news, adding a few pgtap tests has demonstrated some remaining issues with the current implementation, including a missing trigger on money.account_adjustment. That fix and the current tests have been pushed to user/jboyer/lp1174498_mmpbbt_signoff_pr2 in working.

Bad news, the biggest issue requires a deep change to address. The gist: There is a workflow that is not that uncommon that will lead to mis-assignment of some or all account_adjustment payments to voided billings. Here's how that looks:
Check out item
Item is late and overdues are charged
Staff adjust billings to 0 because *handwave*
Item is marked lost and "Void overdue fines when items are marked lost" is enabled; all overdues are voided
Remainder of bill is paid off in whatever non-account_adjustment fashion, xact is closed.
mmpbt is so determined to assign account adjustments to matching amounts that it assigns them to the voided overdues leaving the lost / lost processing fees only partially covered by the actual payment types.

Comparing mmpbt and billings would show that there are non-voided billings not entirely paid off, where the patron's account would show a 0 balance and a closed xact.