Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/core/lib/functions.lib.php
	htdocs/resource/list.php
This commit is contained in:
Laurent Destailleur 2018-11-26 23:08:06 +01:00
commit b9e544d291
4 changed files with 8 additions and 7 deletions

View File

@ -817,7 +817,7 @@ class BookKeeping extends CommonObject
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$i = 0; $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 = new BookKeepingLine();
$line->id = $obj->rowid; $line->id = $obj->rowid;
@ -1066,6 +1066,7 @@ class BookKeeping extends CommonObject
$line->numero_compte = $obj->numero_compte; $line->numero_compte = $obj->numero_compte;
$line->debit = $obj->debit; $line->debit = $obj->debit;
$line->credit = $obj->credit; $line->credit = $obj->credit;
$this->lines[] = $line; $this->lines[] = $line;
$i++; $i++;
@ -1576,7 +1577,7 @@ class BookKeeping extends CommonObject
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) { if ($result) {
while ( $obj = $this->db->fetch_object($result) ) { while ($obj = $this->db->fetch_object($result)) {
$line = new BookKeepingLine(); $line = new BookKeepingLine();
@ -1640,7 +1641,7 @@ class BookKeeping extends CommonObject
$this->linesexport = array (); $this->linesexport = array ();
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
while ( $obj = $this->db->fetch_object($resql) ) { while ($obj = $this->db->fetch_object($resql)) {
$line = new BookKeepingLine(); $line = new BookKeepingLine();
$line->id = $obj->rowid; $line->id = $obj->rowid;

View File

@ -6954,7 +6954,6 @@ function getLanguageCodeFromCountryCode($countrycode)
'sv-FI', 'sv-FI',
'sv-SE', 'sv-SE',
'sw-KE', 'sw-KE',
'syr-SY',
'ta-IN', 'ta-IN',
'te-IN', 'te-IN',
'th-TH', 'th-TH',

View File

@ -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.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_author, d.fk_user_modif, d.fk_user_validator,";
$sql.= " d.fk_user_valid, d.fk_user_approve,"; $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.= " dp.libelle as libelle_paiement, dp.code as code_paiement"; // INNER JOIN paiement
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as d"; $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"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as dp ON d.fk_c_paiement = dp.id";

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr> /* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -22,7 +23,6 @@
* \brief Page to manage resource objects * \brief Page to manage resource objects
*/ */
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
@ -51,6 +51,7 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels // fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options=$extrafields->getOptionalsFromPost($object->table_element,'','search_'); $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_ref=GETPOST("search_ref");
$search_type=GETPOST("search_type"); $search_type=GETPOST("search_type");
@ -196,7 +197,7 @@ if($ret == -1) {
$newcardbutton=''; $newcardbutton='';
if ($user->rights->resource->write) if ($user->rights->resource->write)
{ {
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuResourceAdd').'</span>'; $newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/resource/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuResourceAdd').'</span>';
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>'; $newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
$newcardbutton.= '</a>'; $newcardbutton.= '</a>';
} }