@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | // Parameters |
36 | 36 | $action = GETPOST('action', 'aZ09'); |
37 | 37 | $backtopage = GETPOST('backtopage', 'alpha'); |
38 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
38 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
39 | 39 | |
40 | 40 | if (empty($action)) { |
41 | 41 | $action = 'edit'; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | //'gemini' => 'Gemini' |
72 | 72 | ); |
73 | 73 | |
74 | -$item = $formSetup->newItem('AI_API_SERVICE'); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
74 | +$item = $formSetup->newItem('AI_API_SERVICE'); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
75 | 75 | $item->setAsSelect($arrayofia); |
76 | 76 | $item->cssClass = 'minwidth150'; |
77 | 77 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $item->defaultFieldValue = ''; |
82 | 82 | $item->cssClass = 'minwidth500';*/ |
83 | 83 | |
84 | - $item = $formSetup->newItem('AI_API_' . strtoupper($ia) . '_KEY')->setAsSecureKey(); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
84 | + $item = $formSetup->newItem('AI_API_' . strtoupper($ia) . '_KEY')->setAsSecureKey(); // Name of constant must end with _KEY so it is encrypted when saved into database. |
|
85 | 85 | $item->nameText = $langs->trans("AI_API_KEY") . ' (' . $ialabel . ')'; |
86 | 86 | $item->defaultFieldValue = ''; |
87 | 87 | $item->fieldParams['hideGenerateButton'] = 1; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | // Parameters |
35 | 35 | $action = GETPOST('action', 'aZ09'); |
36 | 36 | $backtopage = GETPOST('backtopage', 'alpha'); |
37 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
37 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
38 | 38 | |
39 | 39 | if (empty($action)) { |
40 | 40 | $action = 'edit'; |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $ai = new Ai($db); |
65 | 65 | |
66 | 66 | // Get parameters |
67 | -$function = empty($jsonData['function']) ? 'textgeneration' : $jsonData['function']; // Default value. Can also be 'textgenerationemail', 'textgenerationwebpage', ... |
|
67 | +$function = empty($jsonData['function']) ? 'textgeneration' : $jsonData['function']; // Default value. Can also be 'textgenerationemail', 'textgenerationwebpage', ... |
|
68 | 68 | $instructions = dol_string_nohtmltag($jsonData['instructions'], 1, 'UTF-8'); |
69 | 69 | $format = empty($jsonData['format']) ? '' : $jsonData['format']; |
70 | 70 |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | // Create a line of payments |
301 | 301 | $paiement = new PaymentSalary($db); |
302 | 302 | $paiement->fk_salary = $object->id; |
303 | - $paiement->chid = $object->id; // deprecated |
|
303 | + $paiement->chid = $object->id; // deprecated |
|
304 | 304 | $paiement->datep = $datep; |
305 | 305 | $paiement->datev = $datev; |
306 | 306 | $paiement->amounts = array($object->id => $amount); // Tableau de montant |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | |
622 | 622 | // Auto create payment |
623 | 623 | print '<tr><td><label for="auto_create_paiement">' . $langs->trans('AutomaticCreationPayment') . '</label></td>'; |
624 | - print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_paiement) ? '' : 'checked="checked"') . ' value="1"></td></tr>' . "\n"; // Date payment |
|
624 | + print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_paiement) ? '' : 'checked="checked"') . ' value="1"></td></tr>' . "\n"; // Date payment |
|
625 | 625 | |
626 | 626 | // Bank |
627 | 627 | if (isModEnabled("bank")) { |
@@ -55,7 +55,7 @@ |
||
55 | 55 | dol_print_error($db, 'Failed to get payment id ' . $id); |
56 | 56 | } |
57 | 57 | } |
58 | -restrictedArea($user, 'salaries', $object->fk_salary, 'salary', ''); // $object is payment of salary |
|
58 | +restrictedArea($user, 'salaries', $object->fk_salary, 'salary', ''); // $object is payment of salary |
|
59 | 59 | |
60 | 60 | |
61 | 61 | /* |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | } else { |
177 | 177 | //Checking error |
178 | 178 | $error = 0; |
179 | - $listofSalries = array(); |
|
179 | + $listofSalries = array(); |
|
180 | 180 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
181 | 181 | foreach ($arrayofselected as $toselectid) { |
182 | 182 | $objecttmp = new Salary($db); |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | // Output page |
440 | 440 | // -------------------------------------------------------------------- |
441 | 441 | |
442 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
442 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
443 | 443 | |
444 | 444 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
445 | 445 | |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | } |
567 | 567 | |
568 | 568 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
569 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
569 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
570 | 570 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
571 | 571 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
572 | 572 | |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $userstatic->login = $obj->login; |
734 | 734 | $userstatic->email = $obj->email; |
735 | 735 | $userstatic->socid = $obj->fk_soc; |
736 | - $userstatic->statut = $obj->status; // deprecated |
|
736 | + $userstatic->statut = $obj->status; // deprecated |
|
737 | 737 | $userstatic->status = $obj->status; |
738 | 738 | $userstatic->photo = $obj->photo; |
739 | 739 |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | } |
689 | 689 | |
690 | 690 | |
691 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
691 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
692 | 692 | /** |
693 | 693 | * Mise a jour du lien entre le paiement de salaire et la ligne dans llx_bank generee |
694 | 694 | * |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | */ |
698 | 698 | public function update_fk_bank($id_bank) |
699 | 699 | { |
700 | - // phpcs:enable |
|
700 | + // phpcs:enable |
|
701 | 701 | $sql = "UPDATE " . MAIN_DB_PREFIX . "payment_salary SET fk_bank = " . ((int) $id_bank) . " WHERE rowid = " . ((int) $this->id); |
702 | 702 | |
703 | 703 | dol_syslog(get_class($this) . "::update_fk_bank", LOG_DEBUG); |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | return $this->LibStatut($this->statut, $mode); |
777 | 777 | } |
778 | 778 | |
779 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
779 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
780 | 780 | /** |
781 | 781 | * Return the status |
782 | 782 | * |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | */ |
787 | 787 | public function LibStatut($status, $mode = 0) |
788 | 788 | { |
789 | - // phpcs:enable |
|
789 | + // phpcs:enable |
|
790 | 790 | global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage |
791 | 791 | |
792 | 792 | $langs->load('compta'); |
@@ -294,7 +294,7 @@ |
||
294 | 294 | $this->amount = $totalamount; |
295 | 295 | $this->total = $totalamount; // deprecated |
296 | 296 | $this->db->commit(); |
297 | - return $this->id; // id of the last payment inserted |
|
297 | + return $this->id; // id of the last payment inserted |
|
298 | 298 | } else { |
299 | 299 | $this->error = $this->db->error(); |
300 | 300 | $this->db->rollback(); |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | return $paymentsalary; |
456 | 456 | } |
457 | 457 | |
458 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
458 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
459 | 459 | /** |
460 | 460 | * Clean sensible object datas |
461 | 461 | * |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | */ |
465 | 465 | protected function _cleanObjectDatas($object) |
466 | 466 | { |
467 | - // phpcs:enable |
|
467 | + // phpcs:enable |
|
468 | 468 | $object = parent::_cleanObjectDatas($object); |
469 | 469 | |
470 | 470 | unset($object->rowid); |
@@ -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"); |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | } |
449 | 449 | } |
450 | 450 | |
451 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
451 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
452 | 452 | /** |
453 | 453 | * Update link between payment salary and line generate into llx_bank |
454 | 454 | * |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | */ |
458 | 458 | public function update_fk_bank($id_bank) |
459 | 459 | { |
460 | - // phpcs:enable |
|
460 | + // phpcs:enable |
|
461 | 461 | $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'salary SET fk_bank = ' . ((int) $id_bank); |
462 | 462 | $sql .= " WHERE rowid = " . ((int) $this->id); |
463 | 463 | $result = $this->db->query($sql); |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | } |
666 | 666 | } |
667 | 667 | |
668 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
668 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
669 | 669 | /** |
670 | 670 | * Tag social contribution as paid completely |
671 | 671 | * |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | */ |
677 | 677 | public function set_paid($user) |
678 | 678 | { |
679 | - // phpcs:enable |
|
679 | + // phpcs:enable |
|
680 | 680 | dol_syslog(get_class($this) . "::set_paid is deprecated, use setPaid instead", LOG_NOTICE); |
681 | 681 | return $this->setPaid($user); |
682 | 682 | } |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | } |
704 | 704 | } |
705 | 705 | |
706 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
706 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
707 | 707 | /** |
708 | 708 | * Remove tag paid on social contribution |
709 | 709 | * |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | */ |
713 | 713 | public function set_unpaid($user) |
714 | 714 | { |
715 | - // phpcs:enable |
|
715 | + // phpcs:enable |
|
716 | 716 | $sql = "UPDATE " . MAIN_DB_PREFIX . "salary SET"; |
717 | 717 | $sql .= " paye = 0"; |
718 | 718 | $sql .= " WHERE rowid = " . ((int) $this->id); |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | return $this->LibStatut($this->paye, $mode, $alreadypaid); |
741 | 741 | } |
742 | 742 | |
743 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
743 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
744 | 744 | /** |
745 | 745 | * Return label of a given status |
746 | 746 | * |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | */ |
752 | 752 | public function LibStatut($status, $mode = 0, $alreadypaid = -1) |
753 | 753 | { |
754 | - // phpcs:enable |
|
754 | + // phpcs:enable |
|
755 | 755 | global $langs; |
756 | 756 | |
757 | 757 | // Load translation files required by the page |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | return $return; |
835 | 835 | } |
836 | 836 | |
837 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
837 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
838 | 838 | /** |
839 | 839 | * Create a withdrawal request for a direct debit order or a credit transfer order. |
840 | 840 | * Use the remain to pay excluding all existing open direct debit requests. |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | */ |
849 | 849 | public function demande_prelevement($fuser, $amount = 0, $type = 'direct-debit', $sourcetype = 'salaire', $checkduplicateamongall = 0) |
850 | 850 | { |
851 | - // phpcs:enable |
|
851 | + // phpcs:enable |
|
852 | 852 | global $conf, $mysoc; |
853 | 853 | |
854 | 854 | $error = 0; |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | } |
957 | 957 | } |
958 | 958 | |
959 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
959 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
960 | 960 | /** |
961 | 961 | * Remove a direct debit request or a credit transfer request |
962 | 962 | * |
@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | */ |
967 | 967 | public function demande_prelevement_delete($fuser, $did) |
968 | 968 | { |
969 | - // phpcs:enable |
|
969 | + // phpcs:enable |
|
970 | 970 | $sql = 'DELETE FROM ' . $this->db->prefix() . 'prelevement_demande'; |
971 | 971 | $sql .= ' WHERE rowid = ' . ((int) $did); |
972 | 972 | $sql .= ' AND traite = 0'; |
@@ -619,7 +619,7 @@ |
||
619 | 619 | } elseif ($multicurrency) { |
620 | 620 | //$this->sumpayed_multicurrency = $obj->multicurrency_amount; |
621 | 621 | //return (float) $obj->multicurrency_amount; |
622 | - return -1; // Not yet supported |
|
622 | + return -1; // Not yet supported |
|
623 | 623 | } else { |
624 | 624 | //$this->sumpayed = $obj->amount; |
625 | 625 | return (float) $obj->amount; |