@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | print '<datalist id="pcg_type_datalist">'; |
257 | 257 | $sql = "SELECT DISTINCT pcg_type FROM " . MAIN_DB_PREFIX . "accounting_account"; |
258 | 258 | $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'"; |
259 | - $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
259 | + $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
260 | 260 | $sql .= ' LIMIT 50000'; // just as a sanity check |
261 | 261 | $resql = $db->query($sql); |
262 | 262 | if ($resql) { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | print '<datalist id="pcg_type_datalist">'; |
334 | 334 | $sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account'; |
335 | 335 | $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'"; |
336 | - $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
336 | + $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
337 | 337 | $sql .= ' LIMIT 50000'; // just as a sanity check |
338 | 338 | $resql = $db->query($sql); |
339 | 339 | if ($resql) { |
@@ -461,7 +461,7 @@ |
||
461 | 461 | print '<br>'; |
462 | 462 | |
463 | 463 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
464 | - $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
464 | + $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
465 | 465 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
466 | 466 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
467 | 467 |
@@ -335,7 +335,7 @@ |
||
335 | 335 | print '<div class="info">' . $langs->trans("WarningCreateSubAccounts") . '</div>'; |
336 | 336 | |
337 | 337 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
338 | - $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
338 | + $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
339 | 339 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
340 | 340 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
341 | 341 |
@@ -188,7 +188,7 @@ |
||
188 | 188 | |
189 | 189 | // Si verif ok et action add, on ajoute la ligne |
190 | 190 | if ($ok && GETPOST('actionadd', 'alpha')) { |
191 | - $newid = 0; // Initialise before if for static analysis |
|
191 | + $newid = 0; // Initialise before if for static analysis |
|
192 | 192 | if ($tabrowid[$id]) { |
193 | 193 | // Get free id for insert |
194 | 194 | $sql = "SELECT MAX(" . $db->sanitize($tabrowid[$id]) . ") newid FROM " . $db->sanitize($tabname[$id]); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $confirm = GETPOST('confirm', 'alpha'); |
41 | 41 | $cancel = GETPOST('cancel', 'aZ09'); |
42 | 42 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
43 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
43 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
44 | 44 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
45 | 45 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
46 | 46 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $search_date_endday = GETPOSTINT('search_date_endday'); |
62 | 62 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
63 | 63 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
64 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
64 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
65 | 65 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
66 | 66 | $search_country = GETPOST('search_country', 'aZ09'); |
67 | 67 | $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | // Search Getpost |
60 | 60 | $search_societe = GETPOST('search_societe', 'alpha'); |
61 | -$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100' |
|
61 | +$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100' |
|
62 | 62 | $search_ref = GETPOST('search_ref', 'alpha'); |
63 | 63 | $search_invoice = GETPOST('search_invoice', 'alpha'); |
64 | 64 | $search_label = GETPOST('search_label', 'alpha'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $search_date_endday = GETPOSTINT('search_date_endday'); |
73 | 73 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
74 | 74 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
75 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
75 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
76 | 76 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
77 | 77 | $search_country = GETPOST('search_country', 'aZ09'); |
78 | 78 | $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); |
@@ -568,14 +568,14 @@ discard block |
||
568 | 568 | $thirdpartystatic->client = $objp->client; |
569 | 569 | $thirdpartystatic->fournisseur = $objp->fournisseur; |
570 | 570 | $thirdpartystatic->code_client = $objp->code_client; |
571 | - $thirdpartystatic->code_compta = $objp->code_compta_client; // For backward compatibility |
|
571 | + $thirdpartystatic->code_compta = $objp->code_compta_client; // For backward compatibility |
|
572 | 572 | $thirdpartystatic->code_compta_client = $objp->code_compta_client; |
573 | 573 | $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; |
574 | 574 | $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; |
575 | 575 | $thirdpartystatic->email = $objp->email; |
576 | 576 | $thirdpartystatic->country_code = $objp->country_code; |
577 | 577 | $thirdpartystatic->tva_intra = $objp->tva_intra; |
578 | - $thirdpartystatic->code_compta_product = $objp->company_code_sell; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
578 | + $thirdpartystatic->code_compta_product = $objp->company_code_sell; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
579 | 579 | |
580 | 580 | $product_static->ref = $objp->product_ref; |
581 | 581 | $product_static->id = $objp->product_id; |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | $sql .= " co.code as country_code, co.label as country_label,"; |
143 | 143 | $sql .= " s.tva_intra,"; |
144 | 144 | if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
145 | - $sql .= " spe.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty |
|
145 | + $sql .= " spe.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty |
|
146 | 146 | } else { |
147 | - $sql .= " s.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty |
|
147 | + $sql .= " s.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty |
|
148 | 148 | } |
149 | 149 | $sql .= " FROM " . $db->prefix() . "facture as f"; |
150 | 150 | $sql .= " INNER JOIN " . $db->prefix() . "societe as s ON s.rowid = f.fk_soc"; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $sql .= " LEFT JOIN " . $db->prefix() . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); |
153 | 153 | } |
154 | 154 | $sql .= " LEFT JOIN " . $db->prefix() . "c_country as co ON co.rowid = s.fk_pays "; |
155 | - $sql .= " INNER JOIN " . $db->prefix() . "facturedet as l ON f.rowid = l.fk_facture"; // the main table |
|
155 | + $sql .= " INNER JOIN " . $db->prefix() . "facturedet as l ON f.rowid = l.fk_facture"; // the main table |
|
156 | 156 | $sql .= " LEFT JOIN " . $db->prefix() . "product as p ON p.rowid = l.fk_product"; |
157 | 157 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
158 | 158 | $sql .= " LEFT JOIN " . $db->prefix() . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $thirdpartystatic->email = !empty($objp->email) ? $objp->email : ""; |
207 | 207 | $thirdpartystatic->country_code = !empty($objp->country_code) ? $objp->country_code : ""; |
208 | 208 | $thirdpartystatic->tva_intra = !empty($objp->tva_intra) ? $objp->tva_intra : ""; |
209 | - $thirdpartystatic->code_compta_product = !empty($objp->company_code_sell) ? $objp->company_code_sell : ""; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
209 | + $thirdpartystatic->code_compta_product = !empty($objp->company_code_sell) ? $objp->company_code_sell : ""; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
210 | 210 | |
211 | 211 | $product_static->ref = $objp->product_ref; |
212 | 212 | $product_static->id = $objp->product_id; |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | "MONTH(f.datef) = " . ((int) $j), |
669 | 669 | " (" . $db->ifsql( |
670 | 670 | "fd.total_ht < 0", |
671 | - " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent ! |
|
671 | + " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent ! |
|
672 | 672 | " (fd.total_ht - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100)))" |
673 | 673 | ) . ")", |
674 | 674 | 0 |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | } |
677 | 677 | $sql .= " SUM(" . $db->ifsql( |
678 | 678 | "fd.total_ht < 0", |
679 | - " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent ! |
|
679 | + " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent ! |
|
680 | 680 | " (fd.total_ht - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100)))" |
681 | 681 | ) . ") as total"; |
682 | 682 | } else { |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $cpttva = getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT', 'NotDefined'); |
204 | 204 | $rcctva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined'); |
205 | 205 | $rcdtva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined'); |
206 | - $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
206 | + $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
207 | 207 | |
208 | 208 | $i = 0; |
209 | 209 | while ($i < $num) { |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | $totalcredit = 0; |
412 | 412 | $totaldebit = 0; |
413 | 413 | |
414 | - $db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error |
|
414 | + $db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error |
|
415 | 415 | |
416 | 416 | $companystatic->id = $tabcompany[$key]['id']; |
417 | 417 | $companystatic->name = $tabcompany[$key]['name']; |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | |
618 | 618 | foreach ($arrayofvat[$key] as $k => $mt) { |
619 | 619 | if ($mt) { |
620 | - $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
620 | + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
621 | 621 | $label_account = $accountingaccount->label; |
622 | 622 | |
623 | 623 | $bookkeeping = new BookKeeping($db); |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | } |
976 | 976 | |
977 | 977 | // Button to write into Ledger |
978 | - $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['','-1']); |
|
978 | + $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['', '-1']); |
|
979 | 979 | if ($acctSupplierNotConfigured) { |
980 | 980 | print '<br><div class="warning">' . img_warning() . ' ' . $langs->trans("SomeMandatoryStepsOfSetupWereNotDone"); |
981 | 981 | $desc = ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '{link}'); |