mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797984 - Infinite loop while Check&Repair AR and AP accounts
If using the Check&Repair option from the Chart of Accounts on 'Account Receivable or Payable' add has a voided transaction will cause an infinite loop. This occurs from checking the transaction split amount is zero in gncScrubBusinessSplit and trying to delete it. As the transaction is read only as a result of being voided this fails so add a further condition for the 'else if' statement to include !is_void.
This commit is contained in:
parent
794b31a98e
commit
8e5e3480ad
@ -582,7 +582,7 @@ gncScrubBusinessSplit (Split *split)
|
||||
* Such splits may be the result of scrubbing the business lots, which can
|
||||
* merge splits together while reducing superfluous lot links
|
||||
*/
|
||||
else if (gnc_numeric_zero_p (xaccSplitGetAmount(split)) && !gncInvoiceGetInvoiceFromTxn (txn))
|
||||
else if (gnc_numeric_zero_p (xaccSplitGetAmount(split)) && !gncInvoiceGetInvoiceFromTxn (txn) && !is_void)
|
||||
{
|
||||
GNCLot *lot = xaccSplitGetLot (split);
|
||||
time64 pdate = xaccTransGetDate (txn);
|
||||
|
Loading…
Reference in New Issue
Block a user