fix accountancy export

This commit is contained in:
florian HENRY 2016-05-16 17:05:34 +02:00
parent b8d452596c
commit f8ac6c96e0
2 changed files with 4 additions and 7 deletions

View File

@ -237,15 +237,11 @@ if ($action == 'export_csv') {
else
{
$accountancyexport = new AccountancyExport($db);
AccountancyExport::downloadFile();
$accountancyexport->export($object->lines);
if (!empty($accountancyexport->errors)) {
setEventMessages('', $accountancyexport->errors, 'errors');
}
else {
Header("Location: list.php");
exit;
}
exit;
}
}

View File

@ -113,6 +113,8 @@ class AccountancyExport
public function export(&$TData) {
global $conf, $langs;
self::downloadFile();
switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) {
case self::$EXPORT_TYPE_NORMAL :
$this->exportNormal($TData);
@ -140,8 +142,7 @@ class AccountancyExport
break;
}
if (empty($this->errors))
self::downloadFile();
}
/**