@@ -200,7 +200,7 @@ |
||
200 | 200 | print '</td>'."\n"; |
201 | 201 | |
202 | 202 | print '<td class="center">'; |
203 | - if (getDolGlobalString('CHEQUERECEIPTS_ADDON') == $file || getDolGlobalString('CHEQUERECEIPTS_ADDON') . '.php' == $file) { |
|
203 | + if (getDolGlobalString('CHEQUERECEIPTS_ADDON') == $file || getDolGlobalString('CHEQUERECEIPTS_ADDON').'.php' == $file) { |
|
204 | 204 | print img_picto($langs->trans("Activated"), 'switch_on'); |
205 | 205 | } else { |
206 | 206 | print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.preg_replace('/\.php$/', '', $file).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
44 | 44 | require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
45 | 45 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
46 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
46 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
47 | 47 | if (isModEnabled('invoice')) { |
48 | 48 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
49 | 49 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | if ($action == 'update_extras' && $permissiontoeditextra) { |
312 | 312 | $object->fetch($id); |
313 | 313 | |
314 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
314 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
315 | 315 | |
316 | 316 | $attribute_name = GETPOST('attribute', 'aZ09'); |
317 | 317 | |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | if ($object->accountancy_code_customer_general > 0) { |
419 | 419 | print ' - '; |
420 | 420 | } |
421 | - $accountingAccountByDefault = '<span class="opacitymedium">' . $langs->trans("AccountingAccountByDefaultShort") . ": " . length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER')) . '</span>'; |
|
421 | + $accountingAccountByDefault = '<span class="opacitymedium">'.$langs->trans("AccountingAccountByDefaultShort").": ".length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER')).'</span>'; |
|
422 | 422 | print $accountingAccountByDefault; |
423 | 423 | } |
424 | 424 | } |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | print '<td class="nowraponall">'; |
929 | 929 | $propal_static->id = $objp->propalid; |
930 | 930 | $propal_static->ref = $objp->ref; |
931 | - $propal_static->ref_client = $objp->ref_client; // deprecated |
|
931 | + $propal_static->ref_client = $objp->ref_client; // deprecated |
|
932 | 932 | $propal_static->ref_customer = $objp->ref_client; |
933 | 933 | $propal_static->fk_project = $objp->fk_projet; |
934 | 934 | $propal_static->total_ht = $objp->total_ht; |
@@ -1251,7 +1251,7 @@ discard block |
||
1251 | 1251 | $contrat->ref_customer = $objp->refcus; |
1252 | 1252 | $contrat->ref_supplier = $objp->refsup; |
1253 | 1253 | $contrat->fk_project = $objp->fk_projet; |
1254 | - $contrat->statut = $objp->contract_status; // deprecated |
|
1254 | + $contrat->statut = $objp->contract_status; // deprecated |
|
1255 | 1255 | $contrat->status = $objp->contract_status; |
1256 | 1256 | $contrat->last_main_doc = $objp->last_main_doc; |
1257 | 1257 | $contrat->model_pdf = $objp->model_pdf; |
@@ -1364,7 +1364,7 @@ discard block |
||
1364 | 1364 | |
1365 | 1365 | $fichinter_static->id = $objp->id; |
1366 | 1366 | $fichinter_static->ref = $objp->ref; |
1367 | - $fichinter_static->statut = $objp->fk_statut; // deprecated |
|
1367 | + $fichinter_static->statut = $objp->fk_statut; // deprecated |
|
1368 | 1368 | $fichinter_static->status = $objp->fk_statut; |
1369 | 1369 | $fichinter_static->fk_project = $objp->fk_projet; |
1370 | 1370 | |
@@ -1589,7 +1589,7 @@ discard block |
||
1589 | 1589 | $facturestatic->total_ht = $objp->total_ht; |
1590 | 1590 | $facturestatic->total_tva = $objp->total_tva; |
1591 | 1591 | $facturestatic->total_ttc = $objp->total_ttc; |
1592 | - $facturestatic->statut = $objp->status; // deprecated |
|
1592 | + $facturestatic->statut = $objp->status; // deprecated |
|
1593 | 1593 | $facturestatic->status = $objp->status; |
1594 | 1594 | $facturestatic->paye = $objp->paye; |
1595 | 1595 |
@@ -314,9 +314,9 @@ discard block |
||
314 | 314 | // Create a line of payments |
315 | 315 | $paiement = new PaymentSalary($db); |
316 | 316 | $paiement->fk_salary = $object->id; |
317 | - $paiement->chid = $object->id; // deprecated |
|
317 | + $paiement->chid = $object->id; // deprecated |
|
318 | 318 | $paiement->datep = $datep; |
319 | - $paiement->datev = $datev; |
|
319 | + $paiement->datev = $datev; |
|
320 | 320 | $paiement->amounts = array($object->id => $amount); // Tableau de montant |
321 | 321 | $paiement->fk_typepayment = $type_payment; |
322 | 322 | $paiement->num_payment = GETPOST("num_payment", 'alphanohtml'); |
@@ -345,10 +345,10 @@ discard block |
||
345 | 345 | |
346 | 346 | if (GETPOST('saveandnew', 'alpha')) { |
347 | 347 | setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); |
348 | - header("Location: card.php?action=create&fk_project=" . urlencode((string) ($projectid)) . "&accountid=" . urlencode((string) ($accountid)) . '&paymenttype=' . urlencode((string) (GETPOSTINT('paymenttype'))) . '&datepday=' . GETPOSTINT("datepday") . '&datepmonth=' . GETPOSTINT("datepmonth") . '&datepyear=' . GETPOSTINT("datepyear")); |
|
348 | + header("Location: card.php?action=create&fk_project=".urlencode((string) ($projectid))."&accountid=".urlencode((string) ($accountid)).'&paymenttype='.urlencode((string) (GETPOSTINT('paymenttype'))).'&datepday='.GETPOSTINT("datepday").'&datepmonth='.GETPOSTINT("datepmonth").'&datepyear='.GETPOSTINT("datepyear")); |
|
349 | 349 | exit; |
350 | 350 | } else { |
351 | - header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
|
351 | + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$object->id); |
|
352 | 352 | exit; |
353 | 353 | } |
354 | 354 | } else { |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | |
639 | 639 | // Auto create payment |
640 | 640 | print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>'; |
641 | - 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 |
|
641 | + 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 |
|
642 | 642 | |
643 | 643 | // Bank |
644 | 644 | if (isModEnabled("bank")) { |
@@ -906,10 +906,10 @@ discard block |
||
906 | 906 | $userstatic = new User($db); |
907 | 907 | $result = $userstatic->fetch($object->fk_user); |
908 | 908 | if ($result > 0) { |
909 | - $morehtmlref .= '<br>' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1); |
|
909 | + $morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1); |
|
910 | 910 | } |
911 | 911 | } else { |
912 | - $morehtmlref .= '<br>' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1); |
|
912 | + $morehtmlref .= '<br>'.$form->editfieldkey("Employee", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1); |
|
913 | 913 | |
914 | 914 | if (!empty($object->fk_user)) { |
915 | 915 | $userstatic = new User($db); |
@@ -961,7 +961,7 @@ discard block |
||
961 | 961 | $totalpaid = $object->getSommePaiement(); |
962 | 962 | |
963 | 963 | $object->totalpaid = $totalpaid; |
964 | - $object->alreadypaid = $totalpaid; // Same then $totalpaid because there is no amount of credit note or deposits for salary payments. |
|
964 | + $object->alreadypaid = $totalpaid; // Same then $totalpaid because there is no amount of credit note or deposits for salary payments. |
|
965 | 965 | |
966 | 966 | dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); |
967 | 967 | |
@@ -977,7 +977,7 @@ discard block |
||
977 | 977 | print "</td></tr>"; |
978 | 978 | } else { |
979 | 979 | print "<tr>"; |
980 | - print '<td class="titlefieldmiddle">' . $langs->trans("DateStartPeriod") . '</td><td>'; |
|
980 | + print '<td class="titlefieldmiddle">'.$langs->trans("DateStartPeriod").'</td><td>'; |
|
981 | 981 | print dol_print_date($object->datesp, 'day'); |
982 | 982 | print '</td></tr>'; |
983 | 983 | } |
@@ -988,7 +988,7 @@ discard block |
||
988 | 988 | print "</td></tr>"; |
989 | 989 | } else { |
990 | 990 | print "<tr>"; |
991 | - print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>'; |
|
991 | + print '<td>'.$langs->trans("DateEndPeriod").'</td><td>'; |
|
992 | 992 | print dol_print_date($object->dateep, 'day'); |
993 | 993 | print '</td></tr>'; |
994 | 994 | } |
@@ -1003,9 +1003,9 @@ discard block |
||
1003 | 1003 | print '</td></tr>';*/ |
1004 | 1004 | |
1005 | 1005 | if ($action == 'edit') { |
1006 | - print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>'; |
|
1006 | + print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>'; |
|
1007 | 1007 | } else { |
1008 | - print '<tr><td>' . $langs->trans("Amount") . '</td><td><span class="amount">' . price($object->amount, 0, $langs, 1, -1, -1, $conf->currency) . '</span></td></tr>'; |
|
1008 | + print '<tr><td>'.$langs->trans("Amount").'</td><td><span class="amount">'.price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span></td></tr>'; |
|
1009 | 1009 | } |
1010 | 1010 | |
1011 | 1011 | // Default mode of payment |
@@ -1191,7 +1191,7 @@ discard block |
||
1191 | 1191 | if (empty($user->socid)) { |
1192 | 1192 | $canSendMail = true; |
1193 | 1193 | |
1194 | - print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', $canSendMail); |
|
1194 | + print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', $canSendMail); |
|
1195 | 1195 | } |
1196 | 1196 | } |
1197 | 1197 | |
@@ -1207,12 +1207,12 @@ discard block |
||
1207 | 1207 | |
1208 | 1208 | // Transfer request |
1209 | 1209 | if ($object->status == $object::STATUS_UNPAID && ((price2num($object->amount) < 0 && $resteapayer < 0) || (price2num($object->amount) > 0 && $resteapayer > 0)) && $permissiontoadd) { |
1210 | - print dolGetButtonAction('', $langs->trans('MakeTransferRequest'), 'default', DOL_URL_ROOT . '/salaries/virement_request.php?id=' . $object->id, ''); |
|
1210 | + print dolGetButtonAction('', $langs->trans('MakeTransferRequest'), 'default', DOL_URL_ROOT.'/salaries/virement_request.php?id='.$object->id, ''); |
|
1211 | 1211 | } |
1212 | 1212 | |
1213 | 1213 | // Emit payment |
1214 | 1214 | if ($object->status == $object::STATUS_UNPAID && ((price2num($object->amount) < 0 && $resteapayer < 0) || (price2num($object->amount) > 0 && $resteapayer > 0)) && $permissiontoadd) { |
1215 | - print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='. $object->id, ''); |
|
1215 | + print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='.$object->id, ''); |
|
1216 | 1216 | } |
1217 | 1217 | |
1218 | 1218 | // Classify 'paid' |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | /** |
94 | 94 | * @var int |
95 | 95 | */ |
96 | - public $type_payment; // TODO Rename into type_payment_id |
|
96 | + public $type_payment; // TODO Rename into type_payment_id |
|
97 | 97 | /** |
98 | 98 | * @var string |
99 | 99 | */ |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'position' => 12, 'notnull' => 0, 'visible' => 1), |
168 | 168 | 'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => 0, 'position' => 30), |
169 | 169 | 'datep' => array('type' => 'date', 'label' => 'Date', 'enabled' => 1, 'visible' => 0, 'position' => 40, 'comment' => 'Date'), |
170 | - 'datev' => array('type' => 'date', 'label' => 'Date', 'enabled' => 1, 'visible' => 0, 'position' => 50, 'comment' => 'Date'), |
|
170 | + 'datev' => array('type' => 'date', 'label' => 'Date', 'enabled' => 1, 'visible' => 0, 'position' => 50, 'comment' => 'Date'), |
|
171 | 171 | 'fk_user' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'Employee', 'enabled' => 1, 'position' => 15, 'notnull' => 1, 'visible' => 1, 'picto' => 'user'), |
172 | 172 | 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'position' => 20), |
173 | 173 | 'salary' => array('type' => 'double(24,8)', 'label' => 'salary', 'enabled' => 1, 'visible' => 0, 'position' => 70), |
@@ -334,10 +334,10 @@ discard block |
||
334 | 334 | $this->datesp = $this->db->jdate($obj->datesp); |
335 | 335 | $this->dateep = $this->db->jdate($obj->dateep); |
336 | 336 | $this->note = $obj->note_private; |
337 | - $this->note_private = $obj->note_private; |
|
338 | - $this->note_public = $obj->note_public; |
|
337 | + $this->note_private = $obj->note_private; |
|
338 | + $this->note_public = $obj->note_public; |
|
339 | 339 | $this->paye = $obj->paye; |
340 | - $this->status = $obj->paye; |
|
340 | + $this->status = $obj->paye; |
|
341 | 341 | $this->fk_bank = $obj->fk_bank; |
342 | 342 | $this->fk_user_author = $obj->fk_user_author; |
343 | 343 | $this->fk_user_modif = $obj->fk_user_modif; |
@@ -682,11 +682,11 @@ discard block |
||
682 | 682 | //$this->totalpaid = $obj->amount; |
683 | 683 | //$this->totalpaid_multicurrency = $obj->multicurrency_amount; |
684 | 684 | //return array('alreadypaid'=>(float) $obj->amount, 'alreadypaid_multicurrency'=>(float) $obj->multicurrency_amount); |
685 | - return array(); // Not yet supported |
|
685 | + return array(); // Not yet supported |
|
686 | 686 | } elseif ($multicurrency) { |
687 | 687 | //$this->totalpaid_multicurrency = $obj->multicurrency_amount; |
688 | 688 | //return (float) $obj->multicurrency_amount; |
689 | - return -1; // Not yet supported |
|
689 | + return -1; // Not yet supported |
|
690 | 690 | } else { |
691 | 691 | //$this->totalpaid = $obj->amount; |
692 | 692 | return (float) $obj->amount; |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | $errors = 0; |
81 | 81 | $errorforhistory = 0; |
82 | 82 | $static_object = new Target($this->db); |
83 | - $target_url = $static_object->fetchAll(); // TODO Replace this with a search with filter on $action trigger to avoid to filter later. |
|
83 | + $target_url = $static_object->fetchAll(); // TODO Replace this with a search with filter on $action trigger to avoid to filter later. |
|
84 | 84 | |
85 | 85 | if (is_numeric($target_url) && $target_url < 0) { |
86 | - dol_syslog("Error Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id); |
|
86 | + dol_syslog("Error Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); |
|
87 | 87 | $this->errors = array_merge($this->errors, $static_object->errors); |
88 | 88 | return -1; |
89 | 89 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $nbPosts++; |
141 | 141 | } else { |
142 | 142 | $errormsg = "The WebHook for ".$action." failed to get URL ".$tmpobject->url." with httpcode=".(!empty($response['http_code']) ? $response['http_code'] : "")." curl_error_no=".(!empty($response['curl_error_no']) ? $response['curl_error_no'] : ""); |
143 | - $errorforhistory ++; |
|
143 | + $errorforhistory++; |
|
144 | 144 | |
145 | 145 | if ($tmpobject->type == Target::TYPE_BLOCKING) { |
146 | 146 | $errors++; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } |
171 | 171 | } |
172 | 172 | |
173 | - dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id." -> nbPost=".$nbPosts); |
|
173 | + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id." -> nbPost=".$nbPosts); |
|
174 | 174 | |
175 | 175 | if (!empty($errors)) { |
176 | 176 | return $errors * -1; |
@@ -102,10 +102,10 @@ discard block |
||
102 | 102 | function dolGetRandomBytes($length) |
103 | 103 | { |
104 | 104 | if (function_exists('random_bytes')) { // Available with PHP 7 only. |
105 | - return bin2hex(random_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2 |
|
105 | + return bin2hex(random_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2 |
|
106 | 106 | } |
107 | 107 | |
108 | - return bin2hex(openssl_random_pseudo_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2. May be very slow on Windows. |
|
108 | + return bin2hex(openssl_random_pseudo_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2. May be very slow on Windows. |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | |
271 | 271 | // Salt value |
272 | 272 | if (getDolGlobalString('MAIN_SECURITY_SALT') && $type != '4' && $type !== 'openldap' && empty($nosalt)) { |
273 | - $chain = getDolGlobalString('MAIN_SECURITY_SALT') . $chain; |
|
273 | + $chain = getDolGlobalString('MAIN_SECURITY_SALT').$chain; |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | if ($type == '1' || $type == 'sha1') { |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | { |
348 | 348 | if ($type == '0' && getDolGlobalString('MAIN_SECURITY_HASH_ALGO') == 'password_hash' && function_exists('password_verify')) { |
349 | 349 | // Try to autodetect which algo we used |
350 | - if (! empty($hash[0]) && $hash[0] == '$') { |
|
350 | + if (!empty($hash[0]) && $hash[0] == '$') { |
|
351 | 351 | return password_verify($chain, $hash); |
352 | 352 | } elseif (dol_strlen($hash) == 32) { |
353 | 353 | return dol_verifyHash($chain, $hash, '3'); // md5 |
@@ -377,31 +377,31 @@ discard block |
||
377 | 377 | $salt = substr(sha1((string) time()), 0, 8); |
378 | 378 | |
379 | 379 | if ($type === 'md5') { |
380 | - return '{MD5}' . base64_encode(hash("md5", $password, true)); //For OpenLdap with md5 (based on an unencrypted password in base) |
|
380 | + return '{MD5}'.base64_encode(hash("md5", $password, true)); //For OpenLdap with md5 (based on an unencrypted password in base) |
|
381 | 381 | } elseif ($type === 'md5frommd5') { |
382 | - return '{MD5}' . base64_encode(hex2bin($password)); // Create OpenLDAP MD5 password from Dolibarr MD5 password |
|
382 | + return '{MD5}'.base64_encode(hex2bin($password)); // Create OpenLDAP MD5 password from Dolibarr MD5 password |
|
383 | 383 | } elseif ($type === 'smd5') { |
384 | - return "{SMD5}" . base64_encode(hash("md5", $password . $salt, true) . $salt); |
|
384 | + return "{SMD5}".base64_encode(hash("md5", $password.$salt, true).$salt); |
|
385 | 385 | } elseif ($type === 'sha') { |
386 | - return '{SHA}' . base64_encode(hash("sha1", $password, true)); |
|
386 | + return '{SHA}'.base64_encode(hash("sha1", $password, true)); |
|
387 | 387 | } elseif ($type === 'ssha') { |
388 | - return "{SSHA}" . base64_encode(hash("sha1", $password . $salt, true) . $salt); |
|
388 | + return "{SSHA}".base64_encode(hash("sha1", $password.$salt, true).$salt); |
|
389 | 389 | } elseif ($type === 'sha256') { |
390 | - return "{SHA256}" . base64_encode(hash("sha256", $password, true)); |
|
390 | + return "{SHA256}".base64_encode(hash("sha256", $password, true)); |
|
391 | 391 | } elseif ($type === 'ssha256') { |
392 | - return "{SSHA256}" . base64_encode(hash("sha256", $password . $salt, true) . $salt); |
|
392 | + return "{SSHA256}".base64_encode(hash("sha256", $password.$salt, true).$salt); |
|
393 | 393 | } elseif ($type === 'sha384') { |
394 | - return "{SHA384}" . base64_encode(hash("sha384", $password, true)); |
|
394 | + return "{SHA384}".base64_encode(hash("sha384", $password, true)); |
|
395 | 395 | } elseif ($type === 'ssha384') { |
396 | - return "{SSHA384}" . base64_encode(hash("sha384", $password . $salt, true) . $salt); |
|
396 | + return "{SSHA384}".base64_encode(hash("sha384", $password.$salt, true).$salt); |
|
397 | 397 | } elseif ($type === 'sha512') { |
398 | - return "{SHA512}" . base64_encode(hash("sha512", $password, true)); |
|
398 | + return "{SHA512}".base64_encode(hash("sha512", $password, true)); |
|
399 | 399 | } elseif ($type === 'ssha512') { |
400 | - return "{SSHA512}" . base64_encode(hash("sha512", $password . $salt, true) . $salt); |
|
400 | + return "{SSHA512}".base64_encode(hash("sha512", $password.$salt, true).$salt); |
|
401 | 401 | } elseif ($type === 'crypt') { |
402 | - return '{CRYPT}' . crypt($password, $salt); |
|
402 | + return '{CRYPT}'.crypt($password, $salt); |
|
403 | 403 | } elseif ($type === 'clear') { |
404 | - return '{CLEAR}' . $password; // Just for test, plain text password is not secured ! |
|
404 | + return '{CLEAR}'.$password; // Just for test, plain text password is not secured ! |
|
405 | 405 | } |
406 | 406 | return ""; |
407 | 407 | } |
@@ -434,13 +434,13 @@ discard block |
||
434 | 434 | if (is_object($object)) { |
435 | 435 | $objectid = $object->id; |
436 | 436 | } else { |
437 | - $objectid = $object; // $objectid can be X or 'X,Y,Z' |
|
437 | + $objectid = $object; // $objectid can be X or 'X,Y,Z' |
|
438 | 438 | } |
439 | 439 | if ($objectid == "-1") { |
440 | 440 | $objectid = 0; |
441 | 441 | } |
442 | 442 | if ($objectid) { |
443 | - $objectid = preg_replace('/[^0-9\.\,]/', '', (string) $objectid); // For the case value is coming from a non sanitized user input |
|
443 | + $objectid = preg_replace('/[^0-9\.\,]/', '', (string) $objectid); // For the case value is coming from a non sanitized user input |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft"); |
@@ -946,9 +946,9 @@ discard block |
||
946 | 946 | if (is_object($object)) { |
947 | 947 | $objectid = $object->id; |
948 | 948 | } else { |
949 | - $objectid = $object; // $objectid can be X or 'X,Y,Z' |
|
949 | + $objectid = $object; // $objectid can be X or 'X,Y,Z' |
|
950 | 950 | } |
951 | - $objectid = preg_replace('/[^0-9\.\,]/', '', $objectid); // For the case value is coming from a non sanitized user input |
|
951 | + $objectid = preg_replace('/[^0-9\.\,]/', '', $objectid); // For the case value is coming from a non sanitized user input |
|
952 | 952 | |
953 | 953 | //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft"); |
954 | 954 | //print "user_id=".$user->id.", features=".join(',', $featuresarray).", objectid=".$objectid; |
@@ -998,8 +998,8 @@ discard block |
||
998 | 998 | $checkparentsoc = array('agenda', 'contact', 'contrat'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...). |
999 | 999 | $checkproject = array('projet', 'project'); // Test for project object |
1000 | 1000 | $checktask = array('projet_task'); // Test for task object |
1001 | - $checkhierarchy = array('expensereport', 'holiday'); // check permission among the hierarchy of user |
|
1002 | - $checkuser = array('bookmark'); // check permission among the fk_user (must be myself or null) |
|
1001 | + $checkhierarchy = array('expensereport', 'holiday'); // check permission among the hierarchy of user |
|
1002 | + $checkuser = array('bookmark'); // check permission among the fk_user (must be myself or null) |
|
1003 | 1003 | $nocheck = array('barcode', 'stock', 'webhook'); // No test |
1004 | 1004 | |
1005 | 1005 | //$checkdefault = 'all other not already defined'; // Test on entity + link to third party on field $dbt_keyfield. Not allowed if link is empty (Ex: invoice, orders...). |
@@ -1012,7 +1012,7 @@ discard block |
||
1012 | 1012 | |
1013 | 1013 | // To avoid an access forbidden with a numeric ref |
1014 | 1014 | if ($dbt_select != 'rowid' && $dbt_select != 'id') { |
1015 | - $objectid = "'".$objectid."'"; // Note: $objectid was already cast into int at begin of this method. |
|
1015 | + $objectid = "'".$objectid."'"; // Note: $objectid was already cast into int at begin of this method. |
|
1016 | 1016 | } |
1017 | 1017 | // Check permission for objectid on entity only |
1018 | 1018 | if (in_array($feature, $check) && $objectid > 0) { // For $objectid = 0, no check |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandoned remain - escompte |
276 | 276 | const CLOSECODE_BADDEBT = 'badcustomer'; // Abandoned remain - bad customer |
277 | 277 | const CLOSECODE_BANKCHARGE = 'bankcharge'; // Abandoned remain - bank charge |
278 | - const CLOSECODE_WITHHOLDINGTAX = 'withholdingtax'; // Abandoned remain - source tax |
|
278 | + const CLOSECODE_WITHHOLDINGTAX = 'withholdingtax'; // Abandoned remain - source tax |
|
279 | 279 | const CLOSECODE_OTHER = 'other'; // Abandoned remain - other |
280 | 280 | |
281 | 281 | const CLOSECODE_ABANDONED = 'abandon'; // Abandoned - other |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | public function getListOfPayments($filtertype = '', $multicurrency = 0, $mode = 0) |
573 | 573 | { |
574 | 574 | $retarray = array(); |
575 | - $this->error = ''; // By default no error, list can be empty. |
|
575 | + $this->error = ''; // By default no error, list can be empty. |
|
576 | 576 | |
577 | 577 | $table = 'paiement_facture'; |
578 | 578 | $table2 = 'paiement'; |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | |
593 | 593 | // List of payments |
594 | 594 | if (empty($mode) || $mode == 1) { |
595 | - $sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".$field3 . $field4; |
|
595 | + $sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".$field3.$field4; |
|
596 | 596 | $sql .= " FROM ".$this->db->prefix().$table." as pf, ".$this->db->prefix().$table2." as p, ".$this->db->prefix()."c_paiement as t"; |
597 | 597 | $sql .= " WHERE pf.".$field." = ".((int) $this->id); |
598 | 598 | $sql .= " AND pf.".$field2." = p.rowid"; |
@@ -850,12 +850,12 @@ discard block |
||
850 | 850 | { |
851 | 851 | $subtypeLabel = ''; |
852 | 852 | if ($table === 'facture' || $table === 'facture_fourn') { |
853 | - $sql = "SELECT s.label FROM " . $this->db->prefix() . $table . " AS f"; |
|
854 | - $sql .= " INNER JOIN " . $this->db->prefix() . "c_invoice_subtype AS s ON f.subtype = s.rowid"; |
|
853 | + $sql = "SELECT s.label FROM ".$this->db->prefix().$table." AS f"; |
|
854 | + $sql .= " INNER JOIN ".$this->db->prefix()."c_invoice_subtype AS s ON f.subtype = s.rowid"; |
|
855 | 855 | $sql .= " WHERE f.ref = '".$this->db->escape($this->ref)."'"; |
856 | 856 | } elseif ($table === 'facture_rec' || $table === 'facture_fourn_rec') { |
857 | - $sql = "SELECT s.label FROM " . $this->db->prefix() . $table . " AS f"; |
|
858 | - $sql .= " INNER JOIN " . $this->db->prefix() . "c_invoice_subtype AS s ON f.subtype = s.rowid"; |
|
857 | + $sql = "SELECT s.label FROM ".$this->db->prefix().$table." AS f"; |
|
858 | + $sql .= " INNER JOIN ".$this->db->prefix()."c_invoice_subtype AS s ON f.subtype = s.rowid"; |
|
859 | 859 | $sql .= " WHERE f.titre = '".$this->db->escape($this->title)."'"; |
860 | 860 | } else { |
861 | 861 | return -1; |
@@ -887,11 +887,11 @@ discard block |
||
887 | 887 | $effs = array(); |
888 | 888 | |
889 | 889 | $sql = "SELECT rowid, code, label as label"; |
890 | - $sql .= " FROM " . MAIN_DB_PREFIX . 'c_invoice_subtype'; |
|
890 | + $sql .= " FROM ".MAIN_DB_PREFIX.'c_invoice_subtype'; |
|
891 | 891 | $sql .= " WHERE active = 1 AND fk_country = ".((int) $mysoc->country_id)." AND entity IN(".getEntity('c_invoice_subtype').")"; |
892 | 892 | $sql .= " ORDER by rowid, code"; |
893 | 893 | |
894 | - dol_syslog(get_class($this) . '::getArrayOfInvoiceSubtypes', LOG_DEBUG); |
|
894 | + dol_syslog(get_class($this).'::getArrayOfInvoiceSubtypes', LOG_DEBUG); |
|
895 | 895 | $resql = $this->db->query($sql); |
896 | 896 | if ($resql) { |
897 | 897 | $num = $this->db->num_rows($resql); |
@@ -1329,7 +1329,7 @@ discard block |
||
1329 | 1329 | if ($this->status > self::STATUS_DRAFT && $this->paye == 0) { |
1330 | 1330 | // Get the default payment mode for BAN payment of the third party |
1331 | 1331 | require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; |
1332 | - $bac = new CompanyBankAccount($this->db); // Table societe_rib |
|
1332 | + $bac = new CompanyBankAccount($this->db); // Table societe_rib |
|
1333 | 1333 | $result = $bac->fetch(0, '', $this->socid, 1, 'ban'); |
1334 | 1334 | if ($result <= 0 || empty($bac->id)) { |
1335 | 1335 | $this->error = $langs->trans("ThirdpartyHasNoDefaultBanAccount"); |
@@ -1343,16 +1343,16 @@ discard block |
||
1343 | 1343 | $sql .= " FROM ".$this->db->prefix()."prelevement_demande"; |
1344 | 1344 | $sql .= " WHERE rowid = ".((int) $did); |
1345 | 1345 | if ($type != 'bank-transfer' && $type != 'credit-transfer') { |
1346 | - $sql .= " AND fk_facture = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1346 | + $sql .= " AND fk_facture = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1347 | 1347 | } |
1348 | 1348 | if ($type != 'direct-debit') { |
1349 | 1349 | if ($sourcetype == 'salary') { |
1350 | - $sql .= " AND fk_salary = ".((int) $this->id); // Add a protection to not pay another salary than current one |
|
1350 | + $sql .= " AND fk_salary = ".((int) $this->id); // Add a protection to not pay another salary than current one |
|
1351 | 1351 | } else { |
1352 | - $sql .= " AND fk_facture_fourn = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1352 | + $sql .= " AND fk_facture_fourn = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1353 | 1353 | } |
1354 | 1354 | } |
1355 | - $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0) |
|
1355 | + $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0) |
|
1356 | 1356 | |
1357 | 1357 | dol_syslog(get_class($this)."::makeStripeSepaRequest load requests to process", LOG_DEBUG); |
1358 | 1358 | $resql = $this->db->query($sql); |
@@ -1368,7 +1368,7 @@ discard block |
||
1368 | 1368 | |
1369 | 1369 | if (is_numeric($amount) && $amount != 0) { |
1370 | 1370 | require_once DOL_DOCUMENT_ROOT.'/societe/class/companypaymentmode.class.php'; |
1371 | - $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib |
|
1371 | + $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib |
|
1372 | 1372 | $companypaymentmode->fetch($bac->id); |
1373 | 1373 | |
1374 | 1374 | $this->stripechargedone = 0; |
@@ -1378,11 +1378,11 @@ discard block |
||
1378 | 1378 | |
1379 | 1379 | $currency = $conf->currency; |
1380 | 1380 | |
1381 | - $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop |
|
1381 | + $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop |
|
1382 | 1382 | |
1383 | 1383 | $this->fetch_thirdparty(); |
1384 | 1384 | |
1385 | - dol_syslog("makeStripeSepaRequest Process payment request amount=".$amount." thirdparty_id=" . $this->thirdparty->id . ", thirdparty_name=" . $this->thirdparty->name . " ban id=" . $bac->id, LOG_DEBUG); |
|
1385 | + dol_syslog("makeStripeSepaRequest Process payment request amount=".$amount." thirdparty_id=".$this->thirdparty->id.", thirdparty_name=".$this->thirdparty->name." ban id=".$bac->id, LOG_DEBUG); |
|
1386 | 1386 | |
1387 | 1387 | //$alreadypayed = $this->getSommePaiement(); |
1388 | 1388 | //$amount_credit_notes_included = $this->getSumCreditNotesUsed(); |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | $amountstripe *= 100; |
1398 | 1398 | } |
1399 | 1399 | |
1400 | - $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr. |
|
1400 | + $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr. |
|
1401 | 1401 | if (!($fk_bank_account > 0)) { |
1402 | 1402 | $error++; |
1403 | 1403 | $errorforinvoice++; |
@@ -1458,44 +1458,44 @@ discard block |
||
1458 | 1458 | } |
1459 | 1459 | |
1460 | 1460 | //var_dump($companypaymentmode); |
1461 | - dol_syslog("makeStripeSepaRequest We will try to pay with companypaymentmodeid=" . $companypaymentmode->id . " stripe_card_ref=" . $companypaymentmode->stripe_card_ref . " mode=" . $companypaymentmode->status, LOG_DEBUG); |
|
1461 | + dol_syslog("makeStripeSepaRequest We will try to pay with companypaymentmodeid=".$companypaymentmode->id." stripe_card_ref=".$companypaymentmode->stripe_card_ref." mode=".$companypaymentmode->status, LOG_DEBUG); |
|
1462 | 1462 | |
1463 | 1463 | $thirdparty = new Societe($this->db); |
1464 | 1464 | $resultthirdparty = $thirdparty->fetch($this->socid); |
1465 | 1465 | |
1466 | - include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php |
|
1466 | + include_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php |
|
1467 | 1467 | // So it inits or erases the $stripearrayofkeysbyenv |
1468 | 1468 | $stripe = new Stripe($this->db); |
1469 | 1469 | |
1470 | 1470 | if (empty($savstripearrayofkeysbyenv)) { |
1471 | 1471 | $savstripearrayofkeysbyenv = $stripearrayofkeysbyenv; |
1472 | 1472 | } |
1473 | - dol_syslog("makeStripeSepaRequest Current Stripe environment is " . $stripearrayofkeysbyenv[$servicestatus]['publishable_key']); |
|
1473 | + dol_syslog("makeStripeSepaRequest Current Stripe environment is ".$stripearrayofkeysbyenv[$servicestatus]['publishable_key']); |
|
1474 | 1474 | dol_syslog("makeStripeSepaRequest Current Saved Stripe environment is ".$savstripearrayofkeysbyenv[$servicestatus]['publishable_key']); |
1475 | 1475 | |
1476 | 1476 | $foundalternativestripeaccount = ''; |
1477 | 1477 | |
1478 | 1478 | // Force stripe to another value (by default this value is empty) |
1479 | - if (! empty($forcestripe)) { |
|
1479 | + if (!empty($forcestripe)) { |
|
1480 | 1480 | dol_syslog("makeStripeSepaRequest A dedicated stripe account was forced, so we switch to it."); |
1481 | 1481 | |
1482 | 1482 | $tmparray = explode('@', $forcestripe); |
1483 | - if (! empty($tmparray[1])) { |
|
1483 | + if (!empty($tmparray[1])) { |
|
1484 | 1484 | $tmparray2 = explode(':', $tmparray[1]); |
1485 | - if (! empty($tmparray2[1])) { |
|
1485 | + if (!empty($tmparray2[1])) { |
|
1486 | 1486 | $stripearrayofkeysbyenv[$servicestatus]["publishable_key"] = $tmparray2[0]; |
1487 | 1487 | $stripearrayofkeysbyenv[$servicestatus]["secret_key"] = $tmparray2[1]; |
1488 | 1488 | |
1489 | 1489 | $stripearrayofkeys = $stripearrayofkeysbyenv[$servicestatus]; |
1490 | 1490 | \Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']); |
1491 | 1491 | |
1492 | - $foundalternativestripeaccount = $tmparray[0]; // Store the customer id |
|
1492 | + $foundalternativestripeaccount = $tmparray[0]; // Store the customer id |
|
1493 | 1493 | |
1494 | 1494 | dol_syslog("makeStripeSepaRequest We use now customer=".$foundalternativestripeaccount." publishable_key=".$stripearrayofkeys['publishable_key'], LOG_DEBUG); |
1495 | 1495 | } |
1496 | 1496 | } |
1497 | 1497 | |
1498 | - if (! $foundalternativestripeaccount) { |
|
1498 | + if (!$foundalternativestripeaccount) { |
|
1499 | 1499 | $stripearrayofkeysbyenv = $savstripearrayofkeysbyenv; |
1500 | 1500 | |
1501 | 1501 | $stripearrayofkeys = $savstripearrayofkeysbyenv[$servicestatus]; |
@@ -1510,7 +1510,7 @@ discard block |
||
1510 | 1510 | dol_syslog("makeStripeSepaRequest No dedicated Stripe Account requested, so we use global one, so ".$stripearrayofkeys['publishable_key'], LOG_DEBUG); |
1511 | 1511 | } |
1512 | 1512 | |
1513 | - $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here) |
|
1513 | + $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here) |
|
1514 | 1514 | |
1515 | 1515 | if ($foundalternativestripeaccount) { |
1516 | 1516 | if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage |
@@ -1520,7 +1520,7 @@ discard block |
||
1520 | 1520 | } |
1521 | 1521 | } else { |
1522 | 1522 | $customer = $stripe->customerStripe($thirdparty, $stripeacc, $servicestatus, 0); |
1523 | - if (empty($customer) && ! empty($stripe->error)) { |
|
1523 | + if (empty($customer) && !empty($stripe->error)) { |
|
1524 | 1524 | $this->error = $stripe->error; |
1525 | 1525 | $this->errors[] = $this->error; |
1526 | 1526 | } |
@@ -1549,15 +1549,15 @@ discard block |
||
1549 | 1549 | } |
1550 | 1550 | |
1551 | 1551 | if ($stripecard) { // Can be src_... (for sepa) or pm_... (new card mode). Note that card_... (old card mode) should not happen here. |
1552 | - $FULLTAG = 'DID='.$did.'-INV=' . $this->id . '-CUS=' . $thirdparty->id; |
|
1553 | - $description = 'Stripe payment from makeStripeSepaRequest: ' . $FULLTAG . ' did='.$did.' ref=' . $this->ref; |
|
1552 | + $FULLTAG = 'DID='.$did.'-INV='.$this->id.'-CUS='.$thirdparty->id; |
|
1553 | + $description = 'Stripe payment from makeStripeSepaRequest: '.$FULLTAG.' did='.$did.' ref='.$this->ref; |
|
1554 | 1554 | |
1555 | 1555 | $stripefailurecode = ''; |
1556 | 1556 | $stripefailuremessage = ''; |
1557 | 1557 | $stripefailuredeclinecode = ''; |
1558 | 1558 | |
1559 | 1559 | // Using new SCA method |
1560 | - dol_syslog("* Create payment on SEPA " . $stripecard->id . ", amounttopay=" . $amounttopay . ", amountstripe=" . $amountstripe . ", FULLTAG=" . $FULLTAG, LOG_DEBUG); |
|
1560 | + dol_syslog("* Create payment on SEPA ".$stripecard->id.", amounttopay=".$amounttopay.", amountstripe=".$amountstripe.", FULLTAG=".$FULLTAG, LOG_DEBUG); |
|
1561 | 1561 | |
1562 | 1562 | // Create payment intent and charge payment (confirmnow = true) |
1563 | 1563 | $paymentintent = $stripe->getPaymentIntent($amounttopay, $currency, $FULLTAG, $description, $this, $customer->id, $stripeacc, $servicestatus, 0, 'automatic', true, $stripecard->id, 1, 1, $did); |
@@ -1578,7 +1578,7 @@ discard block |
||
1578 | 1578 | $charge->failure_message = $stripe->error; |
1579 | 1579 | $charge->failure_declinecode = $stripe->declinecode; |
1580 | 1580 | $stripefailurecode = $stripe->code; |
1581 | - $stripefailuremessage = 'Action required. Contact the support at ';// . $conf->global->SELLYOURSAAS_MAIN_EMAIL; |
|
1581 | + $stripefailuremessage = 'Action required. Contact the support at '; // . $conf->global->SELLYOURSAAS_MAIN_EMAIL; |
|
1582 | 1582 | $stripefailuredeclinecode = $stripe->declinecode; |
1583 | 1583 | } else { |
1584 | 1584 | dol_syslog(var_export($paymentintent, true), LOG_DEBUG); |
@@ -1599,7 +1599,7 @@ discard block |
||
1599 | 1599 | |
1600 | 1600 | // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) |
1601 | 1601 | if (empty($charge) || $charge->status == 'failed') { |
1602 | - dol_syslog('Failed to charge payment mode ' . $stripecard->id . ' stripefailurecode=' . $stripefailurecode . ' stripefailuremessage=' . $stripefailuremessage . ' stripefailuredeclinecode=' . $stripefailuredeclinecode, LOG_WARNING); |
|
1602 | + dol_syslog('Failed to charge payment mode '.$stripecard->id.' stripefailurecode='.$stripefailurecode.' stripefailuremessage='.$stripefailuremessage.' stripefailuredeclinecode='.$stripefailuredeclinecode, LOG_WARNING); |
|
1603 | 1603 | |
1604 | 1604 | // Save a stripe payment was in error |
1605 | 1605 | $this->stripechargeerror++; |
@@ -1612,8 +1612,8 @@ discard block |
||
1612 | 1612 | $errauthenticationmessage = $langs->trans("ErrSCAAuthentication"); |
1613 | 1613 | $errmsg = $errauthenticationmessage; |
1614 | 1614 | } elseif (in_array($stripefailuredeclinecode, ['insufficient_funds', 'generic_decline'])) { |
1615 | - $errmsg .= ': ' . $charge->failure_code; |
|
1616 | - $errmsg .= ($charge->failure_message ? ' - ' : '') . ' ' . $charge->failure_message; |
|
1615 | + $errmsg .= ': '.$charge->failure_code; |
|
1616 | + $errmsg .= ($charge->failure_message ? ' - ' : '').' '.$charge->failure_message; |
|
1617 | 1617 | if (empty($stripefailurecode)) { |
1618 | 1618 | $stripefailurecode = $charge->failure_code; |
1619 | 1619 | } |
@@ -1621,8 +1621,8 @@ discard block |
||
1621 | 1621 | $stripefailuremessage = $charge->failure_message; |
1622 | 1622 | } |
1623 | 1623 | } else { |
1624 | - $errmsg .= ': failure_code=' . $charge->failure_code; |
|
1625 | - $errmsg .= ($charge->failure_message ? ' - ' : '') . ' failure_message=' . $charge->failure_message; |
|
1624 | + $errmsg .= ': failure_code='.$charge->failure_code; |
|
1625 | + $errmsg .= ($charge->failure_message ? ' - ' : '').' failure_message='.$charge->failure_message; |
|
1626 | 1626 | if (empty($stripefailurecode)) { |
1627 | 1627 | $stripefailurecode = $charge->failure_code; |
1628 | 1628 | } |
@@ -1631,26 +1631,26 @@ discard block |
||
1631 | 1631 | } |
1632 | 1632 | } |
1633 | 1633 | } else { |
1634 | - $errmsg .= ': ' . $stripefailurecode . ' - ' . $stripefailuremessage; |
|
1635 | - $errmsg .= ($stripefailuredeclinecode ? ' - ' . $stripefailuredeclinecode : ''); |
|
1634 | + $errmsg .= ': '.$stripefailurecode.' - '.$stripefailuremessage; |
|
1635 | + $errmsg .= ($stripefailuredeclinecode ? ' - '.$stripefailuredeclinecode : ''); |
|
1636 | 1636 | } |
1637 | 1637 | |
1638 | - $description = 'Stripe payment ERROR from makeStripeSepaRequest: ' . $FULLTAG; |
|
1639 | - $postactionmessages[] = $errmsg . ' (' . $stripearrayofkeys['publishable_key'] . ')'; |
|
1638 | + $description = 'Stripe payment ERROR from makeStripeSepaRequest: '.$FULLTAG; |
|
1639 | + $postactionmessages[] = $errmsg.' ('.$stripearrayofkeys['publishable_key'].')'; |
|
1640 | 1640 | |
1641 | 1641 | $this->error = $errmsg; |
1642 | 1642 | $this->errors[] = $this->error; |
1643 | 1643 | } else { |
1644 | 1644 | dol_syslog('Successfuly request '.$type.' '.$stripecard->id); |
1645 | 1645 | |
1646 | - $postactionmessages[] = 'Success to request '.$type.' (' . $charge->id . ' with ' . $stripearrayofkeys['publishable_key'] . ')'; |
|
1646 | + $postactionmessages[] = 'Success to request '.$type.' ('.$charge->id.' with '.$stripearrayofkeys['publishable_key'].')'; |
|
1647 | 1647 | |
1648 | 1648 | // Save a stripe payment was done in real life so later we will be able to force a commit on recorded payments |
1649 | 1649 | // even if in batch mode (method doTakePaymentStripe), we will always make all action in one transaction with a forced commit. |
1650 | 1650 | $this->stripechargedone++; |
1651 | 1651 | |
1652 | 1652 | // Default description used for label of event. Will be overwrite by another value later. |
1653 | - $description = 'Stripe payment request OK (' . $charge->id . ') from makeStripeSepaRequest: ' . $FULLTAG; |
|
1653 | + $description = 'Stripe payment request OK ('.$charge->id.') from makeStripeSepaRequest: '.$FULLTAG; |
|
1654 | 1654 | } |
1655 | 1655 | |
1656 | 1656 | $object = $this; |
@@ -1659,8 +1659,8 @@ discard block |
||
1659 | 1659 | if (empty($charge) || $charge->status == 'failed') { |
1660 | 1660 | $actioncode = 'PAYMENT_STRIPE_KO'; |
1661 | 1661 | $extraparams = $stripefailurecode; |
1662 | - $extraparams .= (($extraparams && $stripefailuremessage) ? ' - ' : '') . $stripefailuremessage; |
|
1663 | - $extraparams .= (($extraparams && $stripefailuredeclinecode) ? ' - ' : '') . $stripefailuredeclinecode; |
|
1662 | + $extraparams .= (($extraparams && $stripefailuremessage) ? ' - ' : '').$stripefailuremessage; |
|
1663 | + $extraparams .= (($extraparams && $stripefailuredeclinecode) ? ' - ' : '').$stripefailuredeclinecode; |
|
1664 | 1664 | } else { |
1665 | 1665 | $actioncode = 'PAYMENT_STRIPE_OK'; |
1666 | 1666 | $extraparams = array(); |
@@ -1668,15 +1668,15 @@ discard block |
||
1668 | 1668 | } else { |
1669 | 1669 | $error++; |
1670 | 1670 | $errorforinvoice++; |
1671 | - dol_syslog("No ban payment method found for this stripe customer " . $customer->id, LOG_WARNING); |
|
1671 | + dol_syslog("No ban payment method found for this stripe customer ".$customer->id, LOG_WARNING); |
|
1672 | 1672 | |
1673 | - $this->error = 'Failed to get direct debit payment method for stripe customer = ' . $customer->id; |
|
1673 | + $this->error = 'Failed to get direct debit payment method for stripe customer = '.$customer->id; |
|
1674 | 1674 | $this->errors[] = $this->error; |
1675 | 1675 | |
1676 | 1676 | $description = 'Failed to find or use the payment mode - no ban defined for the thirdparty account'; |
1677 | 1677 | $stripefailurecode = 'BADPAYMENTMODE'; |
1678 | 1678 | $stripefailuremessage = 'Failed to find or use the payment mode - no ban defined for the thirdparty account'; |
1679 | - $postactionmessages[] = $description . ' (' . $stripearrayofkeys['publishable_key'] . ')'; |
|
1679 | + $postactionmessages[] = $description.' ('.$stripearrayofkeys['publishable_key'].')'; |
|
1680 | 1680 | |
1681 | 1681 | $object = $this; |
1682 | 1682 | |
@@ -1696,12 +1696,12 @@ discard block |
||
1696 | 1696 | } |
1697 | 1697 | } else { // Else of the if ($resultthirdparty > 0 && ! empty($customer)) { |
1698 | 1698 | if ($resultthirdparty <= 0) { |
1699 | - dol_syslog('SellYourSaasUtils Failed to load customer for thirdparty_id = ' . $thirdparty->id, LOG_WARNING); |
|
1700 | - $this->error = 'Failed to load Stripe account for thirdparty_id = ' . $thirdparty->id; |
|
1699 | + dol_syslog('SellYourSaasUtils Failed to load customer for thirdparty_id = '.$thirdparty->id, LOG_WARNING); |
|
1700 | + $this->error = 'Failed to load Stripe account for thirdparty_id = '.$thirdparty->id; |
|
1701 | 1701 | $this->errors[] = $this->error; |
1702 | 1702 | } else { // $customer stripe not found |
1703 | - dol_syslog('SellYourSaasUtils Failed to get Stripe customer id for thirdparty_id = ' . $thirdparty->id . " in mode " . $servicestatus . " in Stripe env " . $stripearrayofkeysbyenv[$servicestatus]['publishable_key'], LOG_WARNING); |
|
1704 | - $this->error = 'Failed to get Stripe account id for thirdparty_id = ' . $thirdparty->id . " in mode " . $servicestatus . " in Stripe env " . $stripearrayofkeysbyenv[$servicestatus]['publishable_key']; |
|
1703 | + dol_syslog('SellYourSaasUtils Failed to get Stripe customer id for thirdparty_id = '.$thirdparty->id." in mode ".$servicestatus." in Stripe env ".$stripearrayofkeysbyenv[$servicestatus]['publishable_key'], LOG_WARNING); |
|
1704 | + $this->error = 'Failed to get Stripe account id for thirdparty_id = '.$thirdparty->id." in mode ".$servicestatus." in Stripe env ".$stripearrayofkeysbyenv[$servicestatus]['publishable_key']; |
|
1705 | 1705 | $this->errors[] = $this->error; |
1706 | 1706 | } |
1707 | 1707 | $error++; |
@@ -1719,24 +1719,24 @@ discard block |
||
1719 | 1719 | } |
1720 | 1720 | |
1721 | 1721 | if ($description) { |
1722 | - dol_syslog("* Record event for credit transfer or direct debit request result - " . $description); |
|
1722 | + dol_syslog("* Record event for credit transfer or direct debit request result - ".$description); |
|
1723 | 1723 | require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
1724 | 1724 | |
1725 | 1725 | // Insert record of payment (success or error) |
1726 | 1726 | $actioncomm = new ActionComm($this->db); |
1727 | 1727 | |
1728 | - $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
1729 | - $actioncomm->code = 'AC_' . $actioncode; |
|
1728 | + $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
1729 | + $actioncomm->code = 'AC_'.$actioncode; |
|
1730 | 1730 | $actioncomm->label = $description; |
1731 | 1731 | $actioncomm->note_private = implode(",\n", $postactionmessages); |
1732 | 1732 | $actioncomm->fk_project = $this->fk_project; |
1733 | 1733 | $actioncomm->datep = $now; |
1734 | 1734 | $actioncomm->datef = $now; |
1735 | - $actioncomm->percentage = -1; // Not applicable |
|
1735 | + $actioncomm->percentage = -1; // Not applicable |
|
1736 | 1736 | $actioncomm->socid = $thirdparty->id; |
1737 | 1737 | $actioncomm->contactid = 0; |
1738 | - $actioncomm->authorid = $user->id; // User saving action |
|
1739 | - $actioncomm->userownerid = $user->id; // Owner of action |
|
1738 | + $actioncomm->authorid = $user->id; // User saving action |
|
1739 | + $actioncomm->userownerid = $user->id; // Owner of action |
|
1740 | 1740 | // Fields when action is a real email (content is already into note) |
1741 | 1741 | /*$actioncomm->email_msgid = $object->email_msgid; |
1742 | 1742 | $actioncomm->email_from = $object->email_from; |
@@ -1749,7 +1749,7 @@ discard block |
||
1749 | 1749 | $actioncomm->fk_element = $this->id; |
1750 | 1750 | $actioncomm->elementid = $this->id; |
1751 | 1751 | $actioncomm->elementtype = $this->element; |
1752 | - $actioncomm->extraparams = $extraparams; // Can be null, empty string or array() |
|
1752 | + $actioncomm->extraparams = $extraparams; // Can be null, empty string or array() |
|
1753 | 1753 | |
1754 | 1754 | $actioncomm->create($user); |
1755 | 1755 | } |
@@ -1759,15 +1759,15 @@ discard block |
||
1759 | 1759 | } catch (Exception $e) { |
1760 | 1760 | $error++; |
1761 | 1761 | $errorforinvoice++; |
1762 | - dol_syslog('Error ' . $e->getMessage(), LOG_ERR); |
|
1763 | - $this->error = 'Error ' . $e->getMessage(); |
|
1762 | + dol_syslog('Error '.$e->getMessage(), LOG_ERR); |
|
1763 | + $this->error = 'Error '.$e->getMessage(); |
|
1764 | 1764 | $this->errors[] = $this->error; |
1765 | 1765 | } |
1766 | 1766 | } else { // If remain to pay is null |
1767 | 1767 | $error++; |
1768 | 1768 | $errorforinvoice++; |
1769 | - dol_syslog("Remain to pay is null for the invoice " . $this->id . " " . $this->ref . ". Why is the invoice not classified 'Paid' ?", LOG_WARNING); |
|
1770 | - $this->error = "Remain to pay is null for the invoice " . $this->id . " " . $this->ref . ". Why is the invoice not classified 'Paid' ?"; |
|
1769 | + dol_syslog("Remain to pay is null for the invoice ".$this->id." ".$this->ref.". Why is the invoice not classified 'Paid' ?", LOG_WARNING); |
|
1770 | + $this->error = "Remain to pay is null for the invoice ".$this->id." ".$this->ref.". Why is the invoice not classified 'Paid' ?"; |
|
1771 | 1771 | $this->errors[] = $this->error; |
1772 | 1772 | } |
1773 | 1773 | } |
@@ -1876,10 +1876,10 @@ discard block |
||
1876 | 1876 | |
1877 | 1877 | // Add the standard elements to the QR code |
1878 | 1878 | $lines = [ |
1879 | - 'BCD', // Service Tag (optional) |
|
1880 | - '002', // Version (optional) |
|
1881 | - '1', // Character set (optional) |
|
1882 | - 'SCT', // Identification (optional) |
|
1879 | + 'BCD', // Service Tag (optional) |
|
1880 | + '002', // Version (optional) |
|
1881 | + '1', // Character set (optional) |
|
1882 | + 'SCT', // Identification (optional) |
|
1883 | 1883 | ]; |
1884 | 1884 | |
1885 | 1885 | // Add the bank account information |
@@ -1901,7 +1901,7 @@ discard block |
||
1901 | 1901 | } |
1902 | 1902 | |
1903 | 1903 | // Add the amount and reference |
1904 | - $lines[] = 'EUR' . $totalTTCString; // Amount (optional) |
|
1904 | + $lines[] = 'EUR'.$totalTTCString; // Amount (optional) |
|
1905 | 1905 | $lines[] = ''; // Purpose (optional) |
1906 | 1906 | $lines[] = ''; // Payment reference (optional) |
1907 | 1907 | $lines[] = $this->ref; // Remittance Information (optional) |
@@ -1959,10 +1959,10 @@ discard block |
||
1959 | 1959 | $s .= pack('C1', 3).pack('C1', strlen($datestring)).$datestring; |
1960 | 1960 | $s .= pack('C1', 4).pack('C1', strlen($pricewithtaxstring)).$pricewithtaxstring; |
1961 | 1961 | $s .= pack('C1', 5).pack('C1', strlen($pricetaxstring)).$pricetaxstring; |
1962 | - $s .= ''; // Hash of xml invoice |
|
1963 | - $s .= ''; // ecda signature |
|
1964 | - $s .= ''; // ecda public key |
|
1965 | - $s .= ''; // ecda signature of public key stamp |
|
1962 | + $s .= ''; // Hash of xml invoice |
|
1963 | + $s .= ''; // ecda signature |
|
1964 | + $s .= ''; // ecda public key |
|
1965 | + $s .= ''; // ecda signature of public key stamp |
|
1966 | 1966 | |
1967 | 1967 | $s = base64_encode($s); |
1968 | 1968 | |
@@ -2030,8 +2030,8 @@ discard block |
||
2030 | 2030 | $s .= "S\n"; |
2031 | 2031 | $s .= dol_trunc($bankaccount->owner_name, 70, 'right', 'UTF-8', 1)."\n"; |
2032 | 2032 | $addresslinearray = explode("\n", $bankaccount->owner_address); |
2033 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
2034 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
2033 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
2034 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
2035 | 2035 | /*$s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1)."\n"; |
2036 | 2036 | $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1)."\n"; |
2037 | 2037 | $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1)."\n";*/ |
@@ -2039,8 +2039,8 @@ discard block |
||
2039 | 2039 | $s .= "S\n"; |
2040 | 2040 | $s .= dol_trunc((string) $mysoc->name, 70, 'right', 'UTF-8', 1)."\n"; |
2041 | 2041 | $addresslinearray = explode("\n", $mysoc->address); |
2042 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
2043 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
2042 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
2043 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
2044 | 2044 | $s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1)."\n"; |
2045 | 2045 | $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1)."\n"; |
2046 | 2046 | $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1)."\n"; |
@@ -2060,14 +2060,14 @@ discard block |
||
2060 | 2060 | $s .= "S\n"; |
2061 | 2061 | $s .= dol_trunc((string) $this->thirdparty->name, 70, 'right', 'UTF-8', 1)."\n"; |
2062 | 2062 | $addresslinearray = explode("\n", $this->thirdparty->address); |
2063 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
2064 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
2063 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
2064 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
2065 | 2065 | $s .= dol_trunc($this->thirdparty->zip, 16, 'right', 'UTF-8', 1)."\n"; |
2066 | 2066 | $s .= dol_trunc($this->thirdparty->town, 35, 'right', 'UTF-8', 1)."\n"; |
2067 | 2067 | $s .= dol_trunc($this->thirdparty->country_code, 2, 'right', 'UTF-8', 1)."\n"; |
2068 | 2068 | // ID of payment |
2069 | - $s .= "NON\n"; // NON or QRR |
|
2070 | - $s .= "\n"; // QR Code reference if previous field is QRR |
|
2069 | + $s .= "NON\n"; // NON or QRR |
|
2070 | + $s .= "\n"; // QR Code reference if previous field is QRR |
|
2071 | 2071 | // Free text |
2072 | 2072 | if ($complementaryinfo) { |
2073 | 2073 | $s .= $complementaryinfo."\n"; |
@@ -102,14 +102,14 @@ |
||
102 | 102 | // Get parameters |
103 | 103 | $id = GETPOSTINT('id'); |
104 | 104 | $ref = GETPOST('ref', 'alpha'); |
105 | -$lineid = GETPOSTINT('lineid'); |
|
105 | +$lineid = GETPOSTINT('lineid'); |
|
106 | 106 | |
107 | 107 | $action = GETPOST('action', 'aZ09'); |
108 | 108 | $confirm = GETPOST('confirm', 'alpha'); |
109 | 109 | $cancel = GETPOST('cancel', 'aZ09'); |
110 | 110 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
111 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
112 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
111 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
112 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
113 | 113 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
114 | 114 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |
115 | 115 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
78 | 78 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
79 | 79 | $mode = GETPOST('mode', 'aZ'); // The display mode ('list', 'kanban', 'hierarchy', 'calendar', 'gantt', ...) |
80 | -$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
80 | +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
81 | 81 | |
82 | 82 | $id = GETPOSTINT('id'); |
83 | 83 | $ref = GETPOST('ref', 'alpha'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $object = new TriggerHistory($db); |
100 | 100 | $extrafields = new ExtraFields($db); |
101 | 101 | $diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id; |
102 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
102 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
103 | 103 | |
104 | 104 | // Fetch optionals attributes and labels |
105 | 105 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | // Default sort order (if not yet defined by previous GETPOST) |
111 | 111 | if (!$sortfield) { |
112 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
112 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
113 | 113 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
114 | 114 | } |
115 | 115 | if (!$sortorder) { |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | // Output page |
438 | 438 | // -------------------------------------------------------------------- |
439 | 439 | |
440 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-webhook page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for a horizontal scroll in the table instead of page |
|
440 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-webhook page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for a horizontal scroll in the table instead of page |
|
441 | 441 | |
442 | 442 | if ($mode == 'modulesetup') { |
443 | 443 | require_once DOL_DOCUMENT_ROOT.'/webhook/lib/webhook.lib.php'; |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | } |
589 | 589 | |
590 | 590 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
591 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
591 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
592 | 592 | $selectedfields = (($mode != 'kanban' && $mode != 'kanbangroupby') ? $htmlofselectarray : ''); |
593 | 593 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
594 | 594 | |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | $formadmin = new FormAdmin($db); |
640 | 640 | print $formadmin->select_language((isset($search[$key]) ? $search[$key] : ''), 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2); |
641 | 641 | } elseif ($val['type'] === 'boolean') { |
642 | - print $form->selectyesno('search_' . $key, $search[$key] ?? '', 1, false, 1); |
|
642 | + print $form->selectyesno('search_'.$key, $search[$key] ?? '', 1, false, 1); |
|
643 | 643 | } else { |
644 | 644 | print '<input type="text" class="flat maxwidth'.(in_array($val['type'], array('integer', 'price')) ? '50' : '75').'" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">'; |
645 | 645 | } |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
688 | 688 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
689 | 689 | } |
690 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
690 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
691 | 691 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
692 | 692 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
693 | 693 | $totalarray['nbfield']++; |