Fix can add an empty line in tmp edit mode of transation

This commit is contained in:
Laurent Destailleur 2022-06-09 03:07:11 +02:00
parent e10d89dd36
commit 900c71b5d6

View File

@ -643,11 +643,9 @@ if ($action == 'create') {
print "</tr>\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 '<tr class="oddeven">';