From e13792a55502cc0cb0b5bcaea3a8d184c3ad3520 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Sep 2017 15:26:02 +0200 Subject: [PATCH] Fix data for account categories --- .../mysql/data/llx_accounting_category.sql | 16 +++++----------- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 2 ++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/htdocs/install/mysql/data/llx_accounting_category.sql b/htdocs/install/mysql/data/llx_accounting_category.sql index 0fd47049efb..776e0edf066 100644 --- a/htdocs/install/mysql/data/llx_accounting_category.sql +++ b/htdocs/install/mysql/data/llx_accounting_category.sql @@ -1,4 +1,5 @@ -- Copyright (C) 2016 Alexandre Spangaro +-- Copyright (C) 2017 Laurent Destailleur -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -15,15 +16,8 @@ -- -- --- --- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors --- de l'install et tous les sigles '--' sont supprimés. --- --- --- Categories compte de résultat Français --- - -INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 1, 'VTE', 'Ventes de marchandises', '707xxx', 0, 0, '', '10', 1, 1); -INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 2, 'MAR', 'Coût achats marchandises vendues', '603xxx | 607xxx | 609xxx', 0, 0, '', '20', 1, 1); -INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 3, 'MARGE', 'Marge commerciale', '', 0, 1, '1 + 2', '30', 1, 1); \ No newline at end of file +-- Group of accounting account for French result +INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 1, 'VTE', 'Income of products', '707xxx', 0, 0, '', '10', 1, 1); +INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 2, 'MAR', 'Expenses of products', '603xxx | 607xxx | 609xxx', 0, 0, '', '20', 1, 1); +INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 3, 'MARGE', 'Commercial margin', '', 0, 1, 'VTE+MAR', '30', 1, 1); \ No newline at end of file diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index 2f080227f36..1fcb5e7c089 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -25,6 +25,8 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); +UPDATE llx_c_accounting_category set formula = 'VTE+MAR' where code = 'MARGE'; + ALTER TABLE llx_menu MODIFY COLUMN perms text; ALTER TABLE llx_mailing MODIFY COLUMN titre varchar(128);