';
print '';
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 6ef9c3aa253..7376e797c3c 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -2069,11 +2069,16 @@ class Commande extends CommonObject
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0 ;';
if ($this->db->query($sql) )
{
- if (($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1) && $this->propale_id)
- {
- $propal = new Propal($this->db);
- $propal->fetch($this->propale_id);
- $propal->classer_facturee();
+ if (! empty($conf->propal->enabled) && ! empty($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER))
+ {
+ $this->fetchObjectLinked('','propal',$this->id,$this->element);
+ if (! empty($this->linkedObjects))
+ {
+ foreach($this->linkedObjects['propal'] as $element)
+ {
+ $ret=$element->classer_facturee();
+ }
+ }
}
return 1;
}
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index a16030a686b..d9cc93b4fcd 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -34,7 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
$langs->load("other");
$langs->load("products");
-
+$langs->load("contracts");
$action = GETPOST('action','alpha');
$confirm = GETPOST('confirm','alpha');
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 52352963ca4..48f966a9fbf 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -199,7 +199,7 @@ class Conf
{
$modulename=strtolower($reg[1]);
if ($modulename == 'propale') $modulename='propal';
- if (! is_object($this->$modulename)) $this->$modulename=(object) array();
+ if (! isset($this->$modulename) || ! is_object($this->$modulename)) $this->$modulename=(object) array();
$this->$modulename->enabled=true;
$this->modules[]=$modulename; // Add this module in list of enabled modules
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 34e3d32fe3e..ad276af09fb 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3328,7 +3328,8 @@ function dol_textishtml($msg,$option=0)
elseif (preg_match('//i',$msg)) return true;
elseif (preg_match('//i',$msg)) return true;
- elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true;
+ elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true; // Html entities names (http://www.w3schools.com/tags/ref_entities.asp)
+ elseif (preg_match('/[0-9]{2,3};/i',$msg)) return true; // Html entities numbers (http://www.w3schools.com/tags/ref_entities.asp)
return false;
}
}
diff --git a/htdocs/langs/ca_ES/orders.lang b/htdocs/langs/ca_ES/orders.lang
index 8c7a382a1c9..78396af245c 100644
--- a/htdocs/langs/ca_ES/orders.lang
+++ b/htdocs/langs/ca_ES/orders.lang
@@ -89,7 +89,8 @@ ConfirmUnvalidateOrder=Esteu segur de voler restaurar la comanda %s a l'e
ConfirmCancelOrder=Esteu segur de voler anul lar aquesta comanda?
ConfirmMakeOrder=Esteu segur de voler confirmar aquest comanda a data de %s ?
GenerateBill=Facturar
-ClassifyBilled=Classificar "Facturat"
+ClassifyShipped=Classificar enviat
+ClassifyBilled=Classificar facturat
ComptaCard=Fitxa comptable
DraftOrders=Comandes esborrany
RelatedOrders=Comandes adjuntes
diff --git a/htdocs/langs/ca_ES/workflow.lang b/htdocs/langs/ca_ES/workflow.lang
index c55f3d72614..33cd33eca43 100644
--- a/htdocs/langs/ca_ES/workflow.lang
+++ b/htdocs/langs/ca_ES/workflow.lang
@@ -7,5 +7,5 @@ descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Crear una comanda de client automàticament
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Crear una factura a client automàticament a la signatura d'un pressupost
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Crear una factura a client automàticament a la validació d'un contracte
descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Crear una factura a client automàticament al tancament d'una comanda de client
-descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Clasificar como facturado el presupuesto al mismo tiempo que el pedido
-descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificar como facturados los pedidos al mismo tiempo que la factura
\ No newline at end of file
+descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classificar com facturat el pressupost quan la comanda de client relacionada es classifiqui com pagada
+descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classificar com facturades les comandes quan la factura relacionada es classifiqui com a pagada
\ No newline at end of file
diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang
index ffc68da4709..ae2558d1177 100644
--- a/htdocs/langs/es_ES/orders.lang
+++ b/htdocs/langs/es_ES/orders.lang
@@ -89,7 +89,8 @@ ConfirmUnvalidateOrder=¿Está seguro de querer restaurar el pedido %s al
ConfirmCancelOrder=¿Está seguro de querer anular este pedido?
ConfirmMakeOrder=¿Está seguro de querer confirmar este pedido en fecha de%s ?
GenerateBill=Facturar
-ClassifyBilled=Clasificar "Facturado"
+ClassifyShipped=Clasificar enviado
+ClassifyBilled=Clasificar facturado
ComptaCard=Ficha contable
DraftOrders=Pedidos borrador
RelatedOrders=Pedidos adjuntos
diff --git a/htdocs/langs/es_ES/workflow.lang b/htdocs/langs/es_ES/workflow.lang
index d6f1677fbc5..ac75216d886 100644
--- a/htdocs/langs/es_ES/workflow.lang
+++ b/htdocs/langs/es_ES/workflow.lang
@@ -7,5 +7,5 @@ descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Crear un pedido de cliente automáticamente
descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Crear una factura a cliente automáticamente a la firma de un presupuesto
descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Crear una factura a cliente automáticamente a la validación de un contrato
descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Crear una factura a cliente automáticamente al cierre de un pedido de cliente
-descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Clasificar como facturado el presupuesto al mismo tiempo que el pedido
-descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificar como facturados los pedidos al mismo tiempo que la factura
\ No newline at end of file
+descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Clasificar como facturado el presupuesto cuando el pedido de cliente relacionado se clasifique como pagado
+descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificar como facturados los pedidos cuando la factura relacionada se clasifique como pagada
\ No newline at end of file
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 5df97438f6a..d24f2448e69 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -326,7 +326,7 @@ class Product extends CommonObject
{
if ($this->update($id, $user, true) > 0)
{
- if ($this->catid > 0)
+ if ($this->catid > 0)
{
require_once(DOL_DOCUMENT_ROOT ."/categories/class/categorie.class.php");
$cat = new Categorie($this->db, $this->catid);
@@ -379,7 +379,6 @@ class Product extends CommonObject
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
-
if (! $error)
{
$this->db->commit();
@@ -408,8 +407,6 @@ class Product extends CommonObject
$this->db->begin();
- $this->db->begin();
-
// Verification parametres
if (! $this->libelle) $this->libelle = 'MISSING LABEL';