ALmost done with Halbjahres Bilanz

This commit is contained in:
2026-02-12 15:58:29 +01:00
parent 567b9edc2d
commit 5424d25822
27 changed files with 3056 additions and 271 deletions

View File

@@ -212,4 +212,42 @@ class SecondTableEntry(models.Model):
date_joined = models.DateField(auto_now_add=True)
def __str__(self):
return f"{self.client.name} - {self.date}"
return f"{self.client.name} - {self.date}"
class MonthlySummary(models.Model):
"""
Stores per-month summary values that we need in other months
or in the half-year overview.
"""
sheet = models.OneToOneField(
MonthlySheet,
on_delete=models.CASCADE,
related_name='summary',
)
# K44: Gesamtbestand neu (Lit. LHe) from Bottom Table 2
gesamtbestand_neu_lhe = models.DecimalField(
max_digits=18,
decimal_places=6,
null=True,
blank=True,
)
# Gasbestand (Lit. LHe) from Bottom Table 1
gasbestand_lhe = models.DecimalField(
max_digits=18,
decimal_places=6,
null=True,
blank=True,
)
# Verbraucherverluste (Lit. L-He) from overall summary
verbraucherverlust_lhe = models.DecimalField(
max_digits=18,
decimal_places=6,
null=True,
blank=True,
)
def __str__(self):
return f"Summary {self.sheet.year}-{self.sheet.month:02d}"