@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $search_date_endday = GETPOSTINT('search_date_endday'); |
64 | 64 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
65 | 65 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
66 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
66 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
67 | 67 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
68 | 68 | $search_date_limit_startday = GETPOSTINT('search_date_limit_startday'); |
69 | 69 | $search_date_limit_startmonth = GETPOSTINT('search_date_limit_startmonth'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
120 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
120 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
121 | 121 | |
122 | 122 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
123 | 123 | $hookmanager->initHooks(array('sclist')); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | } |
81 | 81 | $result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges'); |
82 | 82 | |
83 | -$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php |
|
83 | +$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php |
|
84 | 84 | |
85 | 85 | |
86 | 86 | /* |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $invoicestatic->id = $obj->rowid; |
160 | 160 | $invoicestatic->ref = $obj->ref; |
161 | 161 | $invoicestatic->status = $obj->fk_statut; |
162 | - $invoicestatic->statut = $obj->fk_statut; // For backward compatibility |
|
162 | + $invoicestatic->statut = $obj->fk_statut; // For backward compatibility |
|
163 | 163 | $invoicestatic->paye = $obj->paye; |
164 | 164 | $invoicestatic->paid = $obj->paye; |
165 | 165 | $invoicestatic->type = $obj->type; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $resql2 = $db->query($sqlForSalary); |
222 | 222 | if ($resql2) { |
223 | 223 | $numRow = $db->num_rows($resql2); |
224 | - $j = 0 ; |
|
224 | + $j = 0; |
|
225 | 225 | |
226 | 226 | print '<div class="div-table-responsive-no-min">'; |
227 | 227 | print '<table class="noborder rightpercent">'; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $langs->loadLangs(array("bills", "banks")); |
54 | 54 | |
55 | 55 | $id = GETPOSTINT('id'); |
56 | -$summaryonly = GETPOSTINT('summaryonly'); // May be used for ticket Z |
|
56 | +$summaryonly = GETPOSTINT('summaryonly'); // May be used for ticket Z |
|
57 | 57 | |
58 | 58 | $object = new CashControl($db); |
59 | 59 | $object->fetch($id); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'cashcontrol'; // To manage different context of search |
43 | 43 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
44 | 44 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
45 | -$mode = GETPOST('mode', 'alpha'); // for mode view result |
|
45 | +$mode = GETPOST('mode', 'alpha'); // for mode view result |
|
46 | 46 | $id = GETPOSTINT('id'); |
47 | 47 | |
48 | 48 | // Load variable for pagination |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | // Default sort order (if not yet defined by previous GETPOST) |
76 | 76 | if (!$sortfield) { |
77 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
77 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
78 | 78 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
79 | 79 | } |
80 | 80 | if (!$sortorder) { |
@@ -144,7 +144,7 @@ |
||
144 | 144 | 'selectsocialcontributions' => array('label' => 'SocialContributions', 'picto' => 'bill', 'enabled' => isModEnabled('tax'), 'perms' => $user->hasRight('tax', 'charges', 'lire')), |
145 | 145 | 'selectpaymentsofsalaries' => array('label' => 'SalariesPayments', 'picto' => 'salary', 'lang' => 'salaries', 'enabled' => isModEnabled('salaries'), 'perms' => $user->hasRight('salaries', 'read')), |
146 | 146 | 'selectvariouspayment' => array('label' => 'VariousPayment', 'picto' => 'payment', 'enabled' => isModEnabled('bank'), 'perms' => $user->hasRight('banque', 'lire')), |
147 | - 'selectloanspayment' => array('label' => 'PaymentLoan','picto' => 'loan', 'enabled' => isModEnabled('don'), 'perms' => $user->hasRight('loan', 'read')), |
|
147 | + 'selectloanspayment' => array('label' => 'PaymentLoan', 'picto' => 'loan', 'enabled' => isModEnabled('don'), 'perms' => $user->hasRight('loan', 'read')), |
|
148 | 148 | ); |
149 | 149 | |
150 | 150 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | // General $Variables |
86 | -$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
86 | +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
87 | 87 | $ref = GETPOST('ref', 'alpha'); |
88 | 88 | $socid = GETPOSTINT('socid'); |
89 | 89 | $action = GETPOST('action', 'aZ09'); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | $object->fetch($id); |
343 | 343 | |
344 | 344 | if ( |
345 | - (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
345 | + (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
346 | 346 | getDolGlobalString('FAC_FORCE_DATE_VALIDATION') // If option enabled, we force invoice date |
347 | 347 | ) { |
348 | 348 | $object->date = dol_now(); |
@@ -1054,7 +1054,7 @@ discard block |
||
1054 | 1054 | $error++; |
1055 | 1055 | } |
1056 | 1056 | |
1057 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1057 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1058 | 1058 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
1059 | 1059 | |
1060 | 1060 | // Replacement invoice |
@@ -1149,7 +1149,7 @@ discard block |
||
1149 | 1149 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
1150 | 1150 | $object->model_pdf = GETPOST('model'); |
1151 | 1151 | $object->fk_project = GETPOSTINT('projectid'); |
1152 | - $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1152 | + $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1153 | 1153 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
1154 | 1154 | $object->fk_account = GETPOSTINT('fk_account'); |
1155 | 1155 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
@@ -1991,7 +1991,7 @@ discard block |
||
1991 | 1991 | $line->fk_prev_id = $line->id; |
1992 | 1992 | $line->fetch_optionals(); |
1993 | 1993 | if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) { |
1994 | - $line->situation_percent = $line->get_allprev_progress($object->id);; // get good progress including credit note |
|
1994 | + $line->situation_percent = $line->get_allprev_progress($object->id); ; // get good progress including credit note |
|
1995 | 1995 | } else { |
1996 | 1996 | $line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note |
1997 | 1997 | } |
@@ -2090,7 +2090,7 @@ discard block |
||
2090 | 2090 | } else { |
2091 | 2091 | $db->rollback(); |
2092 | 2092 | $action = 'create'; |
2093 | - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2093 | + $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2094 | 2094 | $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? |
2095 | 2095 | setEventMessages($object->error, $object->errors, 'errors'); |
2096 | 2096 | } |
@@ -2637,7 +2637,7 @@ discard block |
||
2637 | 2637 | // Define special_code for special lines |
2638 | 2638 | $special_code = GETPOSTINT('special_code'); |
2639 | 2639 | if ($special_code == 3) { |
2640 | - $special_code = 0; // Options should not exists on invoices |
|
2640 | + $special_code = 0; // Options should not exists on invoices |
|
2641 | 2641 | } |
2642 | 2642 | |
2643 | 2643 | $line = new FactureLigne($db); |
@@ -3374,7 +3374,7 @@ discard block |
||
3374 | 3374 | print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST" id="formtocreate" name="formtocreate">'; |
3375 | 3375 | print '<input type="hidden" name="token" value="' . newToken() . '">'; |
3376 | 3376 | print '<input type="hidden" name="action" id="formtocreateaction" value="add">'; |
3377 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
3377 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
3378 | 3378 | if ($soc->id > 0) { |
3379 | 3379 | print '<input type="hidden" name="socid" value="' . $soc->id . '">' . "\n"; |
3380 | 3380 | } |
@@ -4424,7 +4424,7 @@ discard block |
||
4424 | 4424 | $nbMandated = 0; |
4425 | 4425 | foreach ($object->lines as $line) { |
4426 | 4426 | $res = $line->fetch_product(); |
4427 | - if ($res > 0) { |
|
4427 | + if ($res > 0) { |
|
4428 | 4428 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
4429 | 4429 | $nbMandated++; |
4430 | 4430 | break; |
@@ -6055,7 +6055,7 @@ discard block |
||
6055 | 6055 | if ($usercandelete || ($usercancreate && $isErasable == 1)) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) |
6056 | 6056 | $enableDelete = false; |
6057 | 6057 | $deleteHref = '#'; |
6058 | - if ($isErasable > 0 && ! $objectidnext) { |
|
6058 | + if ($isErasable > 0 && !$objectidnext) { |
|
6059 | 6059 | $deleteHref = $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&action=delete&token=' . newToken(); |
6060 | 6060 | $enableDelete = true; |
6061 | 6061 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | |
303 | 303 | $object->fields = dol_sort_array($object->fields, 'position'); |
304 | 304 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
305 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
305 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
306 | 306 | |
307 | 307 | if (!$user->hasRight('societe', 'client', 'voir')) { |
308 | 308 | $search_sale = $user->id; |
@@ -1944,7 +1944,7 @@ discard block |
||
1944 | 1944 | |
1945 | 1945 | $facturestatic->id = $obj->id; |
1946 | 1946 | $facturestatic->ref = $obj->ref; |
1947 | - $facturestatic->ref_client = $obj->ref_client; // deprecated |
|
1947 | + $facturestatic->ref_client = $obj->ref_client; // deprecated |
|
1948 | 1948 | $facturestatic->ref_customer = $obj->ref_client; |
1949 | 1949 | $facturestatic->type = $obj->type; |
1950 | 1950 | $facturestatic->subtype = $obj->subtype; |
@@ -1956,7 +1956,7 @@ discard block |
||
1956 | 1956 | $facturestatic->multicurrency_total_ht = $obj->multicurrency_total_ht; |
1957 | 1957 | $facturestatic->multicurrency_total_tva = $obj->multicurrency_total_vat; |
1958 | 1958 | $facturestatic->multicurrency_total_ttc = $obj->multicurrency_total_ttc; |
1959 | - $facturestatic->statut = $obj->fk_statut; // deprecated |
|
1959 | + $facturestatic->statut = $obj->fk_statut; // deprecated |
|
1960 | 1960 | $facturestatic->status = $obj->fk_statut; |
1961 | 1961 | $facturestatic->close_code = $obj->close_code; |
1962 | 1962 | $facturestatic->total_ttc = $obj->total_ttc; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $cancel = GETPOST('cancel', 'alpha'); |
59 | 59 | $toselect = GETPOST('toselect', 'array'); |
60 | 60 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'invoicetemplatelist'; // To manage different context of search |
61 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
61 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
62 | 62 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
63 | 63 | |
64 | 64 | |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | // Define special_code for special lines |
815 | 815 | $special_code = GETPOSTINT('special_code'); |
816 | 816 | if ($special_code == 3) { |
817 | - $special_code = 0; // Options should not exists on invoices |
|
817 | + $special_code = 0; // Options should not exists on invoices |
|
818 | 818 | } |
819 | 819 | |
820 | 820 | /*$line = new FactureLigne($db); |