update code

This commit is contained in:
Philippe GRAND
2022-09-04 13:29:29 +02:00
parent a8531a4afd
commit 2cd48587ed
5 changed files with 11 additions and 11 deletions

View File

@@ -2272,7 +2272,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
}
// Add if object was dispatched "into accountancy"
if (!empty($conf->accounting->enabled) && in_array($object->element, array('bank', 'paiementcharge', 'facture', 'invoice', 'invoice_supplier', 'expensereport', 'payment_various'))) {
if (isModEnabled('accounting') && in_array($object->element, array('bank', 'paiementcharge', 'facture', 'invoice', 'invoice_supplier', 'expensereport', 'payment_various'))) {
// Note: For 'chargesociales', 'salaries'... this is the payments that are dispatched (so element = 'bank')
if (method_exists($object, 'getVentilExportCompta')) {
$accounted = $object->getVentilExportCompta();