@@ -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; |
@@ -32,19 +32,19 @@ discard block |
||
32 | 32 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/files.lib.php'; |
33 | 33 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/functions2.lib.php'; |
34 | 34 | |
35 | -require_once constant('DOL_DOCUMENT_ROOT') . '/comm/propal/class/propal.class.php'; // Customer Proposal |
|
36 | -require_once constant('DOL_DOCUMENT_ROOT') . '/commande/class/commande.class.php'; // Sale Order |
|
37 | -require_once constant('DOL_DOCUMENT_ROOT') . '/compta/facture/class/facture.class.php'; // Customer Invoice |
|
38 | -require_once constant('DOL_DOCUMENT_ROOT') . '/contact/class/contact.class.php'; // Contact / Address |
|
39 | -require_once constant('DOL_DOCUMENT_ROOT') . '/expedition/class/expedition.class.php'; // Shipping / Delivery |
|
40 | -require_once constant('DOL_DOCUMENT_ROOT') . '/fourn/class/fournisseur.commande.class.php'; // Purchase Order |
|
41 | -require_once constant('DOL_DOCUMENT_ROOT') . '/fourn/class/fournisseur.facture.class.php'; // Purchase Invoice |
|
42 | -require_once constant('DOL_DOCUMENT_ROOT') . '/projet/class/project.class.php'; // Project |
|
43 | -require_once constant('DOL_DOCUMENT_ROOT') . '/reception/class/reception.class.php'; // Reception |
|
44 | -require_once constant('DOL_DOCUMENT_ROOT') . '/recruitment/class/recruitmentcandidature.class.php'; // Recruiting |
|
45 | -require_once constant('DOL_DOCUMENT_ROOT') . '/societe/class/societe.class.php'; // Third-Party |
|
46 | -require_once constant('DOL_DOCUMENT_ROOT') . '/supplier_proposal/class/supplier_proposal.class.php'; // Supplier Proposal |
|
47 | -require_once constant('DOL_DOCUMENT_ROOT') . '/ticket/class/ticket.class.php'; // Ticket |
|
35 | +require_once constant('DOL_DOCUMENT_ROOT') . '/comm/propal/class/propal.class.php'; // Customer Proposal |
|
36 | +require_once constant('DOL_DOCUMENT_ROOT') . '/commande/class/commande.class.php'; // Sale Order |
|
37 | +require_once constant('DOL_DOCUMENT_ROOT') . '/compta/facture/class/facture.class.php'; // Customer Invoice |
|
38 | +require_once constant('DOL_DOCUMENT_ROOT') . '/contact/class/contact.class.php'; // Contact / Address |
|
39 | +require_once constant('DOL_DOCUMENT_ROOT') . '/expedition/class/expedition.class.php'; // Shipping / Delivery |
|
40 | +require_once constant('DOL_DOCUMENT_ROOT') . '/fourn/class/fournisseur.commande.class.php'; // Purchase Order |
|
41 | +require_once constant('DOL_DOCUMENT_ROOT') . '/fourn/class/fournisseur.facture.class.php'; // Purchase Invoice |
|
42 | +require_once constant('DOL_DOCUMENT_ROOT') . '/projet/class/project.class.php'; // Project |
|
43 | +require_once constant('DOL_DOCUMENT_ROOT') . '/reception/class/reception.class.php'; // Reception |
|
44 | +require_once constant('DOL_DOCUMENT_ROOT') . '/recruitment/class/recruitmentcandidature.class.php'; // Recruiting |
|
45 | +require_once constant('DOL_DOCUMENT_ROOT') . '/societe/class/societe.class.php'; // Third-Party |
|
46 | +require_once constant('DOL_DOCUMENT_ROOT') . '/supplier_proposal/class/supplier_proposal.class.php'; // Supplier Proposal |
|
47 | +require_once constant('DOL_DOCUMENT_ROOT') . '/ticket/class/ticket.class.php'; // Ticket |
|
48 | 48 | //require_once DOL_DOCUMENT_ROOT .'/expensereport/class/expensereport.class.php'; // Expense Report |
49 | 49 | //require_once DOL_DOCUMENT_ROOT .'/holiday/class/holiday.class.php'; // Holidays (leave request) |
50 | 50 | |
@@ -821,8 +821,8 @@ discard block |
||
821 | 821 | { |
822 | 822 | if (function_exists('mb_convert_encoding')) { |
823 | 823 | // change spaces by entropy because mb_convert fail with spaces |
824 | - $str = preg_replace("/ /", "xxxSPACExxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
825 | - $str = preg_replace("/\[Gmail\]/", "xxxGMAILxxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
824 | + $str = preg_replace("/ /", "xxxSPACExxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
825 | + $str = preg_replace("/\[Gmail\]/", "xxxGMAILxxx", $str); // the replacement string must be valid in utf7 so _ can't be used |
|
826 | 826 | // if mb_convert work |
827 | 827 | if ($str = mb_convert_encoding($str, "UTF-7")) { |
828 | 828 | // change characters |
@@ -1444,7 +1444,7 @@ discard block |
||
1444 | 1444 | } |
1445 | 1445 | |
1446 | 1446 | if ($rule['type'] == 'from') { |
1447 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1447 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1448 | 1448 | if (count($tmprulevaluearray) >= 2) { |
1449 | 1449 | foreach ($tmprulevaluearray as $tmprulevalue) { |
1450 | 1450 | $search .= ($search ? ' ' : '') . $not . 'FROM "' . str_replace('"', '', $tmprulevalue) . '"'; |
@@ -1454,7 +1454,7 @@ discard block |
||
1454 | 1454 | } |
1455 | 1455 | } |
1456 | 1456 | if ($rule['type'] == 'to') { |
1457 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1457 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
1458 | 1458 | if (count($tmprulevaluearray) >= 2) { |
1459 | 1459 | foreach ($tmprulevaluearray as $tmprulevalue) { |
1460 | 1460 | $search .= ($search ? ' ' : '') . $not . 'TO "' . str_replace('"', '', $tmprulevalue) . '"'; |
@@ -1641,7 +1641,7 @@ discard block |
||
1641 | 1641 | } |
1642 | 1642 | } |
1643 | 1643 | |
1644 | - $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
1644 | + $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
1645 | 1645 | |
1646 | 1646 | // Loop on each email found |
1647 | 1647 | if (!$error && !empty($arrayofemail) && count($arrayofemail) > 0) { |
@@ -1973,7 +1973,7 @@ discard block |
||
1973 | 1973 | $tmpdate = $overview['date']->toDate(); |
1974 | 1974 | $tmptimezone = $tmpdate->getTimezone()->getName(); |
1975 | 1975 | |
1976 | - $dateemail = dol_stringtotime((string) $overview['date'], 'gmt'); // if $overview['timezone'] is "+00:00" |
|
1976 | + $dateemail = dol_stringtotime((string) $overview['date'], 'gmt'); // if $overview['timezone'] is "+00:00" |
|
1977 | 1977 | if (preg_match('/^([+\-])(\d\d):(\d\d)/', $tmptimezone, $reg)) { |
1978 | 1978 | if ($reg[1] == '+' && ($reg[2] != '00' || $reg[3] != '00')) { |
1979 | 1979 | $dateemail -= (3600 * (int) $reg[2]); |
@@ -1987,7 +1987,7 @@ discard block |
||
1987 | 1987 | $subject = $overview['subject']; |
1988 | 1988 | } else { |
1989 | 1989 | $fromstring = $overview[0]->from; |
1990 | - $replytostring = (!empty($overview['in_reply-to']) ? $overview['in_reply-to'] : (!empty($headers['Reply-To']) ? $headers['Reply-To'] : "")) ; |
|
1990 | + $replytostring = (!empty($overview['in_reply-to']) ? $overview['in_reply-to'] : (!empty($headers['Reply-To']) ? $headers['Reply-To'] : "")); |
|
1991 | 1991 | |
1992 | 1992 | $sender = !empty($overview[0]->sender) ? $overview[0]->sender : ''; |
1993 | 1993 | $to = $overview[0]->to; |
@@ -2058,15 +2058,15 @@ discard block |
||
2058 | 2058 | foreach ($arrayofreferences as $reference) { |
2059 | 2059 | //print "Process mail ".$iforemailloop." email_msgid ".$msgid.", date ".dol_print_date($dateemail, 'dayhour', 'gmt').", subject ".$subject.", reference ".dol_escape_htmltag($reference)."<br>\n"; |
2060 | 2060 | if (!empty($trackidfoundintorecipienttype)) { |
2061 | - $resultsearchtrackid = -1; // trackid found |
|
2061 | + $resultsearchtrackid = -1; // trackid found |
|
2062 | 2062 | $reg[1] = $trackidfoundintorecipienttype; |
2063 | 2063 | $reg[2] = $trackidfoundintorecipientid; |
2064 | 2064 | } elseif (!empty($trackidfoundintomsgidtype)) { |
2065 | - $resultsearchtrackid = -1; // trackid found |
|
2065 | + $resultsearchtrackid = -1; // trackid found |
|
2066 | 2066 | $reg[1] = $trackidfoundintomsgidtype; |
2067 | 2067 | $reg[2] = $trackidfoundintomsgidid; |
2068 | 2068 | } else { |
2069 | - $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@' . preg_quote($host, '/') . '/', $reference, $reg); // trackid found or not |
|
2069 | + $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@' . preg_quote($host, '/') . '/', $reference, $reg); // trackid found or not |
|
2070 | 2070 | if (empty($resultsearchtrackid) && getDolGlobalString('EMAIL_ALTERNATIVE_HOST_SIGNATURE')) { |
2071 | 2071 | $resultsearchtrackid = preg_match('/dolibarr-([a-z]+)([0-9]+)@' . preg_quote(getDolGlobalString('EMAIL_ALTERNATIVE_HOST_SIGNATURE'), '/') . '/', $reference, $reg); // trackid found |
2072 | 2072 | } |
@@ -2364,7 +2364,7 @@ discard block |
||
2364 | 2364 | |
2365 | 2365 | // Make Operation |
2366 | 2366 | dol_syslog("Execute action " . $operation['type'] . " actionparam=" . $operation['actionparam'] . ' thirdpartystatic->id=' . $thirdpartystatic->id . ' contactstatic->id=' . $contactstatic->id . ' projectstatic->id=' . $projectstatic->id); |
2367 | - dol_syslog("Execute action fk_element_id=" . $fk_element_id . " fk_element_type=" . $fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
2367 | + dol_syslog("Execute action fk_element_id=" . $fk_element_id . " fk_element_type=" . $fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
2368 | 2368 | |
2369 | 2369 | // Try to guess if this is an email in or out. |
2370 | 2370 | $actioncode = 'EMAIL_IN'; |
@@ -2417,7 +2417,7 @@ discard block |
||
2417 | 2417 | $operationslog .= '<br>Ticket not found using trackid=' . $trackid . ' or msgid=' . $msgid; |
2418 | 2418 | $ticketalreadyexists = 0; |
2419 | 2419 | } else { |
2420 | - $operationslog .= '<br>Ticket already found using trackid=' . $trackid . ' or msgid=' . $msgid; // We change the operation type to do |
|
2420 | + $operationslog .= '<br>Ticket already found using trackid=' . $trackid . ' or msgid=' . $msgid; // We change the operation type to do |
|
2421 | 2421 | $ticketalreadyexists = 1; |
2422 | 2422 | $operation['type'] = 'recordevent'; |
2423 | 2423 | } |
@@ -2791,8 +2791,8 @@ discard block |
||
2791 | 2791 | $actioncomm->label = $langs->trans("ActionAC_" . $actioncode) . ' - ' . $langs->trans("MailFrom") . ' ' . $from; |
2792 | 2792 | $actioncomm->note_private = $descriptionfull; |
2793 | 2793 | $actioncomm->fk_project = $projectstatic->id; |
2794 | - $actioncomm->datep = $dateemail; // date of email |
|
2795 | - $actioncomm->datef = $dateemail; // date of email |
|
2794 | + $actioncomm->datep = $dateemail; // date of email |
|
2795 | + $actioncomm->datef = $dateemail; // date of email |
|
2796 | 2796 | $actioncomm->percentage = -1; // Not applicable |
2797 | 2797 | $actioncomm->socid = $thirdpartystatic->id; |
2798 | 2798 | $actioncomm->contact_id = $contactstatic->id; |
@@ -2991,7 +2991,7 @@ discard block |
||
2991 | 2991 | } |
2992 | 2992 | $hookmanager->initHooks(array('emailcolector')); |
2993 | 2993 | $parameters = array('arrayobject' => $arrayobject); |
2994 | - $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
2994 | + $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
2995 | 2995 | if ($reshook > 0) { |
2996 | 2996 | $arrayobject = $hookmanager->resArray; |
2997 | 2997 | } |
@@ -3080,7 +3080,7 @@ discard block |
||
3080 | 3080 | $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); |
3081 | 3081 | |
3082 | 3082 | $projecttocreate->title = $subject; |
3083 | - $projecttocreate->date_start = $date; // date of email |
|
3083 | + $projecttocreate->date_start = $date; // date of email |
|
3084 | 3084 | $projecttocreate->date_end = 0; |
3085 | 3085 | $projecttocreate->opp_status = $id_opp_status; |
3086 | 3086 | $projecttocreate->opp_percent = $percent_opp_status; |
@@ -3342,7 +3342,7 @@ discard block |
||
3342 | 3342 | $candidaturetocreate->note_private = $descriptionfull; |
3343 | 3343 | $candidaturetocreate->entity = $conf->entity; |
3344 | 3344 | $candidaturetocreate->email_msgid = $msgid; |
3345 | - $candidaturetocreate->email_date = $date; // date of email |
|
3345 | + $candidaturetocreate->email_date = $date; // date of email |
|
3346 | 3346 | $candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT; |
3347 | 3347 | //$candidaturetocreate->fk_contact = $contactstatic->id; |
3348 | 3348 |
@@ -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 |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | $sql .= " JOIN " . MAIN_DB_PREFIX . "product_stock as ps"; |
181 | 181 | $sql .= " ON ps.rowid = pb.fk_product_stock"; |
182 | 182 | $sql .= " WHERE pb.batch = '" . $db->escape($lot) . "'"; |
183 | - $sql .= " AND ps.fk_product = " . ((int) $prod_id) ; |
|
184 | - $sql .= " AND ps.fk_entrepot = " . ((int) $warehouse_id) ; |
|
183 | + $sql .= " AND ps.fk_product = " . ((int) $prod_id); |
|
184 | + $sql .= " AND ps.fk_entrepot = " . ((int) $warehouse_id); |
|
185 | 185 | |
186 | 186 | $resql = $db->query($sql); |
187 | 187 | if ($resql) { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $qtystart = 0; |
210 | 210 | |
211 | 211 | if ($idline > 0) { |
212 | - $result = $expeditiondispatch->fetch($idline); // get line from llx_expeditiondet |
|
212 | + $result = $expeditiondispatch->fetch($idline); // get line from llx_expeditiondet |
|
213 | 213 | if ($result < 0) { |
214 | 214 | setEventMessages($expeditiondispatch->error, $expeditiondispatch->errors, 'errors'); |
215 | 215 | $error++; |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | llxHeader('', $title, $help_url, '', 0, 0, $morejs); |
383 | 383 | |
384 | 384 | if ($object->id > 0 || !empty($object->ref)) { |
385 | - $lines = $object->lines; // This is an array of detail of line, on line per source order line found intolines[]->fk_elementdet, then each line may have sub data |
|
385 | + $lines = $object->lines; // This is an array of detail of line, on line per source order line found intolines[]->fk_elementdet, then each line may have sub data |
|
386 | 386 | //var_dump($lines[0]->fk_elementdet); exit; |
387 | 387 | |
388 | 388 | $num_prod = count($lines); |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | print '<center>'; |
532 | 532 | |
533 | 533 | print '<br>'; |
534 | - $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0. |
|
534 | + $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0. |
|
535 | 535 | |
536 | 536 | if ($object->statut == Expedition::STATUS_DRAFT) { |
537 | 537 | require_once constant('DOL_DOCUMENT_ROOT') . '/product/class/html.formproduct.class.php'; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | } |
636 | 636 | print '<td class="right">' . $langs->trans("QtyOrdered") . '</td>'; |
637 | 637 | if ($object->status == Expedition::STATUS_DRAFT) { |
638 | - print '<td class="right">' . $langs->trans("QtyToShip"); // Qty to dispatch (sum for all lines of batch detail if there is) |
|
638 | + print '<td class="right">' . $langs->trans("QtyToShip"); // Qty to dispatch (sum for all lines of batch detail if there is) |
|
639 | 639 | } else { |
640 | 640 | print '<td class="right">' . $langs->trans("QtyDispatchedShort") . '</td>'; |
641 | 641 | } |
@@ -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'); |
@@ -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 | /* |
@@ -203,11 +203,11 @@ |
||
203 | 203 | $shipmentline = new ExpeditionLigne($this->db); |
204 | 204 | |
205 | 205 | $shipmentline->entrepot_id = $line['entrepot_id']; |
206 | - $shipmentline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: order id. this->origin is 'commande' |
|
207 | - $shipmentline->origin_line_id = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order id |
|
208 | - $shipmentline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order line id |
|
209 | - $shipmentline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
210 | - $shipmentline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
206 | + $shipmentline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: order id. this->origin is 'commande' |
|
207 | + $shipmentline->origin_line_id = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order id |
|
208 | + $shipmentline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: order line id |
|
209 | + $shipmentline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
210 | + $shipmentline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'commande' or 'order' |
|
211 | 211 | $shipmentline->qty = $line['qty']; |
212 | 212 | $shipmentline->rang = $line['rang']; |
213 | 213 | $shipmentline->array_options = $line['array_options']; |