Merge pull request #12106 from frederic34/patch-13

avoid ErrorBadValueForParamNotAString if not configured
This commit is contained in:
Laurent Destailleur 2019-10-14 20:55:06 +02:00 committed by GitHub
commit 1f672221ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -454,7 +454,7 @@ foreach ($accounts as $key=>$type)
if (! empty($arrayfields['b.account_number']['checked']))
{
print '<td>';
if (! empty($conf->accounting->enabled))
if (! empty($conf->accounting->enabled) && ! empty($objecttmp->account_number))
{
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch('', $objecttmp->account_number, 1);
@ -472,7 +472,7 @@ foreach ($accounts as $key=>$type)
if (! empty($arrayfields['b.fk_accountancy_journal']['checked']))
{
print '<td>';
if (! empty($conf->accounting->enabled))
if (! empty($conf->accounting->enabled) && ! empty($objecttmp->fk_accountancy_journal))
{
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($objecttmp->fk_accountancy_journal);