From 01a3787664d31b04b901488172d56f872847f81b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 31 Oct 2017 13:45:13 +0100 Subject: [PATCH 1/5] swap llxfooter() and $db->close() --- htdocs/compta/facture/document.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index e4f9846309a..9159c13070c 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -4,6 +4,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2017 Frédéric France * * 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 @@ -164,6 +165,6 @@ else print $langs->trans("ErrorUnknown"); } -$db->close(); - llxFooter(); + +$db->close(); From 219e58d0e4e1294e952b89a86bbbb1ec766b30bd Mon Sep 17 00:00:00 2001 From: atm-ph Date: Wed, 22 Nov 2017 12:15:02 +0100 Subject: [PATCH 2/5] Fix product type is ignored and can generate a diffrent result with situation invoice --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 60970b5b1e2..3c60e0b6679 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2710,7 +2710,7 @@ class Facture extends CommonInvoice $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx, $pu_ht_devise); + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, $type, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx, $pu_ht_devise); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; From 5fef6478a50ae7087214f12b03b274682ae1478a Mon Sep 17 00:00:00 2001 From: atm-ph Date: Mon, 27 Nov 2017 11:26:41 +0100 Subject: [PATCH 3/5] Fix wrong calcul_price_total() update --- htdocs/compta/facture/class/facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3c60e0b6679..d1ede7cb41d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2710,7 +2710,7 @@ class Facture extends CommonInvoice $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, $type, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx, $pu_ht_devise); + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx, $pu_ht_devise); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -2878,7 +2878,7 @@ class Facture extends CommonInvoice // Cap percentages to 100 if ($percent > 100) $percent = 100; $line->situation_percent = $percent; - $tabprice = calcul_price_total($line->qty, $line->subprice, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->product_type, 'HT', 0, 0, $mysoc, '', $percent); + $tabprice = calcul_price_total($line->qty, $line->subprice, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 0, 'HT', 0, $line->product_type, $mysoc, '', $percent); $line->total_ht = $tabprice[0]; $line->total_tva = $tabprice[1]; $line->total_ttc = $tabprice[2]; From 44e5566ee58d2e9b7543a669ea4323fb54e59f71 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Dec 2017 14:17:49 +0100 Subject: [PATCH 4/5] Update changelog --- ChangeLog | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 541e7963d36..3c56559f8d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,27 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 6.0.4 compared to 6.0.3 ***** +FIX: #7737 +FIX: #7751 +FIX: #7756 Add better error message +FIX: #7786 +FIX: #7806 +FIX: #7824 +FIX: add line bad price and ref +FIX: A lot of several fix on local taxes and NPR tax +FIX: createfromorder +FIX: CSS for IE10 +FIX: external user cannot be set as internal +FIX: Filter type on actioncomm with multiselect doesn't work +FIX: list of donation not filtered on multicompany +FIX: list of module not complete when module mb_strlen not available +FIX: Locatax were not propagated when cloning order or proposal +FIX: Searching translation should not be case sensitive +FIX: Search into language is ok for file into external modules two. +FIX: test for filter fk_status +FIX: too much users on holiday list +FIX: Wrong alias sql ***** ChangeLog for 6.0.3 compared to 6.0.2 ***** FIX: #7211 Update qty dispatched on qty change From 36bcd26e2765064a7efd3bc74c9c4be79e32a1b8 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Mon, 4 Dec 2017 17:43:35 +0100 Subject: [PATCH 5/5] FIX : link project from other company conf --- htdocs/langs/en_US/projects.lang | 1 + htdocs/projet/admin/project.php | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 8b380645f73..31639d0b6b1 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -207,3 +207,4 @@ OppStatusPENDING=Pending OppStatusWON=Won OppStatusLOST=Lost Budget=Budget +AllowToLinkFromOtherCompany=Allow to link project from other company

Supported values :
- "all" : Link all projects
- A list of thirdparty id separated with commas : Link all projects with these thirdparty defined
Example : 11524,4795,53

N.B.: Leave empty to disable this configuration diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 744e52e0f2f..92646bab75a 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -274,6 +274,12 @@ elseif ($action == 'updateoptions') } } } +else if ($action == "linkOtherCompany") +{ + $projectToSelect = GETPOST('projectToSelect'); + + dolibarr_set_const($db, 'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect, 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value +} /* @@ -912,16 +918,20 @@ print ''; print ''; print ''.$langs->trans("AllowToSelectProjectFromOtherCompany").''; -print ''; -echo ajax_constantonoff('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY'); +print ''; + +print '
'; +print ''; +print ' '; +print $form->textwithpicto('', $langs->trans('AllowToLinkFromOtherCompany')); +print ''; +print '
'; print ''; -print ' '; print ''; print ''; - llxFooter(); $db->close();