diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 31a54aafc3b..70934e01ed6 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -817,7 +817,7 @@ class BookKeeping extends CommonObject $num = $this->db->num_rows($resql); $i = 0; - while ($obj = $this->db->fetch_object($resql) && (empty($limit) || $i < min($limit, $num))) { + while (($obj = $this->db->fetch_object($resql)) && (empty($limit) || $i < min($limit, $num))) { $line = new BookKeepingLine(); $line->id = $obj->rowid; @@ -1066,6 +1066,7 @@ class BookKeeping extends CommonObject $line->numero_compte = $obj->numero_compte; $line->debit = $obj->debit; $line->credit = $obj->credit; + $this->lines[] = $line; $i++; @@ -1576,7 +1577,7 @@ class BookKeeping extends CommonObject $result = $this->db->query($sql); if ($result) { - while ( $obj = $this->db->fetch_object($result) ) { + while ($obj = $this->db->fetch_object($result)) { $line = new BookKeepingLine(); @@ -1640,7 +1641,7 @@ class BookKeeping extends CommonObject $this->linesexport = array (); $num = $this->db->num_rows($resql); - while ( $obj = $this->db->fetch_object($resql) ) { + while ($obj = $this->db->fetch_object($resql)) { $line = new BookKeepingLine(); $line->id = $obj->rowid; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index eba4c4d5f4e..dface41fb67 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6954,7 +6954,6 @@ function getLanguageCodeFromCountryCode($countrycode) 'sv-FI', 'sv-SE', 'sw-KE', - 'syr-SY', 'ta-IN', 'te-IN', 'th-TH', diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index efb5c41e300..4bf0a80d8c9 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -459,7 +459,7 @@ class ExpenseReport extends CommonObject $sql.= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_valid, d.date_approve,"; // DATES (datetime) $sql.= " d.fk_user_author, d.fk_user_modif, d.fk_user_validator,"; $sql.= " d.fk_user_valid, d.fk_user_approve,"; - $sql.= " d.fk_statut as status, d.fk_c_paiement,"; + $sql.= " d.fk_statut as status, d.fk_c_paiement, d.paid,"; $sql.= " dp.libelle as libelle_paiement, dp.code as code_paiement"; // INNER JOIN paiement $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as dp ON d.fk_c_paiement = dp.id"; diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 55dddcc0a48..07962c5b011 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -1,6 +1,7 @@ * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 Frédéric France * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +23,6 @@ * \brief Page to manage resource objects */ - require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; @@ -51,6 +51,7 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options=$extrafields->getOptionalsFromPost($object->table_element,'','search_'); +if (! is_array($search_array_options)) $search_array_options = array(); $search_ref=GETPOST("search_ref"); $search_type=GETPOST("search_type"); @@ -196,7 +197,7 @@ if($ret == -1) { $newcardbutton=''; if ($user->rights->resource->write) { - $newcardbutton=''.$langs->trans('MenuResourceAdd').''; + $newcardbutton=''.$langs->trans('MenuResourceAdd').''; $newcardbutton.= ''; $newcardbutton.= ''; }