Merge pull request #13260 from atm-quentin/FIX_ecm_files
FIX ecm_files didnt match cause document ref contained "/"
This commit is contained in:
commit
7866f89585
@ -561,7 +561,7 @@ class BOM extends CommonObject
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
// Validate
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
|
||||
@ -1803,7 +1803,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
||||
$sql .= " SET ref = '".$this->db->escape($num)."',";
|
||||
|
||||
@ -384,7 +384,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
// Validate
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
|
||||
@ -2530,7 +2530,7 @@ class Facture extends CommonInvoice
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@ -517,7 +517,7 @@ class Contrat extends CommonObject
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@ -697,7 +697,7 @@ class Expedition extends CommonObject
|
||||
{
|
||||
$numref = "EXP".$this->id;
|
||||
}
|
||||
$this->newref = $numref;
|
||||
$this->newref = dol_sanitizeFileName($numref);
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
@ -1163,7 +1163,7 @@ class ExpenseReport extends CommonObject
|
||||
}
|
||||
if (empty($num) || $num < 0) return -1;
|
||||
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
@ -544,7 +544,7 @@ class Fichinter extends CommonObject
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter";
|
||||
$sql .= " SET fk_statut = 1";
|
||||
|
||||
@ -587,7 +587,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."commande_fournisseur";
|
||||
$sql .= " SET ref='".$this->db->escape($num)."',";
|
||||
@ -971,7 +971,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
{
|
||||
$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)
|
||||
$movetoapprovestatus = true;
|
||||
|
||||
@ -1413,7 +1413,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
$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)."'";
|
||||
|
||||
@ -716,7 +716,7 @@ class Holiday extends CommonObject
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
// Update status
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday SET";
|
||||
|
||||
@ -404,7 +404,7 @@ class Livraison extends CommonObject
|
||||
{
|
||||
$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.
|
||||
$sql = "SELECT ref";
|
||||
|
||||
@ -546,7 +546,7 @@ class Reception extends CommonObject
|
||||
$numref = $this->ref;
|
||||
}
|
||||
|
||||
$this->newref = $numref;
|
||||
$this->newref = dol_sanitizeFileName($numref);
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
@ -1462,7 +1462,7 @@ class SupplierProposal extends CommonObject
|
||||
{
|
||||
$num = $this->ref;
|
||||
}
|
||||
$this->newref = $num;
|
||||
$this->newref = dol_sanitizeFileName($num);
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal";
|
||||
$sql .= " SET ref = '".$this->db->escape($num)."',";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user