@@ -99,8 +99,9 @@ |
||
99 | 99 | $main_data_dir = $argv[4]; // override when executing the script in command line |
100 | 100 | } |
101 | 101 | // In mode 3 the main_url is custom |
102 | - if ($force_install_noedit != 3) |
|
103 | - $main_url = detect_dolibarr_main_url_root(); |
|
102 | + if ($force_install_noedit != 3) { |
|
103 | + $main_url = detect_dolibarr_main_url_root(); |
|
104 | + } |
|
104 | 105 | if (!empty($argv[5])) { |
105 | 106 | $main_url = $argv[5]; // override when executing the script in command line |
106 | 107 | } |
@@ -192,7 +192,9 @@ discard block |
||
192 | 192 | |
193 | 193 | if (($action == 'add' || ($action == 'update' && $object->status < Ticket::STATUS_CLOSED)) && $permissiontoadd) { |
194 | 194 | $ifErrorAction = $action == 'add' ? 'create' : 'edit'; |
195 | - if ($action == 'add') $object->track_id = null; |
|
195 | + if ($action == 'add') { |
|
196 | + $object->track_id = null; |
|
197 | + } |
|
196 | 198 | $error = 0; |
197 | 199 | |
198 | 200 | $fieldsToCheck = [ |
@@ -344,7 +346,9 @@ discard block |
||
344 | 346 | $db->rollback(); |
345 | 347 | setEventMessages($object->error, $object->errors, 'errors'); |
346 | 348 | } |
347 | - } else $action = $ifErrorAction; |
|
349 | + } else { |
|
350 | + $action = $ifErrorAction; |
|
351 | + } |
|
348 | 352 | } |
349 | 353 | |
350 | 354 | // Mark as Read |
@@ -49,7 +49,9 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | // Not sure this is required |
52 | -if (isset($_SESSION['webportal_logged_thirdparty_account_id'])) unset($_SESSION['webportal_logged_thirdparty_account_id']); |
|
52 | +if (isset($_SESSION['webportal_logged_thirdparty_account_id'])) { |
|
53 | + unset($_SESSION['webportal_logged_thirdparty_account_id']); |
|
54 | +} |
|
53 | 55 | |
54 | 56 | if (GETPOST('noredirect')) { |
55 | 57 | return; |
@@ -467,13 +467,23 @@ |
||
467 | 467 | if ($this->product->multiprices_base_type[$key] != $oldproduct->multiprices_base_type[$key]) { |
468 | 468 | $pricemodified = true; |
469 | 469 | } else { |
470 | - if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) $pricemodified = true; |
|
470 | + if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) { |
|
471 | + $pricemodified = true; |
|
472 | + } |
|
471 | 473 | if ($this->product->multiprices_base_type[$key] == 'TTC') { |
472 | - if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) $pricemodified = true; |
|
473 | - if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) $pricemodified = true; |
|
474 | + if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) { |
|
475 | + $pricemodified = true; |
|
476 | + } |
|
477 | + if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) { |
|
478 | + $pricemodified = true; |
|
479 | + } |
|
474 | 480 | } else { |
475 | - if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) $pricemodified = true; |
|
476 | - if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) $pricemodified = true; |
|
481 | + if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) { |
|
482 | + $pricemodified = true; |
|
483 | + } |
|
484 | + if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) { |
|
485 | + $pricemodified = true; |
|
486 | + } |
|
477 | 487 | } |
478 | 488 | } |
479 | 489 | if ($pricemodified && $result > 0) { |
@@ -445,7 +445,9 @@ |
||
445 | 445 | { |
446 | 446 | $paymentsalary = array(); |
447 | 447 | $fields = Salaries::$FIELDSPAYMENT; |
448 | - if (isModEnabled("bank")) array_push($fields, "accountid"); |
|
448 | + if (isModEnabled("bank")) { |
|
449 | + array_push($fields, "accountid"); |
|
450 | + } |
|
449 | 451 | foreach ($fields as $field) { |
450 | 452 | if (!isset($data[$field])) { |
451 | 453 | throw new RestException(400, "$field field missing"); |
@@ -3558,7 +3558,9 @@ discard block |
||
3558 | 3558 | $deja_regle = $invoice->getSommePaiement(); |
3559 | 3559 | |
3560 | 3560 | $resteapayer = price2num($invoice->total_ttc - $deja_regle - $total_ttc_rg - $creditnoteamount - $depositsamount, 'MT'); |
3561 | - if ($invoice->paye) $resteapayer = 0; |
|
3561 | + if ($invoice->paye) { |
|
3562 | + $resteapayer = 0; |
|
3563 | + } |
|
3562 | 3564 | |
3563 | 3565 | $y = 0; |
3564 | 3566 | |
@@ -3608,7 +3610,9 @@ discard block |
||
3608 | 3610 | |
3609 | 3611 | if ($deja_regle > 0) { |
3610 | 3612 | $title = $outputlangs->transnoentities("PaymentsAlreadyDone"); |
3611 | - if ($invoice->type == 2) $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); |
|
3613 | + if ($invoice->type == 2) { |
|
3614 | + $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); |
|
3615 | + } |
|
3612 | 3616 | |
3613 | 3617 | $pdf->SetFont('', '', $default_font_size - 3); |
3614 | 3618 | $pdf->SetXY($posx, $posy + $height * $index); |
@@ -3671,7 +3675,9 @@ discard block |
||
3671 | 3675 | if (!empty($this->tplidx)) { |
3672 | 3676 | $pdf->useTemplate($this->tplidx); |
3673 | 3677 | } |
3674 | - if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); |
|
3678 | + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { |
|
3679 | + $this->_pagehead($pdf, $object, 0, $outputlangs); |
|
3680 | + } |
|
3675 | 3681 | $pdf->setPage($pageposafter + 1); |
3676 | 3682 | $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
3677 | 3683 |
@@ -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)) { |
@@ -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++; |
@@ -2663,6 +2663,8 @@ |
||
2663 | 2663 | $this->dictionaries['tab' . $field][] = $dictionaryArray[$field]; |
2664 | 2664 | } |
2665 | 2665 | } |
2666 | - if ($langs && !in_array($langs, $this->dictionaries[$langs])) $this->dictionaries['langs'][] = $langs; |
|
2666 | + if ($langs && !in_array($langs, $this->dictionaries[$langs])) { |
|
2667 | + $this->dictionaries['langs'][] = $langs; |
|
2668 | + } |
|
2667 | 2669 | } |
2668 | 2670 | } |