Invoices hang on attempt to save

Bug #901378 reported by James Fournie on 2011-12-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Status tracked in Master
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.

James Fournie (jfournie) on 2011-12-07
tags: added: acq invoicing
James Fournie (jfournie) wrote :


tags: added: pullrequest
description: updated
James Fournie (jfournie) on 2011-12-22
description: updated
Bill Erickson (berick) on 2012-01-20
Changed in evergreen:
assignee: nobody → Bill Erickson (erickson-esilibrary)
status: New → In Progress
Bill Erickson (berick) wrote :

Looks good. Merged to master(2.2), rel_2_1, and rel_2_0. Thanks!


no longer affects: evergreen/2.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers