diff --git a/ChangeLog b/ChangeLog index b59da631ee6..1c4919910d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ 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 +Fix: [ bug #1905 ] Custom deplacement types do not get translated in deplacement card +Fix: [ bug #2583 ] Unable to create a bank transfer with localized numbers +Fix: [ bug #2577 ] Incorrect invoice status in "Linked objects" page of a project Fix: [ bug #2576 ] Unable to edit a dictionary entry that has # in its ref ***** ChangeLog for 3.5.6 compared to 3.5.5 ***** 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) { diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 808d9163222..752ffafa357 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 @@ -453,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 @@ -477,7 +486,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 diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index 1cc70aa009e..a4514efbce4 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -44,8 +44,8 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode function __construct() { global $conf; - if (empty($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER)) $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER='411'; - if (empty($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER)) $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER='401'; + if (! isset($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) || trim($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) == '') $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER='411'; + if (! isset($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) || trim($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) == '') $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER='401'; $this->prefixcustomeraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER; $this->prefixsupplieraccountancycode=$conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER; } 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"'); 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 '';