Skip to content
Snippets Groups Projects
Commit f8ac6c96 authored by florian HENRY's avatar florian HENRY
Browse files

fix accountancy export

parent b8d45259
No related branches found
No related tags found
No related merge requests found
......@@ -237,17 +237,13 @@ 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;
}
}
}
/*
* View
......
......@@ -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();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment