@@ -69,7 +69,7 @@ |
||
69 | 69 | /* |
70 | 70 | * Actions |
71 | 71 | */ |
72 | -$parameters = array('id' => $id, 'label' => $label, 'confirm' => $confirm, 'type' => $type, 'uploaddir' => $upload_dir, 'sendfile' => (GETPOST("sendit") ? true : false)); |
|
72 | +$parameters = array('id' => $id, 'label' => $label, 'confirm' => $confirm, 'type' => $type, 'uploaddir' => $upload_dir, 'sendfile' => (GETPOST("sendit") ? true : false)); |
|
73 | 73 | // Note that $action and $object may be modified by some hooks |
74 | 74 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); |
75 | 75 | if ($reshook < 0) { |
@@ -59,7 +59,7 @@ |
||
59 | 59 | |
60 | 60 | $type = $object->type; |
61 | 61 | if (is_numeric($type)) { |
62 | - $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility |
|
62 | + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility |
|
63 | 63 | } |
64 | 64 | |
65 | 65 |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | function getAttachments($jk, $mbox) |
120 | 120 | { |
121 | - $structure = imap_fetchstructure($mbox, $jk, FT_UID); // @phan-suppress-current-line PhanTypeMismatchArgumentInternal |
|
121 | + $structure = imap_fetchstructure($mbox, $jk, FT_UID); // @phan-suppress-current-line PhanTypeMismatchArgumentInternal |
|
122 | 122 | $parts = getParts($structure); |
123 | 123 | |
124 | 124 | $fpos = 2; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | function getFileData($jk, $fpos, $type, $mbox) |
157 | 157 | { |
158 | - $merge = imap_fetchbody($mbox, $jk, $fpos, FT_UID); // @phan-suppress-current-line PhanTypeMismatchArgumentInternal |
|
158 | + $merge = imap_fetchbody($mbox, $jk, $fpos, FT_UID); // @phan-suppress-current-line PhanTypeMismatchArgumentInternal |
|
159 | 159 | $data = getDecodeValue($merge, $type); |
160 | 160 | |
161 | 161 | return $data; |
@@ -98,22 +98,22 @@ |
||
98 | 98 | $fk_product = $obj->fk_product; |
99 | 99 | $reelqty = $obj->reel; |
100 | 100 | |
101 | - $objectreturn = array('fk_warehouse' => $warehouseid,'fk_product' => $fk_product,'reelqty' => $reelqty); |
|
101 | + $objectreturn = array('fk_warehouse' => $warehouseid, 'fk_product' => $fk_product, 'reelqty' => $reelqty); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | } |
105 | 105 | if ($warehousefound < 1) { |
106 | - $response = array('status' => 'error','errorcode' => 'NotFound','message' => 'No warehouse found for barcode' . $barcode); |
|
106 | + $response = array('status' => 'error', 'errorcode' => 'NotFound', 'message' => 'No warehouse found for barcode' . $barcode); |
|
107 | 107 | } elseif ($warehousefound > 1) { |
108 | - $response = array('status' => 'error','errorcode' => 'TooManyWarehouse','message' => 'Too many warehouse found'); |
|
108 | + $response = array('status' => 'error', 'errorcode' => 'TooManyWarehouse', 'message' => 'Too many warehouse found'); |
|
109 | 109 | } else { |
110 | - $response = array('status' => 'success','message' => 'Warehouse found','object' => $objectreturn); |
|
110 | + $response = array('status' => 'success', 'message' => 'Warehouse found', 'object' => $objectreturn); |
|
111 | 111 | } |
112 | 112 | } else { |
113 | - $response = array('status' => 'error','errorcode' => 'NotFound','message' => "No results found for barcode"); |
|
113 | + $response = array('status' => 'error', 'errorcode' => 'NotFound', 'message' => "No results found for barcode"); |
|
114 | 114 | } |
115 | 115 | } else { |
116 | - $response = array('status' => 'error','errorcode' => 'ActionError','message' => "Error on action"); |
|
116 | + $response = array('status' => 'error', 'errorcode' => 'ActionError', 'message' => "Error on action"); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | $response = json_encode($response); |
@@ -1449,7 +1449,7 @@ discard block |
||
1449 | 1449 | $tooltipClass = ' classfortooltip'; |
1450 | 1450 | $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
1451 | 1451 | } else { |
1452 | - $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ; |
|
1452 | + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
|
1453 | 1453 | } |
1454 | 1454 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
1455 | 1455 | |
@@ -1688,7 +1688,7 @@ discard block |
||
1688 | 1688 | $tooltipClass = ' classfortooltip'; |
1689 | 1689 | $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
1690 | 1690 | } else { |
1691 | - $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ; |
|
1691 | + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
|
1692 | 1692 | } |
1693 | 1693 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
1694 | 1694 |
@@ -1437,7 +1437,9 @@ |
||
1437 | 1437 | $deliverableQty = min($quantityToBeDelivered, $batchStock); |
1438 | 1438 | } |
1439 | 1439 | |
1440 | - if ($deliverableQty < 0) $deliverableQty = 0; |
|
1440 | + if ($deliverableQty < 0) { |
|
1441 | + $deliverableQty = 0; |
|
1442 | + } |
|
1441 | 1443 | |
1442 | 1444 | $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
1443 | 1445 | if (GETPOSTISSET($inputName)) { |
@@ -153,7 +153,7 @@ |
||
153 | 153 | |
154 | 154 | $object->fields = dol_sort_array($object->fields, 'position'); |
155 | 155 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
156 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
156 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
157 | 157 | |
158 | 158 | // Security check |
159 | 159 | $expeditionid = GETPOSTINT('id'); |
@@ -444,8 +444,10 @@ |
||
444 | 444 | ); |
445 | 445 | if ($result > 0) { |
446 | 446 | $lineid = $result; |
447 | - if (!empty($createbills_onebythird)) //increment rang to keep sending |
|
447 | + if (!empty($createbills_onebythird)) { |
|
448 | + //increment rang to keep sending |
|
448 | 449 | $TFactThirdNbLines[$expd->socid]++; |
450 | + } |
|
449 | 451 | } else { |
450 | 452 | $lineid = 0; |
451 | 453 | $error++; |
@@ -96,7 +96,7 @@ |
||
96 | 96 | } |
97 | 97 | $result = restrictedArea($user, 'expedition', $object->id, ''); |
98 | 98 | |
99 | -$permissiontoadd = $user->hasRight('expedition', 'creer'); // Used by the include of actions_dellink.inc.php |
|
99 | +$permissiontoadd = $user->hasRight('expedition', 'creer'); // Used by the include of actions_dellink.inc.php |
|
100 | 100 | |
101 | 101 | |
102 | 102 | /* |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $socid = $user->socid; |
82 | 82 | } |
83 | 83 | |
84 | -$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
84 | +$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
85 | 85 | |
86 | 86 | |
87 | 87 |
@@ -105,7 +105,7 @@ |
||
105 | 105 | $match = preg_grep('/(' . preg_quote($htmlname, '/') . '[0-9]+)/', array_keys($_GET)); |
106 | 106 | sort($match); |
107 | 107 | |
108 | - $id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123 |
|
108 | + $id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123 |
|
109 | 109 | |
110 | 110 | // When used from jQuery, the search term is added as GET param $htmlname. |
111 | 111 | $searchkey = (($id && GETPOST($id, 'alpha')) ? GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ? GETPOST($htmlname, 'alpha') : '')); |