FIX ecm_files didnt match cause document ref contained "/"

This commit is contained in:
atm-quentin 2020-03-03 11:49:17 +01:00
parent 5e6ee7888c
commit 9446138951
14 changed files with 15 additions and 15 deletions

View File

@ -549,7 +549,7 @@ class BOM extends CommonObject
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
// Validate // Validate
$sql = "UPDATE ".MAIN_DB_PREFIX."bom_bom"; $sql = "UPDATE ".MAIN_DB_PREFIX."bom_bom";

View File

@ -1777,7 +1777,7 @@ class Propal extends CommonObject
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
$sql = "UPDATE ".MAIN_DB_PREFIX."propal"; $sql = "UPDATE ".MAIN_DB_PREFIX."propal";
$sql.= " SET ref = '".$num."',"; $sql.= " SET ref = '".$num."',";

View File

@ -361,7 +361,7 @@ class Commande extends CommonOrder
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
// Validate // Validate
$sql = "UPDATE ".MAIN_DB_PREFIX."commande"; $sql = "UPDATE ".MAIN_DB_PREFIX."commande";

View File

@ -2350,7 +2350,7 @@ class Facture extends CommonInvoice
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
if ($num) if ($num)
{ {

View File

@ -453,7 +453,7 @@ class Contrat extends CommonObject
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
if ($num) if ($num)
{ {

View File

@ -693,7 +693,7 @@ class Expedition extends CommonObject
{ {
$numref = "EXP".$this->id; $numref = "EXP".$this->id;
} }
$this->newref = $numref; $this->newref = dol_sanitizeFileName($numref);
$now=dol_now(); $now=dol_now();

View File

@ -1117,7 +1117,7 @@ class ExpenseReport extends CommonObject
} }
if (empty($num) || $num < 0) return -1; if (empty($num) || $num < 0) return -1;
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
$this->db->begin(); $this->db->begin();

View File

@ -540,7 +540,7 @@ class Fichinter extends CommonObject
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter"; $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter";
$sql.= " SET fk_statut = 1"; $sql.= " SET fk_statut = 1";

View File

@ -519,7 +519,7 @@ class CommandeFournisseur extends CommonOrder
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
$sql = 'UPDATE '.MAIN_DB_PREFIX."commande_fournisseur"; $sql = 'UPDATE '.MAIN_DB_PREFIX."commande_fournisseur";
$sql.= " SET ref='".$this->db->escape($num)."',"; $sql.= " SET ref='".$this->db->escape($num)."',";
@ -912,7 +912,7 @@ class CommandeFournisseur extends CommonOrder
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
// Do we have to change status now ? (If double approval is required and first approval, we keep status to 1 = validated) // Do we have to change status now ? (If double approval is required and first approval, we keep status to 1 = validated)
$movetoapprovestatus=true; $movetoapprovestatus=true;

View File

@ -1369,7 +1369,7 @@ class FactureFournisseur extends CommonInvoice
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn";
$sql.= " SET ref='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; $sql.= " SET ref='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'";

View File

@ -688,7 +688,7 @@ class Holiday extends CommonObject
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
// Update status // Update status
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."holiday SET";

View File

@ -391,7 +391,7 @@ class Livraison extends CommonObject
{ {
$numref = $this->ref; $numref = $this->ref;
} }
$this->newref = $numref; $this->newref = dol_sanitizeFileName($numref);
// Test if is not already in valid status. If so, we stop to avoid decrementing the stock twice. // Test if is not already in valid status. If so, we stop to avoid decrementing the stock twice.
$sql = "SELECT ref"; $sql = "SELECT ref";

View File

@ -529,7 +529,7 @@ class Reception extends CommonObject
$numref = $this->ref; $numref = $this->ref;
} }
$this->newref = $numref; $this->newref = dol_sanitizeFileName($numref);
$now=dol_now(); $now=dol_now();

View File

@ -1453,7 +1453,7 @@ class SupplierProposal extends CommonObject
{ {
$num = $this->ref; $num = $this->ref;
} }
$this->newref = $num; $this->newref = dol_sanitizeFileName($num);
$sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal"; $sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal";
$sql.= " SET ref = '".$this->db->escape($num)."',"; $sql.= " SET ref = '".$this->db->escape($num)."',";