mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/class/html.form.class.php htdocs/core/tpl/extrafields_list_print_fields.tpl.php
This commit is contained in:
@@ -267,8 +267,12 @@ CREATE TABLE llx_pos_cash_fence(
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_END_TO_END' where name = 'END_TO_END';
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_USTRD' where name = 'USTRD';
|
||||
|
||||
-- Delete duplicate accounting account not used
|
||||
|
||||
-- Delete duplicate accounting account, but only if not used
|
||||
DROP TABLE tmp_llx_accouting_account;
|
||||
CREATE TABLE tmp_llx_accouting_account AS SELECT MIN(rowid) as MINID, account_number, entity, fk_pcg_version, count(*) AS NB FROM llx_accounting_account group BY account_number, entity, fk_pcg_version HAVING count(*) >= 2 order by account_number, entity, fk_pcg_version;
|
||||
--SELECT * from tmp_llx_accouting_account;
|
||||
DELETE from llx_accounting_account where rowid in (select minid from tmp_llx_accouting_account where minid NOT IN (SELECT fk_code_ventilation from llx_facturedet) AND minid NOT IN (SELECT fk_code_ventilation from llx_facture_fourn_det) AND minid NOT IN (SELECT fk_code_ventilation from llx_expensereport_det));
|
||||
|
||||
|
||||
ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account;
|
||||
|
||||
@@ -376,6 +376,16 @@ update llx_bank_url as bu set url_id = (select e.fk_user_author from tmp_bank_ur
|
||||
drop table tmp_bank_url_expense_user;
|
||||
|
||||
|
||||
-- Delete duplicate accounting account, but only if not used
|
||||
DROP TABLE tmp_llx_accouting_account;
|
||||
CREATE TABLE tmp_llx_accouting_account AS SELECT MIN(rowid) as MINID, account_number, entity, fk_pcg_version, count(*) AS NB FROM llx_accounting_account group BY account_number, entity, fk_pcg_version HAVING count(*) >= 2 order by account_number, entity, fk_pcg_version;
|
||||
--SELECT * from tmp_llx_accouting_account;
|
||||
DELETE from llx_accounting_account where rowid in (select minid from tmp_llx_accouting_account where minid NOT IN (SELECT fk_code_ventilation from llx_facturedet) AND minid NOT IN (SELECT fk_code_ventilation from llx_facture_fourn_det) AND minid NOT IN (SELECT fk_code_ventilation from llx_expensereport_det));
|
||||
|
||||
ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account;
|
||||
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
|
||||
|
||||
|
||||
-- VMYSQL4.1 update llx_projet_task_time set task_datehour = task_date where task_datehour < task_date or task_datehour > DATE_ADD(task_date, interval 1 day);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user