Mix two systems for create and edit account from balance

This commit is contained in:
Alexandre SPANGARO 2021-01-07 06:27:36 +01:00
parent 1f87bbbd01
commit 74ba7e68da

View File

@ -322,8 +322,10 @@ if ($action != 'export_csv')
$root_account_description = $tmparrayforrootaccount['label'];
$root_account_number = $tmparrayforrootaccount['account_number'];
if (empty($tmparrayforrootaccount['label'])) {
$link = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=create&accountingaccount='.length_accountg($line->numero_compte).'">'.img_edit_add().'</a>';
if (empty($accountingaccountstatic->label) && $accountingaccountstatic->id > 0) {
$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=update&token=' . newToken() . '&id=' . $accountingaccountstatic->id . '">' . img_edit() . '</a>';
} elseif (empty($tmparrayforrootaccount['label'])) {
$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?action=create&token=' . newToken() . '&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
}
if (!empty($show_subgroup))