fix accountancy export
This commit is contained in:
parent
b8d452596c
commit
f8ac6c96e0
@ -237,15 +237,11 @@ if ($action == 'export_csv') {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$accountancyexport = new AccountancyExport($db);
|
$accountancyexport = new AccountancyExport($db);
|
||||||
AccountancyExport::downloadFile();
|
|
||||||
$accountancyexport->export($object->lines);
|
$accountancyexport->export($object->lines);
|
||||||
if (!empty($accountancyexport->errors)) {
|
if (!empty($accountancyexport->errors)) {
|
||||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||||
}
|
}
|
||||||
else {
|
exit;
|
||||||
Header("Location: list.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,6 +113,8 @@ class AccountancyExport
|
|||||||
public function export(&$TData) {
|
public function export(&$TData) {
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
|
self::downloadFile();
|
||||||
|
|
||||||
switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) {
|
switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) {
|
||||||
case self::$EXPORT_TYPE_NORMAL :
|
case self::$EXPORT_TYPE_NORMAL :
|
||||||
$this->exportNormal($TData);
|
$this->exportNormal($TData);
|
||||||
@ -140,8 +142,7 @@ class AccountancyExport
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->errors))
|
|
||||||
self::downloadFile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user