Merge pull request #10574 from aspangaro/10.0_menu

FIX: Accountancy journal label menu on Auguria
This commit is contained in:
Laurent Destailleur 2019-02-14 13:22:49 +01:00 committed by GitHub
commit c59313a3cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -227,7 +227,7 @@ class AccountingJournal extends CommonObject
if (! empty($this->code))
$label .= '<br><b>'.$langs->trans('Code') . ':</b> ' . $this->code;
if (! empty($this->label))
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $this->label;
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $langs->transnoentities($this->label);
if ($moretitle) $label.=' - '.$moretitle;
$linkclose='';
@ -254,7 +254,7 @@ class AccountingJournal extends CommonObject
}
$label_link = $this->code;
if ($withlabel) $label_link .= ' - ' . $this->label;
if ($withlabel) $label_link .= ' - ' . $langs->transnoentities($this->label);
$result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);

View File

@ -391,7 +391,9 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t
if ($nature)
{
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/', $leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, dol_trunc($objp->label, 25), 2, $user->rights->accounting->comptarapport->lire);
$langs->load('accountancy');
$journallabel=$langs->transnoentities($objp->label); // Labels in this table are set by loading llx_accounting_abc.sql. Label can be 'ACCOUNTING_SELL_JOURNAL', 'InventoryJournal', ...
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy/', $leftmenu)) $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire);
}
$i++;
}