FIX/NEW : Accountancy

This commit is contained in:
bobby 2015-12-28 11:08:14 +01:00
parent eec22169e3
commit 46532ccb55
3 changed files with 13 additions and 3 deletions

View File

@ -213,6 +213,18 @@ if ($action == 'create') {
$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();

View File

@ -577,9 +577,9 @@ else
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
$varlink = 'id_account='.$id_bank_account;
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';

View File

@ -48,8 +48,6 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat
if(! empty($varlink)) $varlink = '?'.$varlink;
if(! empty($varlink)) $varlink = '?'.$varlink;
$h=0;
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
$head[$h][1] = $langs->trans("Report");