Merge pull request #13089 from mapiolca/patch-31

Fix the display of the banner with multicompany
This commit is contained in:
Laurent Destailleur 2020-02-12 18:51:08 +01:00 committed by GitHub
commit d70712fd61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -971,8 +971,8 @@ if (empty($action) || $action == 'view') {
journalHead($nom, '', $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
// Test that setup is complete
$sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL AND clos=0';
// Test that setup is complete (we are in accounting, so test on entity is always on $conf->entity only, no sharing allowed)
$sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE entity = '.$conf->entity.' AND fk_accountancy_journal IS NULL AND clos=0';
$resql = $db->query($sql);
if ($resql)
{