Adjust prices
This commit is contained in:
@@ -6,6 +6,9 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
from pygrister.api import GristApi
|
||||
|
||||
PRICE_REGULAR = 3
|
||||
PRICE_KIDS = 1.5
|
||||
|
||||
config = {
|
||||
"GRIST_API_SERVER": "allmende-gufi.de",
|
||||
"GRIST_TEAM_SITE": "grist",
|
||||
@@ -41,7 +44,7 @@ def sync_with_grist(event) -> int:
|
||||
"Datum": event.event_time.date().isoformat(),
|
||||
"Typ": "Essen",
|
||||
"Partei_Konto": registration.household.name,
|
||||
"Betrag": -3.5 * registration.num_adult_meals,
|
||||
"Betrag": -1 * PRICE_REGULAR * registration.num_adult_meals,
|
||||
"Date_Added": today,
|
||||
"meal_manager_event_id": event.id,
|
||||
}
|
||||
@@ -52,7 +55,7 @@ def sync_with_grist(event) -> int:
|
||||
"Datum": event.event_time.date().isoformat(),
|
||||
"Typ": "Essen Kind",
|
||||
"Partei_Konto": registration.household.name,
|
||||
"Betrag": -2 * registration.num_children_meals,
|
||||
"Betrag": -1 * PRICE_KIDS * registration.num_children_meals,
|
||||
"Date_Added": today,
|
||||
"meal_manager_event_id": event.id,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user