diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index cb142948096..692202c68a4 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2025 Alexandre Spangaro * * 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 @@ -123,7 +123,7 @@ if ($result) { $newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint; if (empty($reshook)) { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->hasRight('accounting', 'fiscalyear', 'write')); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/accountancy/admin/fiscalyear_card.php?action=create', '', $user->hasRight('accounting', 'fiscalyear', 'write')); } $title = $langs->trans('AccountingPeriods'); diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 0162ee7de95..53a0b24e919 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -1,7 +1,7 @@ - * Copyright (C) 2020 OScss-Shop - * Copyright (C) 2023 Frédéric France +/* Copyright (C) 2014-2025 Alexandre Spangaro + * Copyright (C) 2020 OScss-Shop + * Copyright (C) 2023 Frédéric France * * 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 @@ -122,9 +122,6 @@ class Fiscalyear extends CommonObject public function __construct(DoliDB $db) { $this->db = $db; - - $this->labelStatusShort = array(self::STATUS_OPEN => 'Opened', self::STATUS_CLOSED => 'Closed'); - $this->labelStatus = array(self::STATUS_OPEN => 'Opened', self::STATUS_CLOSED => 'Closed'); } /** @@ -411,11 +408,11 @@ class Fiscalyear extends CommonObject // phpcs:enable if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; - //$langs->load("mymodule@mymodule"); - $this->labelStatus[self::STATUS_OPEN] = $langs->transnoentitiesnoconv('Draft'); - $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Enabled'); - $this->labelStatusShort[self::STATUS_OPEN] = $langs->transnoentitiesnoconv('Enabled'); - $this->labelStatusShort[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('Disabled'); + + $this->labelStatus[self::STATUS_OPEN] = $langs->transnoentitiesnoconv('FiscalYearOpened'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('FiscalYearClosed'); + $this->labelStatusShort[self::STATUS_OPEN] = $langs->transnoentitiesnoconv('FiscalYearOpenedShort'); + $this->labelStatusShort[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv('FiscalYearClosedShort'); } $statusType = 'status4'; diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 62cd3bca571..d40d89d1d96 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -277,6 +277,10 @@ ImportDataset_tax_contrib=Social/fiscal taxes ImportDataset_tax_vat=Vat payments ErrorBankAccountNotFound=Error: Bank account not found FiscalPeriod=Accounting period +FiscalYearOpened=Fiscal year opened +FiscalYearClosed=Fiscal year closed +FiscalYearOpenedShort=Opened +FiscalYearClosedShort=Closed ListSocialContributionAssociatedProject=List of social contributions associated with the project DeleteFromCat=Remove from accounting group AccountingAffectation=Accounting assignment