Eco Account deduction
* adds deductable_surface to EcoAccount model to provide an easy way to change the deductable amount from an account -> depends on external funding e.g. with AktionBlau or similar * adds overview of deducted and deductable volume to detail view * adds check to eco account model, so the deductable_surface can never be larger than the total amount of after_state surface sum * adds german formating for python logic based number formating * adds/updates translations
This commit is contained in:
21
konova/utils/general.py
Normal file
21
konova/utils/general.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 17.09.21
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def format_german_float(num) -> str:
|
||||
""" Writes a float into a string based on german float notation
|
||||
|
||||
10000.000 --> "10.000,00"
|
||||
|
||||
Args:
|
||||
num (float): The number
|
||||
|
||||
Returns:
|
||||
num (str): The number as german Gleitkommazahl
|
||||
"""
|
||||
return format(num, "0,.2f").replace(",", "X").replace(".", ",").replace("X", ".")
|
||||
Reference in New Issue
Block a user