From bf4cb94ff1ab2567649a686577c550fd3f6e8da2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 30 Jan 2020 13:19:37 +0000 Subject: [PATCH] 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 --- installer/data/mysql/updatedatabase.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 84b30326c5..a7af84bbbc 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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 } ); -- 2.21.1 (Apple Git-122.3)