diff options
author | Ătienne Loks <etienne.loks@iggdrasil.net> | 2023-06-27 10:32:34 +0200 |
---|---|---|
committer | Ătienne Loks <etienne.loks@iggdrasil.net> | 2023-06-27 10:39:40 +0200 |
commit | 6e10770d2c121a88be0368c8764c47596bc884ba (patch) | |
tree | 01157afc7e4fa97b63ffe3e572cbd23a218eca14 | |
parent | b90d2673308b6a2fc696505e437e692928fd1849 (diff) | |
download | Ishtar-6e10770d2c121a88be0368c8764c47596bc884ba.tar.bz2 Ishtar-6e10770d2c121a88be0368c8764c47596bc884ba.zip |
đ sheet: fix float display for hectare
-rw-r--r-- | archaeological_files/models.py | 4 | ||||
-rw-r--r-- | archaeological_operations/models.py | 2 | ||||
-rw-r--r-- | changelog/en/changelog_2022-06-15.md | 1 | ||||
-rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 1 | ||||
-rw-r--r-- | ishtar_common/models_common.py | 2 |
5 files changed, 6 insertions, 4 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index f6f667c4a..956f91421 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -1075,11 +1075,11 @@ class File( def total_surface_ha(self): if self.total_surface: - return self.total_surface / 10000.0 + return round(self.total_surface / 10000.0, 5) def total_developed_surface_ha(self): if self.total_developed_surface: - return self.total_developed_surface / 10000.0 + return round(self.total_developed_surface / 10000.0, 5) def operation_acts(self): acts = [] diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 9155ce3eb..4f0112710 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1978,7 +1978,7 @@ class Operation( @property def surface_ha(self): if self.surface: - return self.surface / 10000.0 + return round(self.surface / 10000.0, 5) @property def cost_by_m2(self): diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index a7b2a0d3e..6a172482d 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -9,6 +9,7 @@ v4.0.50 - 2999-12-31 ### Bug fixes ### - Operation form: the operation code field (Patriarche) is no longer optional - forms - unit input: fix round float display +- sheet: fix float display for hectare - fix crash on qrcode generation for base finds v4.0.49 - 2023-06-21 diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 65ab2fdc1..fc3b42bdf 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -9,6 +9,7 @@ v4.0.50 - 2999-12-31 ### Corrections de dysfonctionnements ### - Formulaire opération : le champ code opération (Patriarche) n'est plus facultatif - Formulaires - champ unité : correction des arrondis des flottants +- Fiche : correction de l'affichage à virgule pour les hectares - Correction d'erreur lors de la génération de qrcode pour le mobilier d'origine diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index 7a9809ddf..5c9549ba3 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -3544,7 +3544,7 @@ class Town(GeographicItem, Imported, DocumentItem, MainItem, models.Model): def surface_ha(self): if not self.surface: return 0 - return self.surface / 10000.0 + return round(self.surface / 10000.0, 5) def get_filename(self): if self.numero_insee: |