Fix can fix a corrupted lost bank account on bank account lines
This commit is contained in:
parent
1768c3d926
commit
85cddf638f
@ -334,11 +334,12 @@ if ($result) {
|
|||||||
// Bank account
|
// Bank account
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Account").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("Account").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (!$objp->rappro && !$bankline->getVentilExportCompta()) {
|
// $objp->fk_account may be not > 0 if data was lost by an old bug. In such a case, we let a chance to user to fix it.
|
||||||
print img_picto('', 'bank_account', 'class="paddingright"');
|
if (($objp->rappro || $bankline->getVentilExportCompta()) && $objp->fk_account > 0) {
|
||||||
print $form->select_comptes($acct->id, 'accountid', 0, '', 0, '', 0, '', 1);
|
|
||||||
} else {
|
|
||||||
print $acct->getNomUrl(1, 'transactions', 'reflabel');
|
print $acct->getNomUrl(1, 'transactions', 'reflabel');
|
||||||
|
} else {
|
||||||
|
print img_picto('', 'bank_account', 'class="paddingright"');
|
||||||
|
print $form->select_comptes($acct->id, 'accountid', 0, '', ($acct->id > 0 ? $acct->id : 1), '', 0, '', 1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user