Commit 960e2475 authored by Eric Seigne's avatar Eric Seigne
Browse files

modification extensions pour export autre que zip

parent bab490a0
......@@ -39,6 +39,7 @@ class CdeFrais extends Model
protected $_entrepriseSlug;
protected $_directory; //Répertoire de stockage
protected $_filenameZIP; //Le fichier ZIP
protected $_extensionZIP; //.zip ... ou .dex
/**
* construct
......@@ -65,8 +66,9 @@ class CdeFrais extends Model
if ($suffixe != "") {
$suffixe = "-" . $suffixe;
}
$this->_extensionZIP = ".zip";
$this->_filenameZIP = $ladateYMD . "-doliscan_export-" . $this->_entrepriseSlug . "-CDF" . $suffixe . ".zip";
$this->_filenameZIP = $ladateYMD . "-doliscan_export-" . $this->_entrepriseSlug . "-CDF" . $suffixe . $this->_extensionZIP;
Log::debug("CdeFrais::__construct : " . $this->_filenameZIP);
Log::debug("Export des CDF dans " . $this->_directory);
......@@ -82,6 +84,16 @@ class CdeFrais extends Model
return $this->_directory . "/" . $this->_filenameZIP;
}
public function setExportFileExtension($ext)
{
Log::debug("CdeFrais::setExportFileExtension : $ext");
if ($ext != "" && $this->_extensionZIP != $ext) {
$this->_filenameZIP = str_replace($this->_extensionZIP, $ext, $this->_filenameZIP);
$this->_extensionZIP = $ext;
Log::debug("CdeFrais::setExportFileExtension : $ext ok");
}
}
public function getDirectory()
{
return $this->_directory;
......
......@@ -659,7 +659,7 @@ class NdeFraisController extends Controller
$rIK = $pdfIK->save($fullFilenameIK);
$filenameIK = $fullFilenameIK;
}
if($rIK) {
if ($rIK) {
Log::debug(" NdeFraisController :: webBuildPDF Sauvegarde du fichier IK $filenameIK terminé\n");
}
$this->_ndf->pdfFullFileNameIK = $filenameIK;
......@@ -1222,9 +1222,11 @@ class NdeFraisController extends Controller
$this->addExportCompta($this->_ecritureNum, $u->getComptaCode('compteprocb'), "FOURNISSEURS", $local_compAuxNum, $local_compAuxLib, "$local_labelFrais", "0", $local_totalTTC, $local_fichierJoint, $ladate, $is_pro);
$this->_ecritureNum++;
}
} else {
$this->_ecritureNum++;
}
//bug de changement d'écritures "en trop" ... a verifier si ça ne fait pas d'effets de bords
// else {
// $this->_ecritureNum++;
// }
return $ligne;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment