Klimafaktoren

This commit is contained in:
Moritz Utcke
2025-04-07 23:55:42 -04:00
parent 1970a105a9
commit 176f1c08ad
4 changed files with 54 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ import { getKlimafaktoren } from "#lib/Klimafaktoren.js";
import { getHeizwertfaktor } from "#lib/server/Heizwertfaktor.js";
import { Enums } from "#lib/client/prisma.js";
import moment from "moment";
import { getKlimafaktorenServer } from "#lib/server/klimafaktoren.js";
export function energetischeNutzflaecheVerbrauchsausweisWohnen_2016(
ausweis: VerbrauchsausweisWohnenClient,
@@ -49,7 +50,7 @@ export async function endEnergieVerbrauchVerbrauchsausweis_2016(
}];
try {
const response = await getKlimafaktoren(ausweis.startdatum, objekt.plz)
const response = await getKlimafaktorenServer(objekt.plz as string, moment(ausweis.startdatum).toDate(), moment(ausweis.startdatum).add(2, "years").toDate())
if (response) {
klimafaktoren = response