From 4126dcff03557703e1356f41aaf5ff808a286b56 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 8 Feb 2017 06:51:42 +0100 Subject: [PATCH] [FP17] Accountancy - Prepare fiscal year for a better complete accountancy. For the moment, remove function to update status and delete a fiscal year. Need controls and a specific function to block lines in the book keeping if the fiscal year is closed. --- htdocs/accountancy/admin/fiscalyear.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 11 +++++++---- htdocs/core/class/fiscalyear.class.php | 4 ++-- htdocs/langs/en_US/main.lang | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 817905f7b56..4b2b57ee7db 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2016 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 diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 2c22d8f191a..7a8ab0673a7 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2016 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 @@ -176,13 +176,15 @@ if ($action == 'create') print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); print ''; + /* // Statut print ''; print '' . $langs->trans("Status") . ''; print ''; print $form->selectarray('statut', $statut2label, GETPOST('statut')); print ''; - + */ + print ''; dol_fiche_end(); @@ -232,7 +234,8 @@ if ($action == 'create') // Statut print '' . $langs->trans("Statut") . ''; - print $form->selectarray('statut', $statut2label, $object->statut); + // print $form->selectarray('statut', $statut2label, $object->statut); + print $object->getLibStatut(4); print ''; print ''; @@ -304,7 +307,7 @@ if ($action == 'create') print '' . $langs->trans('Modify') . ''; - print '' . $langs->trans('Delete') . ''; + // print '' . $langs->trans('Delete') . ''; print ''; } diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index ef990d8edf3..912c1e34879 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2017 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 @@ -89,7 +89,7 @@ class Fiscalyear extends CommonObject $sql.= " '".$this->label."'"; $sql.= ", '".$this->db->idate($this->date_start)."'"; $sql.= ", ".($this->date_end ? "'".$this->db->idate($this->date_end)."'":"null"); - $sql.= ", ".$this->statut; + $sql.= ", 0"; $sql.= ", ".$conf->entity; $sql.= ", '".$this->db->idate($now)."'"; $sql.= ", ". $user->id; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 1c9c74471ca..37725835e4a 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -756,6 +756,7 @@ SomeTranslationAreUncomplete=Some languages may be partially translated or may c DirectDownloadLink=Direct download link Download=Download ActualizeCurrency=Update currency rate +Fiscalyear=Fiscal year # Week day Monday=Monday Tuesday=Tuesday