From 728b64e334dc999fa965d61e2cfe1c4e65bd8747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 20:24:22 +0200 Subject: [PATCH 1/6] Fix Bug #2583: Unable to create a bank transfer with localized numbers --- ChangeLog | 1 + htdocs/compta/bank/virement.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..e299da9a8e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #2583 ] Unable to create a bank transfer with localized numbers ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index bea66e6a47d..07541732bb0 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copytight (C) 2005-2009 Regis Houssin * Copytight (C) 2012 Juanjo Menent + * Copyright (C) 2015 Marcos García * * 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 @@ -48,7 +49,7 @@ if ($action == 'add') $mesg=''; $dateo = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int')); $label = GETPOST('label','alpha'); - $amount= GETPOST('amount','int'); + $amount= GETPOST('amount'); if (! $label) { From bbd01c0c8d0f238a642e26b5078d593571670879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 20:59:58 +0200 Subject: [PATCH 2/6] Fix: Bug #2577 Incorrect invoice status in "Linked objects" page of a project --- ChangeLog | 1 + htdocs/projet/element.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..4681b1bbd41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #2577 ] Incorrect invoice status in "Linked objects" page of a project ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 62bbf9ae642..4d54123ae4a 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2015 Marcos García * * 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 @@ -281,7 +282,14 @@ foreach ($listofreferent as $key => $value) if (empty($value['disableamount'])) print ''.(isset($element->total_ttc)?price($element->total_ttc):' ').''; // Status - print ''.$element->getLibStatut(5).''; + print ''; + if ($element instanceof CommonInvoice) { + //This applies for Facture and FactureFournisseur + print $element->getLibStatut(5, $element->getSommePaiement()); + } else { + print $element->getLibStatut(5); + } + print ''; print ''; From 9cfb295675bebb049bbc367e902c571f1b9a27c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 21:05:26 +0200 Subject: [PATCH 3/6] Fix: Bug #2576 Unable to edit a dictionary entry that has # in its ref --- ChangeLog | 1 + htdocs/admin/dict.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..b59da631ee6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #2576 ] Unable to edit a dictionary entry that has # in its ref ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 62e78ae95e2..391782199e7 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2011 Philippe Grand * Copyright (C) 2011 Remy Younes - * Copyright (C) 2012-2013 Marcos García + * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2011-2012 Alexandre Spangaro * @@ -1104,7 +1104,7 @@ if ($id) if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) $iserasable=0; - $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?$obj->code:'').'&id='.$id.'&'; + $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'').'&id='.$id.'&'; // Active print ''; From 6173706531ac4a19e0c5b66d3f066e6b98cc2c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 21:55:20 +0200 Subject: [PATCH 4/6] Fix: [ bug #1906 ] Deplacement does not allow translated decimal format --- ChangeLog | 1 + htdocs/compta/deplacement/fiche.php | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31e0bad5a16..89e358f1fcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Fix: [ bug #1757 ] Sorting breaks product/service statistics Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of invoice date Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected +Fix: [ bug #1906 ] Deplacement does not allow translated decimal format ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 808d9163222..65328ff6bfb 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry + * Copyright (C) 2015 Marcos García * * 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 @@ -123,8 +124,14 @@ else if ($action == 'add' && $user->rights->deplacement->creer) { $error=0; + $km = GETPOST('km'); + + if ($km) { + $km = price2num($km); + } + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = $km; $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int'); @@ -182,8 +189,14 @@ else if ($action == 'update' && $user->rights->deplacement->creer) { $result = $object->fetch($id); + $km = GETPOST('km'); + + if ($km) { + $km = price2num($km); + } + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = $km; $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int'); @@ -225,12 +238,6 @@ else if ($action == 'setdated' && $user->rights->deplacement->creer) $result=$object->setValueFrom('dated',$dated,'','','date'); if ($result < 0) dol_print_error($db, $object->error); } -else if ($action == 'setkm' && $user->rights->deplacement->creer) -{ - $object->fetch($id); - $result=$object->setValueFrom('km',GETPOST('km','int')); - if ($result < 0) dol_print_error($db, $object->error); -} else if ($action == 'setnote_public' && $user->rights->deplacement->creer) { $object->fetch($id); @@ -385,7 +392,7 @@ else if ($id) // Km print ''.$langs->trans("FeesKilometersOrAmout").''; - print ''; + print ''; print ''; // Where @@ -477,7 +484,7 @@ else if ($id) print ''; print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ''; - print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); + print $form->editfieldval("FeesKilometersOrAmout",'km',price($object->km),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6'); print ""; // Where From 8f0c41dbd21e48fa61164a6794958a7ad6c1e752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 12 Apr 2015 22:02:25 +0200 Subject: [PATCH 5/6] Fix: [ bug #1905 ] Custom deplacement types do not get translated in deplacement card --- ChangeLog | 1 + htdocs/compta/deplacement/fiche.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 89e358f1fcf..c80a9ecc08b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ Fix: [ bug #1797 ] Tulip supplier invoice module takes creation date instead of Fix: [ bug #1792 ] Users are not allowed to see margins module index page when no product view permission is enabled Fix: [ bug #1846 ] Browser IE11 not detected Fix: [ bug #1906 ] Deplacement does not allow translated decimal format +Fix: [ bug #1905 ] Custom deplacement types do not get translated in deplacement card ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** Fix: Avoid missing class error for fetch_thirdparty method #1973 diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 65328ff6bfb..752ffafa357 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -460,10 +460,12 @@ else if ($id) print ''; // Type + $form->load_cache_types_fees(); + print ''; print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; - print $form->editfieldval("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); + print $form->editfieldval("Type",'type', $form->cache_types_fees[$object->type],$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees'); print ''; // Who From 2b8efc302a173e57138e5be6c9de2af57b9838c8 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 18 Apr 2015 11:24:55 +0200 Subject: [PATCH 6/6] Fix : shipment model selection --- htdocs/expedition/class/expedition.class.php | 2 -- htdocs/expedition/fiche.php | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index e5dbb540b85..fa25c48366d 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -164,8 +164,6 @@ class Expedition extends CommonObject $now=dol_now(); - if (empty($this->model_pdf)) $this->model_pdf=$conf->global->EXPEDITION_ADDON_PDF; - require_once DOL_DOCUMENT_ROOT .'/product/stock/class/mouvementstock.class.php'; $error = 0; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 4743ad5f25b..6200f2c3c5f 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -113,6 +113,7 @@ if ($action == 'add') $object->socid = $objectsrc->socid; $object->ref_customer = $objectsrc->ref_client; + $object->model_pdf = GETPOST('model'); $object->date_delivery = $date_delivery; // Date delivery planed $object->fk_delivery_address = $objectsrc->fk_delivery_address; $object->shipping_method_id = GETPOST('shipping_method_id','int'); @@ -662,6 +663,14 @@ if ($action == 'create') print ''; print ''; print "\n"; + + // Document model + print "".$langs->trans("Model").""; + print ''; + include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; + $liste = ModelePdfExpedition::liste_modeles($db); + print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); + print "\n"; // Other attributes $parameters=array('colspan' => ' colspan="3"');