@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | } |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 460 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 461 | 461 | /** |
| 462 | 462 | * Update link between payment salary and line generate into llx_bank |
| 463 | 463 | * |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | */ |
| 467 | 467 | public function update_fk_bank($id_bank) |
| 468 | 468 | { |
| 469 | - // phpcs:enable |
|
| 469 | + // phpcs:enable |
|
| 470 | 470 | $sql = 'UPDATE '.MAIN_DB_PREFIX.'salary SET fk_bank = '.((int) $id_bank); |
| 471 | 471 | $sql .= " WHERE rowid = ".((int) $this->id); |
| 472 | 472 | $result = $this->db->query($sql); |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | return $this->LibStatut($this->paye, $mode, $alreadypaid); |
| 677 | 677 | } |
| 678 | 678 | |
| 679 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 679 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 680 | 680 | /** |
| 681 | 681 | * Renvoi le libelle d'un statut donne |
| 682 | 682 | * |
@@ -179,7 +179,9 @@ discard block |
||
| 179 | 179 | if (!$notrigger) { |
| 180 | 180 | // Call trigger |
| 181 | 181 | $result = $this->call_trigger('SALARY_MODIFY', $user); |
| 182 | - if ($result < 0) $error++; |
|
| 182 | + if ($result < 0) { |
|
| 183 | + $error++; |
|
| 184 | + } |
|
| 183 | 185 | // End call triggers |
| 184 | 186 | } |
| 185 | 187 | |
@@ -280,7 +282,9 @@ discard block |
||
| 280 | 282 | |
| 281 | 283 | // Call trigger |
| 282 | 284 | $result = $this->call_trigger('SALARY_DELETE', $user); |
| 283 | - if ($result < 0) return -1; |
|
| 285 | + if ($result < 0) { |
|
| 286 | + return -1; |
|
| 287 | + } |
|
| 284 | 288 | // End call triggers |
| 285 | 289 | |
| 286 | 290 | // Delete extrafields |
@@ -394,7 +398,9 @@ discard block |
||
| 394 | 398 | $sql .= ", salary"; |
| 395 | 399 | $sql .= ", fk_typepayment"; |
| 396 | 400 | $sql .= ", fk_account"; |
| 397 | - if ($this->note) $sql .= ", note"; |
|
| 401 | + if ($this->note) { |
|
| 402 | + $sql .= ", note"; |
|
| 403 | + } |
|
| 398 | 404 | $sql .= ", label"; |
| 399 | 405 | $sql .= ", datesp"; |
| 400 | 406 | $sql .= ", dateep"; |
@@ -412,7 +418,9 @@ discard block |
||
| 412 | 418 | $sql .= ", ".($this->salary > 0 ? ((double) $this->salary) : "null"); |
| 413 | 419 | $sql .= ", ".($this->type_payment > 0 ? ((int) $this->type_payment) : 0); |
| 414 | 420 | $sql .= ", ".($this->accountid > 0 ? ((int) $this->accountid) : "null"); |
| 415 | - if ($this->note) $sql .= ", '".$this->db->escape($this->note)."'"; |
|
| 421 | + if ($this->note) { |
|
| 422 | + $sql .= ", '".$this->db->escape($this->note)."'"; |
|
| 423 | + } |
|
| 416 | 424 | $sql .= ", '".$this->db->escape($this->label)."'"; |
| 417 | 425 | $sql .= ", '".$this->db->idate($this->datesp)."'"; |
| 418 | 426 | $sql .= ", '".$this->db->idate($this->dateep)."'"; |
@@ -440,9 +448,13 @@ discard block |
||
| 440 | 448 | |
| 441 | 449 | // Call trigger |
| 442 | 450 | $result = $this->call_trigger('SALARY_CREATE', $user); |
| 443 | - if ($result < 0) $error++; |
|
| 451 | + if ($result < 0) { |
|
| 452 | + $error++; |
|
| 453 | + } |
|
| 444 | 454 | // End call triggers |
| 445 | - } else $error++; |
|
| 455 | + } else { |
|
| 456 | + $error++; |
|
| 457 | + } |
|
| 446 | 458 | |
| 447 | 459 | if (!$error) { |
| 448 | 460 | $this->db->commit(); |
@@ -496,7 +508,10 @@ discard block |
||
| 496 | 508 | global $dolibarr_main_authentication, $dolibarr_main_demo; |
| 497 | 509 | global $menumanager; |
| 498 | 510 | |
| 499 | - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips |
|
| 511 | + if (!empty($conf->dol_no_mouse_hover)) { |
|
| 512 | + $notooltip = 1; |
|
| 513 | + } |
|
| 514 | + // Force disable tooltips |
|
| 500 | 515 | |
| 501 | 516 | $result = ''; |
| 502 | 517 | |
@@ -518,8 +533,12 @@ discard block |
||
| 518 | 533 | if ($option != 'nolink') { |
| 519 | 534 | // Add param to save lastsearch_values or not |
| 520 | 535 | $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); |
| 521 | - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; |
|
| 522 | - if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; |
|
| 536 | + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { |
|
| 537 | + $add_save_lastsearch_values = 1; |
|
| 538 | + } |
|
| 539 | + if ($add_save_lastsearch_values) { |
|
| 540 | + $url .= '&save_lastsearch_values=1'; |
|
| 541 | + } |
|
| 523 | 542 | } |
| 524 | 543 | |
| 525 | 544 | $linkclose = ''; |
@@ -537,15 +556,21 @@ discard block |
||
| 537 | 556 | $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks |
| 538 | 557 | if ($reshook > 0) $linkclose = $hookmanager->resPrint; |
| 539 | 558 | */ |
| 540 | - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); |
|
| 559 | + } else { |
|
| 560 | + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); |
|
| 561 | + } |
|
| 541 | 562 | |
| 542 | 563 | $linkstart = '<a href="'.$url.'"'; |
| 543 | 564 | $linkstart .= $linkclose.'>'; |
| 544 | 565 | $linkend = '</a>'; |
| 545 | 566 | |
| 546 | 567 | $result .= $linkstart; |
| 547 | - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright pictofixedwidth"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip pictofixedwidth"'), 0, 0, $notooltip ? 0 : 1); |
|
| 548 | - if ($withpicto != 2) $result .= $this->ref; |
|
| 568 | + if ($withpicto) { |
|
| 569 | + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright pictofixedwidth"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip pictofixedwidth"'), 0, 0, $notooltip ? 0 : 1); |
|
| 570 | + } |
|
| 571 | + if ($withpicto != 2) { |
|
| 572 | + $result .= $this->ref; |
|
| 573 | + } |
|
| 549 | 574 | $result .= $linkend; |
| 550 | 575 | //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); |
| 551 | 576 | |
@@ -553,8 +578,11 @@ discard block |
||
| 553 | 578 | $hookmanager->initHooks(array('salarypayment')); |
| 554 | 579 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
| 555 | 580 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 556 | - if ($reshook > 0) $result = $hookmanager->resPrint; |
|
| 557 | - else $result .= $hookmanager->resPrint; |
|
| 581 | + if ($reshook > 0) { |
|
| 582 | + $result = $hookmanager->resPrint; |
|
| 583 | + } else { |
|
| 584 | + $result .= $hookmanager->resPrint; |
|
| 585 | + } |
|
| 558 | 586 | |
| 559 | 587 | return $result; |
| 560 | 588 | } |
@@ -580,7 +608,9 @@ discard block |
||
| 580 | 608 | $amount = 0; |
| 581 | 609 | |
| 582 | 610 | $obj = $this->db->fetch_object($resql); |
| 583 | - if ($obj) $amount = $obj->amount ? $obj->amount : 0; |
|
| 611 | + if ($obj) { |
|
| 612 | + $amount = $obj->amount ? $obj->amount : 0; |
|
| 613 | + } |
|
| 584 | 614 | |
| 585 | 615 | $this->db->free($resql); |
| 586 | 616 | return $amount; |
@@ -634,8 +664,11 @@ discard block |
||
| 634 | 664 | $sql .= " paye = 1"; |
| 635 | 665 | $sql .= " WHERE rowid = ".((int) $this->id); |
| 636 | 666 | $return = $this->db->query($sql); |
| 637 | - if ($return) return 1; |
|
| 638 | - else return -1; |
|
| 667 | + if ($return) { |
|
| 668 | + return 1; |
|
| 669 | + } else { |
|
| 670 | + return -1; |
|
| 671 | + } |
|
| 639 | 672 | } |
| 640 | 673 | |
| 641 | 674 | // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
@@ -652,8 +685,11 @@ discard block |
||
| 652 | 685 | $sql .= " paye = 0"; |
| 653 | 686 | $sql .= " WHERE rowid = ".((int) $this->id); |
| 654 | 687 | $return = $this->db->query($sql); |
| 655 | - if ($return) return 1; |
|
| 656 | - else return -1; |
|
| 688 | + if ($return) { |
|
| 689 | + return 1; |
|
| 690 | + } else { |
|
| 691 | + return -1; |
|
| 692 | + } |
|
| 657 | 693 | } |
| 658 | 694 | |
| 659 | 695 | |
@@ -695,15 +731,23 @@ discard block |
||
| 695 | 731 | //$langs->load("mymodule"); |
| 696 | 732 | $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid'); |
| 697 | 733 | $this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid'); |
| 698 | - if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); |
|
| 734 | + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) { |
|
| 735 | + $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); |
|
| 736 | + } |
|
| 699 | 737 | $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid'); |
| 700 | 738 | $this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid'); |
| 701 | - if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); |
|
| 739 | + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) { |
|
| 740 | + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); |
|
| 741 | + } |
|
| 702 | 742 | } |
| 703 | 743 | |
| 704 | 744 | $statusType = 'status1'; |
| 705 | - if ($status == 0 && $alreadypaid <> 0) $statusType = 'status3'; |
|
| 706 | - if ($status == 1) $statusType = 'status6'; |
|
| 745 | + if ($status == 0 && $alreadypaid <> 0) { |
|
| 746 | + $statusType = 'status3'; |
|
| 747 | + } |
|
| 748 | + if ($status == 1) { |
|
| 749 | + $statusType = 'status6'; |
|
| 750 | + } |
|
| 707 | 751 | |
| 708 | 752 | return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); |
| 709 | 753 | } |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | } |
| 611 | 611 | |
| 612 | 612 | |
| 613 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 613 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 614 | 614 | /** |
| 615 | 615 | * Mise a jour du lien entre le paiement de tva et la ligne dans llx_bank generee |
| 616 | 616 | * |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | */ |
| 620 | 620 | public function update_fk_bank($id_bank) |
| 621 | 621 | { |
| 622 | - // phpcs:enable |
|
| 622 | + // phpcs:enable |
|
| 623 | 623 | $sql = "UPDATE ".MAIN_DB_PREFIX."payment_vat SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id); |
| 624 | 624 | |
| 625 | 625 | dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | return $this->LibStatut($this->statut, $mode); |
| 645 | 645 | } |
| 646 | 646 | |
| 647 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 647 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 648 | 648 | /** |
| 649 | 649 | * Renvoi le libelle d'un statut donne |
| 650 | 650 | * |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | */ |
| 655 | 655 | public function LibStatut($status, $mode = 0) |
| 656 | 656 | { |
| 657 | - // phpcs:enable |
|
| 657 | + // phpcs:enable |
|
| 658 | 658 | global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage |
| 659 | 659 | |
| 660 | 660 | $langs->load('compta'); |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | $sql = array(); |
| 171 | 171 | |
| 172 | 172 | // If already used, we add an entry to show we enable module |
| 173 | - require_once DOL_DOCUMENT_ROOT . '/blockedlog/class/blockedlog.class.php'; |
|
| 173 | + require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; |
|
| 174 | 174 | |
| 175 | 175 | $object = new stdClass(); |
| 176 | 176 | $object->id = 1; |
@@ -632,7 +632,7 @@ |
||
| 632 | 632 | } |
| 633 | 633 | $sql .= " WHERE ps.fk_entrepot = ".((int) $this->id); |
| 634 | 634 | if ($separatedPMP) { |
| 635 | - $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ". (int) $conf->entity; |
|
| 635 | + $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ".(int) $conf->entity; |
|
| 636 | 636 | } |
| 637 | 637 | $sql .= " AND ps.fk_product = p.rowid"; |
| 638 | 638 | //print $sql; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; |
| 50 | 50 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
| 51 | 51 | require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
| 52 | -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
| 52 | +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
| 53 | 53 | // Hook to be used by external payment modules (ie Payzen, ...) |
| 54 | 54 | include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; |
| 55 | 55 | $hookmanager = new HookManager($db); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | // Has not already voted |
| 171 | 171 | $conforbooth = new ActionComm($db); |
| 172 | 172 | $resultconforbooth = $conforbooth->fetch($idvote); |
| 173 | - if ($resultconforbooth<=0) { |
|
| 173 | + if ($resultconforbooth <= 0) { |
|
| 174 | 174 | $error++; |
| 175 | 175 | $errmsg .= $conforbooth->error; |
| 176 | 176 | } else { |
@@ -186,11 +186,11 @@ discard block |
||
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | - if ($votestatus=="ok") { |
|
| 189 | + if ($votestatus == "ok") { |
|
| 190 | 190 | setEventMessage($langs->trans("VoteOk"), 'mesgs'); |
| 191 | - } elseif ($votestatus=="ko") { |
|
| 191 | + } elseif ($votestatus == "ko") { |
|
| 192 | 192 | setEventMessage($langs->trans("AlreadyVoted"), 'warnings'); |
| 193 | - } elseif ($votestatus=="err") { |
|
| 193 | + } elseif ($votestatus == "err") { |
|
| 194 | 194 | setEventMessage($langs->trans("VoteError"), 'warnings'); |
| 195 | 195 | } |
| 196 | 196 | header("Refresh:0;url=".dol_buildpath('/public/project/viewandvote.php?id='.$id.'&securekey=', 1).$securekeyreceived); |
@@ -203,7 +203,11 @@ |
||
| 203 | 203 | |
| 204 | 204 | |
| 205 | 205 | $selectedvalue=$conf->global->AGENDA_DISABLE_EXT; |
| 206 | -if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1; |
|
| 206 | +if ($selectedvalue==1) { |
|
| 207 | + $selectedvalue=0; |
|
| 208 | +} else { |
|
| 209 | + $selectedvalue=1; |
|
| 210 | +} |
|
| 207 | 211 | |
| 208 | 212 | print "<table class=\"noborder\" width=\"100%\">"; |
| 209 | 213 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | } else { |
| 79 | 79 | $db->commit(); |
| 80 | 80 | setEventMessage($langs->trans('SetupSaved')); |
| 81 | - header('Location: ' . $_SERVER["PHP_SELF"]); |
|
| 81 | + header('Location: '.$_SERVER["PHP_SELF"]); |
|
| 82 | 82 | exit(); |
| 83 | 83 | } |
| 84 | 84 | } elseif (preg_match('/del_(.*)/', $action, $reg)) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } else { |
| 99 | 99 | $db->commit(); |
| 100 | 100 | setEventMessage($langs->trans('SetupSaved')); |
| 101 | - header('Location: ' . $_SERVER["PHP_SELF"]); |
|
| 101 | + header('Location: '.$_SERVER["PHP_SELF"]); |
|
| 102 | 102 | exit(); |
| 103 | 103 | } |
| 104 | 104 | } elseif ($action == 'save') { |
@@ -203,8 +203,8 @@ discard block |
||
| 203 | 203 | print "<br>\n"; |
| 204 | 204 | |
| 205 | 205 | |
| 206 | -$selectedvalue=$conf->global->AGENDA_DISABLE_EXT; |
|
| 207 | -if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1; |
|
| 206 | +$selectedvalue = $conf->global->AGENDA_DISABLE_EXT; |
|
| 207 | +if ($selectedvalue == 1) $selectedvalue = 0; else $selectedvalue = 1; |
|
| 208 | 208 | |
| 209 | 209 | print "<table class=\"noborder\" width=\"100%\">"; |
| 210 | 210 | |
@@ -256,36 +256,36 @@ discard block |
||
| 256 | 256 | $i = 1; |
| 257 | 257 | while ($i <= $MAXAGENDA) { |
| 258 | 258 | $key = $i; |
| 259 | - $name = 'AGENDA_EXT_NAME' . $key; |
|
| 260 | - $src = 'AGENDA_EXT_SRC' . $key; |
|
| 261 | - $offsettz = 'AGENDA_EXT_OFFSETTZ' . $key; |
|
| 262 | - $color = 'AGENDA_EXT_COLOR' . $key; |
|
| 263 | - $enabled = 'AGENDA_EXT_ENABLED' . $key; |
|
| 264 | - $default = 'AGENDA_EXT_ACTIVEBYDEFAULT' . $key; |
|
| 259 | + $name = 'AGENDA_EXT_NAME'.$key; |
|
| 260 | + $src = 'AGENDA_EXT_SRC'.$key; |
|
| 261 | + $offsettz = 'AGENDA_EXT_OFFSETTZ'.$key; |
|
| 262 | + $color = 'AGENDA_EXT_COLOR'.$key; |
|
| 263 | + $enabled = 'AGENDA_EXT_ENABLED'.$key; |
|
| 264 | + $default = 'AGENDA_EXT_ACTIVEBYDEFAULT'.$key; |
|
| 265 | 265 | |
| 266 | 266 | print '<tr class="oddeven">'; |
| 267 | 267 | // Nb |
| 268 | - print '<td width="180" class="nowrap">' . $langs->trans("AgendaExtNb", $key) . "</td>"; |
|
| 268 | + print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb", $key)."</td>"; |
|
| 269 | 269 | // Name |
| 270 | - print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME' . $key . '" value="' . (GETPOST('AGENDA_EXT_NAME' . $key) ? GETPOST('AGENDA_EXT_NAME' . $key, 'alpha') : getDolGlobalString($name)) . '" size="28"></td>'; |
|
| 270 | + print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME'.$key.'" value="'.(GETPOST('AGENDA_EXT_NAME'.$key) ? GETPOST('AGENDA_EXT_NAME'.$key, 'alpha') : getDolGlobalString($name)).'" size="28"></td>'; |
|
| 271 | 271 | // URL |
| 272 | - print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC' . $key . '" value="' . (GETPOST('AGENDA_EXT_SRC' . $key) ? GETPOST('AGENDA_EXT_SRC' . $key, 'alpha') : getDolGlobalString($src)) . '" size="60"></td>'; |
|
| 272 | + print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC'.$key.'" value="'.(GETPOST('AGENDA_EXT_SRC'.$key) ? GETPOST('AGENDA_EXT_SRC'.$key, 'alpha') : getDolGlobalString($src)).'" size="60"></td>'; |
|
| 273 | 273 | // Offset TZ |
| 274 | - print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ' . $key . '" value="' . (GETPOST('AGENDA_EXT_OFFSETTZ' . $key) ? GETPOST('AGENDA_EXT_OFFSETTZ' . $key) : getDolGlobalString($offsettz)) . '" size="2"></td>'; |
|
| 274 | + print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ'.$key.'" value="'.(GETPOST('AGENDA_EXT_OFFSETTZ'.$key) ? GETPOST('AGENDA_EXT_OFFSETTZ'.$key) : getDolGlobalString($offsettz)).'" size="2"></td>'; |
|
| 275 | 275 | // Color (Possible colors are limited by Google) |
| 276 | 276 | print '<td class="nowrap right">'; |
| 277 | 277 | //print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); |
| 278 | - print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR" . $key) ? GETPOST("AGENDA_EXT_COLOR" . $key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR" . $key, 'extsitesconfig', 1, '', 'hideifnotset'); |
|
| 278 | + print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR".$key) ? GETPOST("AGENDA_EXT_COLOR".$key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR".$key, 'extsitesconfig', 1, '', 'hideifnotset'); |
|
| 279 | 279 | print '</td>'; |
| 280 | 280 | // Calendar active by default |
| 281 | 281 | print '<td class="nowrap right">'; |
| 282 | 282 | if (!empty($conf->use_javascript_ajax)) { |
| 283 | - print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT' . $key); |
|
| 283 | + print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT'.$key); |
|
| 284 | 284 | } else { |
| 285 | 285 | if (getDolGlobalString($default)) { |
| 286 | - print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '&token='.newToken().'">' . img_picto($langs->trans("Disabled"), 'off') . '</a>'; |
|
| 286 | + print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_EXT_ACTIVEBYDEFAULT'.$key.'&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; |
|
| 287 | 287 | } else { |
| 288 | - print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '&token='.newToken().'">' . img_picto($langs->trans("Enabled"), 'on') . '</a>'; |
|
| 288 | + print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_EXT_ACTIVEBYDEFAULT'.$key.'&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>'; |
|
| 289 | 289 | } |
| 290 | 290 | } |
| 291 | 291 | print '</td>'; |
@@ -75,7 +75,9 @@ |
||
| 75 | 75 | |
| 76 | 76 | $parameters = array(); |
| 77 | 77 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
| 78 | -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 78 | +if ($reshook < 0) { |
|
| 79 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
| 80 | +} |
|
| 79 | 81 | |
| 80 | 82 | if (empty($reshook)) { |
| 81 | 83 | $backurlforlist = DOL_URL_ROOT.'/compta/bank/list.php'; |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | if ($result > 0) { |
| 312 | 312 | setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); |
| 313 | - header("Location: " . DOL_URL_ROOT . "/compta/bank/list.php"); |
|
| 313 | + header("Location: ".DOL_URL_ROOT."/compta/bank/list.php"); |
|
| 314 | 314 | exit; |
| 315 | 315 | } else { |
| 316 | 316 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | |
| 544 | 544 | if (isModEnabled('paymentbybanktransfer')) { |
| 545 | 545 | print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td>'; |
| 546 | - print '<td><input type="checkbox" class="flat minwidth150" name="pti_in_ctti"'. (empty(GETPOST('pti_in_ctti')) ? '' : ' checked ') . '> '; |
|
| 546 | + print '<td><input type="checkbox" class="flat minwidth150" name="pti_in_ctti"'.(empty(GETPOST('pti_in_ctti')) ? '' : ' checked ').'> '; |
|
| 547 | 547 | print img_picto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp"), 'info'); |
| 548 | 548 | print '</td></tr>'; |
| 549 | 549 | } |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | print '</tr>'; |
| 792 | 792 | |
| 793 | 793 | print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td><td>'; |
| 794 | - print (empty($object->pti_in_ctti) ? $langs->trans("No") : $langs->trans("Yes")) . ' '; |
|
| 794 | + print (empty($object->pti_in_ctti) ? $langs->trans("No") : $langs->trans("Yes")).' '; |
|
| 795 | 795 | print img_picto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp"), 'info'); |
| 796 | 796 | print "</td></tr>\n"; |
| 797 | 797 | } |
@@ -1078,10 +1078,10 @@ discard block |
||
| 1078 | 1078 | |
| 1079 | 1079 | // IBAN |
| 1080 | 1080 | print '<tr><td>'.$langs->trans($ibankey).'</td>'; |
| 1081 | - print '<td><input class="minwidth300 maxwidth200onsmartphone" maxlength="34" type="text" class="flat" name="iban" value="'.(GETPOSTISSET('iban') ? GETPOST('iban', 'alphanohtml') : $object->iban).'"></td></tr>'; |
|
| 1081 | + print '<td><input class="minwidth300 maxwidth200onsmartphone" maxlength="34" type="text" class="flat" name="iban" value="'.(GETPOSTISSET('iban') ? GETPOST('iban', 'alphanohtml') : $object->iban).'"></td></tr>'; |
|
| 1082 | 1082 | |
| 1083 | 1083 | print '<tr><td>'.$langs->trans($bickey).'</td>'; |
| 1084 | - print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOSTISSET('bic') ? GETPOST('bic', 'alphanohtml') : $object->bic).'"></td></tr>'; |
|
| 1084 | + print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="11" type="text" class="flat" name="bic" value="'.(GETPOSTISSET('bic') ? GETPOST('bic', 'alphanohtml') : $object->bic).'"></td></tr>'; |
|
| 1085 | 1085 | |
| 1086 | 1086 | if (isModEnabled('prelevement')) { |
| 1087 | 1087 | print '<tr><td>'.$form->textwithpicto($langs->trans("ICS"), $langs->trans("ICS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("StandingOrder")).')').'</td>'; |
@@ -1093,7 +1093,7 @@ discard block |
||
| 1093 | 1093 | print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.(GETPOSTISSET('ics_transfer') ? GETPOST('ics_transfer', 'alphanohtml') : $object->ics_transfer).'"></td></tr>'; |
| 1094 | 1094 | |
| 1095 | 1095 | print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td>'; |
| 1096 | - print '<td><input type="checkbox" class="flat minwidth150" name="pti_in_ctti"'. ($object->pti_in_ctti ? ' checked ' : '') . '> '; |
|
| 1096 | + print '<td><input type="checkbox" class="flat minwidth150" name="pti_in_ctti"'.($object->pti_in_ctti ? ' checked ' : '').'> '; |
|
| 1097 | 1097 | print img_picto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp"), 'info'); |
| 1098 | 1098 | print '</td></tr>'; |
| 1099 | 1099 | } |
@@ -268,9 +268,9 @@ discard block |
||
| 268 | 268 | // Exports profiles provided by this module |
| 269 | 269 | $r = 1; |
| 270 | 270 | |
| 271 | - $this->export_code[$r]=$this->rights_class.'_'.$r; |
|
| 272 | - $this->export_label[$r]='MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
| 273 | - $this->export_icon[$r]='mrp'; |
|
| 271 | + $this->export_code[$r] = $this->rights_class.'_'.$r; |
|
| 272 | + $this->export_label[$r] = 'MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
| 273 | + $this->export_icon[$r] = 'mrp'; |
|
| 274 | 274 | $this->export_fields_array[$r] = array( |
| 275 | 275 | 'm.rowid'=>"Id", |
| 276 | 276 | 'm.ref'=>"Ref", |
@@ -350,9 +350,9 @@ discard block |
||
| 350 | 350 | $r++; */ |
| 351 | 351 | /* END MODULEBUILDER IMPORT MO */ |
| 352 | 352 | $r++; |
| 353 | - $this->import_code[$r]=$this->rights_class.'_'.$r; |
|
| 354 | - $this->import_label[$r]='MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
| 355 | - $this->import_icon[$r]='mrp'; |
|
| 353 | + $this->import_code[$r] = $this->rights_class.'_'.$r; |
|
| 354 | + $this->import_label[$r] = 'MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
| 355 | + $this->import_icon[$r] = 'mrp'; |
|
| 356 | 356 | $this->import_entities_array[$r] = array(); // We define here only fields that use a different icon from the one defined in import_icon |
| 357 | 357 | $this->import_tables_array[$r] = array('m'=>MAIN_DB_PREFIX.'mrp_mo', 'extra'=>MAIN_DB_PREFIX.'mrp_mo_extrafields'); |
| 358 | 358 | $this->import_tables_creator_array[$r] = array('m'=>'fk_user_creat'); // Fields to store import user id |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | //var_dump($db); |
| 95 | 95 | if ($resql) { |
| 96 | 96 | while ($row = $db->fetch_array($resql)) { |
| 97 | - $row_array['label'] = $row['location_incoterms'].($row['label']?' - '.$row['label'] : ''); |
|
| 97 | + $row_array['label'] = $row['location_incoterms'].($row['label'] ? ' - '.$row['label'] : ''); |
|
| 98 | 98 | if ($location_incoterms) { |
| 99 | 99 | $row_array['value'] = $row['location_incoterms']; |
| 100 | 100 | } |