@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | } |
439 | 439 | $title = $langs->trans("InvoiceWaitingWithdraw"); |
440 | 440 | $picto = 'bill'; |
441 | - if ($type =='bank-transfer') { |
|
441 | + if ($type == 'bank-transfer') { |
|
442 | 442 | if ($sourcetype != 'salary') { |
443 | 443 | $title = $langs->trans("InvoiceWaitingPaymentByBankTransfer"); |
444 | 444 | } else { |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | print '<td>'.$langs->trans("Employee").'</td>'; |
481 | 481 | } |
482 | 482 | print '<td>'.$langs->trans("RIB").'</td>'; |
483 | - print ($sourcetype != 'salary'? '<td>'.$langs->trans("RUM").'</td>' : ''); |
|
483 | + print ($sourcetype != 'salary' ? '<td>'.$langs->trans("RUM").'</td>' : ''); |
|
484 | 484 | print '<td class="right">'.$langs->trans("AmountTTC").'</td>'; |
485 | 485 | print '<td class="right">'.$langs->trans("DateRequest").'</td>'; |
486 | 486 | // Action column |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | while ($i < $num && $i < $limit) { |
503 | 503 | $obj = $db->fetch_object($resql); |
504 | 504 | if ($sourcetype != 'salary') { |
505 | - $bac = new CompanyBankAccount($db); // Must include the new in loop so the fetch is clean |
|
505 | + $bac = new CompanyBankAccount($db); // Must include the new in loop so the fetch is clean |
|
506 | 506 | $bac->fetch(0, $obj->socid); |
507 | 507 | |
508 | 508 | $invoicestatic->id = $obj->rowid; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $sql .= MAIN_DB_PREFIX."prelevement_demande as pd"; |
182 | 182 | $sql .= " WHERE s.rowid = pd.fk_salary"; |
183 | 183 | $sql .= " AND u.rowid = s.fk_user"; |
184 | - $sql .=" AND s.paye = 0 AND pd.traite = 0"; |
|
184 | + $sql .= " AND s.paye = 0 AND pd.traite = 0"; |
|
185 | 185 | if ($search_facture) { |
186 | 186 | $sql .= natural_search("s.rowid", $search_facture); |
187 | 187 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | |
253 | 253 | print '<tr class="liste_titre">'; |
254 | 254 | print_liste_field_titre(($sourcetype ? "RefSalary" : "Bill"), $_SERVER["PHP_SELF"]); |
255 | -print_liste_field_titre(($sourcetype ? "Employee" :"Company"), $_SERVER["PHP_SELF"]); |
|
255 | +print_liste_field_titre(($sourcetype ? "Employee" : "Company"), $_SERVER["PHP_SELF"]); |
|
256 | 256 | print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "", "", $param, '', '', '', 'right '); |
257 | 257 | print_liste_field_titre("DateRequest", $_SERVER["PHP_SELF"], "", "", $param, '', '', '', 'center '); |
258 | 258 | print_liste_field_titre(''); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $i = 0; |
269 | 269 | |
270 | 270 | if ($limit > 0 && $limit != $conf->liste_limit) { |
271 | - $param.='&limit='.((int) $limit); |
|
271 | + $param .= '&limit='.((int) $limit); |
|
272 | 272 | } |
273 | 273 | $param = "&id=".urlencode($id); |
274 | 274 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | print_liste_field_titre("RefSupplierShort", $_SERVER["PHP_SELF"], "f.ref_supplier", '', $param, '', $sortfield, $sortorder); |
300 | 300 | } |
301 | 301 | print_liste_field_titre(($salaryBonPl ? "Employee" : "ThirdParty"), $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); |
302 | - print_liste_field_titre(($salaryBonPl ? "AmountSalary": "AmountInvoice"), $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder); |
|
302 | + print_liste_field_titre(($salaryBonPl ? "AmountSalary" : "AmountInvoice"), $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder); |
|
303 | 303 | print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "pl.amount", "", $param, 'class="right"', $sortfield, $sortorder); |
304 | 304 | print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder); |
305 | 305 | print_liste_field_titre(''); |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | print "</td>\n"; |
349 | 349 | |
350 | 350 | // Amount of invoice |
351 | - print '<td class="right"><span class="amount">'.price(($salaryBonPl ? $obj->amount :$obj->total_ttc))."</span></td>\n"; |
|
351 | + print '<td class="right"><span class="amount">'.price(($salaryBonPl ? $obj->amount : $obj->total_ttc))."</span></td>\n"; |
|
352 | 352 | |
353 | 353 | // Amount requested |
354 | 354 | print '<td class="right"><span class="amount">'.price($obj->amount_requested)."</span></td>\n"; |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | */ |
434 | 434 | if ($salaryBonPl) { |
435 | 435 | $sql = "SELECT pl.rowid, pl.statut, pl.amount,pl.fk_user"; |
436 | - $sql .=" FROM llx_prelevement as p, llx_prelevement_lignes as pl, llx_salary as s"; |
|
436 | + $sql .= " FROM llx_prelevement as p, llx_prelevement_lignes as pl, llx_salary as s"; |
|
437 | 437 | $sql .= " WHERE pl.rowid = p.fk_prelevement_lignes"; |
438 | 438 | $sql .= " AND p.fk_salary = s.rowid"; |
439 | 439 | $sql .= " AND pl.fk_prelevement_bons = ".((int) $id); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $sql .= ", ".MAIN_DB_PREFIX."societe as s"; |
446 | 446 | $sql .= " WHERE pl.fk_prelevement_bons = ".((int) $id); |
447 | 447 | $sql .= " AND pl.fk_prelevement_bons = pb.rowid"; |
448 | - $sql .= " AND pb.entity = ".((int) $conf->entity); // No sharing of entity here |
|
448 | + $sql .= " AND pb.entity = ".((int) $conf->entity); // No sharing of entity here |
|
449 | 449 | $sql .= " AND pl.fk_soc = s.rowid"; |
450 | 450 | if ($socid) { |
451 | 451 | $sql .= " AND s.rowid = ".((int) $socid); |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | $userSalary->fetch($obj->fk_user); |
526 | 526 | } |
527 | 527 | print '<td>'; |
528 | - print (!$salaryBonPl ? $thirdparty->getNomUrl(1) : $userSalary->getNomUrl(1)); |
|
528 | + print (!$salaryBonPl ? $thirdparty->getNomUrl(1) : $userSalary->getNomUrl(1)); |
|
529 | 529 | print "</td>\n"; |
530 | 530 | |
531 | 531 | print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n"; |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | |
98 | 98 | const STATUS_DRAFT = 0; |
99 | 99 | const STATUS_TRANSFERED = 1; |
100 | - const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
101 | - const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
100 | + const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
101 | + const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type |
|
102 | 102 | |
103 | 103 | |
104 | 104 | /** |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
146 | 146 | */ |
147 | - public $fields=array( |
|
147 | + public $fields = array( |
|
148 | 148 | 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>0,), |
149 | 149 | 'ref' => array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax150', 'showoncombobox'=>'1',), |
150 | 150 | 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>25, 'notnull'=>0, 'visible'=>-1,), |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $sql .= ", '".$this->db->escape($code_guichet)."'"; |
341 | 341 | $sql .= ", '".$this->db->escape($number)."'"; |
342 | 342 | $sql .= ", '".$this->db->escape($number_key)."'"; |
343 | - $sql .= (!empty($sourcetype) ? ", ". ((int) $client_id) : ''); |
|
343 | + $sql .= (!empty($sourcetype) ? ", ".((int) $client_id) : ''); |
|
344 | 344 | $sql .= ")"; |
345 | 345 | if ($this->db->query($sql)) { |
346 | 346 | $line_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes"); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | } else { |
565 | 565 | $modeforaddpayment = 'payment'; |
566 | 566 | $labelforaddpayment = '(CustomerInvoicePayment)'; |
567 | - $addbankurl = 'direct-debit'; // = 'directdebit' |
|
567 | + $addbankurl = 'direct-debit'; // = 'directdebit' |
|
568 | 568 | } |
569 | 569 | |
570 | 570 | $result = $paiement->addPaymentToBank($user, $modeforaddpayment, $labelforaddpayment, $fk_bank_account, '', '', 0, '', $addbankurl); |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | // phpcs:enable |
825 | 825 | global $conf; |
826 | 826 | |
827 | - if ($forsalary == 1 ) { |
|
827 | + if ($forsalary == 1) { |
|
828 | 828 | $sql = "SELECT count(s.rowid) as nb"; |
829 | 829 | $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; |
830 | 830 | } else { |
@@ -1077,12 +1077,12 @@ discard block |
||
1077 | 1077 | } else { |
1078 | 1078 | $invoice_url = "<a href='".DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$fac[0]."'>".$fac[9]."</a>"; |
1079 | 1079 | } |
1080 | - dol_syslog(__METHOD__ . " Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() " . $fac->fk_soc . " " . $soc->name, LOG_WARNING); |
|
1081 | - $this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice " . $invoice_url . " for thirdparty " . $soc->getNomUrl(0); |
|
1082 | - $this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice " . $invoice_url . " for thirdparty " . $soc->getNomUrl(0); |
|
1080 | + dol_syslog(__METHOD__." Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$fac->fk_soc." ".$soc->name, LOG_WARNING); |
|
1081 | + $this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice ".$invoice_url." for thirdparty ".$soc->getNomUrl(0); |
|
1082 | + $this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice ".$invoice_url." for thirdparty ".$soc->getNomUrl(0); |
|
1083 | 1083 | } |
1084 | 1084 | } else { |
1085 | - dol_syslog(__METHOD__ . " Check BAN Failed to read company", LOG_WARNING); |
|
1085 | + dol_syslog(__METHOD__." Check BAN Failed to read company", LOG_WARNING); |
|
1086 | 1086 | } |
1087 | 1087 | /* |
1088 | 1088 | } else { |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | $ref = substr($year, -2).$month; |
1136 | 1136 | |
1137 | 1137 | // Get next free nuber for the ref of bon |
1138 | - $sql = "SELECT substring(ref from char_length(ref) - 1)"; // To extract "YYMMXX" from "TYYMMXX" |
|
1138 | + $sql = "SELECT substring(ref from char_length(ref) - 1)"; // To extract "YYMMXX" from "TYYMMXX" |
|
1139 | 1139 | $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons"; |
1140 | 1140 | $sql .= " WHERE ref LIKE '_".$this->db->escape($ref)."%'"; |
1141 | 1141 | $sql .= " AND entity = ".((int) $conf->entity); |
@@ -2145,7 +2145,7 @@ discard block |
||
2145 | 2145 | $XML_CREDITOR .= ' <EndToEndId>'.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('CT-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters |
2146 | 2146 | $XML_CREDITOR .= ' </PmtId>'.$CrLf; |
2147 | 2147 | if (!empty($this->sepa_xml_pti_in_ctti)) { |
2148 | - $XML_CREDITOR .= ' <PmtTpInf>' . $CrLf; |
|
2148 | + $XML_CREDITOR .= ' <PmtTpInf>'.$CrLf; |
|
2149 | 2149 | |
2150 | 2150 | // Can be 'NORM' for normal or 'HIGH' for high priority level |
2151 | 2151 | if (!empty($conf->global->PAYMENTBYBANKTRANSFER_FORCE_HIGH_PRIORITY)) { |
@@ -2153,14 +2153,14 @@ discard block |
||
2153 | 2153 | } else { |
2154 | 2154 | $instrprty = 'NORM'; |
2155 | 2155 | } |
2156 | - $XML_CREDITOR .= ' <InstrPrty>'.$instrprty.'</InstrPrty>' . $CrLf; |
|
2157 | - $XML_CREDITOR .= ' <SvcLvl>' . $CrLf; |
|
2158 | - $XML_CREDITOR .= ' <Cd>SEPA</Cd>' . $CrLf; |
|
2159 | - $XML_CREDITOR .= ' </SvcLvl>' . $CrLf; |
|
2160 | - $XML_CREDITOR .= ' <CtgyPurp>' . $CrLf; |
|
2161 | - $XML_CREDITOR .= ' <Cd>CORE</Cd>' . $CrLf; |
|
2162 | - $XML_CREDITOR .= ' </CtgyPurp>' . $CrLf; |
|
2163 | - $XML_CREDITOR .= ' </PmtTpInf>' . $CrLf; |
|
2156 | + $XML_CREDITOR .= ' <InstrPrty>'.$instrprty.'</InstrPrty>'.$CrLf; |
|
2157 | + $XML_CREDITOR .= ' <SvcLvl>'.$CrLf; |
|
2158 | + $XML_CREDITOR .= ' <Cd>SEPA</Cd>'.$CrLf; |
|
2159 | + $XML_CREDITOR .= ' </SvcLvl>'.$CrLf; |
|
2160 | + $XML_CREDITOR .= ' <CtgyPurp>'.$CrLf; |
|
2161 | + $XML_CREDITOR .= ' <Cd>CORE</Cd>'.$CrLf; |
|
2162 | + $XML_CREDITOR .= ' </CtgyPurp>'.$CrLf; |
|
2163 | + $XML_CREDITOR .= ' </PmtTpInf>'.$CrLf; |
|
2164 | 2164 | } |
2165 | 2165 | $XML_CREDITOR .= ' <Amt>'.$CrLf; |
2166 | 2166 | $XML_CREDITOR .= ' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf; |
@@ -2321,7 +2321,7 @@ discard block |
||
2321 | 2321 | $this->emetteur_iban = $account->iban; |
2322 | 2322 | $this->emetteur_bic = $account->bic; |
2323 | 2323 | |
2324 | - $this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; |
|
2324 | + $this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; |
|
2325 | 2325 | |
2326 | 2326 | $this->raison_sociale = $account->proprio; |
2327 | 2327 | } |
@@ -2412,15 +2412,15 @@ discard block |
||
2412 | 2412 | $XML_SEPA_INFO .= ' <NbOfTxs>'.$nombre.'</NbOfTxs>'.$CrLf; |
2413 | 2413 | $XML_SEPA_INFO .= ' <CtrlSum>'.$total.'</CtrlSum>'.$CrLf; |
2414 | 2414 | if (!empty($this->sepa_xml_pti_in_ctti) && !empty($format)) { // @TODO Using $format (FRST ou RCUR) in a section for a Credit Transfer looks strange. |
2415 | - $XML_SEPA_INFO .= ' <PmtTpInf>' . $CrLf; |
|
2416 | - $XML_SEPA_INFO .= ' <SvcLvl>' . $CrLf; |
|
2417 | - $XML_SEPA_INFO .= ' <Cd>SEPA</Cd>' . $CrLf; |
|
2418 | - $XML_SEPA_INFO .= ' </SvcLvl>' . $CrLf; |
|
2419 | - $XML_SEPA_INFO .= ' <LclInstrm>' . $CrLf; |
|
2420 | - $XML_SEPA_INFO .= ' <Cd>CORE</Cd>' . $CrLf; |
|
2421 | - $XML_SEPA_INFO .= ' </LclInstrm>' . $CrLf; |
|
2422 | - $XML_SEPA_INFO .= ' <SeqTp>' . $format . '</SeqTp>' . $CrLf; |
|
2423 | - $XML_SEPA_INFO .= ' </PmtTpInf>' . $CrLf; |
|
2415 | + $XML_SEPA_INFO .= ' <PmtTpInf>'.$CrLf; |
|
2416 | + $XML_SEPA_INFO .= ' <SvcLvl>'.$CrLf; |
|
2417 | + $XML_SEPA_INFO .= ' <Cd>SEPA</Cd>'.$CrLf; |
|
2418 | + $XML_SEPA_INFO .= ' </SvcLvl>'.$CrLf; |
|
2419 | + $XML_SEPA_INFO .= ' <LclInstrm>'.$CrLf; |
|
2420 | + $XML_SEPA_INFO .= ' <Cd>CORE</Cd>'.$CrLf; |
|
2421 | + $XML_SEPA_INFO .= ' </LclInstrm>'.$CrLf; |
|
2422 | + $XML_SEPA_INFO .= ' <SeqTp>'.$format.'</SeqTp>'.$CrLf; |
|
2423 | + $XML_SEPA_INFO .= ' </PmtTpInf>'.$CrLf; |
|
2424 | 2424 | } |
2425 | 2425 | $XML_SEPA_INFO .= ' <ReqdExctnDt>'.dol_print_date($dateTime_ETAD, 'dayrfc').'</ReqdExctnDt>'.$CrLf; |
2426 | 2426 | $XML_SEPA_INFO .= ' <Dbtr>'.$CrLf; |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | $langs->loadLangs(array("users", "companies", "agenda", "commercial", "other", "orders", "bills")); |
42 | 42 | |
43 | 43 | // Get Parameters |
44 | -$action = GETPOST('action', 'aZ09'); |
|
44 | +$action = GETPOST('action', 'aZ09'); |
|
45 | 45 | $massaction = GETPOST('massaction', 'alpha'); |
46 | -$confirm = GETPOST('confirm', 'alpha'); |
|
46 | +$confirm = GETPOST('confirm', 'alpha'); |
|
47 | 47 | $cancel = GETPOST('cancel', 'alpha'); |
48 | -$toselect = GETPOST('toselect', 'array'); |
|
48 | +$toselect = GETPOST('toselect', 'array'); |
|
49 | 49 | $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search |
50 | 50 | $optioncss = GETPOST('optioncss', 'alpha'); |
51 | 51 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $mode = GETPOST('mode', 'aZ09'); |
56 | 56 | if (empty($mode) && preg_match('/show_/', $action)) { |
57 | - $mode = $action; // For backward compatibility |
|
57 | + $mode = $action; // For backward compatibility |
|
58 | 58 | } |
59 | 59 | $resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); |
60 | 60 | $pid = GETPOST("search_projectid", 'int', 3) ?GETPOST("search_projectid", 'int', 3) : GETPOST("projectid", 'int', 3); |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | if (isModEnabled('category') && $user->hasRight('agenda', 'myactions', 'create')) { |
406 | 406 | $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); |
407 | 407 | } |
408 | -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
408 | +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
409 | 409 | $arrayofmassactions = array(); |
410 | 410 | } |
411 | 411 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | $newparam = '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; |
702 | 702 | |
703 | 703 | //$param='month='.$monthshown.'&year='.$year; |
704 | -$hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation |
|
704 | +$hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation |
|
705 | 705 | |
706 | 706 | $url = DOL_URL_ROOT.'/comm/action/card.php?action=create'; |
707 | 707 | $url .= '&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec; |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | |
712 | 712 | $param .= '&mode='.$mode; |
713 | 713 | |
714 | -print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, is_numeric($nbtotalofrecords) ? -1 * $nbtotalofrecords: $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode); |
|
714 | +print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, is_numeric($nbtotalofrecords) ? -1 * $nbtotalofrecords : $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode); |
|
715 | 715 | |
716 | 716 | print $s; |
717 | 717 | |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | $event_owner_style = ''; |
957 | 957 | // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) |
958 | 958 | if ($cache_user_list[$obj->fk_user_action]->color != '') { |
959 | - $event_owner_style .= 'border-left: #' . $cache_user_list[$obj->fk_user_action]->color . ' 5px solid;'; |
|
959 | + $event_owner_style .= 'border-left: #'.$cache_user_list[$obj->fk_user_action]->color.' 5px solid;'; |
|
960 | 960 | } |
961 | 961 | |
962 | 962 | // get event style for start and end date |
@@ -991,7 +991,7 @@ discard block |
||
991 | 991 | } |
992 | 992 | $event_start_date_css = $event_end_date_css = $event_more_class; |
993 | 993 | |
994 | - print '<tr class="oddeven' . ($event_more_class != '' ? ' '.$event_more_class : '') . '">'; |
|
994 | + print '<tr class="oddeven'.($event_more_class != '' ? ' '.$event_more_class : '').'">'; |
|
995 | 995 | // Action column |
996 | 996 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
997 | 997 | print '<td class="nowrap center">'; |
@@ -1080,7 +1080,7 @@ discard block |
||
1080 | 1080 | } |
1081 | 1081 | print '</span>'; |
1082 | 1082 | $late = 0; |
1083 | - if ($actionstatic->hasDelay() && $actionstatic->percentage >= 0 && $actionstatic->percentage < 100 ) { |
|
1083 | + if ($actionstatic->hasDelay() && $actionstatic->percentage >= 0 && $actionstatic->percentage < 100) { |
|
1084 | 1084 | $late = 1; |
1085 | 1085 | } |
1086 | 1086 | if ($late) { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * \remarks To run this script as CLI: phpunit filename.php |
25 | 25 | */ |
26 | 26 | |
27 | -global $conf,$user,$langs,$db; |
|
27 | +global $conf, $user, $langs, $db; |
|
28 | 28 | //define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver |
29 | 29 | //require_once 'PHPUnit/Autoload.php'; |
30 | 30 | require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $user->fetch(1); |
35 | 35 | $user->getrights(); |
36 | 36 | } |
37 | -$conf->global->MAIN_DISABLE_ALL_MAILS=1; |
|
37 | +$conf->global->MAIN_DISABLE_ALL_MAILS = 1; |
|
38 | 38 | |
39 | 39 | |
40 | 40 | /** |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | parent::__construct($name); |
64 | 64 | |
65 | 65 | //$this->sharedFixture |
66 | - global $conf,$user,$langs,$db; |
|
67 | - $this->savconf=$conf; |
|
68 | - $this->savuser=$user; |
|
69 | - $this->savlangs=$langs; |
|
70 | - $this->savdb=$db; |
|
66 | + global $conf, $user, $langs, $db; |
|
67 | + $this->savconf = $conf; |
|
68 | + $this->savuser = $user; |
|
69 | + $this->savlangs = $langs; |
|
70 | + $this->savdb = $db; |
|
71 | 71 | |
72 | 72 | print __METHOD__." db->type=".$db->type." user->id=".$user->id; |
73 | 73 | //print " - db ".$db->db; |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public static function setUpBeforeClass(): void |
83 | 83 | { |
84 | - global $conf,$user,$langs,$db; |
|
85 | - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. |
|
84 | + global $conf, $user, $langs, $db; |
|
85 | + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. |
|
86 | 86 | |
87 | 87 | print __METHOD__."\n"; |
88 | 88 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public static function tearDownAfterClass(): void |
96 | 96 | { |
97 | - global $conf,$user,$langs,$db; |
|
97 | + global $conf, $user, $langs, $db; |
|
98 | 98 | $db->rollback(); |
99 | 99 | |
100 | 100 | print __METHOD__."\n"; |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | */ |
108 | 108 | protected function setUp(): void |
109 | 109 | { |
110 | - global $conf,$user,$langs,$db; |
|
111 | - $conf=$this->savconf; |
|
112 | - $user=$this->savuser; |
|
113 | - $langs=$this->savlangs; |
|
114 | - $db=$this->savdb; |
|
110 | + global $conf, $user, $langs, $db; |
|
111 | + $conf = $this->savconf; |
|
112 | + $user = $this->savuser; |
|
113 | + $langs = $this->savlangs; |
|
114 | + $db = $this->savdb; |
|
115 | 115 | |
116 | 116 | print __METHOD__."\n"; |
117 | 117 | } |
@@ -132,35 +132,35 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function testModulesInit() |
134 | 134 | { |
135 | - global $conf,$user,$langs,$db; |
|
136 | - $conf=$this->savconf; |
|
137 | - $user=$this->savuser; |
|
138 | - $langs=$this->savlangs; |
|
139 | - $db=$this->savdb; |
|
140 | - |
|
141 | - $modulelist=array('Accounting','Adherent','Agenda','Api','Asset','Banque','Barcode','BlockedLog','Bom','Bookmark', |
|
142 | - 'Categorie','ClickToDial','Collab','Commande','Comptabilite','Contrat','Cron','DataPolicy','Dav','DebugBar','Deplacement','DocumentGeneration','Don','DynamicPrices', |
|
143 | - 'ECM','EmailCollector','EventOrganization','Expedition','ExpenseReport','Export','ExternalRss','ExternalSite', |
|
144 | - 'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','HRM','Import','Incoterm','Intracommreport', |
|
145 | - 'KnowledgeManagement','Label','Ldap','Loan', |
|
146 | - 'Mailing','MailmanSpip','Margin','ModuleBuilder','Mrp','MultiCurrency', |
|
147 | - 'Notification','Oauth','OpenSurvey','Paybox','PaymentByBankTransfer','Paypal','Prelevement','Printing','Product','ProductBatch','Projet','Propale', |
|
148 | - 'ReceiptPrinter','Reception','Recruitment','Resource', |
|
149 | - 'Salaries','Service','SocialNetworks','Societe','Stock','Stripe','SupplierProposal','Syslog', |
|
150 | - 'TakePos','Tax','Ticket','User','Variants','WebServices','WebServicesClient','Website','Workflow','Workstation','Zapier'); |
|
135 | + global $conf, $user, $langs, $db; |
|
136 | + $conf = $this->savconf; |
|
137 | + $user = $this->savuser; |
|
138 | + $langs = $this->savlangs; |
|
139 | + $db = $this->savdb; |
|
140 | + |
|
141 | + $modulelist = array('Accounting', 'Adherent', 'Agenda', 'Api', 'Asset', 'Banque', 'Barcode', 'BlockedLog', 'Bom', 'Bookmark', |
|
142 | + 'Categorie', 'ClickToDial', 'Collab', 'Commande', 'Comptabilite', 'Contrat', 'Cron', 'DataPolicy', 'Dav', 'DebugBar', 'Deplacement', 'DocumentGeneration', 'Don', 'DynamicPrices', |
|
143 | + 'ECM', 'EmailCollector', 'EventOrganization', 'Expedition', 'ExpenseReport', 'Export', 'ExternalRss', 'ExternalSite', |
|
144 | + 'Facture', 'Fckeditor', 'Ficheinter', 'Fournisseur', 'FTP', 'GeoIPMaxmind', 'Gravatar', 'Holiday', 'HRM', 'Import', 'Incoterm', 'Intracommreport', |
|
145 | + 'KnowledgeManagement', 'Label', 'Ldap', 'Loan', |
|
146 | + 'Mailing', 'MailmanSpip', 'Margin', 'ModuleBuilder', 'Mrp', 'MultiCurrency', |
|
147 | + 'Notification', 'Oauth', 'OpenSurvey', 'Paybox', 'PaymentByBankTransfer', 'Paypal', 'Prelevement', 'Printing', 'Product', 'ProductBatch', 'Projet', 'Propale', |
|
148 | + 'ReceiptPrinter', 'Reception', 'Recruitment', 'Resource', |
|
149 | + 'Salaries', 'Service', 'SocialNetworks', 'Societe', 'Stock', 'Stripe', 'SupplierProposal', 'Syslog', |
|
150 | + 'TakePos', 'Tax', 'Ticket', 'User', 'Variants', 'WebServices', 'WebServicesClient', 'Website', 'Workflow', 'Workstation', 'Zapier'); |
|
151 | 151 | foreach ($modulelist as $modlabel) { |
152 | 152 | require_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php'; |
153 | - $class='mod'.$modlabel; |
|
154 | - $mod=new $class($db); |
|
153 | + $class = 'mod'.$modlabel; |
|
154 | + $mod = new $class($db); |
|
155 | 155 | |
156 | - $result=$mod->remove(); |
|
157 | - $result=$mod->init(); |
|
156 | + $result = $mod->remove(); |
|
157 | + $result = $mod->init(); |
|
158 | 158 | |
159 | 159 | $this->assertLessThan($result, 0, $modlabel." ".$mod->error); |
160 | 160 | print __METHOD__." test remove/init for module ".$modlabel.", result=".$result."\n"; |
161 | 161 | |
162 | 162 | if (in_array($modlabel, array('Ldap', 'MailmanSpip'))) { |
163 | - $result=$mod->remove(); |
|
163 | + $result = $mod->remove(); |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 |