Skip to content

Commit

Permalink
Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 4, 2015
2 parents 36a6a77 + 8f28e7c commit 8c17668
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions htdocs/fourn/class/fournisseur.facture.class.php
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
Expand Down Expand Up @@ -986,8 +986,8 @@ function validate($user, $force_number='', $idwarehouse=0, $notrigger=0)
$oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($num);

$dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoive_supplier').$oldref;
$dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoive_supplier').$newref;
$dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoice_supplier').$oldref;
$dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoice_supplier').$newref;
if (file_exists($dirsource))
{
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
Expand All @@ -996,7 +996,7 @@ function validate($user, $force_number='', $idwarehouse=0, $notrigger=0)
{
dol_syslog("Rename ok");
// Rename docs starting with $oldref with $newref
$listoffiles=dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoive_supplier').$newref, 'files', 1, '^'.preg_quote($oldref,'/'));
$listoffiles=dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2,0,0, $this, 'invoice_supplier').$newref, 'files', 1, '^'.preg_quote($oldref,'/'));
foreach($listoffiles as $fileentry)
{
$dirsource=$fileentry['name'];
Expand Down

0 comments on commit 8c17668

Please sign in to comment.