Merge pull request #21152 from daraelmin/patch-2

Fix #21150 - Regression Can't insert manual lines
This commit is contained in:
Laurent Destailleur 2022-06-08 15:01:08 +02:00 committed by GitHub
commit 871077d426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1722,6 +1722,11 @@ class BookKeeping extends CommonObject
dol_syslog(__METHOD__, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
// Add an empty line when transaction is validated to permit to add new line manually
if ($mode != "_tmp") {
$line = new BookKeepingLine();
$this->linesmvt[] = $line;
}
while ($obj = $this->db->fetch_object($result)) {
$line = new BookKeepingLine();