From 7eec1155a05e77ce8feab8068341ec3b3d405df5 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 24 Nov 2020 18:58:37 +0100 Subject: [PATCH 1/3] Fix issue #15506 tansfer line extrafield order to expedition --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index f2cb455cc6b..7614ba01df3 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1599,7 +1599,7 @@ if ($action == 'create') $srcLine = new OrderLine($db); $srcLine->id = $line->id; $srcLine->fetch_optionals(); // fetch extrafields also available in orderline - $line->array_options = array_merge($line->array_options, $srcLine->array_options); + $expLine->array_options = array_merge($line->array_options, $srcLine->array_options); print $expLine->showOptionals($extrafields, 'edit', array('style'=>'class="drag drop oddeven"', 'colspan'=>$colspan), $indiceAsked, '', 1); } From 9b1dbf8d2af2ce535f2c701bb0922595111cdad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Tue, 24 Nov 2020 22:10:01 +0100 Subject: [PATCH 2/3] llx_accounting_account_fr.sql: Remove left over field data In commit 86d9622360b6682d9a75b1c9f9fa15dfa2e4805c, the `pcg_subtype` was removed from the inserted values. In commit a85dfaf71e7300d878af0b656de853e77b9bde92, values associated with this field were removed. However, at least two lines in the PCG99-BASE accounting accounts still had that field values. This led to errors when importing the PCG99-BASE accounts. This patch fixes the problem and the accounts can be imported successfully. --- htdocs/install/mysql/data/llx_accounting_account_fr.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/data/llx_accounting_account_fr.sql b/htdocs/install/mysql/data/llx_accounting_account_fr.sql index 34e8882609d..d49e509a5be 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_fr.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_fr.sql @@ -468,7 +468,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 413,'PCG99-BASE','INCOME', '754', '409', 'Ristournes perçues des coopératives (provenant des excédents)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 414,'PCG99-BASE','INCOME', '755', '409', 'Quotes-parts de résultat sur opérations faites en commun', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 415,'PCG99-BASE','INCOME', '758', '409', 'Produits divers de gestion courante', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 416,'PCG99-BASE','INCOME', 'FIN', '76','1507', 'Produits financiers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 416,'PCG99-BASE','INCOME', '76','1507', 'Produits financiers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 417,'PCG99-BASE','INCOME', '761', '416', 'Produits de participations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 418,'PCG99-BASE','INCOME', '762', '416', 'Produits des autres immobilisations financières', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 419,'PCG99-BASE','INCOME', '763', '416', 'Revenus des autres créances', 1); @@ -476,7 +476,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 421,'PCG99-BASE','INCOME', '765', '416', 'Escomptes obtenus', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 422,'PCG99-BASE','INCOME', '766', '416', 'Gains de change', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 423,'PCG99-BASE','INCOME', '767', '416', 'Produits nets sur cessions de valeurs mobilières de placement', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 424,'PCG99-BASE','INCOME', 'FIN', '768', '416', 'Autres produits financiers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 424,'PCG99-BASE','INCOME', '768', '416', 'Autres produits financiers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 425,'PCG99-BASE','INCOME', '77','1507', 'Produits exceptionnels', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 426,'PCG99-BASE','INCOME', '771', '425', 'Produits exceptionnels sur opérations de gestion', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 427,'PCG99-BASE','INCOME', '772', '425', '(Compte à la disposition des entités pour enregistrer, en cours d''exercice, les produits sur exercices antérieurs)', 1); From a734e1caa7e59722dcea810164962784311c3ee6 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 25 Nov 2020 15:06:07 +0100 Subject: [PATCH 3/3] line is order line not exp line --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 7614ba01df3..12a5e5747b3 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1599,7 +1599,7 @@ if ($action == 'create') $srcLine = new OrderLine($db); $srcLine->id = $line->id; $srcLine->fetch_optionals(); // fetch extrafields also available in orderline - $expLine->array_options = array_merge($line->array_options, $srcLine->array_options); + $expLine->array_options = array_merge($expLine->array_options, $srcLine->array_options); print $expLine->showOptionals($extrafields, 'edit', array('style'=>'class="drag drop oddeven"', 'colspan'=>$colspan), $indiceAsked, '', 1); }