diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php
index c156a388735..0aa57dde3c6 100644
--- a/htdocs/accountancy/bookkeeping/card.php
+++ b/htdocs/accountancy/bookkeeping/card.php
@@ -260,7 +260,7 @@ if ($action == "confirm_update") {
if ($mode != '_tmp') {
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
}
- $action = 'update';
+ $action = '';
$id = $object->id;
$piece_num = $object->piece_num;
}
@@ -642,6 +642,12 @@ 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;
foreach ($object->linesmvt as $line) {
print '
';
+ // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because:
+ // It does not use the setup of "key pressed" to select a thirdparty and this hang browser on large databases.
+ // Also, it is not possible to use a value that is not in the list.
+ // Also, the label is not automatically filled when a value is selected.
+ if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
+ print $formaccounting->select_auxaccount('', 'subledger_account', 1, 'maxwidth250', '', 'subledger_label');
+ } else {
+ print '';
+ }
+ print ' ';
+ print '
';
- // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because:
- // It does not use the setup of "key pressed" to select a thirdparty and this hang browser on large databases.
- // Also, it is not possible to use a value that is not in the list.
- // Also, the label is not automatically filled when a value is selected.
- if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
- print $formaccounting->select_auxaccount('', 'subledger_account', 1);
- } else {
- print '';
- }
- print ' ';
- print '