diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index c3d92edefda..11cd105137c 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1903,6 +1903,9 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{
print '';
}
+ else{
+ print '';
+ }
print '';
}
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) {
@@ -1965,7 +1968,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
}
else
{
- if ($fieldlist[$field]=='sortorder') $fieldlist[$field]='position';
+
+ $fieldValue = isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'';
+
+ if ($fieldlist[$field]=='sortorder')
+ {
+ $fieldlist[$field]='position';
+ }
$classtd=''; $class='';
if ($fieldlist[$field]=='code') $classtd='width100';
@@ -1982,7 +1991,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
}
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
$langs->load("bills");
- $transkey="PaymentCondition".strtoupper($obj->code);
+ $transkey="PaymentConditionShort".strtoupper($obj->code);
}
if ($transkey && $langs->trans($transkey) != $transkey)
{
@@ -1992,8 +2001,11 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
}
if (! $transfound)
{
- print '';
+ print '';
}
+ else{
+ print '';
+ }
print '';
}
}
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 8e8d21c51b1..af54186e255 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -8,6 +8,7 @@
* Copyright (C) 2014 Cedric GROSS
* Copyright (C) 2015 Alexandre Spangaro
* Copyright (C) 2018-2019 Frédéric France
+ * Copyright (C) 2019 Ferran Marcet
*
* 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
@@ -252,7 +253,10 @@ if ($action == 'add')
{
$object->label = $langs->transnoentitiesnoconv("Action".$object->type_code)."\n";
}
- else $object->label = $cactioncomm->libelle;
+ else {
+ $cactioncomm->fetch($object->type_code);
+ $object->label = $cactioncomm->label;
+ }
}
}
$object->fk_project = isset($_POST["projectid"])?$_POST["projectid"]:0;
diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php
index 9f9e3276542..5da37d46fd5 100644
--- a/htdocs/compta/facture/invoicetemplate_list.php
+++ b/htdocs/compta/facture/invoicetemplate_list.php
@@ -261,7 +261,7 @@ if ($search_month_date_when > 0)
if ($search_year_date_when > 0 && empty($search_day_date_when))
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when, $search_month_date_when, false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when, $search_month_date_when, false))."'";
elseif ($search_year_date_when > 0 && ! empty($search_day_date_when))
- $sql.= " AND f.date_date_when_reglement BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'";
+ $sql.= " AND f.date_when BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'";
else
$sql.= " AND date_format(f.date_when, '%m') = '".$db->escape($search_month_date_when)."'";
}
diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php
index 13b2d1ae520..78dbba9934e 100644
--- a/htdocs/core/extrafieldsinexport.inc.php
+++ b/htdocs/core/extrafieldsinexport.inc.php
@@ -34,6 +34,15 @@ if ($resql) // This can fail when class is used on old database (during migra
case 'boolean':
$typeFilter="Boolean";
break;
+ case 'select':
+ if (! empty($conf->global->EXPORT_LABEL_FOR_SELECT))
+ {
+ $tmpparam=unserialize($obj->param); // $tmpparam may be array with 'options' = array(key1=>val1, key2=>val2 ...)
+ if ($tmpparam['options'] && is_array($tmpparam['options'])) {
+ $typeFilter="Select:".$obj->param;
+ }
+ }
+ break;
case 'sellist':
$tmp='';
$tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 0c6091b694a..dae11084fe1 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -242,7 +242,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
// We ask to move a qty
if (GETPOST($qty) != 0) {
if (! (GETPOST($ent, 'int') > 0)) {
- dol_syslog('No dispatch for line ' . $key . ' as no warehouse choosed');
+ dol_syslog('No dispatch for line ' . $key . ' as no warehouse was chosen.');
$text = $langs->transnoentities('Warehouse') . ', ' . $langs->transnoentities('Line') . ' ' . ($numline);
setEventMessages($langs->trans('ErrorFieldRequired', $text), null, 'errors');
$error ++;
@@ -279,7 +279,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
// We ask to move a qty
if (GETPOST($qty) > 0) {
if (! (GETPOST($ent, 'int') > 0)) {
- dol_syslog('No dispatch for line ' . $key . ' as no warehouse choosed');
+ dol_syslog('No dispatch for line ' . $key . ' as no warehouse was chosen.');
$text = $langs->transnoentities('Warehouse') . ', ' . $langs->transnoentities('Line') . ' ' . ($numline) . '-' . ($reg[1] + 1);
setEventMessages($langs->trans('ErrorFieldRequired', $text), null, 'errors');
$error ++;
diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index 888863e5e66..67bca85cfe0 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -245,12 +245,12 @@ if ($action == 'set')
if (! $res > 0) $error++;
}
-if ($action == 'other')
-{
- $value = GETPOST('activate_units', 'alpha');
- $res = dolibarr_set_const($db, "PRODUCT_USE_UNITS", $value, 'chaine', 0, '', $conf->entity);
- if (! $res > 0) $error++;
-}
+//if ($action == 'other')
+//{
+// $value = GETPOST('activate_units', 'alpha');
+// $res = dolibarr_set_const($db, "PRODUCT_USE_UNITS", $value, 'chaine', 0, '', $conf->entity);
+// if (! $res > 0) $error++;
+//}
if ($action)
{