if ($action == 'create') { print load_fiche_titre($langs->trans("CreateMvts")); $code_journal_array = array($conf->global->ACCOUNTING_SELL_JOURNAL => $conf->global->ACCOUNTING_SELL_JOURNAL, $conf->global->ACCOUNTING_PURCHASE_JOURNAL => $conf->global->ACCOUNTING_PURCHASE_JOURNAL, $conf->global->ACCOUNTING_SOCIAL_JOURNAL => $conf->global->ACCOUNTING_SOCIAL_JOURNAL, $conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL => $conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL, $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL => $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL); $sql = 'SELECT DISTINCT accountancy_journal FROM ' . MAIN_DB_PREFIX . 'bank_account WHERE clos=0'; $resql = $db->query($sql); if (!$resql) { setEventMessages($db->lasterror, null, 'errors'); } else { while ($obj_bank = $db->fetch_object($resql)) { if (!empty($obj_bank->accountancy_journal)) { $code_journal_array[$obj_bank->accountancy_journal] = $obj_bank->accountancy_journal; } } } $book = new BookKeeping($db); $next_num_mvt = $book->getNextNumMvt(); print '<form action="' . $_SERVER["PHP_SELF"] . '" name="create_mvt" method="POST">'; print '<input type="hidden" name="action" value="confirm_create">' . "\n"; print '<input type="hidden" name="next_num_mvt" value="' . $next_num_mvt . '">' . "\n"; dol_fiche_head(); print '<table class="border" width="100%">'; print '<tr>'; print '<td width="25%">' . $langs->trans("NumMvts") . '</td>'; print '<td>' . $next_num_mvt . '</td>'; print '</tr>'; print '<tr>'; print '<td>' . $langs->trans("Docdate") . '</td>'; print '<td>'; print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1); print '</td>'; print '</tr>';