Merge pull request #13449 from atm-quentin/FIX_missing_default_accountancy_product_buy_code

FIX missing default accountancy product buy code
This commit is contained in:
Laurent Destailleur 2020-04-05 03:41:46 +02:00 committed by GitHub
commit 8a14652eae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1211,7 +1211,13 @@ else
// Accountancy_code_buy
print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>';
print '<td>';
print $formaccounting->select_account(GETPOST('accountancy_code_buy', 'alpha'), 'accountancy_code_buy', 1, null, 1, 1, '');
if($type == 0)
{
$accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha')?(GETPOST('accountancy_code_buy', 'alpha')):$conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT);
} else {
$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
}
print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, '');
print '</td></tr>';
}
else // For external software