From d77a8bddcffe56645656f6be6a2a684d7bdcd136 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Fri, 19 Feb 2016 07:39:14 +0100 Subject: [PATCH 1/6] Fixed: Members - Problem of tab & missing language file --- htdocs/adherents/card_subscriptions.php | 4 ++-- htdocs/core/lib/member.lib.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 38c6f254bda..998dc53d525 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015-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 @@ -40,7 +40,7 @@ $langs->load("bills"); $langs->load("members"); $langs->load("users"); $langs->load("mails"); - +$langs->load('other'); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index a295d433b6f..8b5bbfcc542 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2015 Raphaƫl Doursenaud * * This program is free software; you can redistribute it and/or modify @@ -91,7 +91,7 @@ function member_prepare_head(Adherent $object) $head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; - $head[$h][2] = 'documents'; + $head[$h][2] = 'document'; $h++; $head[$h][0] = DOL_URL_ROOT.'/adherents/info.php?id='.$object->id; From 7ff8c2c3db324aa9fadf1574db21b1026f94fedf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Feb 2016 02:19:18 +0100 Subject: [PATCH 2/6] FIX Missing carriage return when phone is into property ->phone --- 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 d29d30139c0..278a9cbb626 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -491,7 +491,7 @@ abstract class CommonObject $outdone++; } - if (! empty($this->phone_pro) || ! empty($this->phone_mobile) || ! empty($this->phone_perso) || ! empty($this->fax) || ! empty($this->office_phone) || ! empty($this->user_mobile) || ! empty($this->office_fax)) $out.=($outdone?'
':''); + if (! empty($this->phone) || ! empty($this->phone_pro) || ! empty($this->phone_mobile) || ! empty($this->phone_perso) || ! empty($this->fax) || ! empty($this->office_phone) || ! empty($this->user_mobile) || ! empty($this->office_fax)) $out.=($outdone?'
':''); if (! empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone $out.=dol_print_phone($this->phone,$this->country_code,$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; } From fc8f1272d2d6714bcc5e85e188fa6928f8895be9 Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Fri, 19 Feb 2016 19:47:47 +0100 Subject: [PATCH 3/6] Fix line fetch not converting dates Conflicts: htdocs/comm/propal/class/propal.class.php --- htdocs/comm/propal/class/propal.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 902ee8c0bf4..460b574c246 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1355,8 +1355,8 @@ class Propal extends CommonObject $line->fk_product_type = $objp->fk_product_type; $line->fk_unit = $objp->fk_unit; - $line->date_start = $objp->date_start; - $line->date_end = $objp->date_end; + $line->date_start = $this->db->jdate($objp->date_start); + $line->date_end = $this->db->jdate($objp->date_end); $line->fetch_optionals($line->id,$extralabelsline); From a2817049c90c1962c64593b0ead262ba46668602 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Feb 2016 03:34:56 +0100 Subject: [PATCH 4/6] Fix must show warning only if threshold defined. --- htdocs/product/stock/product.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 5b26f215adb..42fadf54923 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -493,16 +493,14 @@ if ($id > 0 || $ref) print $form->textwithtooltip($langs->trans("PhysicalStock"), $text_stock_options, 2, 1, img_picto('', 'info'), '', 2); print ''; print ''.$object->stock_reel; - if ($object->seuil_stock_alerte && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); + if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print ''; // Calculating a theorical value print ''.$langs->trans("VirtualStock").''; print "".(empty($object->stock_theorique)?0:$object->stock_theorique); - if ($object->stock_theorique < $object->seuil_stock_alerte) { - print ' '.img_warning($langs->trans("StockLowerThanLimit")); - } + if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit")); print ''; print ''; From 2e27319d1bb90b340423470e6a7a706a47706bfa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Feb 2016 03:42:29 +0100 Subject: [PATCH 5/6] Fix Removed not expected br --- htdocs/commande/card.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 9e7f5fae4f8..d7b2bab080a 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2396,7 +2396,6 @@ if ($action == 'create' && $user->rights->commande->creer) } print ''; } - print '
'; if ($action != 'presend') { From 7def330f54ea655c1fab12cd731ae47541301ce0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Feb 2016 03:58:52 +0100 Subject: [PATCH 6/6] Fix missing error message and input lost in shipment create page --- htdocs/expedition/card.php | 5 +++-- htdocs/expedition/class/expedition.class.php | 1 + htdocs/langs/en_US/errors.lang | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 9ef7bdee925..c0daef4cd6b 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -852,9 +852,10 @@ if ($action == 'create') if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() && is_object($product->stock_warehouse[$warehouse_id]))) { // Quantity to send - print ''; + print ''; if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + if (GETPOST('qtyl'.$indiceAsked)) $defaultqty=GETPOST('qtyl'.$indiceAsked); print ''; print ''; } @@ -931,7 +932,7 @@ if ($action == 'create') { //var_dump($dbatch); $substock=$dbatch->qty +0 ; // To get a numeric - print ''; + print ''; print ''; print ''; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 64436dd8bdd..373cb5f2666 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -853,6 +853,7 @@ class Expedition extends CommonObject if (! ($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS)) { + $langs->load("errors"); $this->error=$langs->trans("ErrorWarehouseRequiredIntoShipmentLine"); return -1; } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index f3efba10999..8b64c97ba34 100755 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -172,6 +172,7 @@ ErrorMandatoryParametersNotProvided=Mandatory parameter(s) not provided ErrorOppStatusRequiredIfAmount=You set an estimated amount for this opportunity/lead. So you must also enter its status ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad Definition Of Menu Array In Module Descriptor (bad value for key fk_menu) ErrorSavingChanges=An error has ocurred when saving the changes +ErrorWarehouseRequiredIntoShipmentLine=Warehouse is required on the line to ship # Warnings WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.