Acquisitions: Cannot prorate charges on invoice

Bug #1589586 reported by Christine Burns
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Status tracked in Main
2.10
Fix Released
Undecided
Unassigned
Main
Fix Released
Undecided
Unassigned

Bug Description

New issue with 2.10

Prorating invoice charge types is no longer working

1)
Create Invoice
Enter Invoice details
Click Save
Enter Billed amount
Click Save
Add Charge
Choose Prorateable charge type (Shipping)
Enter Billed amount
Click Save
Fund box is white (fund can be chosen from drop down -> fund drop down should be greyed out)
Click Prorate
Click OK
Grey progress Bar appears - never goes away​

2)Create Invoice
Enter Invoice details
Click Save
Enter Billed amount
Click Save
Add Charge
Choose Prorateable charge type (Shipping)
Enter Billed amounth
Click Prorate
Grey progress Bar appears - never goes away​

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

We suspect this is a regression introduced by changes for bug 1589586.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Er, bug 1333254 rather.

Revision history for this message
Christine Burns (christine-burns) wrote :

Test prorate option on MassLNC 2.9 community demo server - > prorate works as expected.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

The prorate_invoice function gathers a list of fund debits in order to calculate the total invoice amount to prorate against and to determine which funds the prorated charges should be debited against. However, it only looks for fund debits where encumbrance=f. If all existing fund debits have encumbrance=t, then the prorate_invoice function ends up with no fund totals to work with, and prorating does not work (when you click Prorate, the grey progress bar appears and never goes away).

If we change the prorate_invoice function so that it retrieves ALL related fund debits, not just those with encumbrance=f, prorating appears to work just fine. I have a commit in working branch user/jeffdavis/lp1589586-prorate-invoice that does exactly this:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=a3df498

However, my understanding of debits and encumbrances is shaky, so I'm not sure if this is a good approach. Does it make sense to include both encumbered and un-encumbered debits during prorate?

Changed in evergreen:
milestone: none → 2.next
tags: added: acq pullrequest
Revision history for this message
Kathy Lussier (klussier) wrote :

Thanks Jeff! It works for me. I've signed off and merged your branch to master and release 2.10.

Revision history for this message
Christine Burns (christine-burns) wrote :

We have been using this fix on our production 2.10.2 servers for 1 week now without issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.