From 9c3805c0d5d5b44daa4de8e4e3e51adb89e2550a Mon Sep 17 00:00:00 2001 From: TuxGasy Date: Thu, 19 Oct 2017 14:10:58 +0200 Subject: [PATCH 1/9] Fix anchor after add line --- htdocs/comm/propal/card.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/compta/facture.php | 2 +- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/facture/card.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 407a461a1a1..e0f6b796826 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2239,7 +2239,7 @@ if ($action == 'create') // Show object lines $result = $object->getLinesArray(); - print '
+ print ' diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 9de9ffed222..67978ff99e8 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2433,7 +2433,7 @@ if ($action == 'create' && $user->rights->commande->creer) */ $result = $object->getLinesArray(); - print ' + print ' diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index b6d610c65b6..ad5f69edfc0 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3867,7 +3867,7 @@ else if ($id > 0 || ! empty($ref)) - print ' + print ' diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 74d96158f65..05bbc26e5fc 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2064,7 +2064,7 @@ elseif (! empty($object->id)) //$result = $object->getLinesArray(); - print ' + print ' diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 8402b298f93..f24ed99a9f8 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2584,7 +2584,7 @@ else /* * Lines */ - print ''; + print ''; print ''; print ''; print ''; From 08d5ff4736c799277e91fd76da9aa5e4dfa24e43 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Fri, 20 Oct 2017 12:28:33 +0200 Subject: [PATCH 2/9] Fix shipment ref is empty --- htdocs/expedition/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index f0aaad677d6..a5fdbc98dba 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -212,7 +212,7 @@ if (empty($reshook)) $objectsrc->fetch($object->origin_id); $object->socid = $objectsrc->socid; - $object->ref_customer = ''; // We don't use $objectsrc->ref_client, this is ref or order not shipment + $object->ref_customer = GETPOST('ref_customer'); // We don't use $objectsrc->ref_client, this is ref or order not shipment $object->model_pdf = GETPOST('model'); $object->date_delivery = $date_delivery; // Date delivery planed $object->fk_delivery_address = $objectsrc->fk_delivery_address; @@ -692,7 +692,7 @@ if ($action == 'create') else if ($origin == 'propal') print $langs->trans('RefCustomerOrder'); else print $langs->trans('RefCustomer'); print ''; - print $object->ref_client; + print ''; print ''; print ''; From 611f5f638dcb3ab93bce8a3536baa8bec71148a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Oct 2017 15:07:41 +0200 Subject: [PATCH 3/9] FIX #7616 --- htdocs/install/mysql/migration/5.0.0-6.0.0.sql | 1 + htdocs/install/mysql/tables/llx_projet_task.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index 634045d3e4e..b417eaf67bd 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -157,6 +157,7 @@ ALTER TABLE llx_loan ADD COLUMN fk_projet integer DEFAULT NULL; ALTER TABLE llx_holiday ADD COLUMN fk_user_modif integer; ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer; +ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer; ALTER TABLE llx_projet_task_time ADD COLUMN datec date; ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp; diff --git a/htdocs/install/mysql/tables/llx_projet_task.sql b/htdocs/install/mysql/tables/llx_projet_task.sql index 70ec071be95..a7418f2688c 100644 --- a/htdocs/install/mysql/tables/llx_projet_task.sql +++ b/htdocs/install/mysql/tables/llx_projet_task.sql @@ -36,6 +36,7 @@ create table llx_projet_task progress integer DEFAULT 0, -- percentage increase priority integer DEFAULT 0, -- priority fk_user_creat integer, -- user who created the task + fk_user_modif integer, -- user who modify the task fk_user_valid integer, -- user who validated the task fk_statut smallint DEFAULT 0 NOT NULL, note_private text, From c258e229c8808da5d3b0546b7337cb2df92d0d4b Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Mon, 23 Oct 2017 10:00:22 +0200 Subject: [PATCH 4/9] fix accountancy index display --- htdocs/accountancy/customer/index.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index c07f15a6ef4..951f28e4b83 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -322,7 +322,6 @@ if ($resql) { } else print $row[1]; print ''; - print '' . $row[1] . ''; for($i = 2; $i <= 12; $i ++) { print '' . price($row[$i]) . ''; } From 97b694b59cf653fbe4560c4f0d7a39448f590dfc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Oct 2017 10:21:45 +0200 Subject: [PATCH 5/9] Fix missing field in migration v6 --- htdocs/install/mysql/migration/5.0.0-6.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index b417eaf67bd..5da8799d7b3 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -383,6 +383,7 @@ ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price do ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL; UPDATE llx_contrat SET ref = rowid WHERE ref IS NULL OR ref = ''; +ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT ''; CREATE TABLE llx_payment_various ( From ba434617dcf268f48d7ae4c0ea3d2edfcdd0a939 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Oct 2017 14:44:06 +0200 Subject: [PATCH 6/9] FIX Missing function getLinesArray --- htdocs/contrat/class/contrat.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index ca8d6fc9ddb..6885e766603 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2255,6 +2255,16 @@ class Contrat extends CommonObject } } + /** + * Create an array of order lines + * + * @return int >0 if OK, <0 if KO + */ + function getLinesArray() + { + return $this->fetch_lines(); + } + /** * Create a document onto disk according to template module. * From 76aa2df807bfeefe4d353cb0ae3bfb2c5cbd60ba Mon Sep 17 00:00:00 2001 From: dolibarr95 <24292300+dolibarr95@users.noreply.github.com> Date: Tue, 24 Oct 2017 09:22:13 +0200 Subject: [PATCH 7/9] Try to fix #7692 `$this->fk_soc` is empty replace by `$this->socid` --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 50e805f1089..834b80aa98f 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1429,7 +1429,7 @@ class CommandeFournisseur extends CommonOrder // We use 'none' instead of $fourn_ref, because fourn_ref may not exists anymore. So we will take the first supplier price ok. // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. - $result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->fk_soc); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc + $result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->socid); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc if ($result > 0) { $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice From 58584d8784493c4c190788cc3809de2d2ec31b21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 24 Oct 2017 13:01:48 +0200 Subject: [PATCH 8/9] Update fournisseur.commande.class.php --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 834b80aa98f..073f399e324 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1429,7 +1429,7 @@ class CommandeFournisseur extends CommonOrder // We use 'none' instead of $fourn_ref, because fourn_ref may not exists anymore. So we will take the first supplier price ok. // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. - $result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->socid); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc + $result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc?$this->fk_soc:$this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc if ($result > 0) { $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice From 0efd118d430ba3c902c570c07bc23a260deaebbe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 26 Oct 2017 16:50:38 +0200 Subject: [PATCH 9/9] Fix hook on product list --- htdocs/product/list.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 7fd4135bd4a..0beaab3c9c8 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -426,13 +426,14 @@ else $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ',1); $moreforfilter.=''; } - if ($moreforfilter) + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + if (empty($reshook)) $moreforfilter.=$hookmanager->resPrint; + else $moreforfilter=$hookmanager->resPrint; + if ($moreforfilter) { print '
'; print $moreforfilter; - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } @@ -788,7 +789,7 @@ else } } // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp); $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation