2
0
forked from Wavyzz/dolibarr

Merge pull request #4311 from FHenry/develop

NEW : if nb total of lines provided in print barre_liste, display beside title
This commit is contained in:
Juanjo Menent
2016-01-09 17:52:05 +01:00
4 changed files with 18 additions and 4 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

@@ -2985,7 +2985,11 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
// Left
if ($picto && $titre) print '<td class="nobordernopadding hideonsmartphone" width="40" align="left" valign="middle">'.img_picto('', $picto, '', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding"><div class="titre">'.$titre.'</div></td>';
print '<td class="nobordernopadding"><div class="titre">'.$titre;
if (!empty($totalnboflines) && !empty($titre)) {
print ' ('.$totalnboflines.')';
}
print '</div></td>';
// Center
if ($center)

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");