Clean corrupted data (bank lines with no bank account)
This commit is contained in:
parent
11950a31a2
commit
01698aba6b
@ -639,10 +639,10 @@ if ($id) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if (isModEnabled('banque')) {
|
if (isModEnabled('banque')) {
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||||
|
print '<td colspan="3">';
|
||||||
if ($object->fk_account > 0) {
|
if ($object->fk_account > 0) {
|
||||||
print '<tr>';
|
|
||||||
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
|
||||||
print '<td colspan="3">';
|
|
||||||
if ($object->fk_bank > 0) {
|
if ($object->fk_bank > 0) {
|
||||||
$bankline = new AccountLine($db);
|
$bankline = new AccountLine($db);
|
||||||
$bankline->fetch($object->fk_bank);
|
$bankline->fetch($object->fk_bank);
|
||||||
@ -651,9 +651,11 @@ if ($id) {
|
|||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("NoRecordfound").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("NoRecordfound").'</span>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
} else {
|
||||||
print '</tr>';
|
print '<span class="opacitymedium">'.$langs->trans("NoRecordfound").'</span>';
|
||||||
}
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
|
|||||||
@ -217,6 +217,10 @@ DELETE from llx_bank_url where type = 'company' and url_id not in (select rowid
|
|||||||
--SELECT * from llx_bank where rappro = 0 and label LIKE '(CustomerInvoicePayment%)' and rowid not in (select fk_bank from llx_bank_url where type = 'payment');
|
--SELECT * from llx_bank where rappro = 0 and label LIKE '(CustomerInvoicePayment%)' and rowid not in (select fk_bank from llx_bank_url where type = 'payment');
|
||||||
--SELECT * from llx_bank where rappro = 0 and label LIKE '(SupplierInvoicePayment%)' and rowid not in (select fk_bank from llx_bank_url where type = 'payment_supplier');
|
--SELECT * from llx_bank where rappro = 0 and label LIKE '(SupplierInvoicePayment%)' and rowid not in (select fk_bank from llx_bank_url where type = 'payment_supplier');
|
||||||
|
|
||||||
|
-- Fix: delete orphelins in llx_bank
|
||||||
|
DELETE FROM llx_bank WHERE fk_account NOT IN (select rowid from llx_bank_account);
|
||||||
|
|
||||||
|
|
||||||
-- Fix link on parent that were removed
|
-- Fix link on parent that were removed
|
||||||
DROP table tmp_user;
|
DROP table tmp_user;
|
||||||
CREATE TABLE tmp_user as (select * from llx_user);
|
CREATE TABLE tmp_user as (select * from llx_user);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user