From 900c71b5d6a5e32696a89981672bcb82ae7be3fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Jun 2022 03:07:11 +0200 Subject: [PATCH] Fix can add an empty line in tmp edit mode of transation --- htdocs/accountancy/bookkeeping/card.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index f9ec739e63d..b05fe8588bc 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -643,11 +643,9 @@ if ($action == 'create') { print "\n"; - // Empty line is the first line of $object->linesmvt - // So we must get the first line (the empty one) and pu it at the end of the array - // in order to display it correctly to the user - $empty_line = array_shift($object->linesmvt); - $object->linesmvt[]= $empty_line; + // Add an empty line + $line = new BookKeepingLine(); + $object->linesmvt[] = $line; foreach ($object->linesmvt as $line) { print '';