@@ -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; |
@@ -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 | } |
@@ -318,11 +318,15 @@ |
||
| 318 | 318 | $resql = $this->db->query($sql); |
| 319 | 319 | if ($resql) { |
| 320 | 320 | while ($obj = $this->db->fetch_object($resql)) { |
| 321 | - if (empty($obj->lettering_code)) continue; |
|
| 321 | + if (empty($obj->lettering_code)) { |
|
| 322 | + continue; |
|
| 323 | + } |
|
| 322 | 324 | |
| 323 | 325 | // Remove normal lettering code if set partial lettering |
| 324 | 326 | if ($partial && preg_match('/^[A-Z]+$/', $obj->lettering_code)) { |
| 325 | - if (!empty($obj->bookkeeping_ids)) $ids = array_diff($ids, explode(',', $obj->bookkeeping_ids)); |
|
| 327 | + if (!empty($obj->bookkeeping_ids)) { |
|
| 328 | + $ids = array_diff($ids, explode(',', $obj->bookkeeping_ids)); |
|
| 329 | + } |
|
| 326 | 330 | } elseif (!$partial && preg_match('/^[a-z]+$/', $obj->lettering_code)) { |
| 327 | 331 | // Delete partial lettering code if set normal lettering |
| 328 | 332 | $sql2 = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping SET"; |
@@ -89,7 +89,9 @@ |
||
| 89 | 89 | $return++; |
| 90 | 90 | } elseif ((int) $line->fk_product > 0) { |
| 91 | 91 | if ($product->fetch($line->fk_product) > 0) { |
| 92 | - if ($product->status_buy) $return++; |
|
| 92 | + if ($product->status_buy) { |
|
| 93 | + $return++; |
|
| 94 | + } |
|
| 93 | 95 | } |
| 94 | 96 | } |
| 95 | 97 | } |
@@ -236,7 +236,9 @@ |
||
| 236 | 236 | print '<form method="POST" ' . ($withdolfichehead ? '' : 'style="margin-bottom: 30px;" ') . 'name="ticket" id="form_create_ticket" enctype="multipart/form-data" action="' . (!empty($this->param["returnurl"]) ? $this->param["returnurl"] : $_SERVER['PHP_SELF']) . '">'; |
| 237 | 237 | print '<input type="hidden" name="token" value="' . newToken() . '">'; |
| 238 | 238 | print '<input type="hidden" name="action" value="' . $this->action . '">'; |
| 239 | - if (!empty($object->id)) print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
| 239 | + if (!empty($object->id)) { |
|
| 240 | + print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
| 241 | + } |
|
| 240 | 242 | print '<input type="hidden" name="trackid" value="' . $this->trackid . '">'; |
| 241 | 243 | foreach ($this->param as $key => $value) { |
| 242 | 244 | print '<input type="hidden" name="' . $key . '" value="' . $value . '">'; |