Merge pull request #32929 from aspangaro/19_fixaccfy

FIX  Fiscal year - missing translation on status
This commit is contained in:
Laurent Destailleur 2025-02-04 23:36:47 +01:00 committed by GitHub
commit 419da592a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 13 deletions

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
/* Copyright (C) 2013-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
*
* 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');

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2014-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2020 OScss-Shop <support@oscss-shop.fr>
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.fr>
/* Copyright (C) 2014-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2020 OScss-Shop <support@oscss-shop.fr>
* Copyright (C) 2023 Frédéric France <frederic.france@free.fr>
*
* 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';

View file

@ -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