diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php index e9b7c8c005c..f69b47a8017 100644 --- a/htdocs/accountancy/tpl/export_journal.tpl.php +++ b/htdocs/accountancy/tpl/export_journal.tpl.php @@ -1,5 +1,6 @@ + * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,12 +17,12 @@ */ $prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC; $format = $conf->global->ACCOUNTING_EXPORT_FORMAT; +$nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME; $date_export = dol_print_date($now, '%Y%m%d%H%M%S'); header('Content-Type: text/csv'); -if ($prefix) - $filename = $prefix . "_" . "journal_" . $journal . $date_export . "." . $format; -else - $filename = "journal_" . $journal . $date_export . "." . $format; -header('Content-Disposition: attachment;filename=' . $filename); \ No newline at end of file + +$filename = ($prefix?$prefix . "_":""). "journal_" . $journal . ($nodateexport?"":$date_export) . "." . $format; + +header('Content-Disposition: attachment;filename=' . $filename);