@@ -4,7 +4,7 @@ |
||
4 | 4 | * Simple autoloader, so we don't need Composer just for this. |
5 | 5 | */ |
6 | 6 | |
7 | -spl_autoload_register(function ($class) { |
|
7 | +spl_autoload_register(function($class) { |
|
8 | 8 | if (preg_match('/^DebugBar/', $class)) { |
9 | 9 | $file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; |
10 | 10 | //var_dump($class.' - '.file_exists($file).' - '.$file); |
@@ -260,13 +260,13 @@ |
||
260 | 260 | print '</tr>'; |
261 | 261 | |
262 | 262 | // sort list |
263 | -if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) { |
|
263 | +if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) { |
|
264 | 264 | return strcasecmp($a->name, $b->name); }); |
265 | -if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) { |
|
265 | +if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) { |
|
266 | 266 | return strcasecmp($b->name, $a->name); }); |
267 | -if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) { |
|
267 | +if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) { |
|
268 | 268 | return strcasecmp($a->version, $b->version); }); |
269 | -if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) { |
|
269 | +if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) { |
|
270 | 270 | return strcasecmp($b->version, $a->version); }); |
271 | 271 | if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "compareIdAsc"); |
272 | 272 | if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "compareIdDesc"); |
@@ -1288,7 +1288,7 @@ |
||
1288 | 1288 | if (!empty($fields)) |
1289 | 1289 | { |
1290 | 1290 | // Sort extrafields by rank |
1291 | - uasort($fields, function ($a, $b) { |
|
1291 | + uasort($fields, function($a, $b) { |
|
1292 | 1292 | return ($a->rank > $b->rank) ? 1 : -1; |
1293 | 1293 | }); |
1294 | 1294 |
@@ -139,7 +139,7 @@ |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | // remove not available workflows (based on activated modules and global defined keys) |
142 | -$workflowcodes = array_filter($workflowcodes, function ($var) { |
|
142 | +$workflowcodes = array_filter($workflowcodes, function($var) { |
|
143 | 143 | return $var['enabled']; }); |
144 | 144 | |
145 | 145 | /* |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; |
47 | 47 | |
48 | -call_user_func(function () { |
|
48 | +call_user_func(function() { |
|
49 | 49 | $loader = Luracast\Restler\AutoLoader::instance(); |
50 | 50 | spl_autoload_register($loader); |
51 | 51 | return $loader; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | // Create the autoloader for Luracast |
20 | 20 | require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; |
21 | -call_user_func(function () { |
|
21 | +call_user_func(function() { |
|
22 | 22 | $loader = Luracast\Restler\AutoLoader::instance(); |
23 | 23 | spl_autoload_register($loader); |
24 | 24 | return $loader; |
@@ -1510,9 +1510,9 @@ discard block |
||
1510 | 1510 | ($line->doc_type == 'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) { |
1511 | 1511 | if ($line->doc_type == 'customer_invoice') { |
1512 | 1512 | // Get new customer invoice ref and company name |
1513 | - $sql = 'SELECT f.facnumber, s.nom FROM ' . MAIN_DB_PREFIX . 'facture as f'; |
|
1514 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON f.fk_soc = s.rowid'; |
|
1515 | - $sql .= ' WHERE f.rowid = ' . $line->fk_doc; |
|
1513 | + $sql = 'SELECT f.facnumber, s.nom FROM '.MAIN_DB_PREFIX.'facture as f'; |
|
1514 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON f.fk_soc = s.rowid'; |
|
1515 | + $sql .= ' WHERE f.rowid = '.$line->fk_doc; |
|
1516 | 1516 | $resql = $this->db->query($sql); |
1517 | 1517 | if ($resql) { |
1518 | 1518 | if ($obj = $this->db->fetch_object($resql)) { |
@@ -1524,9 +1524,9 @@ discard block |
||
1524 | 1524 | } |
1525 | 1525 | } else { |
1526 | 1526 | // Get new supplier invoice ref and company name |
1527 | - $sql = 'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff'; |
|
1528 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON ff.fk_soc = s.rowid'; |
|
1529 | - $sql .= ' WHERE ff.rowid = ' . $line->fk_doc; |
|
1527 | + $sql = 'SELECT ff.ref, s.nom FROM '.MAIN_DB_PREFIX.'facture_fourn as ff'; |
|
1528 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON ff.fk_soc = s.rowid'; |
|
1529 | + $sql .= ' WHERE ff.rowid = '.$line->fk_doc; |
|
1530 | 1530 | $resql = $this->db->query($sql); |
1531 | 1531 | if ($resql) { |
1532 | 1532 | if ($obj = $this->db->fetch_object($resql)) { |
@@ -1548,28 +1548,28 @@ discard block |
||
1548 | 1548 | } |
1549 | 1549 | } |
1550 | 1550 | |
1551 | - print $line->id . $this->separator; |
|
1552 | - print $date . $this->separator; |
|
1553 | - print substr($line->code_journal, 0, 4) . $this->separator; |
|
1551 | + print $line->id.$this->separator; |
|
1552 | + print $date.$this->separator; |
|
1553 | + print substr($line->code_journal, 0, 4).$this->separator; |
|
1554 | 1554 | |
1555 | 1555 | if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) { |
1556 | - print length_accountg($line->subledger_account) . $this->separator; |
|
1556 | + print length_accountg($line->subledger_account).$this->separator; |
|
1557 | 1557 | } else { |
1558 | - print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator; |
|
1558 | + print substr(length_accountg($line->numero_compte), 0, 15).$this->separator; |
|
1559 | 1559 | } |
1560 | 1560 | //Libellé Auto |
1561 | 1561 | print $this->separator; |
1562 | 1562 | //print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator; |
1563 | 1563 | //Libellé manuel |
1564 | - print dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1) . $this->separator; |
|
1564 | + print dol_trunc(str_replace('"', '', $invoice_ref.(!empty($company_name) ? ' - ' : '').$company_name), 40, 'right', 'UTF-8', 1).$this->separator; |
|
1565 | 1565 | //Numéro de pièce |
1566 | - print dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . $this->separator; |
|
1566 | + print dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1).$this->separator; |
|
1567 | 1567 | //Devise |
1568 | - print 'EUR' . $this->separator; |
|
1568 | + print 'EUR'.$this->separator; |
|
1569 | 1569 | //Montant |
1570 | - print price2num(abs($line->montant)) . $this->separator; |
|
1570 | + print price2num(abs($line->montant)).$this->separator; |
|
1571 | 1571 | //Sens |
1572 | - print $line->sens . $this->separator; |
|
1572 | + print $line->sens.$this->separator; |
|
1573 | 1573 | //Code lettrage |
1574 | 1574 | print $this->separator; |
1575 | 1575 | //Date Echéance |
@@ -1593,21 +1593,21 @@ discard block |
||
1593 | 1593 | foreach ($objectLines as $line) { |
1594 | 1594 | $date = dol_print_date($line->doc_date, '%d%m%Y'); |
1595 | 1595 | |
1596 | - print $line->id . $this->separator; |
|
1597 | - print $date . $this->separator; |
|
1598 | - print substr($line->code_journal, 0, 4) . $this->separator; |
|
1599 | - if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) { |
|
1600 | - print length_accountg($line->subledger_account) . $this->separator; |
|
1596 | + print $line->id.$this->separator; |
|
1597 | + print $date.$this->separator; |
|
1598 | + print substr($line->code_journal, 0, 4).$this->separator; |
|
1599 | + if ((substr($line->numero_compte, 0, 3) == '411') || (substr($line->numero_compte, 0, 3) == '401')) { |
|
1600 | + print length_accountg($line->subledger_account).$this->separator; |
|
1601 | 1601 | } else { |
1602 | - print substr(length_accountg($line->numero_compte), 0, 15) . $this->separator; |
|
1602 | + print substr(length_accountg($line->numero_compte), 0, 15).$this->separator; |
|
1603 | 1603 | } |
1604 | 1604 | print $this->separator; |
1605 | 1605 | //print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator; |
1606 | - print '"'.dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1).'"' . $this->separator; |
|
1606 | + print '"'.dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1).'"'.$this->separator; |
|
1607 | 1607 | print '"'.dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1).'"'.$this->separator; |
1608 | 1608 | print price2num($line->montant).$this->separator; |
1609 | 1609 | print $line->sens.$this->separator; |
1610 | - print $date . $this->separator; |
|
1610 | + print $date.$this->separator; |
|
1611 | 1611 | print $this->separator; |
1612 | 1612 | print $this->separator; |
1613 | 1613 | print 'EUR'; |
@@ -128,7 +128,7 @@ |
||
128 | 128 | 'u.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), |
129 | 129 | ); |
130 | 130 | // Extra fields |
131 | -include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
131 | +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
132 | 132 | |
133 | 133 | $object->fields = dol_sort_array($object->fields, 'position'); |
134 | 134 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public $boxcode = "customersoutstandingbillreached"; |
36 | 36 | public $boximg = "object_company"; |
37 | 37 | public $boxlabel = "BoxCustomersOutstandingBillReached"; |
38 | - public $depends = array("facture","societe"); |
|
38 | + public $depends = array("facture", "societe"); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @var DoliDB Database handler. |