make purchase price a float

This commit is contained in:
2024-10-04 11:36:46 +02:00
parent 228fc2bf5f
commit 0759ad0804
5 changed files with 27 additions and 4 deletions

View File

@ -60,3 +60,7 @@ def generate_split_ranges(
except IndexError:
end = len(value_list)
yield (value_list[start], value_list[end - 1])
def format_float_or_int(number: int | float):
return int(number) if float(number).is_integer() else f"{number:03.2f}"