From acc9879c7c9b19a5b0932ce2395dfb56fff78e6a Mon Sep 17 00:00:00 2001 From: fmarcet Date: Mon, 1 Feb 2016 13:05:14 +0100 Subject: [PATCH 001/113] FIX: It doesn't check if there is enough stock to update the lines of orders/invoices --- htdocs/commande/class/commande.class.php | 23 ++++++++++++++++++- htdocs/compta/facture/class/facture.class.php | 14 +++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5d2907041b23f..d807d67cb1ebc 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Marcos García + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -2372,7 +2373,7 @@ function classer_facturee() */ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_option=0) { - global $conf, $mysoc; + global $conf, $mysoc, $langs; dol_syslog(get_class($this)."::updateline id=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, date_start=$date_start, date_end=$date_end, type=$type, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, special_code=$special_code"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -2426,6 +2427,26 @@ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocalt $line = new OrderLine($this->db); $line->fetch($rowid); + if (!empty($line->fk_product)) + { + $product=new Product($this->db); + $result=$product->fetch($line->fk_product); + $product_type=$product->type; + + if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty) + { + $this->error=$langs->trans('ErrorStockIsNotEnough'); + dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR); + $this->db->rollback(); + unset($_POST['productid']); + unset($_POST['tva_tx']); + unset($_POST['price_ht']); + unset($_POST['qty']); + unset($_POST['buying_price']); + return self::STOCK_NOT_ENOUGH_FOR_ORDER; + } + } + $staticline = clone $line; $line->oldline = $staticline; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index b1ec15f753624..705a52074c921 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -12,6 +12,7 @@ * Copyright (C) 2012-2014 Marcos García * Copyright (C) 2013 Cedric Gross * Copyright (C) 2013 Florian Henry + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -2199,6 +2200,19 @@ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $dat $line = new FactureLigne($this->db); $line->fetch($rowid); + if (!empty($line->fk_product)) + { + $product=new Product($this->db); + $result=$product->fetch($line->fk_product); + $product_type=$product->type; + + if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) { + $this->error=$langs->trans('ErrorStockIsNotEnough'); + $this->db->rollback(); + return -3; + } + } + $staticline = clone $line; $line->oldline = $staticline; From d6cda60ed1c1f239ee7e76e6fc48430870d1948a Mon Sep 17 00:00:00 2001 From: fmarcet Date: Mon, 1 Feb 2016 13:40:02 +0100 Subject: [PATCH 002/113] FIX: Check stock of product by warehouse if $entrepot_id defined on shippings --- htdocs/expedition/class/expedition.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 4ed4a06135876..88d25121ade43 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Francis Appels + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -763,13 +764,19 @@ function addline($entrepot_id, $id, $qty) return -1; } - if ($conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT) // FIXME Check is done for stock of product, it must be done for stock of product into warehouse if $entrepot_id defined + if ($conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT) { $product=new Product($this->db); $result=$product->fetch($fk_product); + if ($entrepot_id > 0) { + $product->load_stock(); + $product_stock = $product->stock_warehouse[$entrepot_id]->real; + } + else + $product_stock = $product->stock_reel; $product_type=$product->type; - if ($product_type == 0 && $product->stock_reel < $qty) + if ($product_type == 0 && $product_stock < $qty) { $this->error=$langs->trans('ErrorStockIsNotEnough'); $this->db->rollback(); From 44746c1899ceddd876f6a775a7e80455ca723691 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 15 Apr 2016 13:46:20 +0200 Subject: [PATCH 003/113] Merge remote-tracking branch 'upstream/3.8' into 3.9 Conflicts: htdocs/compta/localtax/quadri_detail.php --- htdocs/compta/localtax/quadri_detail.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index a4eaccba35bb6..925ca7fc5923c 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -220,9 +220,9 @@ foreach(array_keys($x_coll) as $my_coll_rate) { $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; - $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; + $x_both[$my_coll_rate]['coll']['localtax'.$local] = $x_coll[$my_coll_rate]['localtax'.$local]; $x_both[$my_coll_rate]['paye']['totalht'] = 0; - $x_both[$my_coll_rate]['paye']['vat'] = 0; + $x_both[$my_coll_rate]['paye']['localtax'.$local] = 0; $x_both[$my_coll_rate]['coll']['links'] = ''; $x_both[$my_coll_rate]['coll']['detail'] = array(); foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) From aa64266c2f0059e679d18db11c5b65cfe26e908b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 16 Apr 2016 18:44:31 +0200 Subject: [PATCH 004/113] FIX #5008 SQL error when editing the reference of a supplier invoice that already exists Close #5008 --- htdocs/fourn/class/fournisseur.facture.class.php | 13 +++++++++++-- htdocs/fourn/facture/card.php | 7 +++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 42418184c4f7d..a4799bc53fe2b 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry - * Copyright (C) 2014-2015 Marcos García + * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Bahfir Abbes * * This program is free software; you can redistribute it and/or modify @@ -646,7 +646,16 @@ function update($user=null, $notrigger=0) dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } + + if (!$resql) { + $error++; + + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $this->errors[] = $langs->trans('ErrorRefAlreadyExists'); + } else { + $this->errors[] = "Error ".$this->db->lasterror(); + } + } if (! $error) { diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f70ca50c902b8..d8e8cbe39e356 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -238,8 +238,11 @@ // Set supplier ref if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer) { - $result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha')); - if ($result < 0) dol_print_error($db, $object->error); + $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); + + if ($object->update() < 0) { + setEventMessage($object->error, 'errors'); + } } // conditions de reglement From 867649e9224418d384e98773824f94460cc3b312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garc=C3=ADa=20de=20La=20Fuente?= Date: Sat, 23 Apr 2016 13:36:12 +0200 Subject: [PATCH 005/113] FIX #4813 Won translation for the key OppStatusWON instead OppStatusWIN Close #4813 --- htdocs/langs/ar_SA/projects.lang | 2 +- htdocs/langs/bn_BD/projects.lang | 2 +- htdocs/langs/bs_BA/projects.lang | 2 +- htdocs/langs/ca_ES/projects.lang | 2 +- htdocs/langs/cs_CZ/projects.lang | 2 +- htdocs/langs/da_DK/projects.lang | 2 +- htdocs/langs/de_DE/projects.lang | 2 +- htdocs/langs/en_US/projects.lang | 2 +- htdocs/langs/es_ES/projects.lang | 2 +- htdocs/langs/et_EE/projects.lang | 2 +- htdocs/langs/eu_ES/projects.lang | 2 +- htdocs/langs/fi_FI/projects.lang | 2 +- htdocs/langs/fr_FR/projects.lang | 2 +- htdocs/langs/he_IL/projects.lang | 2 +- htdocs/langs/hr_HR/projects.lang | 2 +- htdocs/langs/hu_HU/projects.lang | 2 +- htdocs/langs/id_ID/projects.lang | 2 +- htdocs/langs/is_IS/projects.lang | 2 +- htdocs/langs/it_IT/projects.lang | 2 +- htdocs/langs/ka_GE/projects.lang | 2 +- htdocs/langs/kn_IN/projects.lang | 2 +- htdocs/langs/ko_KR/projects.lang | 2 +- htdocs/langs/lo_LA/projects.lang | 2 +- htdocs/langs/lt_LT/projects.lang | 2 +- htdocs/langs/lv_LV/projects.lang | 2 +- htdocs/langs/mk_MK/projects.lang | 2 +- htdocs/langs/nb_NO/projects.lang | 2 +- htdocs/langs/nl_NL/projects.lang | 2 +- htdocs/langs/pl_PL/projects.lang | 2 +- htdocs/langs/pt_BR/projects.lang | 2 +- htdocs/langs/pt_PT/projects.lang | 2 +- htdocs/langs/ro_RO/projects.lang | 2 +- htdocs/langs/ru_RU/projects.lang | 2 +- htdocs/langs/sk_SK/projects.lang | 2 +- htdocs/langs/sl_SI/projects.lang | 2 +- htdocs/langs/sq_AL/projects.lang | 2 +- htdocs/langs/sr_RS/projects.lang | 2 +- htdocs/langs/sv_SE/projects.lang | 2 +- htdocs/langs/sw_SW/projects.lang | 2 +- htdocs/langs/tr_TR/projects.lang | 2 +- htdocs/langs/uk_UA/projects.lang | 2 +- htdocs/langs/uz_UZ/projects.lang | 2 +- htdocs/langs/vi_VN/projects.lang | 2 +- htdocs/langs/zh_CN/projects.lang | 2 +- htdocs/langs/zh_TW/projects.lang | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/htdocs/langs/ar_SA/projects.lang b/htdocs/langs/ar_SA/projects.lang index bdd7967374a2a..ab322a4bd051a 100644 --- a/htdocs/langs/ar_SA/projects.lang +++ b/htdocs/langs/ar_SA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=المؤهل العلمى OppStatusPROPO=مقترح OppStatusNEGO=Negociation OppStatusPENDING=بانتظار -OppStatusWIN=فاز +OppStatusWON=فاز OppStatusLOST=ضائع Budget=Budget diff --git a/htdocs/langs/bn_BD/projects.lang b/htdocs/langs/bn_BD/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/bn_BD/projects.lang +++ b/htdocs/langs/bn_BD/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/bs_BA/projects.lang b/htdocs/langs/bs_BA/projects.lang index 0b25f6ea67a06..fdfcbd408e587 100644 --- a/htdocs/langs/bs_BA/projects.lang +++ b/htdocs/langs/bs_BA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ca_ES/projects.lang b/htdocs/langs/ca_ES/projects.lang index 5c2f18593cbb4..91c1a7cc9dbe2 100644 --- a/htdocs/langs/ca_ES/projects.lang +++ b/htdocs/langs/ca_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualificació OppStatusPROPO=Pressupost OppStatusNEGO=Negociació OppStatusPENDING=Pendent -OppStatusWIN=Guanyat +OppStatusWON=Guanyat OppStatusLOST=Perdut Budget=Budget diff --git a/htdocs/langs/cs_CZ/projects.lang b/htdocs/langs/cs_CZ/projects.lang index 14b67dbb918f5..cdc3743aee4eb 100644 --- a/htdocs/langs/cs_CZ/projects.lang +++ b/htdocs/langs/cs_CZ/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/da_DK/projects.lang b/htdocs/langs/da_DK/projects.lang index 0c7ed16673bd0..618a6e5dc47ae 100644 --- a/htdocs/langs/da_DK/projects.lang +++ b/htdocs/langs/da_DK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/de_DE/projects.lang b/htdocs/langs/de_DE/projects.lang index 15fc408019094..c1d58f6d3d6af 100644 --- a/htdocs/langs/de_DE/projects.lang +++ b/htdocs/langs/de_DE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualifikation OppStatusPROPO=Angebot OppStatusNEGO=Verhandlung OppStatusPENDING=Anstehend -OppStatusWIN=Gewonnen +OppStatusWON=Gewonnen OppStatusLOST=Verloren Budget=Budget diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 979fd4670bbb8..c68bd370f5a95 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -190,6 +190,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget \ No newline at end of file diff --git a/htdocs/langs/es_ES/projects.lang b/htdocs/langs/es_ES/projects.lang index b0965bd080cf1..3a9fd40787546 100644 --- a/htdocs/langs/es_ES/projects.lang +++ b/htdocs/langs/es_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Cualificación OppStatusPROPO=Presupuesto OppStatusNEGO=Negociación OppStatusPENDING=Pendiente -OppStatusWIN=Ganado +OppStatusWON=Ganado OppStatusLOST=Perdido Budget=Budget diff --git a/htdocs/langs/et_EE/projects.lang b/htdocs/langs/et_EE/projects.lang index 7c53e51f80d72..31f516ada1480 100644 --- a/htdocs/langs/et_EE/projects.lang +++ b/htdocs/langs/et_EE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/eu_ES/projects.lang b/htdocs/langs/eu_ES/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/eu_ES/projects.lang +++ b/htdocs/langs/eu_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/fi_FI/projects.lang b/htdocs/langs/fi_FI/projects.lang index fea93953f6919..50177fda449d3 100644 --- a/htdocs/langs/fi_FI/projects.lang +++ b/htdocs/langs/fi_FI/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index b95fbb3cd56b9..6389d10abbfdc 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposition OppStatusNEGO=Négociation OppStatusPENDING=En attente -OppStatusWIN=Gagné +OppStatusWON=Gagné OppStatusLOST=Perdu Budget=Budget diff --git a/htdocs/langs/he_IL/projects.lang b/htdocs/langs/he_IL/projects.lang index fb939aef16971..ee8785e639787 100644 --- a/htdocs/langs/he_IL/projects.lang +++ b/htdocs/langs/he_IL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/hr_HR/projects.lang b/htdocs/langs/hr_HR/projects.lang index 7dae3662584df..bd83a40224dfa 100644 --- a/htdocs/langs/hr_HR/projects.lang +++ b/htdocs/langs/hr_HR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/hu_HU/projects.lang b/htdocs/langs/hu_HU/projects.lang index 9ab8ab13b053f..20a6f143d2af6 100644 --- a/htdocs/langs/hu_HU/projects.lang +++ b/htdocs/langs/hu_HU/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/id_ID/projects.lang b/htdocs/langs/id_ID/projects.lang index 83a284cc58cf7..13798a28b3c0c 100644 --- a/htdocs/langs/id_ID/projects.lang +++ b/htdocs/langs/id_ID/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/is_IS/projects.lang b/htdocs/langs/is_IS/projects.lang index d41a345caf3b1..517ab7e2e8473 100644 --- a/htdocs/langs/is_IS/projects.lang +++ b/htdocs/langs/is_IS/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/it_IT/projects.lang b/htdocs/langs/it_IT/projects.lang index 9954fb68fd20e..8599f5089b59b 100644 --- a/htdocs/langs/it_IT/projects.lang +++ b/htdocs/langs/it_IT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualificazione OppStatusPROPO=Proposta OppStatusNEGO=Negoziazione OppStatusPENDING=In attesa -OppStatusWIN=Vinto +OppStatusWON=Vinto OppStatusLOST=Perso Budget=Budget diff --git a/htdocs/langs/ka_GE/projects.lang b/htdocs/langs/ka_GE/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/ka_GE/projects.lang +++ b/htdocs/langs/ka_GE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/kn_IN/projects.lang b/htdocs/langs/kn_IN/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/kn_IN/projects.lang +++ b/htdocs/langs/kn_IN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ko_KR/projects.lang b/htdocs/langs/ko_KR/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/ko_KR/projects.lang +++ b/htdocs/langs/ko_KR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lo_LA/projects.lang b/htdocs/langs/lo_LA/projects.lang index 56cc02c9e8279..52ca66a2763af 100644 --- a/htdocs/langs/lo_LA/projects.lang +++ b/htdocs/langs/lo_LA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lt_LT/projects.lang b/htdocs/langs/lt_LT/projects.lang index 6398f58b12977..bc9adc0ef7fe2 100644 --- a/htdocs/langs/lt_LT/projects.lang +++ b/htdocs/langs/lt_LT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lv_LV/projects.lang b/htdocs/langs/lv_LV/projects.lang index d04ece7b84f33..000139e853cf3 100644 --- a/htdocs/langs/lv_LV/projects.lang +++ b/htdocs/langs/lv_LV/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikācija OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/mk_MK/projects.lang b/htdocs/langs/mk_MK/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/mk_MK/projects.lang +++ b/htdocs/langs/mk_MK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/nb_NO/projects.lang b/htdocs/langs/nb_NO/projects.lang index c57648d77d147..c69d3c47ee4fe 100644 --- a/htdocs/langs/nb_NO/projects.lang +++ b/htdocs/langs/nb_NO/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikasjon OppStatusPROPO=Tilbud OppStatusNEGO=Forhandling OppStatusPENDING=Venter -OppStatusWIN=Vunnet +OppStatusWON=Vunnet OppStatusLOST=Tapt Budget=Budget diff --git a/htdocs/langs/nl_NL/projects.lang b/htdocs/langs/nl_NL/projects.lang index 93514bd41081c..8cf1a0d46846e 100644 --- a/htdocs/langs/nl_NL/projects.lang +++ b/htdocs/langs/nl_NL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/pl_PL/projects.lang b/htdocs/langs/pl_PL/projects.lang index 1479193a7ccc5..429a664d293b4 100644 --- a/htdocs/langs/pl_PL/projects.lang +++ b/htdocs/langs/pl_PL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kwalifikacja OppStatusPROPO=Wniosek OppStatusNEGO=Negocjacje OppStatusPENDING=W oczekiwaniu -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Zagubiony Budget=Budget diff --git a/htdocs/langs/pt_BR/projects.lang b/htdocs/langs/pt_BR/projects.lang index f8ae458330b7f..ab92118d1e4c4 100644 --- a/htdocs/langs/pt_BR/projects.lang +++ b/htdocs/langs/pt_BR/projects.lang @@ -125,5 +125,5 @@ OppStatusQUAL=Qualificação OppStatusPROPO=Proposta OppStatusNEGO=Negociação OppStatusPENDING=Pendente -OppStatusWIN=Ganhou +OppStatusWON=Ganhou OppStatusLOST=Perdido diff --git a/htdocs/langs/pt_PT/projects.lang b/htdocs/langs/pt_PT/projects.lang index c6bc715fada09..2df744a5013ab 100644 --- a/htdocs/langs/pt_PT/projects.lang +++ b/htdocs/langs/pt_PT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ro_RO/projects.lang b/htdocs/langs/ro_RO/projects.lang index 301c6242d249d..c6fc6cb74e0f2 100644 --- a/htdocs/langs/ro_RO/projects.lang +++ b/htdocs/langs/ro_RO/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Calificare OppStatusPROPO=Ofertă OppStatusNEGO=Negociere OppStatusPENDING=In asteptarea -OppStatusWIN=Castigat +OppStatusWON=Castigat OppStatusLOST=Pierdut Budget=Budget diff --git a/htdocs/langs/ru_RU/projects.lang b/htdocs/langs/ru_RU/projects.lang index 27c4995d20d58..bdee2d2d019be 100644 --- a/htdocs/langs/ru_RU/projects.lang +++ b/htdocs/langs/ru_RU/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sk_SK/projects.lang b/htdocs/langs/sk_SK/projects.lang index 6453fec2772d8..579d69f13236f 100644 --- a/htdocs/langs/sk_SK/projects.lang +++ b/htdocs/langs/sk_SK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sl_SI/projects.lang b/htdocs/langs/sl_SI/projects.lang index 81c1c01c46d84..38c773a95bb16 100644 --- a/htdocs/langs/sl_SI/projects.lang +++ b/htdocs/langs/sl_SI/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sq_AL/projects.lang b/htdocs/langs/sq_AL/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/sq_AL/projects.lang +++ b/htdocs/langs/sq_AL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sr_RS/projects.lang b/htdocs/langs/sr_RS/projects.lang index 8ba6046454e07..553b7ec80af0c 100644 --- a/htdocs/langs/sr_RS/projects.lang +++ b/htdocs/langs/sr_RS/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikacija OppStatusPROPO=Ponuda OppStatusNEGO=Pregovaranje OppStatusPENDING=Na čekanju -OppStatusWIN=Dobijeno +OppStatusWON=Dobijeno OppStatusLOST=Izgubljeno Budget=Budget diff --git a/htdocs/langs/sv_SE/projects.lang b/htdocs/langs/sv_SE/projects.lang index 77be1874eb2fb..a75da531dd30b 100644 --- a/htdocs/langs/sv_SE/projects.lang +++ b/htdocs/langs/sv_SE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sw_SW/projects.lang b/htdocs/langs/sw_SW/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/sw_SW/projects.lang +++ b/htdocs/langs/sw_SW/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/tr_TR/projects.lang b/htdocs/langs/tr_TR/projects.lang index dbdfcadfce7e4..b4a54871c5a8c 100644 --- a/htdocs/langs/tr_TR/projects.lang +++ b/htdocs/langs/tr_TR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Nitelendirme OppStatusPROPO=Teklif OppStatusNEGO=Pazarlık OppStatusPENDING=Beklemede -OppStatusWIN=Kazanç +OppStatusWON=Kazanç OppStatusLOST=Kayıp Budget=Budget diff --git a/htdocs/langs/uk_UA/projects.lang b/htdocs/langs/uk_UA/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/uk_UA/projects.lang +++ b/htdocs/langs/uk_UA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/uz_UZ/projects.lang b/htdocs/langs/uz_UZ/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/uz_UZ/projects.lang +++ b/htdocs/langs/uz_UZ/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/vi_VN/projects.lang b/htdocs/langs/vi_VN/projects.lang index 174b4a88dc1d3..7af08a9a5bcad 100644 --- a/htdocs/langs/vi_VN/projects.lang +++ b/htdocs/langs/vi_VN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/zh_CN/projects.lang b/htdocs/langs/zh_CN/projects.lang index bbd8b5cf27d80..070c15647e694 100644 --- a/htdocs/langs/zh_CN/projects.lang +++ b/htdocs/langs/zh_CN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/zh_TW/projects.lang b/htdocs/langs/zh_TW/projects.lang index 2599ab48413d6..2519f38c95425 100644 --- a/htdocs/langs/zh_TW/projects.lang +++ b/htdocs/langs/zh_TW/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget From d98e50e6615c9aef3c6eb53ec3d749c3ab21f657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garc=C3=ADa=20de=20La=20Fuente?= Date: Sat, 23 Apr 2016 13:44:43 +0200 Subject: [PATCH 006/113] Little change --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index d8e8cbe39e356..1552a1aa0be9b 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -241,7 +241,7 @@ $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); if ($object->update() < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } From 1746f8f96cd94aaa94035071476901c3b4d3e561 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Mon, 25 Apr 2016 11:25:49 +0200 Subject: [PATCH 007/113] FIX search on date into supplier invoice list dont work because of status -1 --- htdocs/fourn/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 8704e781a30fc..58a503feec90f 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -206,7 +206,7 @@ $sql .= natural_search('fac.total_ttc', $search_amount_all_tax, 1); } -if ($search_status != '') +if ($search_status != '' && $search_status>=0) { $sql.= " AND fac.fk_statut = ".$search_status; } From 2a0c508d475d7a06b9ee6526aa097d39e88dfd01 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 25 Apr 2016 11:26:13 +0200 Subject: [PATCH 008/113] FIX: end of select when no fournprice --- htdocs/core/class/html.form.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 01c6078007497..83b3c389d9728 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2160,10 +2160,10 @@ function select_product_fourn_price($productid,$htmlname='productfournpriceid') $form.= $opt; $i++; } - $form.= ''; - - $this->db->free($result); } + + $form.= ''; + $this->db->free($result); return $form; } else From bfbb1c20bcc92a383fb64e04a1248e33937e1e9c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 27 Apr 2016 09:27:59 +0200 Subject: [PATCH 009/113] FIX bug on email template --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 9af2b3fe0af04..f84e1913f1af9 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -229,7 +229,7 @@ $tabfield[22]= "code,label"; $tabfield[23]= "country_id,country,taux,accountancy_code_sell,accountancy_code_buy,note"; $tabfield[24]= "code,label"; -$tabfield[25]= "label,type_template,position,topic,content"; +$tabfield[25]= "label,type_template,private,position,topic,content"; $tabfield[26]= "code,label,short_label"; $tabfield[27]= "code,libelle"; $tabfield[28]= "code,label,delay,newByMonth,country_id,country"; @@ -261,7 +261,7 @@ $tabfieldvalue[22]= "code,label"; $tabfieldvalue[23]= "country,taux,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldvalue[24]= "code,label"; -$tabfieldvalue[25]= "label,type_template,position,topic,content"; +$tabfieldvalue[25]= "label,type_template,private,position,topic,content"; $tabfieldvalue[26]= "code,label,short_label"; $tabfieldvalue[27]= "code,libelle"; $tabfieldvalue[28]= "code,label,delay,newByMonth,country"; From 77fcbd3884f93e3131dd033179105882d6380ac6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Apr 2016 12:34:52 +0200 Subject: [PATCH 010/113] FIX: init var at wrong place report incorrect "shippable" flag on draft order. --- htdocs/commande/list.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index d26c5dea5dd0e..cfb8486be6f7c 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -429,15 +429,15 @@ // Show shippable Icon (create subloop, so may be slow) if ($conf->stock->enabled) { + $notshippable=0; + $warning = 0; + $text_info=''; + $text_warning=''; + $nbprod=0; + $langs->load("stocks"); if (($objp->fk_statut > 0) && ($objp->fk_statut < 3)) { - $notshippable=0; - $warning = 0; - $text_info=''; - $text_warning=''; - $nbprod=0; - $numlines = count($generic_commande->lines); // Loop on each line of order for ($lig=0; $lig < $numlines; $lig++) { From 0a67614e7291a80da711f034da097ea648e79a5f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 28 Apr 2016 09:10:22 +0200 Subject: [PATCH 011/113] Fix wrong qty total in ca by prod/serv report --- htdocs/compta/stats/cabyprodserv.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index e995b06aa6b89..07727b02a812d 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -177,6 +177,8 @@ // SQL request $catotal=0; +$catotal_ht=0; +$qtytotal=0; if ($modecompta == 'CREANCES-DETTES') { @@ -386,6 +388,8 @@ // Total print ''; print ''.$langs->trans("Total").''; + print ''.price($qtytotal).''; + print ' '; print ''.price($catotal_ht).''; print ''.price($catotal).''; print ' '; From 73806767171cea2b86181bba075eec3386a4eb42 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 28 Apr 2016 10:25:55 +0200 Subject: [PATCH 012/113] Fix: Not filtering correctly on supplier invoice's list --- htdocs/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/index.php b/htdocs/index.php index 7e922c7059aba..b2a130e7bcab6 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -440,7 +440,7 @@ $board->load_board($user); $board->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24; $board->label=$langs->trans("SupplierBillsToPay"); - $board->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=paye:0'; + $board->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=paye:0,fk_statut:1'; $board->img=img_object($langs->trans("Bills"),"bill"); $rowspan++; $dashboardlines[]=$board; From d599261d209b63b1013fe55b33917d3a1f434e01 Mon Sep 17 00:00:00 2001 From: fmarcet Date: Thu, 28 Apr 2016 10:38:50 +0200 Subject: [PATCH 013/113] FIX: Not filtering correctly when come from dashboard --- htdocs/fourn/facture/list.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 8704e781a30fc..ec9d15e12e868 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -81,6 +81,7 @@ $day_lim = GETPOST('day_lim','int'); $month_lim = GETPOST('month_lim','int'); $year_lim = GETPOST('year_lim','int'); +$filter = GETPOST("filtre"); if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers { @@ -210,6 +211,15 @@ { $sql.= " AND fac.fk_statut = ".$search_status; } +if ($filter && $filter != -1) +{ + $aFilter = explode(',', $filter); + foreach ($aFilter as $fil) + { + $filt = explode(':', $fil); + $sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]); + } +} $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) From e96e0f637ae50e8967493f82fae5d42749da5c31 Mon Sep 17 00:00:00 2001 From: fmarcet Date: Thu, 28 Apr 2016 10:41:37 +0200 Subject: [PATCH 014/113] FIX: Not filtering correctly when come from dashboard --- htdocs/fourn/facture/list.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index aba66991eec53..9c945f014105e 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -229,6 +229,15 @@ { $sql.= " AND fac.fk_statut = ".$search_status; } +if ($filter && $filter != -1) +{ + $aFilter = explode(',', $filter); + foreach ($aFilter as $fil) + { + $filt = explode(':', $fil); + $sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]); + } +} $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) From 608c93702d1216e255e5264e26df697a13c075d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Apr 2016 11:05:34 +0200 Subject: [PATCH 015/113] FIX Can't create a stock transfer from product card --- htdocs/product/stock/product.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 42fadf549230f..e6477fadf69b6 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -185,7 +185,7 @@ // Transfer stock from a warehouse to another warehouse if ($action == "transfert_stock" && ! $cancel) { - if (! (GETPOST("id_entrepot_source",'int') > 0) || ! (GETPOST("id_entrepot_destination",'int') > 0)) + if (! (GETPOST("id_entrepot",'int') > 0) || ! (GETPOST("id_entrepot_destination",'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $error++; @@ -197,7 +197,7 @@ $error++; $action='transfert'; } - if (GETPOST("id_entrepot_source",'int') == GETPOST("id_entrepot_destination",'int')) + if (GETPOST("id_entrepot",'int') == GETPOST("id_entrepot_destination",'int')) { setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors'); $error++; @@ -255,7 +255,7 @@ } else { - $srcwarehouseid=GETPOST('id_entrepot_source','int'); + $srcwarehouseid=GETPOST('id_entrepot','int'); $batch=GETPOST('batch_number'); $eatby=$d_eatby; $sellby=$d_sellby; @@ -292,7 +292,7 @@ // Remove stock $result1=$object->correct_stock( $user, - GETPOST("id_entrepot_source"), + GETPOST("id_entrepot"), GETPOST("nbpiece"), 1, GETPOST("label"), @@ -391,6 +391,7 @@ { $object = new Product($db); $result = $object->fetch($id,$ref); + $object->load_stock(); $help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; @@ -677,7 +678,7 @@ print ''; } -$sql = "SELECT e.rowid, e.label, e.lieu, ps.reel, ps.pmp, ps.rowid as product_stock_id"; +$sql = "SELECT e.rowid, e.label, e.lieu, ps.reel, ps.rowid as product_stock_id, p.pmp"; $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; $sql.= " ".MAIN_DB_PREFIX."product_stock as ps"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product"; @@ -703,9 +704,10 @@ $entrepotstatic->id=$obj->rowid; $entrepotstatic->libelle=$obj->label; $entrepotstatic->lieu=$obj->lieu; + $stock_real = round($obj->reel, 10); print ''; print ''.$entrepotstatic->getNomUrl(1).''; - print ''.$obj->reel.($obj->reel<0?' '.img_warning():'').''; + print ''.$stock_real.($stock_real < 0 ?' '.img_warning():'').''; // PMP print ''.(price2num($object->pmp)?price2num($object->pmp,'MU'):'').''; // Value purchase From 33499ae6525adefdbbce62140e5d9d77cacfce4d Mon Sep 17 00:00:00 2001 From: fmarcet Date: Thu, 28 Apr 2016 11:14:00 +0200 Subject: [PATCH 016/113] FIX: Compatible with multicompany --- htdocs/compta/bank/class/account.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 9747703c58fbf..7058647fae6ab 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -7,6 +7,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -986,6 +987,7 @@ public static function countAccountToReconcile() $sql = "SELECT COUNT(ba.rowid) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " WHERE ba.rappro > 0 and ba.clos = 0"; + $sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")"; if (empty($conf->global->BANK_CAN_RECONCILIATE_CASHACCOUNT)) $sql.= " AND ba.courant != 2"; $resql=$db->query($sql); if ($resql) From 44041975970c92e1bbc138f98e05023586e7f296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 28 Apr 2016 11:54:42 +0200 Subject: [PATCH 017/113] Load user personal param at login --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 41dcd6285c527..7b3d7a71db6f2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -516,7 +516,7 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type) exit; } - $resultFetchUser=$user->fetch('', $login, '', 0, ($entitytotest ? $entitytotest : -1)); + $resultFetchUser=$user->fetch('', $login, '', 1, ($entitytotest ? $entitytotest : -1)); if ($resultFetchUser <= 0) { dol_syslog('User not found, connexion refused'); From b280a700d267f5cd481f39002bafd18a023c8704 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Apr 2016 14:05:56 +0200 Subject: [PATCH 018/113] FIX missing column when module was installed before standard integration --- htdocs/install/mysql/migration/3.7.0-3.8.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index 068fbc753cbe2..89f75c1156da7 100755 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -797,6 +797,7 @@ ALTER TABLE llx_societe_remise_except MODIFY COLUMN description text NOT NULL; update llx_opensurvey_sondage set format = 'D' where format = 'D+'; update llx_opensurvey_sondage set format = 'A' where format = 'A+'; +ALTER TABLE llx_propal_merge_pdf_product ADD COLUMN lang varchar(5) DEFAULT NULL; --Deal with holidays_user that do not have rowid -- Disabled: too dangerous patch. rowid is a primary key. How is it possible to have no rowid ? From 972e5e571d15c893d6a8f86473c942aeb6e13283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 28 Apr 2016 21:52:23 +0200 Subject: [PATCH 019/113] Update card.php --- htdocs/expensereport/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 48de12a678c0e..54a67cc6ffcfa 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1625,7 +1625,7 @@ $sql.= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,'; $sql.= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref'; $sql.= ' FROM '.MAIN_DB_PREFIX.'expensereport_det as fde'; - $sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid'; $sql.= ' WHERE fde.fk_expensereport = '.$object->id; @@ -1691,7 +1691,7 @@ } print ''; } - print ''.$langs->trans("TF_".strtoupper($objp->type_fees_libelle)).''; + print ''.$langs->trans("TF_".strtoupper(empty($objp->type_fees_libelle)?'OTHER':$objp->type_fees_libelle)).''; print ''.$objp->comments.''; print ''.vatrate($objp->vatrate,true).''; print ''.price($objp->value_unit).''; From c743f6cfe5e5624fd4f42d590b2c3e0b6d05b728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 28 Apr 2016 21:56:28 +0200 Subject: [PATCH 020/113] If no project, update line is impossible --- htdocs/expensereport/class/expensereport.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 0a85f720c1312..b524850fdb4de 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1265,7 +1265,9 @@ function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " WHERE p.rowid = ".$projet_id; $result = $this->db->query($sql); - $objp_projet = $this->db->fetch_object($result); + if ($result) { + $objp_projet = $this->db->fetch_object($result); + } $ligne->projet_ref = $objp_projet->ref_projet; $ligne->projet_title = $objp_projet->title_projet; From ab63bdd235fd130ea1b664c24f1fc4ef00746a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 28 Apr 2016 22:30:22 +0200 Subject: [PATCH 021/113] keep files attached with PROV status --- .../class/expensereport.class.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 0a85f720c1312..e0be6dedea090 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -850,6 +850,7 @@ function setValidate($fuser) { global $conf,$langs; + $this->oldref = $this->ref; $expld_car = (empty($conf->global->NDF_EXPLODE_CHAR))?"-":$conf->global->NDF_EXPLODE_CHAR; // Sélection du numéro de ref suivant @@ -872,6 +873,36 @@ function setValidate($fuser) $this->ref = strtoupper($fuser->login).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d'); } + // Rename directory if dir was a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->oldref)) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + // We rename directory in order to avoid losing the attachments + $oldref = dol_sanitizeFileName($this->oldref); + $newref = dol_sanitizeFileName($this->ref); + $dirsource = $conf->expensereport->dir_output.'/'.$oldref; + $dirdest = $conf->expensereport->dir_output.'/'.$newref; + if (file_exists($dirsource)) + { + dol_syslog(get_class($this)."::valid() rename dir ".$dirsource." into ".$dirdest); + + if (@rename($dirsource, $dirdest)) + { + dol_syslog("Rename ok"); + // Rename docs starting with $oldref with $newref + $listoffiles=dol_dir_list($conf->expensereport->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref,'/')); + foreach($listoffiles as $fileentry) + { + $dirsource=$fileentry['name']; + $dirdest=preg_replace('/^'.preg_quote($oldref,'/').'/',$newref, $dirsource); + $dirsource=$fileentry['path'].'/'.$dirsource; + $dirdest=$fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } + } + } + } + if ($this->fk_statut != 2) { $now = dol_now(); From a982f764fe4bd85e6e6cf51a7ca3366a5f20bfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 29 Apr 2016 12:26:41 +0200 Subject: [PATCH 022/113] don't change ref if ref is not prov --- .../class/expensereport.class.php | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index e0be6dedea090..439e6053aff3b 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -853,10 +853,6 @@ function setValidate($fuser) $this->oldref = $this->ref; $expld_car = (empty($conf->global->NDF_EXPLODE_CHAR))?"-":$conf->global->NDF_EXPLODE_CHAR; - // Sélection du numéro de ref suivant - $ref_next = $this->getNextNumRef(); - $ref_number_int = ($this->ref+1)-1; - // Sélection de la date de début de la NDF $sql = 'SELECT date_debut'; $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element; @@ -865,17 +861,23 @@ function setValidate($fuser) $objp = $this->db->fetch_object($result); $this->date_debut = $this->db->jdate($objp->date_debut); - // Création du ref_number suivant - if($ref_next) - { - $prefix="ER"; - if (! empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix=$conf->global->EXPENSE_REPORT_PREFIX; - $this->ref = strtoupper($fuser->login).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d'); - } + $update_number_int = false; + // Create next ref if ref is PROVxx // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->oldref)) + if (preg_match('/^[\(]?PROV/i', $this->ref)) { + // Sélection du numéro de ref suivant + $ref_next = $this->getNextNumRef(); + $ref_number_int = ($this->ref+1)-1; + $update_number_int = true; + // Création du ref_number suivant + if($ref_next) + { + $prefix="ER"; + if (! empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix=$conf->global->EXPENSE_REPORT_PREFIX; + $this->ref = strtoupper($fuser->login).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d'); + } require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // We rename directory in order to avoid losing the attachments $oldref = dol_sanitizeFileName($this->oldref); @@ -906,10 +908,12 @@ function setValidate($fuser) if ($this->fk_statut != 2) { $now = dol_now(); - + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql.= " SET ref = '".$this->ref."', fk_statut = 2, fk_user_valid = ".$fuser->id.", date_valid='".$this->db->idate($now)."',"; - $sql.= " ref_number_int = ".$ref_number_int; + $sql.= " SET ref = '".$this->ref."', fk_statut = 2, fk_user_valid = ".$fuser->id.", date_valid='".$this->db->idate($now)."'"; + if ($update_number_int) { + $sql.= ", ref_number_int = ".$ref_number_int; + } $sql.= ' WHERE rowid = '.$this->id; $resql=$this->db->query($sql); From 7e8aef037a078924e787894c7f3f4f45074beb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 29 Apr 2016 13:23:06 +0200 Subject: [PATCH 023/113] Update expensereport.class.php --- htdocs/expensereport/class/expensereport.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 0a85f720c1312..0adf59f64c613 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -746,7 +746,7 @@ function fetch_lines() $sql.= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,'; $sql.= ' p.ref as ref_projet, p.title as title_projet'; $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as de'; - $sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as p ON de.fk_projet = p.rowid'; $sql.= ' WHERE de.'.$this->fk_element.' = '.$this->id; @@ -776,7 +776,7 @@ function fetch_lines() $deplig->total_tva = $objp->total_tva; $deplig->total_ttc = $objp->total_ttc; - $deplig->type_fees_code = $objp->code_type_fees; + $deplig->type_fees_code = empty($objp->code_type_fees)?'TF_OTHER':$objp->code_type_fees; $deplig->type_fees_libelle = $objp->libelle_type_fees; $deplig->tva_tx = $objp->tva_tx; $deplig->vatrate = $objp->tva_tx; From 2a27fe02eb4c6ede19605600ec9e81f585154cf6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Apr 2016 15:12:58 +0200 Subject: [PATCH 024/113] Fix detection if tag already exists --- build/makepack-dolibarr.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index fbae52f972682..a3ce6ed76bc1d 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -376,7 +376,7 @@ print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n"; $ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`; - if ($ret =~ /already exists/) + if ($ret =~ /(already exists|existe déjà)/) { print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? "; $QUESTIONOVERWRITETAG=; From 3a749462101cf852f33cb4a6d020f865b70e8e5f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Apr 2016 18:59:54 +0200 Subject: [PATCH 025/113] Revert "FIX #4813 Won translation for the key OppStatusWON instead OppStatusWIN" --- htdocs/langs/ar_SA/projects.lang | 2 +- htdocs/langs/bn_BD/projects.lang | 2 +- htdocs/langs/bs_BA/projects.lang | 2 +- htdocs/langs/ca_ES/projects.lang | 2 +- htdocs/langs/cs_CZ/projects.lang | 2 +- htdocs/langs/da_DK/projects.lang | 2 +- htdocs/langs/de_DE/projects.lang | 2 +- htdocs/langs/en_US/projects.lang | 2 +- htdocs/langs/es_ES/projects.lang | 2 +- htdocs/langs/et_EE/projects.lang | 2 +- htdocs/langs/eu_ES/projects.lang | 2 +- htdocs/langs/fi_FI/projects.lang | 2 +- htdocs/langs/fr_FR/projects.lang | 2 +- htdocs/langs/he_IL/projects.lang | 2 +- htdocs/langs/hr_HR/projects.lang | 2 +- htdocs/langs/hu_HU/projects.lang | 2 +- htdocs/langs/id_ID/projects.lang | 2 +- htdocs/langs/is_IS/projects.lang | 2 +- htdocs/langs/it_IT/projects.lang | 2 +- htdocs/langs/ka_GE/projects.lang | 2 +- htdocs/langs/kn_IN/projects.lang | 2 +- htdocs/langs/ko_KR/projects.lang | 2 +- htdocs/langs/lo_LA/projects.lang | 2 +- htdocs/langs/lt_LT/projects.lang | 2 +- htdocs/langs/lv_LV/projects.lang | 2 +- htdocs/langs/mk_MK/projects.lang | 2 +- htdocs/langs/nb_NO/projects.lang | 2 +- htdocs/langs/nl_NL/projects.lang | 2 +- htdocs/langs/pl_PL/projects.lang | 2 +- htdocs/langs/pt_BR/projects.lang | 2 +- htdocs/langs/pt_PT/projects.lang | 2 +- htdocs/langs/ro_RO/projects.lang | 2 +- htdocs/langs/ru_RU/projects.lang | 2 +- htdocs/langs/sk_SK/projects.lang | 2 +- htdocs/langs/sl_SI/projects.lang | 2 +- htdocs/langs/sq_AL/projects.lang | 2 +- htdocs/langs/sr_RS/projects.lang | 2 +- htdocs/langs/sv_SE/projects.lang | 2 +- htdocs/langs/sw_SW/projects.lang | 2 +- htdocs/langs/tr_TR/projects.lang | 2 +- htdocs/langs/uk_UA/projects.lang | 2 +- htdocs/langs/uz_UZ/projects.lang | 2 +- htdocs/langs/vi_VN/projects.lang | 2 +- htdocs/langs/zh_CN/projects.lang | 2 +- htdocs/langs/zh_TW/projects.lang | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/htdocs/langs/ar_SA/projects.lang b/htdocs/langs/ar_SA/projects.lang index ab322a4bd051a..bdd7967374a2a 100644 --- a/htdocs/langs/ar_SA/projects.lang +++ b/htdocs/langs/ar_SA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=المؤهل العلمى OppStatusPROPO=مقترح OppStatusNEGO=Negociation OppStatusPENDING=بانتظار -OppStatusWON=فاز +OppStatusWIN=فاز OppStatusLOST=ضائع Budget=Budget diff --git a/htdocs/langs/bn_BD/projects.lang b/htdocs/langs/bn_BD/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/bn_BD/projects.lang +++ b/htdocs/langs/bn_BD/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/bs_BA/projects.lang b/htdocs/langs/bs_BA/projects.lang index fdfcbd408e587..0b25f6ea67a06 100644 --- a/htdocs/langs/bs_BA/projects.lang +++ b/htdocs/langs/bs_BA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ca_ES/projects.lang b/htdocs/langs/ca_ES/projects.lang index 91c1a7cc9dbe2..5c2f18593cbb4 100644 --- a/htdocs/langs/ca_ES/projects.lang +++ b/htdocs/langs/ca_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualificació OppStatusPROPO=Pressupost OppStatusNEGO=Negociació OppStatusPENDING=Pendent -OppStatusWON=Guanyat +OppStatusWIN=Guanyat OppStatusLOST=Perdut Budget=Budget diff --git a/htdocs/langs/cs_CZ/projects.lang b/htdocs/langs/cs_CZ/projects.lang index cdc3743aee4eb..14b67dbb918f5 100644 --- a/htdocs/langs/cs_CZ/projects.lang +++ b/htdocs/langs/cs_CZ/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/da_DK/projects.lang b/htdocs/langs/da_DK/projects.lang index 618a6e5dc47ae..0c7ed16673bd0 100644 --- a/htdocs/langs/da_DK/projects.lang +++ b/htdocs/langs/da_DK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/de_DE/projects.lang b/htdocs/langs/de_DE/projects.lang index c1d58f6d3d6af..15fc408019094 100644 --- a/htdocs/langs/de_DE/projects.lang +++ b/htdocs/langs/de_DE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualifikation OppStatusPROPO=Angebot OppStatusNEGO=Verhandlung OppStatusPENDING=Anstehend -OppStatusWON=Gewonnen +OppStatusWIN=Gewonnen OppStatusLOST=Verloren Budget=Budget diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index c68bd370f5a95..979fd4670bbb8 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -190,6 +190,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget \ No newline at end of file diff --git a/htdocs/langs/es_ES/projects.lang b/htdocs/langs/es_ES/projects.lang index 3a9fd40787546..b0965bd080cf1 100644 --- a/htdocs/langs/es_ES/projects.lang +++ b/htdocs/langs/es_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Cualificación OppStatusPROPO=Presupuesto OppStatusNEGO=Negociación OppStatusPENDING=Pendiente -OppStatusWON=Ganado +OppStatusWIN=Ganado OppStatusLOST=Perdido Budget=Budget diff --git a/htdocs/langs/et_EE/projects.lang b/htdocs/langs/et_EE/projects.lang index 31f516ada1480..7c53e51f80d72 100644 --- a/htdocs/langs/et_EE/projects.lang +++ b/htdocs/langs/et_EE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/eu_ES/projects.lang b/htdocs/langs/eu_ES/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/eu_ES/projects.lang +++ b/htdocs/langs/eu_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/fi_FI/projects.lang b/htdocs/langs/fi_FI/projects.lang index 50177fda449d3..fea93953f6919 100644 --- a/htdocs/langs/fi_FI/projects.lang +++ b/htdocs/langs/fi_FI/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 6389d10abbfdc..b95fbb3cd56b9 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposition OppStatusNEGO=Négociation OppStatusPENDING=En attente -OppStatusWON=Gagné +OppStatusWIN=Gagné OppStatusLOST=Perdu Budget=Budget diff --git a/htdocs/langs/he_IL/projects.lang b/htdocs/langs/he_IL/projects.lang index ee8785e639787..fb939aef16971 100644 --- a/htdocs/langs/he_IL/projects.lang +++ b/htdocs/langs/he_IL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/hr_HR/projects.lang b/htdocs/langs/hr_HR/projects.lang index bd83a40224dfa..7dae3662584df 100644 --- a/htdocs/langs/hr_HR/projects.lang +++ b/htdocs/langs/hr_HR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/hu_HU/projects.lang b/htdocs/langs/hu_HU/projects.lang index 20a6f143d2af6..9ab8ab13b053f 100644 --- a/htdocs/langs/hu_HU/projects.lang +++ b/htdocs/langs/hu_HU/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/id_ID/projects.lang b/htdocs/langs/id_ID/projects.lang index 13798a28b3c0c..83a284cc58cf7 100644 --- a/htdocs/langs/id_ID/projects.lang +++ b/htdocs/langs/id_ID/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/is_IS/projects.lang b/htdocs/langs/is_IS/projects.lang index 517ab7e2e8473..d41a345caf3b1 100644 --- a/htdocs/langs/is_IS/projects.lang +++ b/htdocs/langs/is_IS/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/it_IT/projects.lang b/htdocs/langs/it_IT/projects.lang index 8599f5089b59b..9954fb68fd20e 100644 --- a/htdocs/langs/it_IT/projects.lang +++ b/htdocs/langs/it_IT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualificazione OppStatusPROPO=Proposta OppStatusNEGO=Negoziazione OppStatusPENDING=In attesa -OppStatusWON=Vinto +OppStatusWIN=Vinto OppStatusLOST=Perso Budget=Budget diff --git a/htdocs/langs/ka_GE/projects.lang b/htdocs/langs/ka_GE/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/ka_GE/projects.lang +++ b/htdocs/langs/ka_GE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/kn_IN/projects.lang b/htdocs/langs/kn_IN/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/kn_IN/projects.lang +++ b/htdocs/langs/kn_IN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ko_KR/projects.lang b/htdocs/langs/ko_KR/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/ko_KR/projects.lang +++ b/htdocs/langs/ko_KR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lo_LA/projects.lang b/htdocs/langs/lo_LA/projects.lang index 52ca66a2763af..56cc02c9e8279 100644 --- a/htdocs/langs/lo_LA/projects.lang +++ b/htdocs/langs/lo_LA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lt_LT/projects.lang b/htdocs/langs/lt_LT/projects.lang index bc9adc0ef7fe2..6398f58b12977 100644 --- a/htdocs/langs/lt_LT/projects.lang +++ b/htdocs/langs/lt_LT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lv_LV/projects.lang b/htdocs/langs/lv_LV/projects.lang index 000139e853cf3..d04ece7b84f33 100644 --- a/htdocs/langs/lv_LV/projects.lang +++ b/htdocs/langs/lv_LV/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikācija OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/mk_MK/projects.lang b/htdocs/langs/mk_MK/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/mk_MK/projects.lang +++ b/htdocs/langs/mk_MK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/nb_NO/projects.lang b/htdocs/langs/nb_NO/projects.lang index c69d3c47ee4fe..c57648d77d147 100644 --- a/htdocs/langs/nb_NO/projects.lang +++ b/htdocs/langs/nb_NO/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikasjon OppStatusPROPO=Tilbud OppStatusNEGO=Forhandling OppStatusPENDING=Venter -OppStatusWON=Vunnet +OppStatusWIN=Vunnet OppStatusLOST=Tapt Budget=Budget diff --git a/htdocs/langs/nl_NL/projects.lang b/htdocs/langs/nl_NL/projects.lang index 8cf1a0d46846e..93514bd41081c 100644 --- a/htdocs/langs/nl_NL/projects.lang +++ b/htdocs/langs/nl_NL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/pl_PL/projects.lang b/htdocs/langs/pl_PL/projects.lang index 429a664d293b4..1479193a7ccc5 100644 --- a/htdocs/langs/pl_PL/projects.lang +++ b/htdocs/langs/pl_PL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kwalifikacja OppStatusPROPO=Wniosek OppStatusNEGO=Negocjacje OppStatusPENDING=W oczekiwaniu -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Zagubiony Budget=Budget diff --git a/htdocs/langs/pt_BR/projects.lang b/htdocs/langs/pt_BR/projects.lang index ab92118d1e4c4..f8ae458330b7f 100644 --- a/htdocs/langs/pt_BR/projects.lang +++ b/htdocs/langs/pt_BR/projects.lang @@ -125,5 +125,5 @@ OppStatusQUAL=Qualificação OppStatusPROPO=Proposta OppStatusNEGO=Negociação OppStatusPENDING=Pendente -OppStatusWON=Ganhou +OppStatusWIN=Ganhou OppStatusLOST=Perdido diff --git a/htdocs/langs/pt_PT/projects.lang b/htdocs/langs/pt_PT/projects.lang index 2df744a5013ab..c6bc715fada09 100644 --- a/htdocs/langs/pt_PT/projects.lang +++ b/htdocs/langs/pt_PT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ro_RO/projects.lang b/htdocs/langs/ro_RO/projects.lang index c6fc6cb74e0f2..301c6242d249d 100644 --- a/htdocs/langs/ro_RO/projects.lang +++ b/htdocs/langs/ro_RO/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Calificare OppStatusPROPO=Ofertă OppStatusNEGO=Negociere OppStatusPENDING=In asteptarea -OppStatusWON=Castigat +OppStatusWIN=Castigat OppStatusLOST=Pierdut Budget=Budget diff --git a/htdocs/langs/ru_RU/projects.lang b/htdocs/langs/ru_RU/projects.lang index bdee2d2d019be..27c4995d20d58 100644 --- a/htdocs/langs/ru_RU/projects.lang +++ b/htdocs/langs/ru_RU/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sk_SK/projects.lang b/htdocs/langs/sk_SK/projects.lang index 579d69f13236f..6453fec2772d8 100644 --- a/htdocs/langs/sk_SK/projects.lang +++ b/htdocs/langs/sk_SK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sl_SI/projects.lang b/htdocs/langs/sl_SI/projects.lang index 38c773a95bb16..81c1c01c46d84 100644 --- a/htdocs/langs/sl_SI/projects.lang +++ b/htdocs/langs/sl_SI/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sq_AL/projects.lang b/htdocs/langs/sq_AL/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/sq_AL/projects.lang +++ b/htdocs/langs/sq_AL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sr_RS/projects.lang b/htdocs/langs/sr_RS/projects.lang index 553b7ec80af0c..8ba6046454e07 100644 --- a/htdocs/langs/sr_RS/projects.lang +++ b/htdocs/langs/sr_RS/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikacija OppStatusPROPO=Ponuda OppStatusNEGO=Pregovaranje OppStatusPENDING=Na čekanju -OppStatusWON=Dobijeno +OppStatusWIN=Dobijeno OppStatusLOST=Izgubljeno Budget=Budget diff --git a/htdocs/langs/sv_SE/projects.lang b/htdocs/langs/sv_SE/projects.lang index a75da531dd30b..77be1874eb2fb 100644 --- a/htdocs/langs/sv_SE/projects.lang +++ b/htdocs/langs/sv_SE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sw_SW/projects.lang b/htdocs/langs/sw_SW/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/sw_SW/projects.lang +++ b/htdocs/langs/sw_SW/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/tr_TR/projects.lang b/htdocs/langs/tr_TR/projects.lang index b4a54871c5a8c..dbdfcadfce7e4 100644 --- a/htdocs/langs/tr_TR/projects.lang +++ b/htdocs/langs/tr_TR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Nitelendirme OppStatusPROPO=Teklif OppStatusNEGO=Pazarlık OppStatusPENDING=Beklemede -OppStatusWON=Kazanç +OppStatusWIN=Kazanç OppStatusLOST=Kayıp Budget=Budget diff --git a/htdocs/langs/uk_UA/projects.lang b/htdocs/langs/uk_UA/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/uk_UA/projects.lang +++ b/htdocs/langs/uk_UA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/uz_UZ/projects.lang b/htdocs/langs/uz_UZ/projects.lang index 982ec36b26b0b..b4a21befd803b 100644 --- a/htdocs/langs/uz_UZ/projects.lang +++ b/htdocs/langs/uz_UZ/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/vi_VN/projects.lang b/htdocs/langs/vi_VN/projects.lang index 7af08a9a5bcad..174b4a88dc1d3 100644 --- a/htdocs/langs/vi_VN/projects.lang +++ b/htdocs/langs/vi_VN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/zh_CN/projects.lang b/htdocs/langs/zh_CN/projects.lang index 070c15647e694..bbd8b5cf27d80 100644 --- a/htdocs/langs/zh_CN/projects.lang +++ b/htdocs/langs/zh_CN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/zh_TW/projects.lang b/htdocs/langs/zh_TW/projects.lang index 2519f38c95425..2599ab48413d6 100644 --- a/htdocs/langs/zh_TW/projects.lang +++ b/htdocs/langs/zh_TW/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWON=Won +OppStatusWIN=Won OppStatusLOST=Lost Budget=Budget From 0ed998af035789a5e2ffb0de117e48fc726329e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Apr 2016 19:01:38 +0200 Subject: [PATCH 026/113] Revert "Revert "FIX #4813 Won translation for the key OppStatusWON instead OppStatusWIN"" --- htdocs/langs/ar_SA/projects.lang | 2 +- htdocs/langs/bn_BD/projects.lang | 2 +- htdocs/langs/bs_BA/projects.lang | 2 +- htdocs/langs/ca_ES/projects.lang | 2 +- htdocs/langs/cs_CZ/projects.lang | 2 +- htdocs/langs/da_DK/projects.lang | 2 +- htdocs/langs/de_DE/projects.lang | 2 +- htdocs/langs/en_US/projects.lang | 2 +- htdocs/langs/es_ES/projects.lang | 2 +- htdocs/langs/et_EE/projects.lang | 2 +- htdocs/langs/eu_ES/projects.lang | 2 +- htdocs/langs/fi_FI/projects.lang | 2 +- htdocs/langs/fr_FR/projects.lang | 2 +- htdocs/langs/he_IL/projects.lang | 2 +- htdocs/langs/hr_HR/projects.lang | 2 +- htdocs/langs/hu_HU/projects.lang | 2 +- htdocs/langs/id_ID/projects.lang | 2 +- htdocs/langs/is_IS/projects.lang | 2 +- htdocs/langs/it_IT/projects.lang | 2 +- htdocs/langs/ka_GE/projects.lang | 2 +- htdocs/langs/kn_IN/projects.lang | 2 +- htdocs/langs/ko_KR/projects.lang | 2 +- htdocs/langs/lo_LA/projects.lang | 2 +- htdocs/langs/lt_LT/projects.lang | 2 +- htdocs/langs/lv_LV/projects.lang | 2 +- htdocs/langs/mk_MK/projects.lang | 2 +- htdocs/langs/nb_NO/projects.lang | 2 +- htdocs/langs/nl_NL/projects.lang | 2 +- htdocs/langs/pl_PL/projects.lang | 2 +- htdocs/langs/pt_BR/projects.lang | 2 +- htdocs/langs/pt_PT/projects.lang | 2 +- htdocs/langs/ro_RO/projects.lang | 2 +- htdocs/langs/ru_RU/projects.lang | 2 +- htdocs/langs/sk_SK/projects.lang | 2 +- htdocs/langs/sl_SI/projects.lang | 2 +- htdocs/langs/sq_AL/projects.lang | 2 +- htdocs/langs/sr_RS/projects.lang | 2 +- htdocs/langs/sv_SE/projects.lang | 2 +- htdocs/langs/sw_SW/projects.lang | 2 +- htdocs/langs/tr_TR/projects.lang | 2 +- htdocs/langs/uk_UA/projects.lang | 2 +- htdocs/langs/uz_UZ/projects.lang | 2 +- htdocs/langs/vi_VN/projects.lang | 2 +- htdocs/langs/zh_CN/projects.lang | 2 +- htdocs/langs/zh_TW/projects.lang | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/htdocs/langs/ar_SA/projects.lang b/htdocs/langs/ar_SA/projects.lang index bdd7967374a2a..ab322a4bd051a 100644 --- a/htdocs/langs/ar_SA/projects.lang +++ b/htdocs/langs/ar_SA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=المؤهل العلمى OppStatusPROPO=مقترح OppStatusNEGO=Negociation OppStatusPENDING=بانتظار -OppStatusWIN=فاز +OppStatusWON=فاز OppStatusLOST=ضائع Budget=Budget diff --git a/htdocs/langs/bn_BD/projects.lang b/htdocs/langs/bn_BD/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/bn_BD/projects.lang +++ b/htdocs/langs/bn_BD/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/bs_BA/projects.lang b/htdocs/langs/bs_BA/projects.lang index 0b25f6ea67a06..fdfcbd408e587 100644 --- a/htdocs/langs/bs_BA/projects.lang +++ b/htdocs/langs/bs_BA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ca_ES/projects.lang b/htdocs/langs/ca_ES/projects.lang index 5c2f18593cbb4..91c1a7cc9dbe2 100644 --- a/htdocs/langs/ca_ES/projects.lang +++ b/htdocs/langs/ca_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualificació OppStatusPROPO=Pressupost OppStatusNEGO=Negociació OppStatusPENDING=Pendent -OppStatusWIN=Guanyat +OppStatusWON=Guanyat OppStatusLOST=Perdut Budget=Budget diff --git a/htdocs/langs/cs_CZ/projects.lang b/htdocs/langs/cs_CZ/projects.lang index 14b67dbb918f5..cdc3743aee4eb 100644 --- a/htdocs/langs/cs_CZ/projects.lang +++ b/htdocs/langs/cs_CZ/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/da_DK/projects.lang b/htdocs/langs/da_DK/projects.lang index 0c7ed16673bd0..618a6e5dc47ae 100644 --- a/htdocs/langs/da_DK/projects.lang +++ b/htdocs/langs/da_DK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/de_DE/projects.lang b/htdocs/langs/de_DE/projects.lang index 15fc408019094..c1d58f6d3d6af 100644 --- a/htdocs/langs/de_DE/projects.lang +++ b/htdocs/langs/de_DE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualifikation OppStatusPROPO=Angebot OppStatusNEGO=Verhandlung OppStatusPENDING=Anstehend -OppStatusWIN=Gewonnen +OppStatusWON=Gewonnen OppStatusLOST=Verloren Budget=Budget diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 979fd4670bbb8..c68bd370f5a95 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -190,6 +190,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget \ No newline at end of file diff --git a/htdocs/langs/es_ES/projects.lang b/htdocs/langs/es_ES/projects.lang index b0965bd080cf1..3a9fd40787546 100644 --- a/htdocs/langs/es_ES/projects.lang +++ b/htdocs/langs/es_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Cualificación OppStatusPROPO=Presupuesto OppStatusNEGO=Negociación OppStatusPENDING=Pendiente -OppStatusWIN=Ganado +OppStatusWON=Ganado OppStatusLOST=Perdido Budget=Budget diff --git a/htdocs/langs/et_EE/projects.lang b/htdocs/langs/et_EE/projects.lang index 7c53e51f80d72..31f516ada1480 100644 --- a/htdocs/langs/et_EE/projects.lang +++ b/htdocs/langs/et_EE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/eu_ES/projects.lang b/htdocs/langs/eu_ES/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/eu_ES/projects.lang +++ b/htdocs/langs/eu_ES/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/fi_FI/projects.lang b/htdocs/langs/fi_FI/projects.lang index fea93953f6919..50177fda449d3 100644 --- a/htdocs/langs/fi_FI/projects.lang +++ b/htdocs/langs/fi_FI/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index b95fbb3cd56b9..6389d10abbfdc 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposition OppStatusNEGO=Négociation OppStatusPENDING=En attente -OppStatusWIN=Gagné +OppStatusWON=Gagné OppStatusLOST=Perdu Budget=Budget diff --git a/htdocs/langs/he_IL/projects.lang b/htdocs/langs/he_IL/projects.lang index fb939aef16971..ee8785e639787 100644 --- a/htdocs/langs/he_IL/projects.lang +++ b/htdocs/langs/he_IL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/hr_HR/projects.lang b/htdocs/langs/hr_HR/projects.lang index 7dae3662584df..bd83a40224dfa 100644 --- a/htdocs/langs/hr_HR/projects.lang +++ b/htdocs/langs/hr_HR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/hu_HU/projects.lang b/htdocs/langs/hu_HU/projects.lang index 9ab8ab13b053f..20a6f143d2af6 100644 --- a/htdocs/langs/hu_HU/projects.lang +++ b/htdocs/langs/hu_HU/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/id_ID/projects.lang b/htdocs/langs/id_ID/projects.lang index 83a284cc58cf7..13798a28b3c0c 100644 --- a/htdocs/langs/id_ID/projects.lang +++ b/htdocs/langs/id_ID/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/is_IS/projects.lang b/htdocs/langs/is_IS/projects.lang index d41a345caf3b1..517ab7e2e8473 100644 --- a/htdocs/langs/is_IS/projects.lang +++ b/htdocs/langs/is_IS/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/it_IT/projects.lang b/htdocs/langs/it_IT/projects.lang index 9954fb68fd20e..8599f5089b59b 100644 --- a/htdocs/langs/it_IT/projects.lang +++ b/htdocs/langs/it_IT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualificazione OppStatusPROPO=Proposta OppStatusNEGO=Negoziazione OppStatusPENDING=In attesa -OppStatusWIN=Vinto +OppStatusWON=Vinto OppStatusLOST=Perso Budget=Budget diff --git a/htdocs/langs/ka_GE/projects.lang b/htdocs/langs/ka_GE/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/ka_GE/projects.lang +++ b/htdocs/langs/ka_GE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/kn_IN/projects.lang b/htdocs/langs/kn_IN/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/kn_IN/projects.lang +++ b/htdocs/langs/kn_IN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ko_KR/projects.lang b/htdocs/langs/ko_KR/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/ko_KR/projects.lang +++ b/htdocs/langs/ko_KR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lo_LA/projects.lang b/htdocs/langs/lo_LA/projects.lang index 56cc02c9e8279..52ca66a2763af 100644 --- a/htdocs/langs/lo_LA/projects.lang +++ b/htdocs/langs/lo_LA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lt_LT/projects.lang b/htdocs/langs/lt_LT/projects.lang index 6398f58b12977..bc9adc0ef7fe2 100644 --- a/htdocs/langs/lt_LT/projects.lang +++ b/htdocs/langs/lt_LT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/lv_LV/projects.lang b/htdocs/langs/lv_LV/projects.lang index d04ece7b84f33..000139e853cf3 100644 --- a/htdocs/langs/lv_LV/projects.lang +++ b/htdocs/langs/lv_LV/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikācija OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/mk_MK/projects.lang b/htdocs/langs/mk_MK/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/mk_MK/projects.lang +++ b/htdocs/langs/mk_MK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/nb_NO/projects.lang b/htdocs/langs/nb_NO/projects.lang index c57648d77d147..c69d3c47ee4fe 100644 --- a/htdocs/langs/nb_NO/projects.lang +++ b/htdocs/langs/nb_NO/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikasjon OppStatusPROPO=Tilbud OppStatusNEGO=Forhandling OppStatusPENDING=Venter -OppStatusWIN=Vunnet +OppStatusWON=Vunnet OppStatusLOST=Tapt Budget=Budget diff --git a/htdocs/langs/nl_NL/projects.lang b/htdocs/langs/nl_NL/projects.lang index 93514bd41081c..8cf1a0d46846e 100644 --- a/htdocs/langs/nl_NL/projects.lang +++ b/htdocs/langs/nl_NL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/pl_PL/projects.lang b/htdocs/langs/pl_PL/projects.lang index 1479193a7ccc5..429a664d293b4 100644 --- a/htdocs/langs/pl_PL/projects.lang +++ b/htdocs/langs/pl_PL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kwalifikacja OppStatusPROPO=Wniosek OppStatusNEGO=Negocjacje OppStatusPENDING=W oczekiwaniu -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Zagubiony Budget=Budget diff --git a/htdocs/langs/pt_BR/projects.lang b/htdocs/langs/pt_BR/projects.lang index f8ae458330b7f..ab92118d1e4c4 100644 --- a/htdocs/langs/pt_BR/projects.lang +++ b/htdocs/langs/pt_BR/projects.lang @@ -125,5 +125,5 @@ OppStatusQUAL=Qualificação OppStatusPROPO=Proposta OppStatusNEGO=Negociação OppStatusPENDING=Pendente -OppStatusWIN=Ganhou +OppStatusWON=Ganhou OppStatusLOST=Perdido diff --git a/htdocs/langs/pt_PT/projects.lang b/htdocs/langs/pt_PT/projects.lang index c6bc715fada09..2df744a5013ab 100644 --- a/htdocs/langs/pt_PT/projects.lang +++ b/htdocs/langs/pt_PT/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/ro_RO/projects.lang b/htdocs/langs/ro_RO/projects.lang index 301c6242d249d..c6fc6cb74e0f2 100644 --- a/htdocs/langs/ro_RO/projects.lang +++ b/htdocs/langs/ro_RO/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Calificare OppStatusPROPO=Ofertă OppStatusNEGO=Negociere OppStatusPENDING=In asteptarea -OppStatusWIN=Castigat +OppStatusWON=Castigat OppStatusLOST=Pierdut Budget=Budget diff --git a/htdocs/langs/ru_RU/projects.lang b/htdocs/langs/ru_RU/projects.lang index 27c4995d20d58..bdee2d2d019be 100644 --- a/htdocs/langs/ru_RU/projects.lang +++ b/htdocs/langs/ru_RU/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sk_SK/projects.lang b/htdocs/langs/sk_SK/projects.lang index 6453fec2772d8..579d69f13236f 100644 --- a/htdocs/langs/sk_SK/projects.lang +++ b/htdocs/langs/sk_SK/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sl_SI/projects.lang b/htdocs/langs/sl_SI/projects.lang index 81c1c01c46d84..38c773a95bb16 100644 --- a/htdocs/langs/sl_SI/projects.lang +++ b/htdocs/langs/sl_SI/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sq_AL/projects.lang b/htdocs/langs/sq_AL/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/sq_AL/projects.lang +++ b/htdocs/langs/sq_AL/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sr_RS/projects.lang b/htdocs/langs/sr_RS/projects.lang index 8ba6046454e07..553b7ec80af0c 100644 --- a/htdocs/langs/sr_RS/projects.lang +++ b/htdocs/langs/sr_RS/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikacija OppStatusPROPO=Ponuda OppStatusNEGO=Pregovaranje OppStatusPENDING=Na čekanju -OppStatusWIN=Dobijeno +OppStatusWON=Dobijeno OppStatusLOST=Izgubljeno Budget=Budget diff --git a/htdocs/langs/sv_SE/projects.lang b/htdocs/langs/sv_SE/projects.lang index 77be1874eb2fb..a75da531dd30b 100644 --- a/htdocs/langs/sv_SE/projects.lang +++ b/htdocs/langs/sv_SE/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/sw_SW/projects.lang b/htdocs/langs/sw_SW/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/sw_SW/projects.lang +++ b/htdocs/langs/sw_SW/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/tr_TR/projects.lang b/htdocs/langs/tr_TR/projects.lang index dbdfcadfce7e4..b4a54871c5a8c 100644 --- a/htdocs/langs/tr_TR/projects.lang +++ b/htdocs/langs/tr_TR/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Nitelendirme OppStatusPROPO=Teklif OppStatusNEGO=Pazarlık OppStatusPENDING=Beklemede -OppStatusWIN=Kazanç +OppStatusWON=Kazanç OppStatusLOST=Kayıp Budget=Budget diff --git a/htdocs/langs/uk_UA/projects.lang b/htdocs/langs/uk_UA/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/uk_UA/projects.lang +++ b/htdocs/langs/uk_UA/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/uz_UZ/projects.lang b/htdocs/langs/uz_UZ/projects.lang index b4a21befd803b..982ec36b26b0b 100644 --- a/htdocs/langs/uz_UZ/projects.lang +++ b/htdocs/langs/uz_UZ/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/vi_VN/projects.lang b/htdocs/langs/vi_VN/projects.lang index 174b4a88dc1d3..7af08a9a5bcad 100644 --- a/htdocs/langs/vi_VN/projects.lang +++ b/htdocs/langs/vi_VN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/zh_CN/projects.lang b/htdocs/langs/zh_CN/projects.lang index bbd8b5cf27d80..070c15647e694 100644 --- a/htdocs/langs/zh_CN/projects.lang +++ b/htdocs/langs/zh_CN/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget diff --git a/htdocs/langs/zh_TW/projects.lang b/htdocs/langs/zh_TW/projects.lang index 2599ab48413d6..2519f38c95425 100644 --- a/htdocs/langs/zh_TW/projects.lang +++ b/htdocs/langs/zh_TW/projects.lang @@ -199,6 +199,6 @@ OppStatusQUAL=Qualification OppStatusPROPO=Proposal OppStatusNEGO=Negociation OppStatusPENDING=Pending -OppStatusWIN=Won +OppStatusWON=Won OppStatusLOST=Lost Budget=Budget From f5a541d4697892e47c6b981cbbd667874b7b2929 Mon Sep 17 00:00:00 2001 From: esprit libre Date: Wed, 27 Apr 2016 16:42:59 +0200 Subject: [PATCH 027/113] Fix problem about unit buy price fetching To fix a bug encountered at customer shop about margin calculation. In some case, returned buy price is total buy price from provider and not unit buy price. Case opened on forum: http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/55467-calcul-des-marges --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 716a462f440df..c314011874552 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4246,7 +4246,7 @@ public function defineBuyPrice($unitPrice = 0, $discountPercent = 0, $fk_product $productFournisseur = new ProductFournisseur($this->db); if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0) { - $buyPrice = $productFournisseur->fourn_price; + $buyPrice = $productFournisseur->fourn_unitprice; } else if ($result < 0) { From 31a9acc77d86ad8f016f63d6674cabf15ca72d49 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 23 Apr 2016 20:17:45 +0200 Subject: [PATCH 028/113] not present in some select list --- htdocs/core/class/html.formother.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 078dc01d96fa6..d5ce5679dd3c8 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -805,6 +805,7 @@ function select_dayofweek($selected='',$htmlname='weekid',$useempty=0) $select_week .= ''; } $select_week .= ''; return $select_week; @@ -844,6 +845,7 @@ function select_month($selected='',$htmlname='monthid',$useempty=0,$longlabel=0) $select_month .= ''; } $select_month .= ''; return $select_month; From 49c3c69e3045a2546e961c6b8e02606d8400c837 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sun, 24 Apr 2016 02:01:29 +0200 Subject: [PATCH 029/113] minor error code --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1939299cf635a..e5a70708c8d51 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3687,7 +3687,7 @@ function show_photos($sdir,$size=0,$nbmax=0,$nbbyrow=5,$showfilename=0,$showacti } } - if ($size==1 || $size='small') + if ($size==1 || $size=='small') { if ($nbbyrow > 0) { From 755b99475058b9663c1476be42f195e7ff07cad2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Apr 2016 20:40:00 +0200 Subject: [PATCH 030/113] Prepare 3.9.2 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index db8a586991410..59c489a957ac8 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.1'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.2'); if (! defined('EURO')) define('EURO',chr(128)); From 3cf1d891abf936e2f710080b4a71df1b8bd86c6d Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 30 Apr 2016 07:05:10 +0200 Subject: [PATCH 031/113] FIX: Accountancy - 3.9 - Chart of accounts are limited on only one country --- htdocs/accountancy/admin/index.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 03cb46adf0d6c..92b3ec7adc007 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2015 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -202,10 +202,9 @@ print ""; print ''; -$sql = "SELECT rowid, pcg_version, fk_pays, label, active"; +$sql = "SELECT rowid, pcg_version, label, active"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system"; $sql .= " WHERE active = 1"; -$sql .= " AND fk_pays = " . $mysoc->country_id; dol_syslog('accountancy/admin/index.php:: $sql=' . $sql); $resql = $db->query($sql); @@ -227,7 +226,7 @@ print ''; + print '>' . $row[1] . ' - ' . $row[2] . ''; $i ++; } From 7998cefdd216cf91ffe820515207dedc64ad56c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 May 2016 13:15:00 +0200 Subject: [PATCH 033/113] Fix mark a deprecated function as deprecated --- htdocs/product/class/product.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e5a70708c8d51..2b109af5e68a9 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2948,9 +2948,9 @@ function getFather() /** * Return all direct parent products fo current product - * + * * @return array prod - * @see getFather + * @deprecated See getFather */ function getParent() { @@ -3036,7 +3036,9 @@ function getChildsArbo($id, $firstlevelonly=0) */ function get_sousproduits_arbo() { - $parent = $this->getParent(); + //$parent = $this->getParent(); + $parent[$this->label]=array(0 => $this->id); + foreach($parent as $key => $value) // key=label, value[0]=id { foreach($this->getChildsArbo($value[0]) as $keyChild => $valueChild) From 911e862a8e88a703ea54ca2b7588f7d426b87c2e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 May 2016 13:49:05 +0200 Subject: [PATCH 034/113] Fix missing translation and add a TODO to avoid infinite loop. --- htdocs/langs/en_US/products.lang | 1 + htdocs/product/class/product.class.php | 14 ++++++++++---- htdocs/product/composition/card.php | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 9298bdc9669e2..291f04f1c7e6c 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -130,6 +130,7 @@ AssociatedProductsAbility=Activate the package feature AssociatedProducts=Package product AssociatedProductsNumber=Number of products composing this package product ParentProductsNumber=Number of parent packaging product +ParentProducts=Parent products IfZeroItIsNotAVirtualProduct=If 0, this product is not a package product IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any package product EditAssociate=Associate diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 2b109af5e68a9..3cc72ac9b9728 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2982,9 +2982,10 @@ function getParent() * * @param int $id Id of product to search childs of * @param int $firstlevelonly Return only direct child + * @param int $level Level of recursing call (start to 1) * @return array Prod */ - function getChildsArbo($id, $firstlevelonly=0) + function getChildsArbo($id, $firstlevelonly=0, $level=1) { $sql = "SELECT p.rowid, p.label as label, pa.qty as qty, pa.fk_product_fils as id, p.fk_product_type, pa.incdec"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; @@ -2993,13 +2994,18 @@ function getChildsArbo($id, $firstlevelonly=0) $sql.= " AND pa.fk_product_pere = ".$id; $sql.= " AND pa.fk_product_fils != ".$id; // This should not happens, it is to avoid infinite loop if it happens - dol_syslog(get_class($this).'::getChildsArbo', LOG_DEBUG); + dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level, LOG_DEBUG); + + // Protection against infinite loop + if ($level > 30) return array(); + $res = $this->db->query($sql); if ($res) { $prods = array(); while ($rec = $this->db->fetch_array($res)) { + // TODO Add check to not add ne record if already added $prods[$rec['rowid']]= array( 0=>$rec['id'], 1=>$rec['qty'], @@ -3011,7 +3017,7 @@ function getChildsArbo($id, $firstlevelonly=0) //$prods[$this->db->escape($rec['label'])]= array(0=>$rec['id'],1=>$rec['qty']); if (empty($firstlevelonly)) { - $listofchilds=$this->getChildsArbo($rec['id']); + $listofchilds=$this->getChildsArbo($rec['id'], 0, $level + 1); foreach($listofchilds as $keyChild => $valueChild) { $prods[$rec['rowid']]['childs'][$keyChild] = $valueChild; @@ -3041,7 +3047,7 @@ function get_sousproduits_arbo() foreach($parent as $key => $value) // key=label, value[0]=id { - foreach($this->getChildsArbo($value[0]) as $keyChild => $valueChild) + foreach($this->getChildsArbo($value[0]) as $keyChild => $valueChild) // Warning. getChildsArbo can gell getChildsArbo recursively. { $parent[$key][$keyChild] = $valueChild; } diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index f4b3f575ebac8..ee99226f2e4e1 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -265,7 +265,7 @@ print load_fiche_titre($langs->trans("ProductParentList"),'','').'
'; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; From 5040fe46b0ce31adaf0dfb6507d480122f0c395d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 May 2016 11:15:53 +0200 Subject: [PATCH 035/113] FIX Missing number total of modules --- htdocs/admin/modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 3fbaddd0a3f6b..aa4c1b85caecf 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -223,7 +223,7 @@ //var_dump($modules); $nbofactivatedmodules=count($conf->modules); -$moreinfo=$langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1)); +$moreinfo=$langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1), count($modules)); if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule")); print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup'); From cb4e569a5fd0cd87104cc27a8eb2d46ddc7c61c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 May 2016 10:48:55 +0200 Subject: [PATCH 036/113] FIX Merge manually PR #5161 - Bad translation key --- htdocs/comm/action/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 62512562e9a0a..123189bdc87b4 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1173,7 +1173,7 @@ function init_repeat() // Clone event if($action == 'clone') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', $formquestion, 'yes', 1); print $formconfirm; } From 1835caad7b57ba3012176595a7449715d54b9998 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 May 2016 08:53:09 +0200 Subject: [PATCH 037/113] Better translation --- htdocs/adherents/card.php | 21 ++++++++++++--------- htdocs/adherents/card_subscriptions.php | 12 ++++++++++-- htdocs/langs/en_US/members.lang | 1 + 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index f17ca46299f45..b3bfce7d9a17e 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1381,17 +1381,12 @@ function initfieldrequired() print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); } - /* - * Confirm add in spip - */ + // Confirm add in spip if ($action == 'add_spip') { print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } - - /* - * Confirm removed from spip - */ + // Confirm removed from spip if ($action == 'del_spip') { print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); @@ -1556,8 +1551,16 @@ function initfieldrequired() } else { - print $langs->trans("SubscriptionNotReceived"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + if (! $adht->cotisation) + { + print $langs->trans("SubscriptionNotRecorded"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } } print ''; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 998dc53d5258a..784f6d4dea762 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -722,8 +722,16 @@ } else { - print $langs->trans("SubscriptionNotReceived"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + if (! $adht->cotisation) + { + print $langs->trans("SubscriptionNotRecorded"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } } print ''; diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 1844a22c227c6..500f25e4ae883 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -124,6 +124,7 @@ Int=Int DateAndTime=Date and time PublicMemberCard=Member public card MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe +SubscriptionNotRecorded=Subscription not recorded AddSubscription=Create subscription ShowSubscription=Show subscription MemberModifiedInDolibarr=Member modified in Dolibarr From 03732fd1aa0cfe75564111883677099b0bb02fad Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 9 May 2016 15:31:44 +0200 Subject: [PATCH 038/113] Fix contract line creation was adding all proposal lines desc --- htdocs/contrat/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3fe0530ec77e8..3c38cdf4421f9 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -320,7 +320,7 @@ } if ($conf->global->PRODUIT_DESC_IN_FORM) - $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; + $desc = ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; } else { $desc = dol_htmlentitiesbr($lines[$i]->desc); From 6278610d0aad44063c20b274bf07e0e4d936ea7f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 9 May 2016 15:32:21 +0200 Subject: [PATCH 039/113] Fix contract line creation should take desc even if not displayed on screen --- htdocs/contrat/card.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3c38cdf4421f9..c55defb5ce822 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -319,8 +319,7 @@ $label = $lines[$i]->product_label; } - if ($conf->global->PRODUIT_DESC_IN_FORM) - $desc = ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; + $desc = ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; } else { $desc = dol_htmlentitiesbr($lines[$i]->desc); From a8f50283c06de3af9f4e0f0c8db5e9fb64f42e7b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 May 2016 19:37:14 +0200 Subject: [PATCH 040/113] Fix bad translation --- htdocs/langs/en_US/bills.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 392050c6cd5e8..bfbe32b803efb 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -321,8 +321,8 @@ PaymentConditionPT_5050=50%% in advance, 50%% on delivery FixAmount=Fix amount VarAmount=Variable amount (%% tot.) # PaymentType -PaymentTypeVIR=Bank deposit -PaymentTypeShortVIR=Bank deposit +PaymentTypeVIR=Bank transfer +PaymentTypeShortVIR=Bank transfer PaymentTypePRE=Bank's order PaymentTypeShortPRE=Bank's order PaymentTypeLIQ=Cash From 3607f1a296b14f8535248cbad5bf15b520a9cc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 9 May 2016 22:15:00 +0200 Subject: [PATCH 041/113] Correction for Auguria Menu Accounting Expert Entry cause blank windows --- htdocs/core/menus/init_menu_auguria.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 86b8a58e68f25..2e37f989b0ad3 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -206,7 +206,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); -- Accounting Expert -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '(! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__); -- Dispatch insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 2, __ENTITY__); From 84e75eed88371dcc7fdf49dbc785766bc74249ae Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 10 May 2016 09:31:25 +0200 Subject: [PATCH 042/113] FIX : can't fetch by siret or siren because of first "if" --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 864820602c886..efb038a84f082 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1006,7 +1006,7 @@ function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $idprof1='',$idprof2=' global $langs; global $conf; - if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1; + if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($ref_int) && empty($idprof1) && empty($idprof2) && empty($idprof3) && empty($idprof4)) return -1; $sql = 'SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm'; $sql .= ', s.status'; From a57e0f5fd38f4c5a3a318ef9002f68f9172c6eec Mon Sep 17 00:00:00 2001 From: phf Date: Tue, 10 May 2016 14:27:24 +0200 Subject: [PATCH 043/113] Fix update supplier ref on supplier invoice --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f1de6a68a7854..635c9195386be 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -240,7 +240,7 @@ { $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); - if ($object->update() < 0) { + if ($object->update($user) < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } From d3b3e60d82edc38345473f0c4b478ae1c70310d1 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 10 May 2016 22:37:30 +0200 Subject: [PATCH 044/113] Fix email template edition --- htdocs/install/mysql/migration/3.7.0-3.8.0.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index 89f75c1156da7..068fbc753cbe2 100755 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -797,7 +797,6 @@ ALTER TABLE llx_societe_remise_except MODIFY COLUMN description text NOT NULL; update llx_opensurvey_sondage set format = 'D' where format = 'D+'; update llx_opensurvey_sondage set format = 'A' where format = 'A+'; -ALTER TABLE llx_propal_merge_pdf_product ADD COLUMN lang varchar(5) DEFAULT NULL; --Deal with holidays_user that do not have rowid -- Disabled: too dangerous patch. rowid is a primary key. How is it possible to have no rowid ? From 4cbab1cf47a4d3fcb99acaf7e6f7cad74bdaa0f7 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 12 May 2016 16:58:14 +0200 Subject: [PATCH 045/113] FIX PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH --- htdocs/product/document.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 6a8ee77859008..766b24a941ec4 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -247,7 +247,8 @@ if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs { - $filearray = dol_dir_list($upload_dirold, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1); + + $filearray = array_merge($filearray,dol_dir_list($upload_dirold, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1)); } // For each file build select list with PDF extention From 1bba8166f8c2dd69f45899f684f0921a7c86f9fd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 May 2016 23:12:53 +0200 Subject: [PATCH 046/113] FIX #5207 --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f1de6a68a7854..635c9195386be 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -240,7 +240,7 @@ { $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); - if ($object->update() < 0) { + if ($object->update($user) < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } From 21b639ef168389b2d2a6b92482179b577621f76a Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sat, 14 May 2016 00:47:46 +0200 Subject: [PATCH 047/113] Fix issues with entity control --- htdocs/holiday/class/holiday.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 4e5706f94c672..94704451df75a 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2012-2014 Laurent Destailleur * Copyright (C) 2012-2016 Regis Houssin * Copyright (C) 2013 Florian Henry + * Copyright (C) 2016 Juanjo Menent * * 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 @@ -117,7 +118,7 @@ function updateBalance() */ function create($user, $notrigger=0) { - global $conf, $langs; + global $conf; $error=0; $now=dol_now(); @@ -137,7 +138,8 @@ function create($user, $notrigger=0) $sql.= "statut,"; $sql.= "fk_validator,"; $sql.= "fk_type,"; - $sql.= "fk_user_create"; + $sql.= "fk_user_create,"; + $sql.= "entity"; $sql.= ") VALUES ("; $sql.= "'".$this->fk_user."',"; $sql.= " '".$this->db->idate($now)."',"; @@ -148,7 +150,8 @@ function create($user, $notrigger=0) $sql.= " '1',"; $sql.= " '".$this->fk_validator."',"; $sql.= " '".$this->fk_type."',"; - $sql.= " ".$user->id; + $sql.= " ".$user->id.","; + $sql.= " ".$conf->entity; $sql.= ")"; $this->db->begin(); From b3b064d310312b53133ac4cf234d9b7efc3fa916 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Sat, 14 May 2016 18:58:14 +0200 Subject: [PATCH 048/113] FIX hook on group card called but not initialized --- htdocs/user/group/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 3de421e4f4f12..75ad04979b61a 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -64,6 +64,7 @@ // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$hookmanager->initHooks(array('groupcard','globalcard')); /** * Action remove group From af8608ab7aa2fe8fc188e53cde6290ce35b7dadf Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 16 May 2016 10:49:43 +0200 Subject: [PATCH 049/113] Fix services dispatch on supplier order only if STOCK_SUPPORTS_SERVICES --- htdocs/fourn/commande/dispatch.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index fd992dbeeb13e..9d7d2bfeefe3f 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -386,6 +386,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product=p.rowid"; $sql.= " WHERE l.fk_commande = ".$commande->id; + if(empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND l.product_type = 0"; $sql.= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product $sql.= " ORDER BY p.ref, p.label"; From f7c9f20b16297c41c002a3cb1e915a98a4f83c9b Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 16 May 2016 17:21:32 +0200 Subject: [PATCH 050/113] Fix: Expensereport not compatible with multicompany. --- htdocs/expensereport/class/expensereport.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 7de680d02f3d6..cc32f08b0ac8e 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2011 Dimitri Mouillard * Copyright (C) 2015 Laurent Destailleur * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -149,6 +150,7 @@ function create($user) $sql.= ",paid"; $sql.= ",note_public"; $sql.= ",note_private"; + $sql.= ",entity"; $sql.= ") VALUES("; $sql.= "'(PROV)'"; $sql.= ", ".$this->total_ht; @@ -165,6 +167,7 @@ function create($user) $sql.= ", 0"; $sql.= ", ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ", ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null"); + $sql.= ", ".$conf->entity; $sql.= ")"; dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); From 4a3083a4c12aecb64f906c8e1adbb8c57f26e22f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 May 2016 19:34:24 +0200 Subject: [PATCH 051/113] FIX Remove PHP Warning: Creating default object from empty value. --- htdocs/expensereport/card.php | 45 +++++++++-------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 54a67cc6ffcfa..f3174935cd544 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -333,7 +333,7 @@ if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -390,6 +390,7 @@ else { $mesg=$mailfile->error; + setEventMessages($mesg, null, 'errors'); } // END - Send mail } @@ -438,7 +439,7 @@ if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -542,7 +543,7 @@ if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -583,7 +584,6 @@ else { setEventMessages($langs->trans("ErrorFailedToSendMail",$emailFrom,$emailTo), null, 'errors'); - $mesg="Impossible d'envoyer l'email."; } // END - Send mail } @@ -627,7 +627,7 @@ if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -667,6 +667,7 @@ else { $mesg="Impossible d'envoyer l'email."; + setEventMessages($mesg, null, 'errors'); } // END - Send mail } @@ -756,7 +757,7 @@ if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -806,9 +807,8 @@ endif; else: - - $mesg="Impossible d'envoyer l'email."; - + $mesg="Impossible d'envoyer l'email."; + setEventMessages($mesg, null, 'errors'); endif; // END - Send mail } @@ -921,7 +921,7 @@ $total_ht = $object_ligne->total_ht; $total_tva = $object_ligne->total_tva; - $result=$object->deleteline(GETPOST("rowid")); + $result=$object->deleteline(GETPOST("rowid"), $user); if ($result >= 0) { if ($result > 0) @@ -961,7 +961,6 @@ $rowid = $_POST['rowid']; $type_fees_id = GETPOST('fk_c_type_fees'); - $object_ligne->vatrate = price2num(GETPOST('vatrate')); $projet_id = $fk_projet; $comments = GETPOST('comments'); $qty = GETPOST('qty'); @@ -983,6 +982,7 @@ if (! $error) { + // TODO Use update method of ExpenseReportLine $result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id); if ($result >= 0) { @@ -1078,29 +1078,6 @@ $formproject = new FormProjets($db); $projecttmp = new Project($db); -if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) -{ - if(!empty($_GET['mesg'])) - { - $text_mesg = explode(",",$_GET['mesg']); - - foreach($text_mesg as $text) - { - $mesg.= "- ".$langs->trans($text)."
"; - } - - print "
"; - print $langs->trans("LINE_NOT_ADDED")."
"; - print $mesg; - print "
"; - } - else - { - if ($mesg) print "
".$mesg."
"; - } -} - - // Create if ($action == 'create') { From 929787006e43801bdf755294519f07c0918f3f09 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 May 2016 22:40:29 +0200 Subject: [PATCH 052/113] Clean data --- htdocs/install/mysql/migration/repair.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 53034338932d0..2b87303f113cb 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -55,6 +55,7 @@ delete from llx_product_extrafields where fk_object not in (select rowid from ll --delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe); update llx_product_batch set batch = '' where batch = 'Non défini'; +update llx_product_batch set batch = '' where batch = 'Non défini'; -- Fix: delete category child with no category parent. drop table tmp_categorie; From 94c532dd8a4c99eefa31140929b9dd41b92170e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 May 2016 23:58:06 +0200 Subject: [PATCH 053/113] Clean splitted lines into llx_product_batch --- htdocs/install/mysql/migration/repair.sql | 28 ++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 2b87303f113cb..43e0ca21ee274 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -54,9 +54,34 @@ delete from llx_adherent_extrafields where fk_object not in (select rowid from l delete from llx_product_extrafields where fk_object not in (select rowid from llx_product); --delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe); + +-- Clean stocks + +-- Reference for qty is llx_product_stock (detail in llx_product_batch may be not complete) +-- qty in llx_product may be not up to date update llx_product_batch set batch = '' where batch = 'Non défini'; update llx_product_batch set batch = '' where batch = 'Non défini'; +DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb); + +-- Merge splitted lines into one in table llx_product_batch +DROP TABLE tmp_llx_product_batch; +DROP TABLE tmp_llx_product_batch2; +CREATE TABLE tmp_llx_product_batch AS select fk_product_stock, eatby, sellby, batch, SUM(qty) as qty, COUNT(rowid) as nb FROM llx_product_batch GROUP BY fk_product_stock, eatby, sellby, batch HAVING COUNT(rowid) > 1; +CREATE TABLE tmp_llx_product_batch2 AS select pb.rowid, pb.fk_product_stock, pb.eatby, pb.sellby, pb.batch, pb.qty from llx_product_batch as pb, tmp_llx_product_batch as tpb where pb.fk_product_stock = tpb.fk_product_stock and COALESCE(pb.eatby, '') = COALESCE(tpb.eatby,'') and COALESCE(pb.sellby, '') = COALESCE(tpb.sellby, '') and pb.batch = tpb.batch +--select * from tmp_llx_product_batch; +--select * from tmp_llx_product_batch2; +DELETE FROM llx_product_batch WHERE rowid IN (select rowid FROM tmp_llx_product_batch2); +INSERT INTO llx_product_batch(fk_product_stock, eatby, sellby, batch, qty) SELECT fk_product_stock, eatby, sellby, batch, qty FROM tmp_llx_product_batch; + +DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb); +DELETE FROM llx_product_batch WHERE qty = 0; + + +-- Stock calculation on product +UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); + + -- Fix: delete category child with no category parent. drop table tmp_categorie; create table tmp_categorie as select * from llx_categorie; @@ -110,9 +135,6 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 50, 'AC_OTH', 'system', 'Other' ,NULL, 5); --- Stock calculation on product -UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); - -- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid; -- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note); From 63d0710842fdc93dd54b3142845550b2f66242c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 May 2016 10:39:35 +0200 Subject: [PATCH 054/113] FIX Creation of the second ressource type fails. --- htdocs/install/mysql/migration/3.8.0-3.9.0.sql | 3 +++ htdocs/resource/class/html.formresource.class.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index 9d77a87fd7c8f..74f89441f644f 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -607,3 +607,6 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (14 INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1482, 148, '7','0','VAT reduced rate',1); INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1483, 148, '5','0','VAT super-reduced rate', 1); INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1484, 148, '0','0','VAT Rate 0', 1); + +-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT; + diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 4128de6feadff..18119b0cf17da 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -96,7 +96,7 @@ function select_resource_list($selected='',$htmlname='fk_resource',$filter='',$s } // Construct $out and $outarray - $out.= ''."\n"; if ($showempty) $out.= ''."\n"; $num = count($resourcestat->lines); From 0e040b166dbe69bd83710e78462b38caa31037c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 May 2016 17:55:41 +0200 Subject: [PATCH 055/113] Fix: When we edit a product to use lot/serial number, we initialize records for unknown lots to generic value 'Undefined'. --- htdocs/product/class/product.class.php | 35 ++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 3cc72ac9b9728..fce31e31923c5 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -666,25 +666,45 @@ function update($id, $user, $notrigger=false, $action='update') $org->fetch($this->id); $this->oldcopy=$org; } - // test if batch management is activated on existing product + + // Test if batch management is activated on existing product + // If yes, we create missing entries into product_batch if ($this->hasbatch() && !$this->oldcopy->hasbatch()) { + $valueforundefinedlot = 'Undefined'; + + dol_syslog("Flag batch of product id=".$this->id." is set to ON, so we will create missing records into product_batch"); + $this->load_stock(); - foreach ($this->stock_warehouse as $idW => $ObjW) + foreach ($this->stock_warehouse as $idW => $ObjW) // For each warehouse where we have stocks defined for this product (for each lines in product_stock) { $qty_batch = 0; - foreach ($ObjW->detail_batch as $detail) + foreach ($ObjW->detail_batch as $detail) // Each lines of detail in product_batch of the current $ObjW = product_stock { + if ($detail->batch == $valueforundefinedlot || $detail->batch == 'Undefined') + { + // We discard this line, we will create it later + $sqlclean="DELETE FROM ".MAIN_DB_PREFIX."product_batch WHERE batch in('Undefined', '".$valueforundefinedlot."') AND fk_product_stock = ".$ObjW->id; + $result = $this->db->query($sqlclean); + if (! $result) + { + dol_print_error($this->db); + exit; + } + continue; + } + $qty_batch += $detail->qty; } - // Quantities in batch details are not same same as stock quantity - // So we add a default batch record + // Quantities in batch details are not same as stock quantity, + // so we add a default batch record to complete and get same qty in parent and child table if ($ObjW->real <> $qty_batch) { $ObjBatch = new Productbatch($this->db); - $ObjBatch->batch = $langs->trans('BatchDefaultNumber'); - $ObjBatch->qty = $ObjW->real - $qty_batch; + $ObjBatch->batch = $valueforundefinedlot; + $ObjBatch->qty = ($ObjW->real - $qty_batch); $ObjBatch->fk_product_stock = $ObjW->id; + if ($ObjBatch->create($user,1) < 0) { $error++; @@ -693,6 +713,7 @@ function update($id, $user, $notrigger=false, $action='update') } } } + // For automatic creation if ($this->barcode == -1) $this->barcode = $this->get_barcode($this,$this->barcode_type_code); From 7bbb3a7da10e024d78ad4911bf6f7a730f720ebe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 May 2016 19:15:44 +0200 Subject: [PATCH 056/113] Supplier proposal was missing --- htdocs/langs/en_US/other.lang | 2 ++ htdocs/product/class/product.class.php | 37 ++++++++++++++++++++++++++ htdocs/product/stats/card.php | 23 ++++++++++------ 3 files changed, 54 insertions(+), 8 deletions(-) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 278fa9c77b72f..329ab2783293a 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -157,11 +157,13 @@ StatsByNumberOfEntities=Statistics in number of referring entities NumberOfProposals=Number of proposals on last 12 month NumberOfCustomerOrders=Number of customer orders on last 12 month NumberOfCustomerInvoices=Number of customer invoices on last 12 month +NumberOfSupplierProposals=Number of supplier proposals on last 12 month NumberOfSupplierOrders=Number of supplier orders on last 12 month NumberOfSupplierInvoices=Number of supplier invoices on last 12 month NumberOfUnitsProposals=Number of units on proposals on last 12 month NumberOfUnitsCustomerOrders=Number of units on customer orders on last 12 month NumberOfUnitsCustomerInvoices=Number of units on customer invoices on last 12 month +NumberOfUnitsSupplierProposals=Number of units on supplier proposals on last 12 month NumberOfUnitsSupplierOrders=Number of units on supplier orders on last 12 month NumberOfUnitsSupplierInvoices=Number of units on supplier invoices on last 12 month EMailTextInterventionValidated=The intervention %s has been validated. diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index fce31e31923c5..ba2eac00cd9e2 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2280,6 +2280,7 @@ function get_nb_vente($socid, $mode, $filteronproducttype=-1) if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE f.rowid = d.fk_facture"; if ($this->id > 0) $sql.= " AND d.fk_product =".$this->id; + else $sql.=" AND d.fk_product > 0"; if ($filteronproducttype >= 0) $sql.= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; $sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND f.entity IN (".getEntity('facture', 1).")"; @@ -2312,6 +2313,7 @@ function get_nb_achat($socid, $mode, $filteronproducttype=-1) if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE f.rowid = d.fk_facture_fourn"; if ($this->id > 0) $sql.= " AND d.fk_product =".$this->id; + else $sql.=" AND d.fk_product > 0"; if ($filteronproducttype >= 0) $sql.= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; $sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND f.entity IN (".getEntity('facture_fourn', 1).")"; @@ -2344,6 +2346,7 @@ function get_nb_propal($socid, $mode, $filteronproducttype=-1) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE p.rowid = d.fk_propal"; if ($this->id > 0) $sql.= " AND d.fk_product =".$this->id; + else $sql.=" AND d.fk_product > 0"; if ($filteronproducttype >= 0) $sql.= " AND prod.rowid = d.fk_product AND prod.fk_product_type =".$filteronproducttype; $sql.= " AND p.fk_soc = s.rowid"; $sql.= " AND p.entity IN (".getEntity('propal', 1).")"; @@ -2355,6 +2358,38 @@ function get_nb_propal($socid, $mode, $filteronproducttype=-1) return $this->_get_stats($sql,$mode); } + /** + * Return nb of units or proposals in which product is included + * + * @param int $socid Limit count on a particular third party id + * @param string $mode 'byunit'=number of unit, 'bynumber'=nb of entities + * @param int $filteronproducttype 0=To filter on product only, 1=To filter on services only + * @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11 + */ + function get_nb_propalsupplier($socid, $mode, $filteronproducttype=-1) + { + global $conf; + global $user; + + $sql = "SELECT sum(d.qty), date_format(p.date_valid, '%Y%m')"; + if ($mode == 'bynumber') $sql.= ", count(DISTINCT p.rowid)"; + $sql.= " FROM ".MAIN_DB_PREFIX."supplier_proposaldet as d, ".MAIN_DB_PREFIX."supplier_proposal as p, ".MAIN_DB_PREFIX."societe as s"; + if ($filteronproducttype >= 0) $sql.=", ".MAIN_DB_PREFIX."product as prod"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE p.rowid = d.fk_supplier_proposal"; + if ($this->id > 0) $sql.= " AND d.fk_product =".$this->id; + else $sql.=" AND d.fk_product > 0"; + if ($filteronproducttype >= 0) $sql.= " AND prod.rowid = d.fk_product AND prod.fk_product_type =".$filteronproducttype; + $sql.= " AND p.fk_soc = s.rowid"; + $sql.= " AND p.entity IN (".getEntity('propal', 1).")"; + if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($socid > 0) $sql.= " AND p.fk_soc = ".$socid; + $sql.= " GROUP BY date_format(p.date_valid,'%Y%m')"; + $sql.= " ORDER BY date_format(p.date_valid,'%Y%m') DESC"; + + return $this->_get_stats($sql,$mode); + } + /** * Return nb of units or orders in which product is included * @@ -2374,6 +2409,7 @@ function get_nb_order($socid, $mode, $filteronproducttype=-1) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.rowid = d.fk_commande"; if ($this->id > 0) $sql.= " AND d.fk_product =".$this->id; + else $sql.=" AND d.fk_product > 0"; if ($filteronproducttype >= 0) $sql.= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; $sql.= " AND c.fk_soc = s.rowid"; $sql.= " AND c.entity IN (".getEntity('commande', 1).")"; @@ -2404,6 +2440,7 @@ function get_nb_ordersupplier($socid, $mode, $filteronproducttype=-1) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE c.rowid = d.fk_commande"; if ($this->id > 0) $sql.= " AND d.fk_product =".$this->id; + else $sql.=" AND d.fk_product > 0"; if ($filteronproducttype >= 0) $sql.= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; $sql.= " AND c.fk_soc = s.rowid"; $sql.= " AND c.entity IN (".getEntity('commande_fournisseur', 1).")"; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 49b700b46caa9..d98d8ed31c605 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -210,15 +210,20 @@ 'propal' =>array('modulepart'=>'productstats_proposals', 'file' => $object->id.'/propal12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsProposals"):$langs->transnoentitiesnoconv("NumberOfProposals"))), + 'proposalssuppliers'=>array('modulepart'=>'productstats_proposalssuppliers', + 'file' => $object->id.'/proposalssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierProposals"):$langs->transnoentitiesnoconv("NumberOfSupplierProposals"))), + 'orders' =>array('modulepart'=>'productstats_orders', 'file' => $object->id.'/orders12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerOrders"):$langs->transnoentitiesnoconv("NumberOfCustomerOrders"))), - 'invoices' =>array('modulepart'=>'productstats_invoices', - 'file' => $object->id.'/invoices12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', - 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerInvoices"):$langs->transnoentitiesnoconv("NumberOfCustomerInvoices"))), 'orderssuppliers'=>array('modulepart'=>'productstats_orderssuppliers', 'file' => $object->id.'/orderssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierOrders"):$langs->transnoentitiesnoconv("NumberOfSupplierOrders"))), + + 'invoices' =>array('modulepart'=>'productstats_invoices', + 'file' => $object->id.'/invoices12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', + 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerInvoices"):$langs->transnoentitiesnoconv("NumberOfCustomerInvoices"))), 'invoicessuppliers'=>array('modulepart'=>'productstats_invoicessuppliers', 'file' => $object->id.'/invoicessuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png', 'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierInvoices"):$langs->transnoentitiesnoconv("NumberOfSupplierInvoices"))), @@ -243,11 +248,12 @@ } else { - if ($key == 'propal') $graph_data = $object->get_nb_propal($socid,$mode,((string) $type != '' ? $type : -1)); - if ($key == 'orders') $graph_data = $object->get_nb_order($socid,$mode,((string) $type != '' ? $type : -1)); - if ($key == 'invoices') $graph_data = $object->get_nb_vente($socid,$mode,((string) $type != '' ? $type : -1)); - if ($key == 'invoicessuppliers') $graph_data = $object->get_nb_achat($socid,$mode,((string) $type != '' ? $type : -1)); - if ($key == 'orderssuppliers') $graph_data = $object->get_nb_ordersupplier($socid,$mode,((string) $type != '' ? $type : -1)); + if ($key == 'propal') $graph_data = $object->get_nb_propal($socid,$mode,((string) $type != '' ? $type : -1)); + if ($key == 'orders') $graph_data = $object->get_nb_order($socid,$mode,((string) $type != '' ? $type : -1)); + if ($key == 'invoices') $graph_data = $object->get_nb_vente($socid,$mode,((string) $type != '' ? $type : -1)); + if ($key == 'proposalssuppliers') $graph_data = $object->get_nb_propalsupplier($socid,$mode,((string) $type != '' ? $type : -1)); + if ($key == 'invoicessuppliers') $graph_data = $object->get_nb_achat($socid,$mode,((string) $type != '' ? $type : -1)); + if ($key == 'orderssuppliers') $graph_data = $object->get_nb_ordersupplier($socid,$mode,((string) $type != '' ? $type : -1)); // TODO Save cachefile $graphfiles[$key]['file'] } @@ -289,6 +295,7 @@ if ($graphfiles == 'propal' && ! $user->rights->propale->lire) continue; if ($graphfiles == 'order' && ! $user->rights->commande->lire) continue; if ($graphfiles == 'invoices' && ! $user->rights->facture->lire) continue; + if ($graphfiles == 'proposals_suppliers' && ! $user->rights->supplier_proposal->lire) continue; if ($graphfiles == 'invoices_suppliers' && ! $user->rights->fournisseur->facture->lire) continue; if ($graphfiles == 'orders_suppliers' && ! $user->rights->fournisseur->commande->lire) continue; From c7dda59fbc150eb7c96a7dc7c0e8846af4de5e6f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 18 May 2016 17:33:51 +0200 Subject: [PATCH 057/113] Fix: doublon (merge problem?) --- htdocs/comm/propal.php | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index fa5619ca20431..e1587d30f135f 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -562,15 +562,6 @@ } } - // Reopen proposal - else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel')) - { - // prevent browser refresh from reopening proposal several times - if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) { - $object->reopen($user, 1); - } - } - // Close proposal else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel')) { @@ -591,17 +582,6 @@ } } - // Classify billed - else if ($action == 'classifybilled' && $user->rights->propal->cloturer) - { - $result=$object->cloture($user, 4, ''); - if ($result < 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - } - } - // Reopen proposal else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel')) { @@ -617,20 +597,6 @@ } } - // Close proposal - else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel')) - { - if (! GETPOST('statut')) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), 'errors'); - $action = 'statut'; - } else { - // prevent browser refresh from closing proposal several times - if ($object->statut == Propal::STATUS_VALIDATED) { - $object->cloture($user, GETPOST('statut'), GETPOST('note')); - } - } - } - include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; From 9e5db0f3c61f1abcd8a91b3d9f538a2401bb4d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 21 May 2016 09:18:16 +0200 Subject: [PATCH 058/113] Fix next month or next year in opensurvey http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/55209-bug-calendrier-opensurvey-v3-9 --- htdocs/opensurvey/wizard/choix_date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index cc08434cd509f..ee1aafbebb86c 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -227,7 +227,7 @@ if (! isset($_SESSION['annee'])) $_SESSION['annee']= date('Y'); //mise a jour des valeurs de session si bouton retour a aujourd'hui -if ((!issetAndNoEmpty('choixjourajout')) && !issetAndNoEmpty('choixjourretrait') || issetAndNoEmpty('retourmois')){ +if (!issetAndNoEmpty('choixjourajout') && !issetAndNoEmpty('choixjourretrait') && (issetAndNoEmpty('retourmois') || issetAndNoEmpty('retourmois_x'))) { $_SESSION["jour"]=date("j"); $_SESSION["mois"]=date("n"); $_SESSION["annee"]=date("Y"); From b95981a2be1e795e4a8c89c6c24201f66ef2bcf7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 May 2016 18:03:13 +0200 Subject: [PATCH 059/113] Fix missing ; at end of sql --- htdocs/install/mysql/migration/repair.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index e38026b726a52..6b9ea2a16f791 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -71,7 +71,7 @@ DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product DROP TABLE tmp_llx_product_batch; DROP TABLE tmp_llx_product_batch2; CREATE TABLE tmp_llx_product_batch AS select fk_product_stock, eatby, sellby, batch, SUM(qty) as qty, COUNT(rowid) as nb FROM llx_product_batch GROUP BY fk_product_stock, eatby, sellby, batch HAVING COUNT(rowid) > 1; -CREATE TABLE tmp_llx_product_batch2 AS select pb.rowid, pb.fk_product_stock, pb.eatby, pb.sellby, pb.batch, pb.qty from llx_product_batch as pb, tmp_llx_product_batch as tpb where pb.fk_product_stock = tpb.fk_product_stock and COALESCE(pb.eatby, '') = COALESCE(tpb.eatby,'') and COALESCE(pb.sellby, '') = COALESCE(tpb.sellby, '') and pb.batch = tpb.batch +CREATE TABLE tmp_llx_product_batch2 AS select pb.rowid, pb.fk_product_stock, pb.eatby, pb.sellby, pb.batch, pb.qty from llx_product_batch as pb, tmp_llx_product_batch as tpb where pb.fk_product_stock = tpb.fk_product_stock and COALESCE(pb.eatby, '') = COALESCE(tpb.eatby,'') and COALESCE(pb.sellby, '') = COALESCE(tpb.sellby, '') and pb.batch = tpb.batch; --select * from tmp_llx_product_batch; --select * from tmp_llx_product_batch2; DELETE FROM llx_product_batch WHERE rowid IN (select rowid FROM tmp_llx_product_batch2); From 2355a0c38c6e71794d551b53d02626e89e2138c0 Mon Sep 17 00:00:00 2001 From: Xebax Date: Sun, 22 May 2016 17:15:22 +0200 Subject: [PATCH 060/113] FIX #5236 Cron module activated but "Modules tools" does not appear in the left menu. --- htdocs/core/menus/standard/auguria_menu.php | 3 ++- htdocs/core/menus/standard/eldy.lib.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index ae173504ed6c0..359faa930b411 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -110,7 +110,8 @@ function loadMenu($forcemainmenu='',$forceleftmenu='') // Modules system tools // TODO Find a way to add parent menu only if child menu exists. For the moment, no other method than hard coded methods. - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) // TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on + // TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on + if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) || ! empty($conf->cron->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS)) { if (empty($user->societe_id)) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index fafebe3ca18ce..06e4ceab5b8d8 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -544,14 +544,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu } // Modules system tools - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) // TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on + // TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on + if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) || ! empty($conf->cron->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS)) // Some external modules may need to force to have this entry on. { if (empty($user->societe_id)) { $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, $user->admin, '', $mainmenu, 'modulesadmintools'); // Special case: This entry can't be embedded into modules because we need it for both module service and products and we don't want duplicate lines. - if ((empty($leftmenu) || $leftmenu=="modulesadmintools") && $user->admin) + if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && (empty($leftmenu) || $leftmenu=="modulesadmintools") && $user->admin) { $langs->load("products"); $newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin); From e2e95641a3198d527fe1b39667dd3eb803aca3b8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 May 2016 12:27:02 +0200 Subject: [PATCH 061/113] FIX Search supplier ref on contract --- htdocs/contrat/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 669f2b097757b..e9a9e2cb8bc8f 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -180,7 +180,7 @@ print ''; print ''; print '
'; print ''; From a1a335025ff7bcb40a2b698b051bd6a6af1667db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 May 2016 12:05:11 +0200 Subject: [PATCH 065/113] FIX #5230 --- htdocs/contrat/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index cce04ee829179..f7b18696993f5 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1025,7 +1025,7 @@ $projectid = (!empty($objectsrc->fk_project)?$objectsrc->fk_project:''); - $soc = $objectsrc->client; + $soc = $objectsrc->thirdparty; $note_private = (! empty($objectsrc->note_private) ? $objectsrc->note_private : ''); $note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : ''); From 2290f6a123af34dd89ff16695f045934eb27c8e0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 May 2016 13:11:44 +0200 Subject: [PATCH 066/113] FIX Menu statistics was not visible if module proposal was not enabled --- htdocs/core/menus/standard/eldy.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 06e4ceab5b8d8..6c5af367c03b9 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1099,7 +1099,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $langs->load("stocks"); $newmenu->add("/product/reassortlot.php?type=0", $langs->trans("StocksByLotSerial"), 1, $user->rights->produit->lire && $user->rights->stock->lire); } - if (! empty($conf->propal->enabled)) + if (! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled) || ! empty($conf->supplier_proposal->enabled)) { $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire); } @@ -1111,7 +1111,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service'); $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire); - if (! empty($conf->propal->enabled)) + if (! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled) || ! empty($conf->supplier_proposal->enabled)) { $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire && $user->rights->propale->lire); } From 3cc8207bb734eab987e6b31a31997112de0ce2a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 May 2016 17:20:34 +0200 Subject: [PATCH 067/113] FIX Filter on category tag for suppliers --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 80e54742765b6..e9b98ad716489 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -359,7 +359,7 @@ // We'll need this table joined to the select in order to filter by sale if ($search_sale || (!$user->rights->societe->client->voir && !$socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We'll need this table joined to the select in order to filter by categ -if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs"; +if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_".($type=='f'?"fournisseur":"societe")." as cs"; $sql.= " WHERE s.fk_stcomm = st.id"; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; From ed148f70b3d1113c532a1fbe0b1381044f7956b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 May 2016 18:12:27 +0200 Subject: [PATCH 068/113] FIX Filter on assigned to was preselected on current user on list "All events" (instead of no filtering) --- htdocs/comm/action/index.php | 2 +- htdocs/core/modules/modAgenda.class.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index fe7b15c66feb2..cf2b475e10d71 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -48,7 +48,7 @@ $usergroup = GETPOST("usergroup","int",3); $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; -// If not choice done on calendar owner, we filter on user. +// If not choice done on calendar owner (like on left menu link "Agenda"), we filter on user. if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) { $filtert=$user->id; diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 482846032dcf1..45cc2680af01e 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -266,7 +266,7 @@ function __construct($db) 'type'=>'left', 'titre'=>'MenuToDoActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo', + 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', 'langs'=>'agenda', 'position'=>105, 'perms'=>'$user->rights->agenda->allactions->read', @@ -278,7 +278,7 @@ function __construct($db) 'type'=>'left', 'titre'=>'MenuDoneActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done', + 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', 'langs'=>'agenda', 'position'=>106, 'perms'=>'$user->rights->agenda->allactions->read', @@ -327,7 +327,7 @@ function __construct($db) 'type'=>'left', 'titre'=>'MenuToDoActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo', + 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', 'langs'=>'agenda', 'position'=>115, 'perms'=>'$user->rights->agenda->allactions->read', @@ -339,7 +339,7 @@ function __construct($db) 'type'=>'left', 'titre'=>'MenuDoneActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done', + 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', 'langs'=>'agenda', 'position'=>116, 'perms'=>'$user->rights->agenda->allactions->read', From 460d7ce915020a140233f811d8ff666b8664d8ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 May 2016 19:38:28 +0200 Subject: [PATCH 069/113] FIX Split of credit note into discount page generates records not correctly recognised as credit note. --- htdocs/comm/remx.php | 16 ++++++++-------- htdocs/commande/card.php | 4 ++-- htdocs/compta/facture.php | 10 +++++----- htdocs/core/class/html.form.class.php | 8 ++++---- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 07989b457dea6..a4aff6d71c145 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -341,22 +341,22 @@ $var = !$var; print ""; print ''; - if ($obj->description == '(CREDIT_NOTE)') + if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) { print ''; } - elseif ($obj->description == '(DEPOSIT)') + elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) { print ''; } else @@ -500,22 +500,22 @@ $var = !$var; print ""; print ''; - if ($obj->description == '(CREDIT_NOTE)') + if (preg_match('/\(CREDIT_NOTE\)/',$obj->description)) { print ''; } - elseif ($obj->description == '(DEPOSIT)') + elseif (preg_match('/\(DEPOSIT\)/',$obj->description)) { print ''; } else diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4dbc60569bbd1..489eee739329a 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1900,8 +1900,8 @@ // invoice $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice } else { - $filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; - $filtercreditnote = "fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; + $filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')"; + $filtercreditnote = "fk_facture_source IS NOT NULL AND description NOT LIKE '(DEPOSIT)%'"; } // Relative and absolute discounts diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 79045fe54b944..8604e95b5a28a 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2563,8 +2563,8 @@ $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice } else { - $filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; - $filtercreditnote = "fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; + $filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')"; + $filtercreditnote = "fk_facture_source IS NOT NULL AND description NOT LIKE '(DEPOSIT)%'"; } $absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount); @@ -2982,9 +2982,9 @@ // Remise dispo de type avoir if (! $absolute_discount) print '
'; - // $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, - // $filtercreditnote, $resteapayer); - $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We allow credit note even if amount is higher + // $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer + $more=' ('.$addcreditnote.')'; + $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0, $more); // We allow credit note even if amount is higher } } if (! $absolute_discount && ! $absolute_creditnote) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7232f6ec2708f..8fb0118cd2e29 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1128,8 +1128,8 @@ function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0) { $obj = $this->db->fetch_object($resql); $desc=dol_trunc($obj->description,40); - if ($desc=='(CREDIT_NOTE)') $desc=$langs->trans("CreditNote"); - if ($desc=='(DEPOSIT)') $desc=$langs->trans("Deposit"); + if (preg_match('/\(CREDIT_NOTE\)/', $desc)) $desc=preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $desc); + if (preg_match('/\(DEPOSIT\)/', $desc)) $desc=preg_replace('/\(DEPOSIT\)/', $langs->trans("Deposit"), $desc); $selectstring=''; if ($selected > 0 && $selected == $obj->rowid) $selectstring=' selected'; @@ -3762,7 +3762,7 @@ function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter } else { - if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': '; + if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': '; else print $langs->trans("CompanyHasCreditNote",price($amount,0,$langs,0,0,-1,$conf->currency)).': '; } $newfilter='fk_facture IS NULL AND fk_facture_line IS NULL'; // Remises disponibles @@ -3773,7 +3773,7 @@ function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter if ($nbqualifiedlines > 0) { print '   '; } if ($more) print $more; From 58ba5838cee97b43dcff0b1584536a844a3377f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 May 2016 19:41:28 +0200 Subject: [PATCH 070/113] Fix alias name already visible into banner --- htdocs/societe/agenda.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 3d72ad9d32889..e1745d38e5949 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -87,11 +87,6 @@ print '
'; print '
'.$langs->trans('ParentProduct').''.$langs->trans('ParentProducts').''.$langs->trans('Label').''.$langs->trans('Qty').'
'; - print ''; + print ''; print ''; print ''; From 1ce91bac06f445c955e710d061caab0bb038d0ce Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 25 May 2016 11:25:19 +0200 Subject: [PATCH 062/113] FIX : same page added several times on mergepropal option --- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index f8e6874f3b29c..54ffdf0c437c5 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -710,7 +710,7 @@ function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hid if (file_exists($infile) && is_readable($infile)) { $pagecount = $pdf->setSourceFile($infile); for($i = 1; $i <= $pagecount; $i ++) { - $tplIdx = $pdf->importPage(1); + $tplIdx = $pdf->importPage($i); if ($tplIdx!==false) { $s = $pdf->getTemplatesize($tplIdx); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); From 71ee941cf84f3954b69bd0a6927cc6eb575dc02e Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 25 May 2016 12:25:39 +0200 Subject: [PATCH 063/113] FIX : SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty --- htdocs/compta/facture.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index c13d819780171..ccfd057ccde64 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1935,7 +1935,7 @@ $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970) } - $absolute_discount = $soc->getAvailableDiscounts(); + if(!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts(); if (! empty($conf->use_javascript_ajax)) { From b8d5d6a383e0b066350b43462c26272cbc883e55 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 26 May 2016 19:38:52 +0200 Subject: [PATCH 064/113] Fix bad placeholder --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 97c2d782afb9f..38dcdc877591d 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1352,7 +1352,7 @@ } else { - print $form->select_company(GETPOST('socid','int'),'socid','s.fournisseur = 1',1); + print $form->select_company(GETPOST('socid','int'),'socid','s.fournisseur = 1','SelectThirdParty'); } print '
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; - print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1); + print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1); print ''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; - print $langs->trans("InvoiceDeposit").' '.$facturestatic->getNomURl(1); + print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1); print '
'.dol_print_date($db->jdate($obj->dc),'dayhour').''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; - print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1); + print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1); print ''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; - print $langs->trans("InvoiceDeposit").' '.$facturestatic->getNomURl(1); + print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1); print '
'; - // Alias names (commercial, trademark or alias names) - print '"; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''; From 0d277083e642bae91f3df5060487a9b605e2f78b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 May 2016 19:56:59 +0200 Subject: [PATCH 071/113] Fix duplicate translation --- htdocs/langs/en_US/products.lang | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 291f04f1c7e6c..08d2a94c36764 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -45,8 +45,6 @@ LastProducts=Last products CardProduct0=Product card CardProduct1=Service card CardContract=Contract card -Warehouse=Warehouse -Warehouses=Warehouses WarehouseOpened=Warehouse open WarehouseClosed=Warehouse closed Stock=Stock From 41a41f8931a7cf79299ce9e5150aa3271d4cb1d0 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 31 May 2016 22:55:49 +0200 Subject: [PATCH 072/113] FIX #5209 --- htdocs/societe/consumption.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 621a8988a04f8..e07e13ef751ad 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -115,7 +115,7 @@ dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"),0,'company'); dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); - + print '
'; print '
'; @@ -270,7 +270,7 @@ { // Supplier : Show products from orders. require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $documentstatic=new Contrat($db); - $documentstaticline=new ContratLigne($db); + $documentstaticline=new ContratLigne($db); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, '; $tables_from = MAIN_DB_PREFIX."contrat as c,".MAIN_DB_PREFIX."contratdet as d"; $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; @@ -304,7 +304,7 @@ $sql.= " AND ".$dateprint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'"; } if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$sref."%'"; -if ($sprod_fulldescr) +if ($sprod_fulldescr) { $sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'"; if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'"; @@ -330,10 +330,10 @@ { $resql=$db->query($sql); if (!$resql) dol_print_error($db); - + $var=true; $num = $db->num_rows($resql); - + $param="&socid=".$socid."&type_element=".$type_element; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($sprod_fulldescr) $param.= "&sprod_fulldescr=".urlencode($sprod_fulldescr); @@ -341,15 +341,15 @@ if ($month) $param.= "&month=".$month; if ($year) $param.= "&year=".$year; if ($optioncss != '') $param.='&optioncss='.$optioncss; - + print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $totalnboflines, '', 0, '', '', $limit); - + print '
'.$langs->trans('AliasNames').''; - print $object->name_alias; - print "
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'."\n"; // Titles with sort buttons print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'doc_number','',$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Date'),$_SERVER['PHP_SELF'],'dateprint','',$param,'align="center" width="150"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Status'),$_SERVER['PHP_SELF'],'fk_status','',$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Status'),$_SERVER['PHP_SELF'],'fk_statut','',$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Product'),$_SERVER['PHP_SELF'],'','',$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Quantity'),$_SERVER['PHP_SELF'],'prod_qty','',$param,'align="right"',$sortfield,$sortorder); print "\n"; @@ -384,7 +384,7 @@ $documentstatic->statut=$objp->status; $documentstatic->status=$objp->status; $documentstatic->paye=$objp->paid; - + if (is_object($documentstaticline)) $documentstaticline->statut=$objp->status; $var=!$var; @@ -550,7 +550,7 @@ } print "
"; - + if ($num > $limit) { print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num); } @@ -559,7 +559,7 @@ else if (empty($type_element) || $type_element == -1) { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', ''); - + print ''."\n"; // Titles with sort buttons print ''; @@ -569,16 +569,16 @@ print_liste_field_titre($langs->trans('Product'),$_SERVER['PHP_SELF'],'','',$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Quantity'),$_SERVER['PHP_SELF'],'prod_qty','',$param,'align="right"',$sortfield,$sortorder); print "\n"; - + print ''; print "
'.$langs->trans("SelectElementAndClickRefresh").'
"; } else { print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', ''); - + print ''."\n"; - + print ''; print "
'.$langs->trans("FeatureNotYetAvailable").'
"; From ee420b79b1f7b532e33fa19aa4c63cb65864b895 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Jun 2016 17:49:20 +0200 Subject: [PATCH 073/113] FIX Infinite loop on menu tree output for edition FIX Can show tree of entries added by external modules using fk_mainmenu and fk_leftmenu instead of fk_menu. --- htdocs/core/lib/treeview.lib.php | 37 +++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index e900931037ea3..225568fd77603 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -113,7 +113,11 @@ function tree_showpad(&$fulltree,$key,$silent=0) */ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree') { - if (empty($pere['rowid'])) + global $tree_recur_alreadyadded; + + if ($rang == 0) $tree_recur_alreadyadded=array(); + + if (empty($pere['rowid'])) { // Test also done with jstree and dynatree (not able to have inside label) print ''; print load_fiche_titre($langs->trans("NewMenu"),'','title_setup'); - + print '
'; print ''; @@ -281,7 +281,7 @@ function init_topleft() $parent_rowid = $_GET['menuId']; if ($_GET['menuId']) { - $sql = "SELECT m.rowid, m.mainmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId']; + $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId']; $res = $db->query($sql); if ($res) { @@ -290,6 +290,7 @@ function init_topleft() { $parent_rowid = $menu['rowid']; $parent_mainmenu = $menu['mainmenu']; + $parent_leftmenu = $menu['leftmenu']; $parent_langs = $menu['langs']; $parent_level = $menu['level']; } @@ -340,7 +341,9 @@ function init_topleft() { print ''; } - print ''.$langs->trans('DetailMenuIdParent').''; + print ''.$langs->trans('DetailMenuIdParent'); + print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; + print ''; // Title print ''.$langs->trans('Title').''.$langs->trans('DetailTitre').''; @@ -418,7 +421,12 @@ function init_topleft() print ''.$langs->trans('MenuIdParent').''; //$menu_handler //print ''; - print ''.$menu->fk_menu.''; + print ''; + $valtouse=$menu->fk_menu; + if ($menu->fk_mainmenu) $valtouse='fk_mainmenu='.$menu->fk_mainmenu; + if ($menu->fk_leftmenu) $valtouse.='&fk_leftmenu='.$menu->fk_leftmenu; + print $valtouse; + print ''; print ''.$langs->trans('DetailMenuIdParent').''; // Niveau diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index cb370e31d96dd..bb842bab1aa52 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -264,6 +264,8 @@ function fetch($id, $user=null) $sql.= " t.mainmenu,"; $sql.= " t.leftmenu,"; $sql.= " t.fk_menu,"; + $sql.= " t.fk_mainmenu,"; + $sql.= " t.fk_leftmenu,"; $sql.= " t.position,"; $sql.= " t.url,"; $sql.= " t.target,"; @@ -293,6 +295,8 @@ function fetch($id, $user=null) $this->mainmenu = $obj->mainmenu; $this->leftmenu = $obj->leftmenu; $this->fk_menu = $obj->fk_menu; + $this->fk_mainmenu = $obj->fk_mainmenu; + $this->fk_leftmenu = $obj->fk_leftmenu; $this->position = $obj->position; $this->url = $obj->url; $this->target = $obj->target; From 19f6aa805be4dac3f5278fe74a68a1a5f02db01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 30 Apr 2016 18:56:16 +0200 Subject: [PATCH 077/113] select engine for code 128 didn't work --- htdocs/admin/barcode.php | 54 +++++++++++++++------------------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index b7cc6e94bf214..29475d712df29 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -62,21 +62,12 @@ } else if ($action == 'update') { - if (GETPOST('submit_GENBARCODE_LOCATION')) - { - $location = GETPOST('GENBARCODE_LOCATION','alpha'); - $res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity); - } - if (GETPOST('submit_PRODUIT_DEFAULT_BARCODE_TYPE')) - { - $coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha'); - $res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity); - } - if (GETPOST('submit_GENBARCODE_BARCODETYPE_THIRDPARTY')) - { - $coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha'); - $res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity); - } + $location = GETPOST('GENBARCODE_LOCATION','alpha'); + $res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity); + $coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha'); + $res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity); + $coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha'); + $res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity); } else if ($action == 'updateengine') { @@ -195,9 +186,9 @@ print '
'; print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'',''); -print ""; -print ''; -print ""; +//print ""; +//print ''; +//print ""; print ''; print ''; @@ -261,7 +252,7 @@ // Build barcode on disk (not used, this is done to make debug easier) $result=$module->writeBarCode($obj->example,$obj->encoding,'Y'); // Generate on the fly and output barcode with generator - $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding); + $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding); //print $url; print ''; } @@ -296,7 +287,7 @@ // TODO Implement code behind action updateengine //print '
'; } -print ''; +//print ''; print "
"; @@ -331,9 +322,7 @@ $langs->load("errors"); print '
'.$langs->trans("ErrorFileNotFound",$conf->global->GENBARCODE_LOCATION).''; } - print ''; - print ''; - print ''; + print ''; } // Module products @@ -344,10 +333,7 @@ print ''; print '"; - print ''; + print ''; } // Module thirdparty @@ -358,13 +344,13 @@ print ''; print '"; - print ''; + print ''; } print "
'.$langs->trans("SetDefaultBarcodeTypeProducts").''; $formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"PRODUIT_DEFAULT_BARCODE_TYPE",1); - print ''; - print ''; - print "
'.$langs->trans("SetDefaultBarcodeTypeThirdParties").''; print $formbarcode->select_barcode_type($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY,"GENBARCODE_BARCODETYPE_THIRDPARTY",1); - print ''; - print ''; - print "
\n"; +print '
'; +print ''; +print "
"; print ''; print '
'; @@ -419,13 +405,13 @@ if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file") { - print '
'; + print ''; print img_picto($langs->trans("Activated"),'switch_on'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"),'switch_off'); print ''; } @@ -442,7 +428,7 @@ print "\n"; } -print ''; +//print ''; print "
"; From ab44adc6d5b7d7fe6d8c926fbe9d45ed225e6cac Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 2 Jun 2016 12:37:37 +0200 Subject: [PATCH 078/113] Fix SQL error on order stats --- htdocs/commande/class/commandestats.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 1ab418a9daa59..e38097e4e3ad0 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -206,7 +206,7 @@ function getAllByProduct($year) $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; $sql.= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid"; $sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'"; From 778b05c3416f9ba7c89792ce7e97a00229280f8f Mon Sep 17 00:00:00 2001 From: phf Date: Fri, 3 Jun 2016 23:06:53 +0200 Subject: [PATCH 079/113] Fix #4632 --- htdocs/societe/soc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 76a2c9486360b..7668064995843 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1863,7 +1863,7 @@ /* * View */ - $res=$object->fetch_optionals($object->id,$extralabels); + if (!empty($object->id)) $res=$object->fetch_optionals($object->id,$extralabels); //if ($res < 0) { dol_print_error($db); exit; } From c9c7045a6f0ed6d925ac89635a45eeccd492b077 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 3 Jun 2016 23:34:37 +0200 Subject: [PATCH 080/113] Fix access to project task time spent creation #5249 --- htdocs/projet/tasks/time.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index e54eef4cf6eae..7f820304b60f2 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -359,7 +359,7 @@ /* * Form to add time spent */ - if ($user->rights->projet->creer) + if ($user->rights->projet->lire) { print '
'; From 8b0b3b1a9dc1ac1db0b0d70a14005c9043945a1d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 3 Jun 2016 23:49:34 +0200 Subject: [PATCH 081/113] PMP available only if stock module enabled --- htdocs/fourn/ajax/getSupplierPrices.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index 664c8a2da4e6f..ae711d2f01ba7 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -125,9 +125,11 @@ } } - // Add price for pmp - $price=$producttmp->pmp; - $prices[] = array("id" => 'pmpprice', "price" => $price, "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); + if(!empty($conf->stock->enabled)) { + // Add price for pmp + $price=$producttmp->pmp; + $prices[] = array("id" => 'pmpprice', "price" => $price, "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); + } } echo json_encode($prices); From 66c73015b2aa8de2f43e494fafe9a1bb84e2f7c8 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 3 Jun 2016 23:58:54 +0200 Subject: [PATCH 082/113] Fix issues with strict mode --- htdocs/compta/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index ea154303d2092..379995677380e 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin - * Copyright (C) 2015 Juanjo Menent + * Copyright (C) 2015-2016 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Marcos García @@ -877,7 +877,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql.= " AND ff.fk_soc = ".$socid; $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye,"; - $sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur"; + $sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur, ff.date_lim_reglement"; $sql.= " ORDER BY ff.date_lim_reglement ASC"; $resql=$db->query($sql); From 8901b99e2dfc1eab203fd40a1a7beae04816d4b7 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 4 Jun 2016 00:14:08 +0200 Subject: [PATCH 083/113] Fix import model not correctly saved #5185 --- htdocs/install/mysql/migration/3.8.0-3.9.0.sql | 1 + htdocs/install/mysql/tables/llx_import_model.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index 74f89441f644f..35ebf79e1ef3a 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -610,3 +610,4 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (14 -- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT; +ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50); \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_import_model.sql b/htdocs/install/mysql/tables/llx_import_model.sql index cb5266a0c4169..37ab1c00c12ae 100644 --- a/htdocs/install/mysql/tables/llx_import_model.sql +++ b/htdocs/install/mysql/tables/llx_import_model.sql @@ -23,6 +23,6 @@ create table llx_import_model rowid integer AUTO_INCREMENT PRIMARY KEY, fk_user integer DEFAULT 0 NOT NULL, label varchar(50) NOT NULL, - type varchar(20) NOT NULL, + type varchar(50) NOT NULL, field text NOT NULL )ENGINE=innodb; \ No newline at end of file From 9c3365aefcd4c02ad4aed8ce1b7783561267bcc5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Jun 2016 00:52:55 +0200 Subject: [PATCH 084/113] FIX #5163 --- htdocs/comm/action/listactions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 447a247ad56b4..a9dd8d8f1e51c 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -210,7 +210,7 @@ if ($filtert > 0 || $usergroup > 0) { $sql.= " AND ("; - if ($filtert > 0) $sql.= "(ar.fk_element = ".$filtert." OR a.fk_user_action=".$filtert.")"; + if ($filtert > 0) $sql.= "(ar.fk_element = ".$filtert." OR (ar.fk_element IS NULL AND a.fk_user_action=".$filtert."))"; // The OR is for backward compatibility if ($usergroup > 0) $sql.= ($filtert>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup; $sql.= ")"; } @@ -350,7 +350,7 @@ $actionstatic->type_code=$obj->type_code; $actionstatic->type_label=$obj->type_label; $actionstatic->label=$obj->label; - print $actionstatic->getNomUrl(1,28); + print $actionstatic->getNomUrl(1,36); print ''; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) From ff6daebee68dd457544e7833854bb0be15355abb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Jun 2016 01:19:27 +0200 Subject: [PATCH 085/113] FIX #5203 --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index f41a4b4e69ae6..30381c8c39d34 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -277,7 +277,7 @@ function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $avai $error++; } - if (! $error && !empty($cong->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) + if (! $error && !empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) { // Add record into log table $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price_log("; From a1c7632a501502efbe248f9c8d092404257af7f9 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 4 Jun 2016 01:28:51 +0200 Subject: [PATCH 086/113] Fix import mapping #5229 --- htdocs/imports/import.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index c6fe3094b6860..d2d0540ee8083 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -617,6 +617,10 @@ $obj->separator = $separator; $obj->enclosure = $enclosure; } + + if(!empty(GETPOST('update'))) { + $array_match_file_to_database=array(); + } // Load source fields in input file $fieldssource=array(); @@ -738,7 +742,7 @@ print ''; print '    '.$langs->trans("Enclosure").' : '; print ''; - print ''; + print ''; print ''; print ''; } From 32b6766a7d560d7c47a042f363709588b8124ae7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Jun 2016 01:50:01 +0200 Subject: [PATCH 087/113] FIX #5195 --- htdocs/fourn/commande/card.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index a0cf8bc11bb1d..a9a4024c3ae73 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1006,7 +1006,6 @@ } $idprod = $productsupplier->find_min_price_product_fournisseur($lines[$i]->fk_product, $lines[$i]->qty); - $res = $productsupplier->fetch($idProductFourn); $result = $object->addline( $desc, @@ -1017,7 +1016,7 @@ $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $productsupplier->product_fourn_price_id, - $productsupplier->ref_fourn, + $productsupplier->fourn_ref, $lines[$i]->remise_percent, 'HT', 0, From c9834117c9999c6b2c825caea83e70d8d77e4d39 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Jun 2016 02:03:30 +0200 Subject: [PATCH 088/113] Fix #5156 --- htdocs/langs/en_US/main.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index a60b3ddb21b5c..aaa1085e37742 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -149,6 +149,7 @@ Save=Save SaveAs=Save As TestConnection=Test connection ToClone=Clone +ConfirmCloneAction=Are you sure you want to clone this event ? ConfirmClone=Choose data you want to clone : NoCloneOptionsSpecified=No data to clone defined. Of=of From 01b881a0a692cb3d708c1471155b3539a40c4c96 Mon Sep 17 00:00:00 2001 From: phf Date: Sat, 4 Jun 2016 13:24:42 +0200 Subject: [PATCH 089/113] Fix builddoc with odt lost value of extrafields as "sellist" on view card --- .../modules/propale/doc/doc_generic_proposal_odt.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index d696d95c4d5de..2479acaaaec8f 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -381,6 +381,7 @@ function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidede $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); + $object->fetch_optionals(); // Call the ODTSubstitution hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks From bd2fe75d08dde06f130a1e8408f0992458747b4a Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 4 Jun 2016 14:45:03 +0200 Subject: [PATCH 090/113] Fix menus in dashboard links --- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 4 ++-- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 939054a06ebd5..74ee7488f562e 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2528,7 +2528,7 @@ function load_board($user,$mode) $response = new WorkboardResponse(); $response->warning_delay = $delay_warning/60/60/24; $response->label = $label; - $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut; + $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals'; $response->img = img_object($langs->trans("Propals"),"propal"); // This assignment in condition is not a bug. It allows walking the results. diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 47219049a9198..a853ad49fecca 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2910,7 +2910,7 @@ function load_board($user) $response = new WorkboardResponse(); $response->warning_delay=$conf->commande->client->warning_delay/60/60/24; $response->label=$langs->trans("OrdersToProcess"); - $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3'; + $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders'; $response->img=img_object($langs->trans("Orders"),"order"); while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index dc62189be87be..6633f196eed3a 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3264,7 +3264,7 @@ function load_board($user) $response = new WorkboardResponse(); $response->warning_delay=$conf->facture->client->warning_delay/60/60/24; $response->label=$langs->trans("CustomerBillsUnpaid"); - $response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1'; + $response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1&mainmenu=accountancy&leftmenu=customers_bills'; $response->img=img_object($langs->trans("Bills"),"bill"); while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index a24091c4f970d..361ce27a494b5 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -753,8 +753,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->facture->enabled)) { $langs->load("bills"); - $newmenu->add("/compta/facture/list.php",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills'); - $newmenu->add("/compta/facture.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills'); + $newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer); $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire); if (empty($leftmenu) || ($leftmenu == 'customers_bills')) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index e7777f82cd53f..31ff52886c65e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2318,7 +2318,7 @@ function load_board($user) $response = new WorkboardResponse(); $response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SuppliersOrdersToProcess"); - $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3'; + $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers'; $response->img=img_object($langs->trans("Orders"),"order"); while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index a4799bc53fe2b..9a57f9c025373 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1440,7 +1440,7 @@ function load_board($user) $response = new WorkboardResponse(); $response->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SupplierBillsToPay"); - $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0'; + $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0&mainmenu=accountancy&leftmenu=suppliers_bills'; $response->img=img_object($langs->trans("Bills"),"bill"); while ($obj=$this->db->fetch_object($resql)) From 8ccda16ef370e86ee801d3e3790c43ead1625f29 Mon Sep 17 00:00:00 2001 From: phf Date: Sat, 4 Jun 2016 14:50:32 +0200 Subject: [PATCH 091/113] Fix call function ldap_connect but not exists --- htdocs/core/class/ldap.class.php | 106 +++++++++++++++++-------------- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index ca0cbab392588..85cb36f31f244 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -159,50 +159,41 @@ function connect_bind() dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING); } - // Loop on each ldap server - foreach ($this->server as $key => $host) + if (! function_exists("ldap_connect")) { - if ($connected) break; - if (empty($host)) continue; - - if (preg_match('/^ldap/',$host)) - { - $this->connection = ldap_connect($host); - } - else - { - $this->connection = ldap_connect($host,$this->serverPort); - } + $this->error='LDAPFunctionsNotAvailableOnPHP'; + $return=-1; + dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING); + } - if (is_resource($this->connection)) + if (empty($this->error)) + { + // Loop on each ldap server + foreach ($this->server as $key => $host) { - // Execute the ldap_set_option here (after connect and before bind) - $this->setVersion(); - ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. - - - if ($this->serverType == "activedirectory") + if ($connected) break; + if (empty($host)) continue; + + if (preg_match('/^ldap/',$host)) { - $result=$this->setReferrals(); - dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); - $this->result=$this->bindauth($this->searchUser,$this->searchPassword); - if ($this->result) - { - $this->bind=$this->result; - $connected=2; - break; - } - else - { - $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); - } + $this->connection = ldap_connect($host); } else { - // Try in auth mode - if ($this->searchUser && $this->searchPassword) + $this->connection = ldap_connect($host,$this->serverPort); + } + + if (is_resource($this->connection)) + { + // Execute the ldap_set_option here (after connect and before bind) + $this->setVersion(); + ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. + + + if ($this->serverType == "activedirectory") { - dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); + $result=$this->setReferrals(); + dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); $this->result=$this->bindauth($this->searchUser,$this->searchPassword); if ($this->result) { @@ -215,26 +206,45 @@ function connect_bind() $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); } } - // Try in anonymous - if (! $this->bind) + else { - dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG); - $result=$this->bind(); - if ($result) + // Try in auth mode + if ($this->searchUser && $this->searchPassword) { - $this->bind=$this->result; - $connected=1; - break; + dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); + $this->result=$this->bindauth($this->searchUser,$this->searchPassword); + if ($this->result) + { + $this->bind=$this->result; + $connected=2; + break; + } + else + { + $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + } } - else + // Try in anonymous + if (! $this->bind) { - $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG); + $result=$this->bind(); + if ($result) + { + $this->bind=$this->result; + $connected=1; + break; + } + else + { + $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + } } } } + + if (! $connected) $this->close(); } - - if (! $connected) $this->close(); } if ($connected) From a62f5bd5b4d5729910368cc84e3f60a71d21fd44 Mon Sep 17 00:00:00 2001 From: phf Date: Sat, 4 Jun 2016 17:17:22 +0200 Subject: [PATCH 092/113] Fix #2777 --- htdocs/core/lib/admin.lib.php | 7 +++++++ htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 8 insertions(+) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index dd1615d742759..3a7485350cebe 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -732,17 +732,24 @@ function activateModule($value,$withdeps=1) if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends)) { // Activation des modules dont le module depend + $TError=array(); $num = count($objMod->depends); for ($i = 0; $i < $num; $i++) { + $activate = false; foreach ($modulesdir as $dir) { if (file_exists($dir.$objMod->depends[$i].".class.php")) { activateModule($objMod->depends[$i]); + $activate = true; } } + + if (!$activate) $TError[] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $objMod->depends[$i]); } + + setEventMessages('', $TError, 'errors'); } if (isset($objMod->conflictwith) && is_array($objMod->conflictwith) && ! empty($objMod->conflictwith)) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5966578021a6f..925c822cfcf20 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1563,3 +1563,4 @@ TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both custome IncludePath=Include path (defined into variable %s) NoModueToManageStockDecrease=No module able to manage automatic stock decrease has been activated. Stock decrease will be done on manual input only. NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only. +activateModuleDependNotSatisfied=Module "%s" depends on module "%s" that is missing, so module "%1$s" may not work correclty. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise \ No newline at end of file From 3ef9fe2c40fed0bf33a43f96456b2d056ac24ae8 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 4 Jun 2016 18:10:40 +0200 Subject: [PATCH 093/113] Fix product supplier price modification with multicompany --- htdocs/core/class/html.form.class.php | 2 +- htdocs/fourn/class/fournisseur.product.class.php | 2 +- htdocs/product/class/product.class.php | 4 ++-- htdocs/product/fournisseurs.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8fb0118cd2e29..64ec3d4afdda9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2278,7 +2278,7 @@ function select_product_fourn_price($productid,$htmlname='productfournpriceid') $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid"; - $sql.= " WHERE p.entity IN (".getEntity('product', 1).")"; + $sql.= " WHERE p.entity IN (".getEntity('productprice', 1).")"; $sql.= " AND p.tobuy = 1"; $sql.= " AND s.fournisseur = 1"; $sql.= " AND p.rowid = ".$productid; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 9c889a97d9791..f64ef0e1d9545 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -433,7 +433,7 @@ function list_product_fournisseur_price($prodid, $sortfield='', $sortorder='') $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.unitcharges, pfp.info_bits, pfp.delivery_time_days"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; - $sql.= " WHERE pfp.entity IN (".getEntity('product', 1).")"; + $sql.= " WHERE pfp.entity IN (".getEntity('productprice', 1).")"; $sql.= " AND pfp.fk_soc = s.rowid"; $sql.= " AND pfp.fk_product = ".$prodid; if (empty($sortfield)) $sql.= " ORDER BY s.nom, pfp.quantity, pfp.price"; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ba2eac00cd9e2..79c21cfcbdf8b 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2631,7 +2631,7 @@ function add_fournisseur($user, $id_fourn, $ref_fourn, $quantity) $sql.= " WHERE fk_soc = ".$id_fourn; $sql.= " AND ref_fourn = '".$this->db->escape($ref_fourn)."'"; $sql.= " AND fk_product != ".$this->id; - $sql.= " AND entity = ".$conf->entity; + $sql.= " AND entity IN (".getEntity('productprice', 1).")"; dol_syslog(get_class($this)."::add_fournisseur", LOG_DEBUG); $resql=$this->db->query($sql); @@ -2655,7 +2655,7 @@ function add_fournisseur($user, $id_fourn, $ref_fourn, $quantity) else $sql.= " AND (ref_fourn = '' OR ref_fourn IS NULL)"; $sql.= " AND quantity = '".$quantity."'"; $sql.= " AND fk_product = ".$this->id; - $sql.= " AND entity = ".$conf->entity; + $sql.= " AND entity IN (".getEntity('productprice', 1).")"; dol_syslog(get_class($this)."::add_fournisseur", LOG_DEBUG); $resql=$this->db->query($sql); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 2665ae8fd1eb7..a03c5f5b7554b 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -152,7 +152,7 @@ { $error++; $langs->load("errors"); - setEventMessages($langs->trans("ErrorFieldMustBeANumeric",'eeee'), null, 'errors'); + setEventMessages($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("VATRateForSupplierProduct")), null, 'errors'); } if (empty($quantity)) { From abe84ef991a0ddb1e84dee192360897aa1229ace Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 4 Jun 2016 18:32:00 +0200 Subject: [PATCH 094/113] Fix rights check on expense reports --- htdocs/expensereport/card.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index fed76abed074c..0c86da36936b9 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -805,7 +805,7 @@ } } -if ($action == "addline") +if ($action == "addline" && $user->rights->expensereport->creer) { $error = 0; @@ -896,7 +896,7 @@ $action=''; } -if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") +if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -939,7 +939,7 @@ } } -if ($action == "updateligne" ) +if ($action == "updateligne" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -1647,7 +1647,7 @@ print ''.$langs->trans('AmountTTC').''; } // Ajout des boutons de modification/suppression - if ($object->fk_statut < 2 || $object->fk_statut==99) + if (($object->fk_statut < 2 || $object->fk_statut==99) && $user->rights->expensereport->creer) { print ''; } @@ -1690,7 +1690,7 @@ } // Ajout des boutons de modification/suppression - if($object->fk_statut<2 OR $object->fk_statut==99) + if(($object->fk_statut<2 OR $object->fk_statut==99) && $user->rights->expensereport->creer) { print ''; print 'rowid.'#'.$objp->rowid.'">'; @@ -1770,7 +1770,7 @@ //print ''; // Add a line - if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline') + if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline' && $user->rights->expensereport->creer) { print_fiche_titre($langs->trans("AddLine"),'',''); From 7866fb9dae68ddf0218b8f20005bb4c1fd1a01a0 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 4 Jun 2016 19:11:32 +0200 Subject: [PATCH 095/113] Fix #5153 --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index db227ae4cf603..fb577674b64c8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -431,7 +431,7 @@ function dol_size($size,$type='') */ function dol_sanitizeFileName($str,$newstr='_',$unaccent=1) { - $filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"'); + $filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"','°'); return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars); } From a5472b58d1584caeae067e2bee7dc9bd6367606b Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 5 Jun 2016 00:24:00 +0200 Subject: [PATCH 096/113] FIX #5108 --- htdocs/core/ajax/ajaxdirpreview.php | 5 ++++- htdocs/ecm/index.php | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 997e27adb2030..f1352f8e93399 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -240,7 +240,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $useglobalvars=1; $form = new Form($db); - $formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile')); + $formquestion=array( + 'urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'), + 'section'=>array('type'=>'hidden','value'=>$section,'name'=>'section') + ); print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index e3fa4ece95d42..797e759fb13bc 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -175,10 +175,9 @@ dol_print_error($db,$ecmdir->error); exit; } - $relativepath=$ecmdir->getRelativePath(); } else $relativepath=''; - $upload_dir = $conf->ecm->dir_output.($relativepath?'/'.$relativepath:''); + $upload_dir = $conf->ecm->dir_output; $file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP). $ret=dol_delete_file($file); From 0ab4827091cd5dd181cffe7ff0eea202ed4e00f6 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 5 Jun 2016 02:06:32 +0200 Subject: [PATCH 097/113] FIX #5087 --- htdocs/core/lib/project.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index d354721332a54..fa3967284d968 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -970,7 +970,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet"; $sql2.= " WHERE p.rowid IN (".join(',',$arrayidofprojects).")"; - $sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount"; + $sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, s.nom, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount"; $sql2.= " ORDER BY p.title, p.ref"; $var=true; From 23b748aca3774768c89b6112b2ece090724d1027 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 5 Jun 2016 14:22:13 +0200 Subject: [PATCH 098/113] Fix: Accountancy - Access rights --- htdocs/accountancy/admin/account.php | 4 +++- htdocs/accountancy/admin/fiscalyear.php | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 3f251e0090b68..99b78ff7c5ca5 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -43,7 +43,9 @@ $search_pcgsubtype = GETPOST("search_pcgsubtype"); // Security check -if (! $user->admin) +if ($user->societe_id > 0) + accessforbidden(); +if (! $user->rights->accounting->chartofaccount) accessforbidden(); $sortfield = GETPOST("sortfield", 'alpha'); diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 75411d6402f11..199e04bb856a5 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2016 Alexandre Spangaro * * 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 @@ -30,12 +30,15 @@ $langs->load("admin"); $langs->load("compta"); -if (! $user->admin) +// Security check +if ($user->societe_id > 0) + accessforbidden(); +if (! $user->rights->accounting->fiscalyear) accessforbidden(); $error = 0; -// List of statut +// List of status static $tmpstatut2label = array ( '0' => 'OpenFiscalYear', '1' => 'CloseFiscalYear' From e10db62b3ae39edb5c93eb93159b38e24609bfff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jun 2016 13:29:37 +0200 Subject: [PATCH 099/113] Fix a deadlock situation. If order set to billed by error, no way to solve situation. --- htdocs/commande/card.php | 16 +++++++- htdocs/commande/class/commande.class.php | 52 +++++++++++++++++++++++- 2 files changed, 65 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 489eee739329a..ee576ed48e5f2 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -445,7 +445,15 @@ setEventMessages($object->error, $object->errors, 'errors'); } } - + else if ($action == 'classifyunbilled' && $user->rights->commande->creer) + { + $ret=$object->classifyUnBilled(); + + if ($ret < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + // Positionne ref commande client else if ($action == 'set_ref_client' && $user->rights->commande->creer) { $object->set_ref_client($user, GETPOST('ref_client')); @@ -2373,7 +2381,11 @@ print ''; } } - + if ($object->statut > Commande::STATUS_DRAFT && $object->billed) { + if ($user->rights->commande->creer && $object->statut >= Commande::STATUS_VALIDATED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { + print ''; + } + } // Clone if ($user->rights->commande->creer) { print ''; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 06628ee4ea5bf..30d22e7588ea4 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2420,7 +2420,57 @@ function classer_facturee() return $this->classifyBilled(); } - + /** + * Classify the order as not invoiced + * + * @return int <0 if ko, >0 if ok + */ + function classifyUnBilled() + { + global $conf, $user, $langs; + $error = 0; + + $this->db->begin(); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 0'; + $sql.= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; + + dol_syslog(get_class($this)."::classifyUnBilled", LOG_DEBUG); + if ($this->db->query($sql)) + { + // Call trigger + $result=$this->call_trigger('ORDER_CLASSIFY_UNBILLED',$user); + if ($result < 0) $error++; + // End call triggers + + if (! $error) + { + $this->facturee=0; // deprecated + $this->billed=0; + + $this->db->commit(); + return 1; + } + else + { + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::classifyUnBilled ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; + } + } + else + { + $this->error=$this->db->error(); + $this->db->rollback(); + return -1; + } + } + + /** * Update a line in database * From fb254d3287105bc5dc1b188ce0f266b4f0dbd36e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jun 2016 13:47:46 +0200 Subject: [PATCH 100/113] Update changelog for 3.9.2 --- ChangeLog | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/ChangeLog b/ChangeLog index ef52f808ec71a..052b8bcaaf1e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,47 @@ Upgrading to any other version or any other database system is abolutely require make a Dolibarr upgrade. + +***** ChangeLog for 3.9.2 compared to 3.9.1 ***** +FIX: #4813 Won translation for the key OppStatusWON instead OppStatusWIN +FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists +FIX: #5236 Cron module activated but "Modules tools" does not appear in the left menu. +FIX: Accountancy - 3.9 - Chart of accounts are limited on only one country +FIX: bug on email template +FIX: Can't create a stock transfer from product card +FIX: can't fetch by siret or siren because of first "if" +FIX: Check stock of product by warehouse if $entrepot_id defined on shippings +FIX: Compatible with multicompany +FIX: Creation of the second ressource type fails. +FIX: end of select when no fournprice +FIX: Filter on assigned to was preselected on current user on list "All events" (instead of no filtering) +FIX: Filter on category tag for suppliers +FIX: hook on group card called but not initialized +FIX: Infinite loop on menu tree output for edition +FIX: Can show tree of entries added by external modules using fk_mainmenu and fk_leftmenu instead of fk_menu. +FIX: init var at wrong place report incorrect "shippable" flag on draft order. +FIX: It doesn't check if there is enough stock to update the lines of orders/invoices +FIX: Menu statistics was not visible if module proposal was not enabled +FIX: Merge manually PR #5161 - Bad translation key +FIX: missing column when module was installed before standard integration +FIX: Missing number total of modules +FIX: Not filtering correctly when coming from dashboard +FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH +FIX: Remove PHP Warning: Creating default object from empty value. +FIX: same page added several times on mergepropal option +FIX: search on date into supplier invoice list dont work because of status -1 +FIX: Search supplier ref on contract +FIX: Split of credit note into discount page generates records not correctly recognised as credit note. +FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty +FIX: #5087 +FIX: #5108 +FIX: #5163 +FIX: #5195 +FIX: #5203 +FIX: #5207 +FIX: #5209 +FIX: #5230 + ***** ChangeLog for 3.9.1 compared to 3.9.* ***** FIX: #3815 Call to undefined function local_by_date() FIX: #4424 Missing email of user popup in supplier orders area From 5234e8fc8ff67c8a1192066cd23ef49f959b99bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 14 Jun 2016 15:32:55 +0200 Subject: [PATCH 101/113] Update index.php --- htdocs/accountancy/customer/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 06446fdc908cc..6ed71946efeef 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -95,7 +95,7 @@ $sql1 .= " SET fd.fk_code_ventilation = 0"; $sql1 .= ' WHERE fd.fk_code_ventilation NOT IN '; $sql1 .= ' (SELECT accnt.rowid '; - $sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accountingaccount as accnt'; + $sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt'; $sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst'; $sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')'; @@ -393,4 +393,4 @@ print ''; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 3646b5f5ae6bad2d95051975ba0077641781a11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 14 Jun 2016 16:04:10 +0200 Subject: [PATCH 102/113] Update import.php --- htdocs/imports/import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index d2d0540ee8083..944cac8a9b5d8 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -618,7 +618,7 @@ $obj->enclosure = $enclosure; } - if(!empty(GETPOST('update'))) { + if (GETPOST('update')) { $array_match_file_to_database=array(); } From f51386c59fb1c7964fd33028c7c524fc5a63e49d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 15 Jun 2016 08:06:22 +0200 Subject: [PATCH 103/113] FIX #5343 --- htdocs/install/mysql/migration/3.8.0-3.9.0.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index 35ebf79e1ef3a..1a776c27e6697 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -54,7 +54,7 @@ ALTER TABLE llx_askpricesupplier RENAME TO llx_supplier_proposal; ALTER TABLE llx_askpricesupplierdet RENAME TO llx_supplier_proposaldet; ALTER TABLE llx_askpricesupplier_extrafields RENAME TO llx_supplier_proposal_extrafields; ALTER TABLE llx_askpricesupplierdet_extrafields RENAME TO llx_supplier_proposaldet_extrafields; -ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_asksupplierprice fk_supplier_proposal integer NOT NULL; +ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_supplier_proposal integer NOT NULL; -- Fix bad data update llx_opensurvey_sondage set format = 'D' where format = 'D+'; @@ -610,4 +610,4 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (14 -- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT; -ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50); \ No newline at end of file +ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50); From 748b3bb2bad930e317f8d1c0b21ca8adecb35e2b Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 15 Jun 2016 14:16:56 +0200 Subject: [PATCH 104/113] Fix travis error for GETPOST in empty --- htdocs/imports/import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index d2d0540ee8083..6917eb5aeb03a 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -618,7 +618,8 @@ $obj->enclosure = $enclosure; } - if(!empty(GETPOST('update'))) { + $update = GETPOST('update'); + if(!empty($update)) { $array_match_file_to_database=array(); } From 4c922f073b876ec403dd54f3022a1d6afb573169 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jun 2016 18:21:58 +0200 Subject: [PATCH 105/113] FIX Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries --- htdocs/compta/facture.php | 27 ++++++++++++++------------- htdocs/societe/soc.php | 23 +++++++++++++---------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 85bcf2c68fa8e..04951cbb6cd4b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -392,21 +392,22 @@ // Check parameters - // Check for mandatory prof id - for($i = 1; $i < 6; $i ++) + // Check for mandatory prof id (but only if country is than than ours) + if ($mysoc->country_id > 0 && $object->thirdparty->country_id == $mysoc->country_id) { - $idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY'; - $idprof = 'idprof' . $i; - if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory)) - { - if (! $error) - $langs->load("errors"); - $error ++; - - setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors'); - } + for ($i = 1; $i <= 6; $i++) + { + $idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY'; + $idprof = 'idprof' . $i; + if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory)) + { + if (! $error) $langs->load("errors"); + $error++; + setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors'); + } + } } - + $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 85eacc443413b..012aaf374e28f 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -396,7 +396,7 @@ // Only for companies if (!($object->particulier || $private)) { - for ($i = 1; $i < 5; $i++) + for ($i = 1; $i <= 6; $i++) { $slabel="idprof".$i; $_POST[$slabel]=trim($_POST[$slabel]); @@ -411,15 +411,18 @@ } } - $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; - - if (! $vallabel && ! empty($conf->global->$idprof_mandatory)) - { - $langs->load("errors"); - $error++; - $errors[] = $langs->trans("ErrorProdIdIsMandatory", $langs->transcountry('ProfId'.$i, $object->country_code)); - $action = (($action=='add'||$action=='create')?'create':'edit'); - } + // Check for mandatory prof id (but only if country is than than ours) + if ($mysoc->country_id > 0 && $object->country_id == $mysoc->country_id) + { + $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; + if (! $vallabel && ! empty($conf->global->$idprof_mandatory)) + { + $langs->load("errors"); + $error++; + $errors[] = $langs->trans("ErrorProdIdIsMandatory", $langs->transcountry('ProfId'.$i, $object->country_code)); + $action = (($action=='add'||$action=='create')?'create':'edit'); + } + } } } } From 630a063283c15a0113b68fae01273ed5bd2f8459 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 15 Jun 2016 18:21:58 +0200 Subject: [PATCH 106/113] FIX Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries Conflicts: htdocs/compta/facture.php --- htdocs/compta/facture.php | 29 +++++++++++++++-------------- htdocs/societe/soc.php | 23 +++++++++++++---------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ccfd057ccde64..e805d1ecac955 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -390,21 +390,22 @@ // Check parameters - // Check for mandatory prof id - for($i = 1; $i < 6; $i ++) + // Check for mandatory prof id (but only if country is than than ours) + if ($mysoc->country_id > 0 && $object->thirdparty->country_id == $mysoc->country_id) { - $idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY'; - $idprof = 'idprof' . $i; - if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory)) - { - if (! $error) - $langs->load("errors"); - $error ++; - - setEventMessage($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), 'errors'); - } - } - + for ($i = 1; $i <= 6; $i++) + { + $idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY'; + $idprof = 'idprof' . $i; + if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory)) + { + if (! $error) $langs->load("errors"); + $error++; + setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors'); + } + } + } + $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 7668064995843..3a5ed38e2d530 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -363,7 +363,7 @@ // Only for companies if (!($object->particulier || $private)) { - for ($i = 1; $i < 5; $i++) + for ($i = 1; $i <= 6; $i++) { $slabel="idprof".$i; $_POST[$slabel]=trim($_POST[$slabel]); @@ -378,15 +378,18 @@ } } - $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; - - if (! $vallabel && ! empty($conf->global->$idprof_mandatory)) - { - $langs->load("errors"); - $error++; - $errors[] = $langs->trans("ErrorProdIdIsMandatory", $langs->transcountry('ProfId'.$i, $object->country_code)); - $action = (($action=='add'||$action=='create')?'create':'edit'); - } + // Check for mandatory prof id (but only if country is than than ours) + if ($mysoc->country_id > 0 && $object->country_id == $mysoc->country_id) + { + $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; + if (! $vallabel && ! empty($conf->global->$idprof_mandatory)) + { + $langs->load("errors"); + $error++; + $errors[] = $langs->trans("ErrorProdIdIsMandatory", $langs->transcountry('ProfId'.$i, $object->country_code)); + $action = (($action=='add'||$action=='create')?'create':'edit'); + } + } } } } From 9781baa743fbdcdcf72b7a9cc30ec25f25123b97 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 16 Jun 2016 12:42:21 +0200 Subject: [PATCH 107/113] FIX Filter on opportunity amount and budget --- htdocs/projet/list.php | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index f520e7ba1a62e..e5370159742c3 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -70,6 +70,8 @@ $search_all=GETPOST("search_all"); $search_status=GETPOST("search_status",'int'); $search_opp_status=GETPOST("search_opp_status",'alpha'); +$search_opp_amount=GETPOST("search_opp_amount",'alpha'); +$search_budget_amount=GETPOST("search_budget_amount",'alpha'); $search_public=GETPOST("search_public",'int'); $search_user=GETPOST('search_user','int'); $search_sale=GETPOST('search_sale','int'); @@ -128,7 +130,8 @@ 'p.public'=>array('label'=>$langs->trans("Visibility"), 'checked'=>1, 'position'=>102), 'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>1, 'enabled'=>$conf->global->PROJECT_USE_OPPORTUNITIES, 'position'=>103), 'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>1, 'enabled'=>$conf->global->PROJECT_USE_OPPORTUNITIES, 'position'=>104), - 'p.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500), + 'p.budget_amount'=>array('label'=>$langs->trans("Budget"), 'checked'=>0, 'position'=>110), + 'p.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500), 'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), 'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); @@ -158,6 +161,8 @@ $search_year=""; $search_status=-1; $search_opp_status=-1; + $search_opp_amount=''; + $search_budget_amount=''; $search_public=""; $search_sale=""; $search_user=''; @@ -208,7 +213,7 @@ $distinct='DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once. $sql = "SELECT ".$distinct." p.rowid as projectid, p.ref, p.title, p.fk_statut, p.fk_opp_status, p.public, p.fk_user_creat"; -$sql.= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.tms as date_update"; +$sql.= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.tms as date_update, p.budget_amount"; $sql.= ", s.nom as name, s.rowid as socid"; $sql.= ", cls.code as opp_status_code"; // Add fields for extrafields @@ -273,6 +278,8 @@ if ($search_sale > 0) $sql.= " AND sc.fk_user = " .$search_sale; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))"; if ($search_user > 0) $sql.= " AND ecp.fk_c_type_contact IN (".join(',',array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_user; +if ($search_opp_amount != '') $sql .= natural_search('p.opp_amount', $search_opp_amount, 1); +if ($search_budget_amount != '') $sql .= natural_search('p.budget_amount', $search_budget_amount, 1); // Add where from extra fields foreach ($search_array_options as $key => $val) { @@ -327,6 +334,8 @@ if ($search_public != '') $param.='&search_public='.$search_public; if ($search_user > 0) $param.='&search_user='.$search_user; if ($search_sale > 0) $param.='&search_sale='.$search_sale; + if ($search_opp_amount != '') $param.='&search_opp_amount='.$search_opp_amount; + if ($search_budget_amount != '') $param.='&search_budget_amount='.$search_budget_amount; if ($optioncss != '') $param.='&optioncss='.$optioncss; // Add $param from extra fields foreach ($search_array_options as $key => $val) @@ -335,7 +344,7 @@ $tmpkey=preg_replace('/search_options_/','',$key); if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val); } - + $text=$langs->trans("Projects"); if ($search_user == $user->id) $text=$langs->trans('MyProjects'); print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num,'','title_project'); @@ -406,7 +415,8 @@ if (! empty($arrayfields['p.public']['checked'])) print_liste_field_titre($arrayfields['p.public']['label'],$_SERVER["PHP_SELF"],"p.public","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'],$_SERVER["PHP_SELF"],'p.opp_amount',"",$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'],$_SERVER["PHP_SELF"],'p.fk_opp_status',"",$param,'align="center"',$sortfield,$sortorder); - // Extra fields + if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'],$_SERVER["PHP_SELF"],'p.budget_amount',"",$param,'align="center"',$sortfield,$sortorder); + // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { foreach($extrafields->attribute_label as $key => $val) @@ -479,7 +489,8 @@ } if (! empty($arrayfields['p.opp_amount']['checked'])) { - print ''; + print ''; + print ''; print ''; } if (! empty($arrayfields['p.fk_opp_status']['checked'])) @@ -488,6 +499,12 @@ print $formproject->selectOpportunityStatus('search_opp_status',$search_opp_status,1,1,1); print ''; } + if (! empty($arrayfields['p.budget_amount']['checked'])) + { + print ''; + print ''; + print ''; + } // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -651,7 +668,7 @@ if (! empty($arrayfields['p.opp_amount']['checked'])) { print ''; - if ($obj->opp_status_code) print price($obj->opp_amount, 1, '', 1, - 1, - 1, $conf->currency); + if ($obj->opp_status_code) print price($obj->opp_amount, 1, '', 1, - 1, - 1); print ''; } if (! empty($arrayfields['p.fk_opp_status']['checked'])) @@ -660,6 +677,12 @@ if ($obj->opp_status_code) print $langs->trans("OppStatusShort".$obj->opp_status_code); print ''; } + if (! empty($arrayfields['p.budget_amount']['checked'])) + { + print ''; + if ($obj->budget_amount != '') print price($obj->budget_amount, 1, '', 1, - 1, - 1); + print ''; + } // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { From f94d140d2a21b5b56adcb9de6517d73954056f43 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 16 Jun 2016 13:00:23 +0200 Subject: [PATCH 108/113] Fix bad sql field name --- htdocs/product/stock/product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index e6477fadf69b6..9d84ccd6bfe48 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -472,8 +472,8 @@ } // Stock alert threshold - print ''.$form->editfieldkey("StockLimit",'stocklimit',$object->seuil_stock_alerte,$object,$user->rights->produit->creer).''; - print $form->editfieldval("StockLimit",'stocklimit',$object->seuil_stock_alerte,$object,$user->rights->produit->creer); + print ''.$form->editfieldkey("StockLimit",'seuil_stock_alerte',$object->seuil_stock_alerte,$object,$user->rights->produit->creer).''; + print $form->editfieldval("StockLimit",'seuil_stock_alerte',$object->seuil_stock_alerte,$object,$user->rights->produit->creer); print ''; // Desired stock From 5a51850d54368cc0583161ef6bbbc323ad4dd86a Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Thu, 16 Jun 2016 14:03:11 +0300 Subject: [PATCH 109/113] Greece VAT 23 -> 24 --- htdocs/install/mysql/data/llx_c_tva.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index 4226413be59d7..860c416493ad4 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -107,7 +107,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 5 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 55, 5, '10.7','0','USt. Landwirtschaft', 0); -- GREECE (id country=102) -insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2462, 102, 23, 0, '0', 0, '0', 0, 'Κανονικός Φ.Π.Α.', 1); +insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2462, 102, 24, 0, '0', 0, '0', 0, 'Κανονικός Φ.Π.Α.', 1); insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2463, 102, 0, 0, '0', 0, '0', 0, 'Μηδενικό Φ.Π.Α.', 1); insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2464, 102, 13, 0, '0', 0, '0', 0, 'Μειωμένος Φ.Π.Α.', 1); insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2465, 102, 6.5, 0, '0', 0, '0', 0, 'Υπερμειωμένος Φ.Π.Α.', 1); From bc22f39aa45c25a67b0937c5ea6741281654f80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 16 Jun 2016 20:18:58 +0200 Subject: [PATCH 110/113] Update import.php --- htdocs/imports/import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 944cac8a9b5d8..6917eb5aeb03a 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -618,7 +618,8 @@ $obj->enclosure = $enclosure; } - if (GETPOST('update')) { + $update = GETPOST('update'); + if(!empty($update)) { $array_match_file_to_database=array(); } From a3d53b269f8fd7448793c22d89d1a0e27af9c085 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Jun 2016 10:35:18 +0200 Subject: [PATCH 111/113] FIX javascript error with german-switzerland language --- htdocs/core/js/lib_head.js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 234a23485900f..e3b1d0ed691b2 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1032,7 +1032,7 @@ function price2numjs(amount) { if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") { $thousand = $langs->transnoentitiesnoconv("SeparatorThousand"); } - print "var dec='" . $dec . "'; var thousand='" . $thousand . "';\n"; // Set var in javascript + print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript ?> var main_max_dec_shown = global->MAIN_MAX_DECIMALS_SHOWN); ?>; From d7177575949edd6066a524ce209b6ff7a9f2897d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Jun 2016 10:40:11 +0200 Subject: [PATCH 112/113] Protect against bad value of accurancy to avoid javascript error --- htdocs/core/js/lib_head.js.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index e3b1d0ed691b2..4d02acc992513 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1035,9 +1035,9 @@ function price2numjs(amount) { print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript ?> - var main_max_dec_shown = global->MAIN_MAX_DECIMALS_SHOWN); ?>; - var main_rounding_unit = global->MAIN_MAX_DECIMALS_UNIT; ?>; - var main_rounding_tot = global->MAIN_MAX_DECIMALS_TOT; ?>; + var main_max_dec_shown = global->MAIN_MAX_DECIMALS_SHOWN); ?>; + var main_rounding_unit = global->MAIN_MAX_DECIMALS_UNIT; ?>; + var main_rounding_tot = global->MAIN_MAX_DECIMALS_TOT; ?>; var amount = amount.toString(); From 386b19d4b1f91225c9e2207ce98494e72acdaca0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 19 Jun 2016 17:56:34 +0200 Subject: [PATCH 113/113] Fix regression. Add hidden option PROPAL_DISABLE_SIGNATURE to restore old behaviour. --- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 4b7ddc337b0a4..52f9a09ae9f22 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -647,8 +647,11 @@ function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hid */ // Customer signature area - $posy=$this->_signature_area($pdf, $object, $posy, $outputlangs); - + if (empty($conf->global->PROPAL_DISABLE_SIGNATURE)) + { + $posy=$this->_signature_area($pdf, $object, $posy, $outputlangs); + } + // Pied de page $this->_pagefoot($pdf,$object,$outputlangs); if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();