diff --git a/htdocs/boutique/index.php b/htdocs/boutique/index.php
index 040e81b726a..01b3928a96b 100644
--- a/htdocs/boutique/index.php
+++ b/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 '
';
/*
- * 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 ";
diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
index ae439127c06..96393a22c1b 100644
--- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
+++ b/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);
\ No newline at end of file
diff --git a/htdocs/install/mysql/tables/llx_accountingaccount.sql b/htdocs/install/mysql/tables/llx_accountingaccount.sql
index a3143a263f9..085f2f3eeb5 100644
--- a/htdocs/install/mysql/tables/llx_accountingaccount.sql
+++ b/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;
diff --git a/htdocs/install/mysql/tables/llx_accountingdebcred.sql b/htdocs/install/mysql/tables/llx_accountingdebcred.sql
index f1191803d0e..f7ea28b127a 100644
--- a/htdocs/install/mysql/tables/llx_accountingdebcred.sql
+++ b/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;
diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql
index 6d6999e7232..caaa0969944 100644
--- a/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql
+++ b/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
diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql
index 198b0ca87ab..765d836594b 100644
--- a/htdocs/install/mysql/tables/llx_bank_account.sql
+++ b/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,
diff --git a/htdocs/install/mysql/tables/llx_c_chargesociales.sql b/htdocs/install/mysql/tables/llx_c_chargesociales.sql
index b9c448e1d95..5b5cf1edf24 100644
--- a/htdocs/install/mysql/tables/llx_c_chargesociales.sql
+++ b/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;
diff --git a/htdocs/install/mysql/tables/llx_c_revenuestamp.sql b/htdocs/install/mysql/tables/llx_c_revenuestamp.sql
index 7a47c05dca3..0eb5a46216d 100644
--- a/htdocs/install/mysql/tables/llx_c_revenuestamp.sql
+++ b/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;
diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql
index 46aa3632faa..e2de4c3b5ef 100644
--- a/htdocs/install/mysql/tables/llx_c_tva.sql
+++ b/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;
diff --git a/htdocs/install/mysql/tables/llx_compta.sql b/htdocs/install/mysql/tables/llx_compta.sql
deleted file mode 100644
index b7b06636e51..00000000000
--- a/htdocs/install/mysql/tables/llx_compta.sql
+++ /dev/null
@@ -1,32 +0,0 @@
--- ===================================================================
--- Copyright (C) 2000-2002 Rodolphe Quiedeville
---
--- 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 .
---
--- ===================================================================
-
-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;
diff --git a/htdocs/install/mysql/tables/llx_compta_account.sql b/htdocs/install/mysql/tables/llx_compta_account.sql
deleted file mode 100644
index b70ad9ba160..00000000000
--- a/htdocs/install/mysql/tables/llx_compta_account.sql
+++ /dev/null
@@ -1,28 +0,0 @@
--- ===================================================================
--- Copyright (C) 2000-2002 Rodolphe Quiedeville
---
--- 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 .
---
--- ===================================================================
-
-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;
diff --git a/htdocs/install/mysql/tables/llx_compta_compte_generaux.sql b/htdocs/install/mysql/tables/llx_compta_compte_generaux.sql
deleted file mode 100644
index d830e8dbd66..00000000000
--- a/htdocs/install/mysql/tables/llx_compta_compte_generaux.sql
+++ /dev/null
@@ -1,29 +0,0 @@
--- ===================================================================
--- Copyright (C) 2004 Rodolphe Quiedeville
---
--- 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 .
---
--- ===================================================================
-
-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;
diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql
index 582f8161365..0ff94c19530 100644
--- a/htdocs/install/mysql/tables/llx_product.sql
+++ b/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,
diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql
index 4b537e21f0c..6fccf1804c4 100644
--- a/htdocs/install/mysql/tables/llx_user.sql
+++ b/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;