qual: phpstan for htdocs/expedition/dispatch.php

htdocs/expedition/dispatch.php	216	Property ExpeditionLigne::$qty (float) does not accept string.
htdocs/expedition/dispatch.php	217	Property ExpeditionLigne::$entrepot_id (int) does not accept array|string.
htdocs/expedition/dispatch.php	274	Property ExpeditionLigne::$entrepot_id (int) does not accept array|string.
htdocs/expedition/dispatch.php	275	Property ExpeditionLigne::$fk_origin_line (int) does not accept array|string.
htdocs/expedition/dispatch.php	276	Property ExpeditionLigne::$qty (float) does not accept string.
This commit is contained in:
thibdrev 2024-01-29 17:43:40 +01:00 committed by GitHub
parent 22b42d8b81
commit b53c7b5eb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,7 +160,7 @@ if ($action == 'updatelines' && $usercancreate) {
$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$reg[1].'_'.$reg[2].'month', 'int'), GETPOST('dlc_'.$reg[1].'_'.$reg[2].'day', 'int'), GETPOST('dlc_'.$reg[1].'_'.$reg[2].'year', 'int'));
}
$newqty = price2num(GETPOST($qty, 'alpha'), 'MS');
$newqty = GETPOSTFLOAT($qty, 'MS');
//var_dump("modebatch=".$modebatch." newqty=".$newqty." ent=".$ent." idline=".$idline);
// We ask to move a qty
@ -214,7 +214,7 @@ if ($action == 'updatelines' && $usercancreate) {
} else {
$qtystart = $expeditiondispatch->qty;
$expeditiondispatch->qty = $newqty;
$expeditiondispatch->entrepot_id = GETPOST($ent, 'int');
$expeditiondispatch->entrepot_id = GETPOSTINT($ent);
if ($newqty > 0) {
$result = $expeditiondispatch->update($user);
@ -271,8 +271,8 @@ if ($action == 'updatelines' && $usercancreate) {
}
} else {
$expeditiondispatch->fk_expedition = $object->id;
$expeditiondispatch->entrepot_id = GETPOST($ent, 'int');
$expeditiondispatch->fk_origin_line = GETPOST($fk_commandedet, 'int');
$expeditiondispatch->entrepot_id = GETPOSTINT($ent);
$expeditiondispatch->fk_origin_line = GETPOSTINT($fk_commandedet);
$expeditiondispatch->qty = $newqty;
if ($newqty > 0) {