@@ -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 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 74 | 74 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 75 | 75 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 76 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 76 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 77 | 77 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 78 | 78 | $search_country = GETPOST('search_country', 'alpha'); |
| 79 | 79 | $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | $thirdpartystatic->email = $objp->email; |
| 584 | 584 | $thirdpartystatic->country_code = $objp->country_code; |
| 585 | 585 | $thirdpartystatic->tva_intra = $objp->tva_intra; |
| 586 | - $thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
| 586 | + $thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
| 587 | 587 | |
| 588 | 588 | $product_static->ref = $objp->product_ref; |
| 589 | 589 | $product_static->id = $objp->product_id; |
@@ -63,7 +63,7 @@ |
||
| 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_country = GETPOST('search_country', 'alpha'); |
| 69 | 69 | $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | $thirdpartystatic->email = $objp->email; |
| 202 | 202 | $thirdpartystatic->country_code = $objp->country_code; |
| 203 | 203 | $thirdpartystatic->tva_intra = $objp->tva_intra; |
| 204 | - $thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
| 204 | + $thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
| 205 | 205 | |
| 206 | 206 | $product_static->ref = $objp->product_ref; |
| 207 | 207 | $product_static->id = $objp->product_id; |
@@ -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) { |
@@ -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'); |
@@ -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 |
@@ -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 |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | |
| 300 | 300 | // Move a part of the retained warrenty into the account of warranty |
| 301 | 301 | if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY') && $obj->retained_warranty > 0) { |
| 302 | - $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value) |
|
| 302 | + $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value) |
|
| 303 | 303 | $tabwarranty[$obj->rowid][$compta_soc] += $retained_warranty; |
| 304 | 304 | $total_ttc -= $retained_warranty; |
| 305 | 305 | } |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | // Product / Service |
| 581 | 581 | if (!$errorforline) { |
| 582 | 582 | foreach ($tabht[$key] as $k => $mt) { |
| 583 | - $resultfetch = $accountingaccount->fetch(null, $k, true); // TODO Use a cache |
|
| 583 | + $resultfetch = $accountingaccount->fetch(null, $k, true); // TODO Use a cache |
|
| 584 | 584 | $label_account = $accountingaccount->label; |
| 585 | 585 | |
| 586 | 586 | // get compte id and label |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | |
| 657 | 657 | foreach ($arrayofvat[$key] as $k => $mt) { |
| 658 | 658 | if ($mt) { |
| 659 | - $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 659 | + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 660 | 660 | $label_account = $accountingaccount->label; |
| 661 | 661 | |
| 662 | 662 | $bookkeeping = new BookKeeping($db); |
@@ -717,7 +717,7 @@ discard block |
||
| 717 | 717 | if (is_array($tabrevenuestamp[$key])) { |
| 718 | 718 | foreach ($tabrevenuestamp[$key] as $k => $mt) { |
| 719 | 719 | if ($mt) { |
| 720 | - $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 720 | + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 721 | 721 | $label_account = $accountingaccount->label; |
| 722 | 722 | |
| 723 | 723 | $bookkeeping = new BookKeeping($db); |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | foreach ($tabfac as $key => $val) { |
| 839 | 839 | $companystatic->id = $tabcompany[$key]['id']; |
| 840 | 840 | $companystatic->name = $tabcompany[$key]['name']; |
| 841 | - $companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated |
|
| 841 | + $companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated |
|
| 842 | 842 | $companystatic->code_compta_client = $tabcompany[$key]['code_compta']; |
| 843 | 843 | $companystatic->code_client = $tabcompany[$key]['code_client']; |
| 844 | 844 | $companystatic->client = 3; |
@@ -1022,7 +1022,7 @@ discard block |
||
| 1022 | 1022 | } |
| 1023 | 1023 | |
| 1024 | 1024 | // Button to write into Ledger |
| 1025 | - $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['','-1']); |
|
| 1025 | + $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['', '-1']); |
|
| 1026 | 1026 | if ($acctCustomerNotConfigured) { |
| 1027 | 1027 | print '<br><div class="warning">' . img_warning() . ' ' . $langs->trans("SomeMandatoryStepsOfSetupWereNotDone"); |
| 1028 | 1028 | $desc = ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '{link}'); |