fix accountancy export
This commit is contained in:
parent
b8d452596c
commit
f8ac6c96e0
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user