diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index 4faa00aa626..92fca0f81fe 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -568,7 +568,7 @@ if ($result) {
// Current account
print '
';
- $s = (($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
+ $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
$shelp = '';
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC");
elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport");
@@ -577,7 +577,7 @@ if ($result) {
if ($objp->product_id > 0)
{
print ' ';
- $s = (($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': ';
+ $s = (($objp->type_l == 1) ? ''.$langs->trans("ThisService") : $langs->trans("ThisProduct")).': ';
$shelp = '';
if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC");
elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT");
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 7645fc608a9..f1ea3c0923d 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -751,7 +751,7 @@ if ($object->id > 0)
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
$sql .= " WHERE c.fk_soc = s.rowid ";
$sql .= " AND s.rowid = ".$object->id;
- $sql .= " AND c.entity = ".$conf->entity;
+ $sql .= " AND c.entity IN (".getEntity('commande').')';
$sql .= " ORDER BY c.date_commande DESC";
$resql = $db->query($sql);
@@ -905,7 +905,7 @@ if ($object->id > 0)
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
$sql .= " WHERE c.fk_soc = s.rowid ";
$sql .= " AND s.rowid = ".$object->id;
- $sql .= " AND c.entity = ".$conf->entity;
+ $sql .= " AND c.entity IN (".getEntity('contract').")";
$sql .= " ORDER BY c.datec DESC";
$resql = $db->query($sql);
@@ -975,7 +975,7 @@ if ($object->id > 0)
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f";
$sql .= " WHERE f.fk_soc = s.rowid";
$sql .= " AND s.rowid = ".$object->id;
- $sql .= " AND f.entity = ".$conf->entity;
+ $sql .= " AND f.entity IN (".getEntity('intervention').")";
$sql .= " ORDER BY f.tms DESC";
$resql = $db->query($sql);
@@ -1044,7 +1044,7 @@ if ($object->id > 0)
$sql .= ', s.nom, s.rowid as socid';
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
$sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
- $sql .= " AND f.entity = ".$conf->entity;
+ $sql .= " AND f.entity IN (".getEntity('invoice').")";
$sql .= ' GROUP BY f.rowid, f.titre, f.total, f.tva, f.total_ttc,';
$sql .= ' f.date_last_gen, f.datec, f.frequency, f.unit_frequency,';
$sql .= ' f.suspended, f.date_when,';
diff --git a/htdocs/core/boxes/box_shipments.php b/htdocs/core/boxes/box_shipments.php
index 3b07b5bbd68..26f45bc08db 100644
--- a/htdocs/core/boxes/box_shipments.php
+++ b/htdocs/core/boxes/box_shipments.php
@@ -77,6 +77,7 @@ class box_shipments extends ModeleBoxes
$this->max = $max;
include_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
+ include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$shipmentstatic = new Expedition($this->db);
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index da30b714db0..04d7fc1f4a4 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2949,7 +2949,7 @@ abstract class CommonObject
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_ORDER";
elseif ($this->element == 'facture' || $this->element == 'invoice')
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_INVOICE";
- elseif ($this->element == 'facture_fourn' || $this->element == 'supplier_invoice')
+ elseif ($this->element == 'facture_fourn' || $this->element == 'supplier_invoice' || $this->element == 'invoice_supplier')
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_INVOICE";
elseif ($this->element == 'order_supplier' || $this->element == 'supplier_order')
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_ORDER";
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index d54e2da4eb1..916ef2f001d 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -859,7 +859,10 @@ class FactureFournisseur extends CommonInvoice
$line->multicurrency_total_tva = $obj->multicurrency_total_tva;
$line->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
- $this->lines[$i] = $line;
+ // Extra fields
+ $line->fetch_optionals();
+
+ $this->lines[$i] = $line;
$i++;
}
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 6f4a1092194..87696535d2f 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -522,6 +522,7 @@ if ($step == 3 && $datatoimport)
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', '');
+
print '';
print '';
print ' ';
@@ -540,6 +541,13 @@ if ($step == 3 && $datatoimport)
dol_fiche_end();
+
+ if ($format == 'xlsx' && ! class_exists('XMLWriter')) {
+ $langs->load("install");
+ print info_admin($langs->trans("ErrorPHPDoesNotSupport", 'php-xml'), 0, 0, 1, 'error');
+ }
+
+
print ' ';
print ' |