From 1268ba1b4a4e045d959858b9392bd85abb30bdc9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 9 Oct 2024 16:39:57 +0200 Subject: 🩹 Archaeological files templates: add operation_type_for_royalties fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_files/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 8546b8933..b91ea7941 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -1251,6 +1251,13 @@ class File( values["job_non_permanent_cost"] = 0 for k in ["non_permanent_ground_cost_planned", "non_permanent_cost_planned"]: values["job_non_permanent_cost"] += values.get(k, 0) + if self.operation_type_for_royalties: + values.update({ + "operation_type_for_royalties_increase_coefficient": self.operation_type_for_royalties.increase_coefficient, + "operation_type_for_royalties_category": self.operation_type_for_royalties.category, + "operation_type_for_royalties_increased_final_value": self.operation_type_for_royalties.increased_final_value, + }) + return values def get_values(self, prefix="", no_values=False, filtr=None, **kwargs): -- cgit v1.2.3