Bug 24532: Fix original DB update for bug 23049

Pathalogical cases of Payments and Writeoffs being converted to debits
are identified during the DB update for bug 23049, but we are not
correctly limiting to those types accountlines when subsequently
populating the debit_type field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2020-01-30 13:19:37 +00:00 committed by Joy Nelson
parent 382372edbb
commit 5e32b20c6a
1 changed files with 1 additions and 1 deletions

View File

@ -19919,7 +19919,7 @@ if ( CheckVersion($DBversion) ) {
# Populating debit_type_code
$dbh->do(
qq{
UPDATE accountlines SET debit_type_code = accounttype, accounttype = NULL WHERE accounttype IN (SELECT code from account_debit_types)
UPDATE accountlines SET debit_type_code = accounttype, accounttype = NULL WHERE accounttype IN (SELECT code from account_debit_types) AND amount >= 0
}
);