Overview
Comment:Fix: les comptes analytiques sont le type 4
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 966fde34000649a02473978793223af1b3ac4fcc
User & Date: bohwaz on 2020-04-24 02:09:37
Other Links: branch diff | manifest | tags
Context
2020-04-24
02:23
Renommer "Plans" en "Charts" (anglais correct) check-in: 70ab5d00ec user: bohwaz tags: dev
02:09
Fix: les comptes analytiques sont le type 4 check-in: 966fde3400 user: bohwaz tags: dev
02:08
Max 6 caractères dans le code check-in: 1372759276 user: bohwaz tags: dev
Changes

Modified src/include/data/1.0.0_migration.sql from [f4a019e169] to [f8f1e149af].

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
	SELECT NULL, 1, id, libelle, position, CASE WHEN plan_comptable = 1 THEN 0 ELSE 1 END FROM compta_comptes;

-- Migrations projets vers comptes analytiques
INSERT INTO acc_accounts (id_plan, code, label, position, user, type)
	VALUES (1, '99', 'Projets', 0, 1, 4);

INSERT INTO acc_accounts (id_plan, code, label, position, user, type)
	SELECT 1, '99' || substr('0000' || id, -4), libelle, 0, 1, 3 FROM compta_projets;

-- Suppression des positions "actif ou passif" et "charge ou produit"
UPDATE acc_accounts SET position = 0 WHERE position = 3 OR position = 12;

-- Modification des valeurs de la position (qui n'est plus un champ binaire)
UPDATE acc_accounts SET position = 3 WHERE position = 4;
UPDATE acc_accounts SET position = 4 WHERE position = 8;







|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
	SELECT NULL, 1, id, libelle, position, CASE WHEN plan_comptable = 1 THEN 0 ELSE 1 END FROM compta_comptes;

-- Migrations projets vers comptes analytiques
INSERT INTO acc_accounts (id_plan, code, label, position, user, type)
	VALUES (1, '99', 'Projets', 0, 1, 4);

INSERT INTO acc_accounts (id_plan, code, label, position, user, type)
	SELECT 1, '99' || substr('0000' || id, -4), libelle, 0, 1, 4 FROM compta_projets;

-- Suppression des positions "actif ou passif" et "charge ou produit"
UPDATE acc_accounts SET position = 0 WHERE position = 3 OR position = 12;

-- Modification des valeurs de la position (qui n'est plus un champ binaire)
UPDATE acc_accounts SET position = 3 WHERE position = 4;
UPDATE acc_accounts SET position = 4 WHERE position = 8;