Changing # paid value in invoice can lead to creation of unwanted copies/debits

Bug #1171558 reported by Bill Erickson
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

Confirmed in master, believed to be relevant back to 2.2.

The Invoice UI allows staff to invoice for more copies than were originally ordered. The process involves creating additional copies / debits on the fly to match the new amount. This is all fine and good, but the code which determines whether the value entered for "# Paid" is in excess of the amount on order needs improvement. If you start out invoicing fewer than the total number of ordered copies, then change the original invoice to cover all of the ordered copies, the Invoice UI mistakenly thinks are you are invoicing extra copies. This happens because the Invoice UI treats "# Paid" as the number of copies you want to invoice Right Now (in addition to any previously invoiced copies), not the total # to be invoiced.

To reproduce:
1. create a PO with a lineitem with more than one copy
2. create an invoice for the PO (or lineitem)
3. Put a value "# Paid" that is less than the # ordered and Save.
4. Change the "# Paid" value to equal the # ordered. The UI will prompt you to select a fund. Save.

Now you have extra copies and debits, which are not (easily) resolved within this invoice.

The original expectation was that when this happens, the un-invoiced copies (from step 3) would be invoiced in a different/new invoice. Alternately, you can set the "# Paid" value to 0, save, then set your final values.

I found this while looking for another bug. I've never heard anyone mention it, but I could see it causing staff grief if staff simply entered the wrong value and wanted to change it after saving the invoice.

I believe the solution will involve excluding copies which have already been invoiced *on the current invoice* from the total invoiced count when determining if the user is attempting to invoice too many copies, because those already-invoiced copies should be included in the new # Paid amount anyway.

Ben Shum (bshum)
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
Ben Shum (bshum)
no longer affects: evergreen/2.2
no longer affects: evergreen/2.3
no longer affects: evergreen/2.4
tags: added: acq-funds acq-invoice
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.