Invoices hang on attempt to save

Bug #901378 reported by James Fournie
6
This bug affects 1 person
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.

James Fournie (jfournie)
tags: added: acq invoicing
Revision history for this message
James Fournie (jfournie) wrote :

working/user/jamesrf/lp901378-invoice-charge-deletion

tags: added: pullrequest
description: updated
James Fournie (jfournie)
description: updated
Bill Erickson (berick)
Changed in evergreen:
assignee: nobody → Bill Erickson (erickson-esilibrary)
status: New → In Progress
Revision history for this message
Bill Erickson (berick) wrote :

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

-b

no longer affects: evergreen/2.2
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.