From 8a5a5a98996cdd1f6a1684209fd837d63ed8ea56 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Thu, 7 Jul 2016 11:48:22 +0200 Subject: [PATCH] Add : new param accounting export We keep the old export format with no date --- htdocs/accountancy/tpl/export_journal.tpl.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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);