@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | // Move a part of the retained warrenty into the account of warranty |
| 302 | 302 | if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY') && $obj->retained_warranty > 0) { |
| 303 | - $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value) |
|
| 303 | + $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value) |
|
| 304 | 304 | $tabwarranty[$obj->rowid][$compta_soc] += $retained_warranty; |
| 305 | 305 | $total_ttc -= $retained_warranty; |
| 306 | 306 | } |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | $totalcredit = 0; |
| 440 | 440 | $totaldebit = 0; |
| 441 | 441 | |
| 442 | - $db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error |
|
| 442 | + $db->begin(); // We accept transaction into loop so if we hang, we can continue transfer from last error |
|
| 443 | 443 | |
| 444 | 444 | $companystatic->id = $tabcompany[$key]['id']; |
| 445 | 445 | $companystatic->name = $tabcompany[$key]['name']; |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | |
| 672 | 672 | foreach ($arrayofvat[$key] as $k => $mt) { |
| 673 | 673 | if ($mt) { |
| 674 | - $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 674 | + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 675 | 675 | $label_account = $accountingaccount->label; |
| 676 | 676 | |
| 677 | 677 | $bookkeeping = new BookKeeping($db); |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | if (isset($tabrevenuestamp[$key]) && is_array($tabrevenuestamp[$key])) { |
| 733 | 733 | foreach ($tabrevenuestamp[$key] as $k => $mt) { |
| 734 | 734 | if ($mt) { |
| 735 | - $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 735 | + $accountingaccount->fetch(null, $k, true); // TODO Use a cache for label |
|
| 736 | 736 | $label_account = $accountingaccount->label; |
| 737 | 737 | |
| 738 | 738 | $bookkeeping = new BookKeeping($db); |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | foreach ($tabfac as $key => $val) { |
| 854 | 854 | $companystatic->id = $tabcompany[$key]['id']; |
| 855 | 855 | $companystatic->name = $tabcompany[$key]['name']; |
| 856 | - $companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated |
|
| 856 | + $companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated |
|
| 857 | 857 | $companystatic->code_compta_client = $tabcompany[$key]['code_compta']; |
| 858 | 858 | $companystatic->code_client = $tabcompany[$key]['code_client']; |
| 859 | 859 | $companystatic->client = 3; |
@@ -1041,7 +1041,7 @@ discard block |
||
| 1041 | 1041 | } |
| 1042 | 1042 | |
| 1043 | 1043 | // Button to write into Ledger |
| 1044 | - $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['','-1']); |
|
| 1044 | + $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['', '-1']); |
|
| 1045 | 1045 | if ($acctCustomerNotConfigured) { |
| 1046 | 1046 | print '<br><div class="warning">' . img_warning() . ' ' . $langs->trans("SomeMandatoryStepsOfSetupWereNotDone"); |
| 1047 | 1047 | $desc = ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '{link}'); |
@@ -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; |
@@ -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 |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $changeaccount = GETPOST('changeaccount'); |
| 50 | 50 | // Search Getpost |
| 51 | 51 | $search_societe = GETPOST('search_societe', 'alpha'); |
| 52 | -$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100' |
|
| 52 | +$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100' |
|
| 53 | 53 | $search_ref = GETPOST('search_ref', 'alpha'); |
| 54 | 54 | $search_invoice = GETPOST('search_invoice', 'alpha'); |
| 55 | 55 | //$search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 65 | 65 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 66 | 66 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 67 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 67 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 68 | 68 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 69 | 69 | $search_country = GETPOST('search_country', 'aZ09'); |
| 70 | 70 | $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $mesCasesCochees = GETPOST('toselect', 'array'); |
| 59 | 59 | |
| 60 | 60 | // Search Getpost |
| 61 | -$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100' |
|
| 61 | +$search_lineid = GETPOST('search_lineid', 'alpha'); // Can be '> 100' |
|
| 62 | 62 | $search_societe = GETPOST('search_societe', 'alpha'); |
| 63 | 63 | $search_ref = GETPOST('search_ref', 'alpha'); |
| 64 | 64 | $search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $search_date_endday = GETPOSTINT('search_date_endday'); |
| 75 | 75 | $search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
| 76 | 76 | $search_date_endyear = GETPOSTINT('search_date_endyear'); |
| 77 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 77 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
| 78 | 78 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
| 79 | 79 | $search_country = GETPOST('search_country', 'aZ09'); |
| 80 | 80 | $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | $thirdpartystatic->email = $objp->email; |
| 586 | 586 | $thirdpartystatic->country_code = $objp->country_code; |
| 587 | 587 | $thirdpartystatic->tva_intra = $objp->tva_intra; |
| 588 | - $thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
| 588 | + $thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion) |
|
| 589 | 589 | |
| 590 | 590 | $product_static->ref = $objp->product_ref; |
| 591 | 591 | $product_static->id = $objp->product_id; |
@@ -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; |