Browse Source

Align size for accounting account & Drop old table & Typo

aspangaro 11 years ago
parent
commit
53bd5022e0

+ 2 - 2
htdocs/boutique/index.php

@@ -128,7 +128,7 @@ else
 }
 
 /*
- * Last 5 commands in wait
+ * Last 5 orders on hold
  */
 $sql = "SELECT o.orders_id, o.customers_name, o.date_purchased, t.value, o.payment_method";
 $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o on o.orders_id = t.orders_id ";
@@ -200,7 +200,7 @@ else
 
 print '</td></tr><tr>';
 /*
- * Last customers who commanded
+ * Last customers who ordered
  */
 $sql = "SELECT o.orders_id, o.customers_name, o.delivery_country, o.date_purchased, t.value, s.orders_status_name as statut";
 $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o on o.orders_id = t.orders_id ";

+ 19 - 0
htdocs/install/mysql/migration/3.6.0-3.7.0.sql

@@ -19,3 +19,22 @@
 
 
 ALTER TABLE llx_c_paiement ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER active;
+
+-- Drop old table
+DROP TABLE llx_compta;
+DROP TABLE llx_compta_account;
+DROP TABLE llx_compta_compte_generaux;
+
+-- Align size for accounting account
+ALTER TABLE llx_accountingaccount MODIFY COLUMN account_number varchar(32);
+ALTER TABLE llx_accountingaccount MODIFY COLUMN account_parent varchar(32);
+ALTER TABLE llx_accountingdebcred MODIFY COLUMN account_number varchar(32);
+ALTER TABLE llx_bank_account MODIFY COLUMN account_number varchar(32);
+ALTER TABLE llx_c_chargesociales MODIFY COLUMN accountancy_code varchar(32);
+ALTER TABLE llx_c_revenuestamp MODIFY COLUMN accountancy_code_sell varchar(32);
+ALTER TABLE llx_c_revenuestamp MODIFY COLUMN accountancy_code_buy varchar(32);
+ALTER TABLE llx_c_tva MODIFY COLUMN accountancy_code_sell varchar(32);
+ALTER TABLE llx_c_tva MODIFY COLUMN accountancy_code_buy varchar(32);
+ALTER TABLE llx_c_product MODIFY COLUMN accountancy_code_sell varchar(32);
+ALTER TABLE llx_c_product MODIFY COLUMN accountancy_code_buy varchar(32);
+ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32);

+ 2 - 2
htdocs/install/mysql/tables/llx_accountingaccount.sql

@@ -23,8 +23,8 @@ create table llx_accountingaccount
   fk_pcg_version  varchar(12)  NOT NULL,
   pcg_type        varchar(20)  NOT NULL,
   pcg_subtype     varchar(20)  NOT NULL,
-  account_number  varchar(20)  NOT NULL,
-  account_parent  varchar(20),
+  account_number  varchar(32)  NOT NULL,
+  account_parent  varchar(32),
   label           varchar(255) NOT NULL,
   active     	  tinyint DEFAULT 1  NOT NULL
 )ENGINE=innodb;

+ 1 - 1
htdocs/install/mysql/tables/llx_accountingdebcred.sql

@@ -20,7 +20,7 @@
 create table llx_accountingdebcred
 (
 	fk_transaction  integer		NOT NULL,
-	account_number  varchar(20) NOT NULL,
+	account_number  varchar(32) NOT NULL,
 	amount          real		NOT NULL,
 	direction       varchar(1)	NOT NULL
 )ENGINE=innodb;

+ 1 - 1
htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql

@@ -21,5 +21,5 @@
 ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element);
 ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element);
 
--- Pas de contraite sur fk_source et fk_target car pointe sur differentes tables
+-- Pas de contrainte sur fk_source et fk_target car pointe sur differentes tables
 	

+ 1 - 1
htdocs/install/mysql/tables/llx_bank_account.sql

@@ -47,7 +47,7 @@ create table llx_bank_account
   clos				smallint DEFAULT 0 NOT NULL,
   rappro			smallint DEFAULT 1,
   url				varchar(128),
-  account_number	varchar(24),				-- bank accountancy number
+  account_number	varchar(32),				-- bank accountancy number
   currency_code		varchar(3) NOT NULL,
   min_allowed		integer DEFAULT 0,
   min_desired		integer DEFAULT 0,

+ 1 - 1
htdocs/install/mysql/tables/llx_c_chargesociales.sql

@@ -24,7 +24,7 @@ create table llx_c_chargesociales
   deductible   smallint DEFAULT 0 NOT NULL,
   active       tinyint DEFAULT 1  NOT NULL,
   code         varchar(12) NOT NULL,
-  accountancy_code varchar(24) DEFAULT NULL,
+  accountancy_code varchar(32) DEFAULT NULL,
   fk_pays      integer DEFAULT 1 NOT NULL,
   module       varchar(32) NULL
 )ENGINE=innodb;

+ 2 - 2
htdocs/install/mysql/tables/llx_c_revenuestamp.sql

@@ -23,7 +23,7 @@ create table llx_c_revenuestamp
   taux              double  NOT NULL,
   note              varchar(128),
   active            tinyint DEFAULT 1 NOT NULL,
-  accountancy_code_sell	varchar(15) DEFAULT NULL,
-  accountancy_code_buy	varchar(15) DEFAULT NULL
+  accountancy_code_sell	varchar(32) DEFAULT NULL,
+  accountancy_code_buy	varchar(32) DEFAULT NULL
 )ENGINE=innodb;
 

+ 2 - 2
htdocs/install/mysql/tables/llx_c_tva.sql

@@ -30,7 +30,7 @@ create table llx_c_tva
   recuperableonly   integer NOT NULL DEFAULT 0,
   note              varchar(128),
   active            tinyint DEFAULT 1 NOT NULL,
-  accountancy_code_sell	varchar(15) DEFAULT NULL,
-  accountancy_code_buy	varchar(15) DEFAULT NULL
+  accountancy_code_sell	varchar(32) DEFAULT NULL,
+  accountancy_code_buy	varchar(32) DEFAULT NULL
 )ENGINE=innodb;
 

+ 0 - 32
htdocs/install/mysql/tables/llx_compta.sql

@@ -1,32 +0,0 @@
--- ===================================================================
--- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-create table llx_compta
-(
-  rowid             integer AUTO_INCREMENT PRIMARY KEY,
-  datec             datetime,
-  datev             date,           -- date de valeur
-  amount            real DEFAULT 0 NOT NULL ,
-  label             varchar(255),
-  fk_compta_account integer,
-  fk_user_author    integer,
-  fk_user_valid     integer,
-  valid             tinyint DEFAULT 0,
-  note              text
-
-)ENGINE=innodb;

+ 0 - 28
htdocs/install/mysql/tables/llx_compta_account.sql

@@ -1,28 +0,0 @@
--- ===================================================================
--- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-create table llx_compta_account
-(
-  rowid             integer AUTO_INCREMENT PRIMARY KEY,
-  datec             datetime,
-  number            varchar(12),
-  label             varchar(255),
-  fk_user_author    integer,
-  note              text
-
-)ENGINE=innodb;

+ 0 - 29
htdocs/install/mysql/tables/llx_compta_compte_generaux.sql

@@ -1,29 +0,0 @@
--- ===================================================================
--- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
---
--- 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
--- the Free Software Foundation; either version 3 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program. If not, see <http://www.gnu.org/licenses/>.
---
--- ===================================================================
-
-create table llx_compta_compte_generaux
-(
-  rowid           integer AUTO_INCREMENT PRIMARY KEY,
-  date_creation   datetime,
-  numero          varchar(50),
-  intitule        varchar(255),
-  fk_user_author  integer,
-  note            text,
-
-  UNIQUE(numero)
-)ENGINE=innodb;

+ 2 - 2
htdocs/install/mysql/tables/llx_product.sql

@@ -57,8 +57,8 @@ create table llx_product
   url						varchar(255),
   barcode					varchar(255) DEFAULT NULL,
   fk_barcode_type			integer      DEFAULT 0,
-  accountancy_code_sell		varchar(15),                    -- Selling accountancy code
-  accountancy_code_buy		varchar(15),                    -- Buying accountancy code
+  accountancy_code_sell		varchar(32),                    -- Selling accountancy code
+  accountancy_code_buy		varchar(32),                    -- Buying accountancy code
   partnumber				varchar(32),                    -- Not used. Used by external modules.
   weight					float        DEFAULT NULL,
   weight_units				tinyint      DEFAULT NULL,

+ 1 - 1
htdocs/install/mysql/tables/llx_user.sql

@@ -67,7 +67,7 @@ create table llx_user
   color				varchar(6),
   barcode			varchar(255) DEFAULT NULL,
   fk_barcode_type	integer      DEFAULT 0,
-  accountancy_code  varchar(24) NULL,
+  accountancy_code  varchar(32) NULL,
   nb_holiday		integer DEFAULT 0,
   salary			double(24,8)
 )ENGINE=innodb;