diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 7e852846d5c..d50813cbea4 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -213,7 +213,7 @@ if ($object->id > 0) $head = facture_prepare_head($object); } - print dol_get_fiche_head($head, 'standingorders', $title, -1, 'bill'); + print dol_get_fiche_head($head, 'standingorders', $title, -1, ($type == 'bank-transfer' ? 'supplier_invoice' : 'bill')); // Invoice content if ($type == 'bank-transfer') { diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 09f2b0a44ae..a1800e03980 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -52,9 +52,11 @@ class Conf public $disable_compute; //! Used to store current currency (ISO code like 'USD', 'EUR', ...) public $currency; + //! Used to store current css (from theme) public $theme; // Contains current theme ("eldy", "auguria", ...) public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...) + //! Used to store current menu handler public $standard_menu; // List of activated modules @@ -98,6 +100,8 @@ class Conf public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url + public $liste_limit; + /** * Constructor diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 92114b7c094..dd80c660e71 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4877,7 +4877,7 @@ function price2num($amount, $rounding = '', $option = 0) elseif ($rounding == 'CR') $nbofdectoround = 8; elseif (is_numeric($rounding)) $nbofdectoround = $rounding; //print "RR".$amount.' - '.$nbofdectoround.'
'; - if (dol_strlen($nbofdectoround)) $amount = round($amount, $nbofdectoround); // $nbofdectoround can be 0. + if (dol_strlen($nbofdectoround)) $amount = round(is_string($amount) ? (float) $amount : $amount, $nbofdectoround); // $nbofdectoround can be 0. else return 'ErrorBadParameterProvidedToFunction'; //print 'SS'.$amount.' - '.$nbofdec.' - '.$dec.' - '.$thousand.' - '.$nbofdectoround.'
'; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index b439e5cad45..c615817e36f 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -115,6 +115,8 @@ $permissiondellink = $usercancreate; // Used by the include of actions_dellink.i $permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$error = 0; + /* * Actions @@ -183,8 +185,7 @@ if (empty($reshook)) } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) { $langs->load("stocks"); if (!$idwarehouse || $idwarehouse == -1) { @@ -194,11 +195,9 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $result = $object->validate($user, '', $idwarehouse); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { // Define output language @@ -220,8 +219,7 @@ if (empty($reshook)) } } } - } elseif ($action == 'confirm_delete' && $confirm == 'yes') - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes') { $object->fetch($id); $object->fetch_thirdparty(); @@ -280,15 +278,13 @@ if (empty($reshook)) } elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $result = $object->set_paid($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } // Set supplier ref - if ($action == 'setref_supplier' && $usercancreate) - { + if ($action == 'setref_supplier' && $usercancreate) { $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); if ($object->update($user) < 0) { @@ -315,8 +311,7 @@ if (empty($reshook)) } // payments conditions - if ($action == 'setconditions' && $usercancreate) - { + if ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property $object->cond_reglement_id = 0; // To clean property @@ -1680,20 +1675,17 @@ if ($action == 'create') $currency_code = $conf->currency; $societe = ''; - if (GETPOST('socid') > 0) - { + if (GETPOST('socid') > 0) { $societe = new Societe($db); $societe->fetch(GETPOST('socid', 'int')); if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) $currency_code = $societe->multicurrency_code; } - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; - if ($element == 'project') - { + if ($element == 'project') { $projectid = $originid; $element = 'projet'; } @@ -2204,8 +2196,7 @@ if ($action == 'create') // Show origin lines - if (is_object($objectsrc)) - { + if (is_object($objectsrc)) { print '
'; $title = $langs->trans('ProductsAndServices'); @@ -2218,8 +2209,7 @@ if ($action == 'create') print ''; } } else { - if ($id > 0 || !empty($ref)) - { + if ($id > 0 || !empty($ref)) { /* *************************************************************************** */ /* */ /* Fiche en mode visu ou edition */ @@ -2275,7 +2265,7 @@ if ($action == 'create') $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); - print dol_get_fiche_head($head, 'card', $titre, -1, 'bill'); + print dol_get_fiche_head($head, 'card', $titre, -1, 'supplier_invoice'); $formconfirm = ''; diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 99010c977dc..357abd029fa 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -134,7 +134,7 @@ if ($id > 0 || !empty($ref)) $head = facturefourn_prepare_head($object); - print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'bill'); + print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d57abc67644..36f5a45b25e 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -90,7 +90,7 @@ llxHeader('', $title, $helpurl); if ($object->id > 0) { $head = facturefourn_prepare_head($object); - print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'bill'); + print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); $totalpaye = $object->getSommePaiement(); diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 494f5d2aa03..131b34bbe39 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -51,7 +51,7 @@ $maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->globa llxHeader("", $langs->trans("SupplierInvoicesArea"), 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores'); -print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'bill'); +print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'supplier_invoice'); print '
'; diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index f8522722e64..656cd3c5553 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -65,7 +65,7 @@ $alreadypaid = $object->getSommePaiement(); $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); -print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'bill'); +print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index c72e7b72710..c98ad3ba1d8 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -82,7 +82,7 @@ if ($object->id > 0) $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); - print dol_get_fiche_head($head, 'note', $titre, -1, 'bill'); + print dol_get_fiche_head($head, 'note', $titre, -1, 'supplier_invoice'); // Supplier invoice card diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 18ee01eb3bb..1afeb6e3727 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode %sVAT on commitment accounting%s. CalcModeVATEngagement=Mode %sVAT on incomes-expenses%s. -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Analysis of known recorded payments, even if they are not yet accounted in Ledger. CalcModeBookkeeping=Analysis of data journalized in Bookkeeping Ledger table. CalcModeLT1= Mode %sRE on customer invoices - suppliers invoices%s @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary AnnualByCompanies=Balance of income and expenses, by predefined groups of account AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by predefined groups, mode %sClaims-Debts%s said Commitment accounting. AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by predefined groups, mode %sIncomes-Expenses%s said cash accounting. -SeeReportInInputOutputMode=See %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See %sBookeeping report%s for a calculation on Bookkeeping Ledger table +SeeReportInInputOutputMode=See %sanalysis of payments%s for a calculation based on recorded payments made even if they are not yet accounted in Ledger +SeeReportInDueDebtMode=See %sanalysis of recorded documents%s for a calculation based on known recorded documents even if they are not yet accounted in Ledger +SeeReportInBookkeepingMode=See %sanalysis of bookeeping ledger table%s for a report based on Bookkeeping Ledger table RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.
- It is based on the billing date of invoices and on the due date for expenses or tax payments. For salaries defined with Salary module, the value date of payment is used. RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries.
- It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation. diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 14944619d6e..01e51e5e96f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2802,7 +2802,7 @@ if (!function_exists("llxFooter")) if (!empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring] = $contextpage; if (!empty($page) && $page > 0) $_SESSION['lastsearch_page_tmp_'.$relativepathstring] = $page; - if (!empty($limit) && $limit != $conf->limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit; + if (!empty($limit) && $limit != $conf->liste_limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit; unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]); unset($_SESSION['lastsearch_page_'.$relativepathstring]);