From 0c93c89a94f448d51941174a1f2aa242952b0e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 29 Apr 2023 09:08:38 +0200 Subject: [PATCH] clean code --- htdocs/accountancy/journal/bankjournal.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index b79d63cfbce..3e2aa4b3b4a 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -7,7 +7,7 @@ * Copyright (C) 2013-2022 Open-DSI * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Olivier Geffroy - * Copyright (C) 2017-2021 Frédéric France + * Copyright (C) 2017-2023 Frédéric France * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Eric Seigne * Copyright (C) 2021 Gauthier VERDOL @@ -148,7 +148,7 @@ if ($date_start && $date_end) { } // Define begin binding date if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { - $sql .= " AND b.dateo >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + $sql .= " AND b.dateo >= '".$db->idate(getDolGlobalString('ACCOUNTING_DATE_START_BINDING'))."'"; } // Already in bookkeeping or not if ($in_bookkeeping == 'already') { @@ -912,7 +912,7 @@ if (!$error && $action == 'writebookkeeping') { // Export if ($action == 'exportcsv') { // ISO and not UTF8 ! - $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; + $sep = getDolGlobalString('ACCOUNTING_EXPORT_SEPARATORCSV'); $filename = 'journal'; $type_export = 'journal'; @@ -983,13 +983,13 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"'.$val["type_payment"].'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; if ($tabtype[$key] == 'payment_supplier') { - print '"'.$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER.'"'.$sep; + print '"'.getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER').'"'.$sep; } elseif ($tabtype[$key] == 'payment') { - print '"'.$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER.'"'.$sep; + print '"'.getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER').'"'.$sep; } elseif ($tabtype[$key] == 'payment_expensereport') { - print '"'.$conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT.'"'.$sep; + print '"'.getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT').'"'.$sep; } elseif ($tabtype[$key] == 'payment_salary') { - print '"'.$conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT.'"'.$sep; + print '"'.getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT').'"'.$sep; } else { print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; } @@ -1014,8 +1014,8 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["type_payment"].'"'.$sep; - print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE).'"'.$sep; - print '"'.length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE).'"'.$sep; + print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE')).'"'.$sep; + print '"'.length_accounta(getDolGlobalString('ACCOUNTING_ACCOUNT_SUSPENSE')).'"'.$sep; print "".$sep; print '"'.$reflabel.'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;