Merge pull request #2449 from defrance69/patch-51

Update export.class.php
This commit is contained in:
Laurent Destailleur 2015-03-22 14:07:05 +01:00
commit e2675f204d
3 changed files with 14 additions and 3 deletions

View File

@ -249,7 +249,11 @@ if ($action == 'export_csv')
$purchase_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
header('Content-Type: text/csv');
header('Content-Disposition: attachment;filename=journal_achats.csv');
if ($conf->global->EXPORT_PREFIX_SPEC)
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_achats.csv";
else
$filename="journal_achats.csv";
header('Content-Disposition: attachment;filename='.$filename);
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export
{

View File

@ -271,7 +271,11 @@ if ($action == 'export_csv')
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
header('Content-Type: text/csv');
header('Content-Disposition: attachment;filename=journal_ventes.csv');
if ($conf->global->EXPORT_PREFIX_SPEC)
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_ventes.csv";
else
$filename="journal_ventes.csv";
header('Content-Disposition: attachment;filename='.$filename);
$companystatic = new Client($db);

View File

@ -540,7 +540,10 @@ class Export
if ($resql)
{
//$this->array_export_label[$indice]
$filename="export_".$datatoexport;
if ($conf->global->EXPORT_PREFIX_SPEC)
$filename=$conf->global->EXPORT_PREFIX_SPEC."_".$datatoexport;
else
$filename="export_".$datatoexport;
$filename.='.'.$objmodel->getDriverExtension();
$dirname=$conf->export->dir_temp.'/'.$user->id;