Invoices hang on attempt to save
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Evergreen | Status tracked in Main | |||||
2.0 |
Fix Released
|
Undecided
|
Unassigned | |||
2.1 |
Fix Released
|
Undecided
|
Unassigned | |||
Main |
Fix Released
|
Undecided
|
Bill Erickson |
Bug Description
Sometimes invoices will hang when you attempt to save them.
To recreate this problem, you can do something like the following:
1. Add a prorateable charge to an invoice
2. Save invoice and reopen
3. Add another prorateable charge and delete the first one, then click Save again
This or similar actions can cause the "Save" action to hang (actually it is returning an error but this is unhandled and the user gets a perpetual progress dialog)
This appears to be caused when there are invoice charges that are deleted but aren't attached to any fund_debit. This is expected for a prorateable charge as the charge will be prorated to multiple funds.
When deleting a charge, the system expects a fund_debit to be assigned so that it can delete the debit, however in this case there is no debit, and the system returns an (unhandled in Javascript) error. Instead, we should check for a fund_debit value -- if none is found then we can generally assume that we don't need to remove any debits.
I should add that this bug was reported initially in 2.0.5 on Ubuntu with PG 8.4 but I'm fairly certain I've found this to be the problem and the problem code persists through to master.
tags: | added: acq invoicing |
description: | updated |
Changed in evergreen: | |
assignee: | nobody → Bill Erickson (erickson-esilibrary) |
status: | New → In Progress |
no longer affects: | evergreen/2.2 |
working/ user/jamesrf/ lp901378- invoice- charge- deletion