diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index d509c0ff5b1..7d1b5e76637 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -308,10 +308,10 @@ if (empty($reshook)) { $object->origin_type = $origin; $object->origin_id = $origin_id; $object->fk_project = GETPOSTINT('projectid'); - $object->weight = GETPOST('weight') == '' ? "NULL" : GETPOSTFLOAT('weight'); - $object->sizeH = GETPOST('sizeH') == '' ? "NULL" : GETPOSTFLOAT('sizeH'); - $object->sizeW = GETPOST('sizeW') == '' ? "NULL" : GETPOSTFLOAT('sizeW'); - $object->sizeS = GETPOST('sizeS') == '' ? "NULL" : GETPOSTFLOAT('sizeS'); + $object->weight = GETPOST('weight') == '' ? '' : GETPOSTFLOAT('weight'); + $object->sizeH = GETPOST('sizeH') == '' ? '' : GETPOSTFLOAT('sizeH'); + $object->sizeW = GETPOST('sizeW') == '' ? '' : GETPOSTFLOAT('sizeW'); + $object->sizeS = GETPOST('sizeS') == '' ? '' : GETPOSTFLOAT('sizeS'); $object->size_units = GETPOSTINT('size_units'); $object->weight_units = GETPOSTINT('weight_units'); $object->ref_customer = GETPOST('ref_customer', 'alpha'); @@ -350,10 +350,10 @@ if (empty($reshook)) { $object->origin_type = $origin; $object->origin_id = $origin_id; $object->fk_project = GETPOSTINT('projectid'); - $object->weight = GETPOST('weight') == '' ? "NULL" : GETPOSTFLOAT('weight'); - $object->sizeH = GETPOST('sizeH') == '' ? "NULL" : GETPOSTFLOAT('sizeH'); - $object->sizeW = GETPOST('sizeW') == '' ? "NULL" : GETPOSTFLOAT('sizeW'); - $object->sizeS = GETPOST('sizeS') == '' ? "NULL" : GETPOSTFLOAT('sizeS'); + $object->weight = GETPOST('weight') == '' ? '' : GETPOSTFLOAT('weight'); + $object->sizeH = GETPOST('sizeH') == '' ? '' : GETPOSTFLOAT('sizeH'); + $object->sizeW = GETPOST('sizeW') == '' ? '' : GETPOSTFLOAT('sizeW'); + $object->sizeS = GETPOST('sizeS') == '' ? '' : GETPOSTFLOAT('sizeS'); $object->size_units = GETPOSTINT('size_units'); $object->weight_units = GETPOSTINT('weight_units'); $object->ref_customer = GETPOST('ref_customer', 'alpha'); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 60d870b4ef6..d9d5d1d7911 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -152,7 +152,7 @@ class Expedition extends CommonObject public $billed; /** - * @var null|int|string + * @var null|int|float|'' */ public $trueWeight; /** @@ -160,7 +160,7 @@ class Expedition extends CommonObject */ public $weight_units; /** - * @var null|int|string + * @var null|int|float|'' */ public $trueWidth; /** @@ -168,7 +168,7 @@ class Expedition extends CommonObject */ public $width_units; /** - * @var null|int|string + * @var null|int|float|'' */ public $trueHeight; /** @@ -176,7 +176,7 @@ class Expedition extends CommonObject */ public $height_units; /** - * @var null|int|string + * @var null|int|float|'' */ public $trueDepth; /** @@ -184,7 +184,7 @@ class Expedition extends CommonObject */ public $depth_units; /** - * @var null|string A denormalized value + * @var null|int|float|'' A denormalized value */ public $trueSize;