@@ -199,7 +199,7 @@ |
||
199 | 199 | $default_range = (int) $userauthor->default_range; // if not defined, then 0 |
200 | 200 | $ranges = $this->getRangesByCategory($fk_c_exp_tax_cat); |
201 | 201 | // prevent out of range -1 indice |
202 | - $indice = $default_range - 1; |
|
202 | + $indice = $default_range - 1; |
|
203 | 203 | // subtract 1 because array start from 0 |
204 | 204 | if (empty($ranges) || $indice < 0 || !isset($ranges[$indice])) { |
205 | 205 | return false; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } |
298 | 298 | } |
299 | 299 | |
300 | - // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
300 | + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
301 | 301 | /** |
302 | 302 | * Update database |
303 | 303 | * |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | public function update($user = null, $notrigger = 0) |
309 | 309 | { |
310 | - // phpcs:enable |
|
310 | + // phpcs:enable |
|
311 | 311 | $error = 0; |
312 | 312 | |
313 | 313 | // Clean parameters |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | } |
377 | 377 | |
378 | - // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
378 | + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter |
|
379 | 379 | /** |
380 | 380 | * Delete object in database |
381 | 381 | * |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | */ |
386 | 386 | public function delete($user, $notrigger = 0) |
387 | 387 | { |
388 | - // phpcs:enable |
|
388 | + // phpcs:enable |
|
389 | 389 | $error = 0; |
390 | 390 | |
391 | 391 | $this->db->begin(); |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | return ''; |
488 | 488 | } |
489 | 489 | |
490 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
490 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
491 | 491 | /** |
492 | 492 | * Return the label of a given status |
493 | 493 | * |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | */ |
498 | 498 | public function LibStatut($status, $mode = 0) |
499 | 499 | { |
500 | - // phpcs:enable |
|
500 | + // phpcs:enable |
|
501 | 501 | //global $langs; |
502 | 502 | |
503 | 503 | return ''; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | } |
636 | 636 | |
637 | 637 | |
638 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
638 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
639 | 639 | /** |
640 | 640 | * Update link between the expense report payment and the generated line in llx_bank |
641 | 641 | * |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | */ |
645 | 645 | public function update_fk_bank($id_bank) |
646 | 646 | { |
647 | - // phpcs:enable |
|
647 | + // phpcs:enable |
|
648 | 648 | $sql = "UPDATE " . MAIN_DB_PREFIX . "payment_expensereport SET fk_bank = " . ((int) $id_bank) . " WHERE rowid = " . ((int) $this->id); |
649 | 649 | |
650 | 650 | dol_syslog(get_class($this) . "::update_fk_bank", LOG_DEBUG); |
@@ -211,7 +211,7 @@ |
||
211 | 211 | $sql .= " '" . $this->db->idate($this->datep) . "',"; |
212 | 212 | $sql .= " " . price2num($totalamount) . ","; |
213 | 213 | $sql .= " " . ((int) $this->fk_typepayment) . ", '" . $this->db->escape($this->num_payment) . "', '" . $this->db->escape($this->note_public) . "', " . ((int) $user->id) . ","; |
214 | - $sql .= " 0)"; // fk_bank is ID of transaction into ll_bank |
|
214 | + $sql .= " 0)"; // fk_bank is ID of transaction into ll_bank |
|
215 | 215 | |
216 | 216 | dol_syslog(get_class($this) . "::create", LOG_DEBUG); |
217 | 217 | $resql = $this->db->query($sql); |
@@ -141,7 +141,7 @@ |
||
141 | 141 | $dataseries = dol_sort_array($dataseries, 1, 'desc'); |
142 | 142 | |
143 | 143 | // Merge all entries after the $KEEPNFIRST one into one entry called "Other..." (to avoid to have too much entries in graphic). |
144 | -$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain |
|
144 | +$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain |
|
145 | 145 | $i = 0; |
146 | 146 | if (count($dataseries) > ($KEEPNFIRST + 1)) { |
147 | 147 | foreach ($dataseries as $key => $val) { |
@@ -59,7 +59,7 @@ |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | $usestripeterminals = getDolGlobalString('STRIPE_LOCATION'); |
62 | -if (! $usestripeterminals) { |
|
62 | +if (!$usestripeterminals) { |
|
63 | 63 | accessforbidden('Feature to use Stripe terminals not enabled'); |
64 | 64 | } |
65 | 65 |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | "confirmation_method" => $mode, |
489 | 489 | "amount" => $stripeamount, |
490 | 490 | "currency" => $currency_code, |
491 | - "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
491 | + "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
492 | 492 | /* |
493 | 493 | 'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php', |
494 | 494 | 'automatic_payment_methods' => array( |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | ); |
504 | 504 | if ($descriptor) { |
505 | 505 | $dataforintent["statement_descriptor_suffix"] = $descriptor; // For card payment, 22 chars that appears on bank receipt (prefix into stripe setup + this suffix) |
506 | - $dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix |
|
506 | + $dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix |
|
507 | 507 | } |
508 | 508 | if (!is_null($customer)) { |
509 | 509 | $dataforintent["customer"] = $customer; |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | |
713 | 713 | $dataforintent = array( |
714 | 714 | "confirm" => $confirmnow, // Do not confirm immediately during creation of intent |
715 | - "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
715 | + "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard |
|
716 | 716 | /* |
717 | 717 | 'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php', |
718 | 718 | 'automatic_payment_methods' => array( |
@@ -1128,7 +1128,7 @@ discard block |
||
1128 | 1128 | } catch (Exception $e) { |
1129 | 1129 | $sepa = null; |
1130 | 1130 | $this->error = 'Stripe error: ' . $e->getMessage() . '. Check the BAN information.'; |
1131 | - dol_syslog($this->error, LOG_WARNING); // Error from Stripe, so a warning on Dolibarr |
|
1131 | + dol_syslog($this->error, LOG_WARNING); // Error from Stripe, so a warning on Dolibarr |
|
1132 | 1132 | } |
1133 | 1133 | } |
1134 | 1134 | } |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | '', |
91 | 91 | array( |
92 | 92 | 'dolibarrkey' => array('name' => 'dolibarrkey', 'type' => 'xsd:string'), |
93 | - 'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'), |
|
94 | - 'login' => array('name' => 'login', 'type' => 'xsd:string'), |
|
93 | + 'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'), |
|
94 | + 'login' => array('name' => 'login', 'type' => 'xsd:string'), |
|
95 | 95 | 'password' => array('name' => 'password', 'type' => 'xsd:string'), |
96 | 96 | 'entity' => array('name' => 'entity', 'type' => 'xsd:string') |
97 | 97 | ) |
@@ -120,12 +120,12 @@ discard block |
||
120 | 120 | 'amount' => array('name' => 'amount', 'type' => 'xsd:double'), |
121 | 121 | 'num_payment' => array('name' => 'num_payment', 'type' => 'xsd:string'), |
122 | 122 | 'thirdparty_id' => array('name' => 'thirdparty_id', 'type' => 'xsd:int'), |
123 | - 'bank_account' => array('name' => 'bank_account', 'type' => 'xsd:int'), |
|
124 | - 'payment_mode_id' => array('name' => 'payment_mode_id', 'type' => 'xsd:int'), |
|
125 | - 'invoice_id' => array('name' => 'invoice_id', 'type' => 'xsd:int'), |
|
126 | - 'int_label' => array('name' => 'int_label', 'type' => 'xsd:string'), |
|
127 | - 'emitter' => array('name' => 'emitter', 'type' => 'xsd:string'), |
|
128 | - 'bank_source' => array('name' => 'bank_source', 'type' => 'xsd:string'), |
|
123 | + 'bank_account' => array('name' => 'bank_account', 'type' => 'xsd:int'), |
|
124 | + 'payment_mode_id' => array('name' => 'payment_mode_id', 'type' => 'xsd:int'), |
|
125 | + 'invoice_id' => array('name' => 'invoice_id', 'type' => 'xsd:int'), |
|
126 | + 'int_label' => array('name' => 'int_label', 'type' => 'xsd:string'), |
|
127 | + 'emitter' => array('name' => 'emitter', 'type' => 'xsd:string'), |
|
128 | + 'bank_source' => array('name' => 'bank_source', 'type' => 'xsd:string'), |
|
129 | 129 | ) |
130 | 130 | ); |
131 | 131 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $now = dol_now(); |
166 | 166 | |
167 | 167 | dol_syslog("Function: createPayment login=" . $authentication['login'] . " id=" . $payment->id . |
168 | - ", ref=" . $payment->ref . ", ref_ext=" . $payment->ref_ext); |
|
168 | + ", ref=" . $payment->ref . ", ref_ext=" . $payment->ref_ext); |
|
169 | 169 | |
170 | 170 | if ($authentication['entity']) { |
171 | 171 | $conf->entity = $authentication['entity']; |
@@ -64,8 +64,7 @@ |
||
64 | 64 | $dolibarr_main_cookie_cryptkey; // This is loaded by filefunc.inc.php |
65 | 65 | |
66 | 66 | $tmp_instance_unique_id = empty($dolibarr_main_instance_unique_id) ? |
67 | - (empty($dolibarr_main_cookie_cryptkey) ? '' : |
|
68 | - $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; |
|
67 | + (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; |
|
69 | 68 | // Unique id of instance |
70 | 69 | |
71 | 70 | // The recommended value (may be not defined for old versions) |
@@ -113,7 +113,7 @@ |
||
113 | 113 | 'maxTopMenu' => & $maxTopMenu |
114 | 114 | ); |
115 | 115 | |
116 | -$reshook = $hookmanager->executeHooks('PrintTopMenu', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook |
|
116 | +$reshook = $hookmanager->executeHooks('PrintTopMenu', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook |
|
117 | 117 | if ($reshook < 0) { |
118 | 118 | $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
119 | 119 | } |
@@ -49,7 +49,9 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | // Not sure this is required |
52 | -if (isset($_SESSION['webportal_logged_thirdparty_account_id'])) unset($_SESSION['webportal_logged_thirdparty_account_id']); |
|
52 | +if (isset($_SESSION['webportal_logged_thirdparty_account_id'])) { |
|
53 | + unset($_SESSION['webportal_logged_thirdparty_account_id']); |
|
54 | +} |
|
53 | 55 | |
54 | 56 | if (GETPOST('noredirect')) { |
55 | 57 | return; |