@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
86 | 86 | $object = new BookKeeping($db); |
87 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array |
|
87 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array |
|
88 | 88 | |
89 | 89 | $formaccounting = new FormAccounting($db); |
90 | 90 | $formother = new FormOther($db); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | if (getDolGlobalString('ACCOUNTANCY_SHOW_OPENING_BALANCE')) { |
469 | 469 | $sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance"; |
470 | 470 | $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t"; |
471 | - $sql .= " WHERE t.entity = " . $conf->entity; // Never do sharing into accounting features |
|
471 | + $sql .= " WHERE t.entity = " . $conf->entity; // Never do sharing into accounting features |
|
472 | 472 | $sql .= " AND t.doc_date < '" . $db->idate($search_date_start) . "'"; |
473 | 473 | $sql .= " GROUP BY t.numero_compte"; |
474 | 474 |
@@ -617,7 +617,7 @@ |
||
617 | 617 | |
618 | 618 | print '<br>'; |
619 | 619 | |
620 | - $result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt |
|
620 | + $result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt |
|
621 | 621 | |
622 | 622 | if ($result < 0) { |
623 | 623 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | |
681 | 681 | if ($setfields) { |
682 | 682 | $sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping"; |
683 | - $sql .= " SET " . $setfields; // $setfields is already a sanitized SQL string |
|
683 | + $sql .= " SET " . $setfields; // $setfields is already a sanitized SQL string |
|
684 | 684 | $sql .= " WHERE rowid = " . ((int) $movement->id); |
685 | 685 | |
686 | 686 | $result = $db->query($sql); |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | $form_question['formatexport'] = array( |
794 | 794 | 'name' => 'formatexport', |
795 | 795 | 'type' => 'select', |
796 | - 'label' => $langs->trans('Modelcsv'), // TODO Use Selectmodelcsv and show a select combo |
|
796 | + 'label' => $langs->trans('Modelcsv'), // TODO Use Selectmodelcsv and show a select combo |
|
797 | 797 | 'values' => $listofformat, |
798 | 798 | 'default' => $formatexportset, |
799 | 799 | 'morecss' => 'minwidth200 maxwidth200' |
@@ -1320,7 +1320,7 @@ discard block |
||
1320 | 1320 | |
1321 | 1321 | $labeltoshow = ''; |
1322 | 1322 | $labeltoshowalt = ''; |
1323 | - if (($objectstatic instanceof CommonObject) && in_array($line->doc_type, array('customer_invoice', 'supplier_invoice', 'expense_report'))) { |
|
1323 | + if (($objectstatic instanceof CommonObject) && in_array($line->doc_type, array('customer_invoice', 'supplier_invoice', 'expense_report'))) { |
|
1324 | 1324 | if ($objectstatic->id > 0) { |
1325 | 1325 | $labeltoshow .= $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); |
1326 | 1326 | $labeltoshow .= $documentlink; |
@@ -59,45 +59,45 @@ discard block |
||
59 | 59 | $search_mvt_num = GETPOST('search_mvt_num', 'alpha'); |
60 | 60 | $search_doc_type = GETPOST("search_doc_type", 'alpha'); |
61 | 61 | $search_doc_ref = GETPOST("search_doc_ref", 'alpha'); |
62 | -$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
63 | -$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
64 | -$search_date_startday = GETPOSTINT('search_date_startday'); |
|
65 | -$search_date_endyear = GETPOSTINT('search_date_endyear'); |
|
66 | -$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
67 | -$search_date_endday = GETPOSTINT('search_date_endday'); |
|
62 | +$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
63 | +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
64 | +$search_date_startday = GETPOSTINT('search_date_startday'); |
|
65 | +$search_date_endyear = GETPOSTINT('search_date_endyear'); |
|
66 | +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
67 | +$search_date_endday = GETPOSTINT('search_date_endday'); |
|
68 | 68 | $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); |
69 | 69 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
70 | 70 | $search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); |
71 | -$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
|
72 | -$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
|
73 | -$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
|
74 | -$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
|
75 | -$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
|
76 | -$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
|
71 | +$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
|
72 | +$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
|
73 | +$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
|
74 | +$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
|
75 | +$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
|
76 | +$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
|
77 | 77 | $search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); |
78 | 78 | $search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); |
79 | -$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); |
|
80 | -$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); |
|
81 | -$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); |
|
82 | -$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); |
|
83 | -$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); |
|
84 | -$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); |
|
79 | +$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); |
|
80 | +$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); |
|
81 | +$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); |
|
82 | +$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); |
|
83 | +$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); |
|
84 | +$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); |
|
85 | 85 | $search_date_modification_start = dol_mktime(0, 0, 0, $search_date_modification_startmonth, $search_date_modification_startday, $search_date_modification_startyear); |
86 | 86 | $search_date_modification_end = dol_mktime(23, 59, 59, $search_date_modification_endmonth, $search_date_modification_endday, $search_date_modification_endyear); |
87 | -$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); |
|
88 | -$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); |
|
89 | -$search_date_export_startday = GETPOSTINT('search_date_export_startday'); |
|
90 | -$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); |
|
91 | -$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); |
|
92 | -$search_date_export_endday = GETPOSTINT('search_date_export_endday'); |
|
87 | +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); |
|
88 | +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); |
|
89 | +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); |
|
90 | +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); |
|
91 | +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); |
|
92 | +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); |
|
93 | 93 | $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); |
94 | 94 | $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); |
95 | -$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); |
|
96 | -$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); |
|
97 | -$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); |
|
98 | -$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); |
|
99 | -$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); |
|
100 | -$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); |
|
95 | +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); |
|
96 | +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); |
|
97 | +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); |
|
98 | +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); |
|
99 | +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); |
|
100 | +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); |
|
101 | 101 | $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); |
102 | 102 | $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); |
103 | 103 | // Due date start |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $search_date_due_start = ''; |
318 | 318 | // Due date end |
319 | 319 | $search_date_due_end_day = ''; |
320 | - $search_date_due_end_month = ''; |
|
320 | + $search_date_due_end_month = ''; |
|
321 | 321 | $search_date_due_end_year = ''; |
322 | 322 | $search_date_due_end = ''; |
323 | 323 | $search_debit = ''; |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $search_date_due_start = ''; |
285 | 285 | // Due date end |
286 | 286 | $search_date_due_end_day = ''; |
287 | - $search_date_due_end_month = ''; |
|
287 | + $search_date_due_end_month = ''; |
|
288 | 288 | $search_date_due_end_year = ''; |
289 | 289 | $search_date_due_end = ''; |
290 | 290 | $search_lettering_code = ''; |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | $result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $filter, 'AND', 0); |
630 | 630 | } |
631 | 631 | //$num = count($object->lines); |
632 | - $num = $result; // $result is total nb of lines, or limit + 1, but $object->lines is always limited to $limit |
|
632 | + $num = $result; // $result is total nb of lines, or limit + 1, but $object->lines is always limited to $limit |
|
633 | 633 | |
634 | 634 | if ($result < 0) { |
635 | 635 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1046,8 +1046,8 @@ discard block |
||
1046 | 1046 | } |
1047 | 1047 | //if (empty($accountg)) $accountg = '-'; |
1048 | 1048 | |
1049 | - $colspan = 0; // colspan before field 'label of operation' |
|
1050 | - $colspanend = 0; // colspan after debit/credit |
|
1049 | + $colspan = 0; // colspan before field 'label of operation' |
|
1050 | + $colspanend = 0; // colspan after debit/credit |
|
1051 | 1051 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
1052 | 1052 | $colspan++; |
1053 | 1053 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $search_date_endday = GETPOSTINT('search_date_endday'); |
58 | 58 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
59 | 59 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
60 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
60 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
61 | 61 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
62 | 62 | |
63 | 63 | // Load variable for pagination |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $search_date_endday = GETPOSTINT('search_date_endday'); |
67 | 67 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
68 | 68 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
69 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
69 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
70 | 70 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
71 | 71 | |
72 | 72 | // Define begin binding date |
@@ -1731,7 +1731,7 @@ |
||
1731 | 1731 | $sql = "DELETE"; |
1732 | 1732 | $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element . $mode; |
1733 | 1733 | $sql .= " WHERE piece_num = " . (int) $piecenum; |
1734 | - $sql .= " AND date_validated IS NULL"; // For security, exclusion of validated entries at the time of deletion |
|
1734 | + $sql .= " AND date_validated IS NULL"; // For security, exclusion of validated entries at the time of deletion |
|
1735 | 1735 | $sql .= " AND entity = " . ((int) $conf->entity); // Do not use getEntity for accounting features |
1736 | 1736 | $sql .= $sql_filter; |
1737 | 1737 |
@@ -639,7 +639,7 @@ |
||
639 | 639 | if (is_array($cpt)) { |
640 | 640 | $listofaccount = ''; |
641 | 641 | foreach ($cpt as $cptcursor) { |
642 | - if (! is_null($cptcursor)) { |
|
642 | + if (!is_null($cptcursor)) { |
|
643 | 643 | if ($listofaccount) { |
644 | 644 | $listofaccount .= ","; |
645 | 645 | } |