From f5ab957faff92e6574e73d99bbdc82131aa77bdb Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 11 Apr 2020 17:55:07 +0200 Subject: [PATCH 1/4] FIX #13535 : state in italian address --- 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 9c9bf505b05..1f7c08c8d7a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1651,7 +1651,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs { $ret .= ($ret ? $sep : '' ).$object->zip; $ret .= ($object->town?(($object->zip?' ':'').$object->town):''); - $ret .= ($object->state_id?(' ('.($object->state_id).')'):''); + $ret .= ($object->state_code?(' ('.($object->state_code).')'):''); } else // Other: title firstname name \n address lines \n zip town \n country { From 3ca0d48b37a50a0e7afe961017c6346ac9da193f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 12 Apr 2020 10:45:30 +0200 Subject: [PATCH 2/4] Fix warning on shipment because of count func --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index c6b172a5366..236534fa35d 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2544,7 +2544,7 @@ else if ($id || $ref) // This is just to generate a delivery receipt //var_dump($object->linkedObjectsIds['delivery']); - if ($conf->livraison_bon->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && count($object->linkedObjectsIds['delivery']) == 0) + if ($conf->livraison_bon->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds['delivery'])) { print ''.$langs->trans("CreateDeliveryOrder").''; } From f2704036cdb5585e7d7e71679e22f86ef9e4a2f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Apr 2020 16:00:41 +0200 Subject: [PATCH 3/4] FIX #13517 --- htdocs/reception/class/reception.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 260a3744e2e..5552d45380e 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -206,6 +206,8 @@ class Reception extends CommonObject $this->brouillon = 1; $this->tracking_number = dol_sanitizeFileName($this->tracking_number); if (empty($this->fk_project)) $this->fk_project = 0; + if (empty($this->weight_units)) $this->weight_units = 0; + if (empty($this->size_units)) $this->size_units = 0; $this->user = $user; From d143bd8aec55c96f8bfe7c281cc91c24d9cd2a29 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Apr 2020 21:22:08 +0200 Subject: [PATCH 4/4] FIX #13589 missing price_level in import of thirdparties --- htdocs/core/modules/modSociete.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index ae093a25322..46659938782 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -448,6 +448,7 @@ class modSociete extends DolibarrModules 's.fk_multicurrency' => 'MulticurrencyUsed', 's.multicurrency_code' => 'MulticurrencyCurrency' ); + if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->import_fields_array[$r]['s.price_level']='PriceLevel'; // Add extra fields $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql);