diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 52a059a7fd8..766108a986b 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -966,21 +966,23 @@ if ($action == 'create') { // List of movements print load_fiche_titre($langs->trans("ListeMvts"), '', ''); - print '
'; - if ($optioncss != '') { - print ''; + if (empty($object->date_validation)) { + print ''; + if ($optioncss != '') { + print ''; + } + print ''; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print '' . "\n"; + print ''; + print ''; } - print ''; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''; - print ''; if (count($object->linesmvt) > 0) { print '
'; @@ -1005,7 +1007,7 @@ if ($action == 'create') { print "\n"; // Add an empty line if there is not yet - if (!empty($object->linesmvt[0])) { + if (!empty($object->linesmvt[0]) && empty($object->date_validation)) { $tmpline = $object->linesmvt[0]; if (!empty($tmpline->numero_compte)) { $line = new BookKeepingLine($db); @@ -1017,7 +1019,7 @@ if ($action == 'create') { $total_debit += $line->debit; $total_credit += $line->credit; - if ($action == 'update' && $line->id == $id) { + if ($action == 'update' && $line->id == $id && empty($object->date_validation)) { print ''; print ''; print ''; @@ -1044,7 +1046,7 @@ if ($action == 'create') { print ''; print ''; print "\n"; - } elseif (empty($line->numero_compte) || (empty($line->debit) && empty($line->credit))) { + } elseif ((empty($line->numero_compte) || (empty($line->debit) && empty($line->credit))) && empty($object->date_validation)) { if (($action == "" || $action == 'add') && $permissiontoadd) { print ''; print '';