From 54bf8ed1edd1c66f0eba7f5a72ce92fa522ebb04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Feb 2022 22:53:24 +0100 Subject: [PATCH] Fix link --- htdocs/accountancy/expensereport/index.php | 20 +++++++++++++++++++- htdocs/langs/en_US/accountancy.lang | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index 37abd56a21d..93419ce3cc4 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -199,7 +199,25 @@ for ($i = 1; $i <= 12; $i++) { if ($j > 12) { $j -= 12; } - print ''.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).''; + $cursormonth = $j; + if ($cursormonth > 12) { + $cursormonth -= 12; + } + $cursoryear = ($cursormonth < ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1)) ? $y + 1 : $y; + $tmp = dol_getdate(dol_get_last_day($cursoryear, $cursormonth, 'gmt'), false, 'gmt'); + + print ''; + if (!empty($tmp['mday'])) { + $param = 'search_date_startday=1&search_date_startmonth='.$cursormonth.'&search_date_startyear='.$cursoryear; + $param .= '&search_date_endday='.$tmp['mday'].'&search_date_endmonth='.$tmp['mon'].'&search_date_endyear='.$tmp['year']; + $param .= '&search_month='.$tmp['mon'].'&search_year='.$tmp['year']; + print ''; + } + print $langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)); + if (!empty($tmp['mday'])) { + print ''; + } + print ''; } print ''.$langs->trans("Total").''; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 893f448bbf8..a44c819aa78 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -294,7 +294,7 @@ Balancing=Balancing FicheVentilation=Binding card GeneralLedgerIsWritten=Transactions are written in the Ledger GeneralLedgerSomeRecordWasNotRecorded=Some of the transactions could not be journalized. If there is no other error message, this is probably because they were already journalized. -NoNewRecordSaved=No more record to journalize +NoNewRecordSaved=No more record to transfer ListOfProductsWithoutAccountingAccount=List of products not bound to any accounting account ChangeBinding=Change the binding Accounted=Accounted in ledger