diff --git a/app/core/config.py b/app/core/config.py index 5f1f20a..fb9eef1 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -24,6 +24,12 @@ class Settings(BaseSettings): # Elnet supplier lookup ELNET_API_BASE_URL: str = "https://api.elnet.greenpowerdenmark.dk/api" ELNET_TIMEOUT_SECONDS: int = 12 + + # API Gateway (Product catalog) + APIGW_BASE_URL: str = "https://apigateway.bmcnetworks.dk" + APIGATEWAY_URL: str = "" + APIGW_TOKEN: str = "" + APIGW_TIMEOUT_SECONDS: int = 12 # Security SECRET_KEY: str = "dev-secret-key-change-in-production" diff --git a/app/modules/sag/backend/router.py b/app/modules/sag/backend/router.py index 0c3e734..0a8d533 100644 --- a/app/modules/sag/backend/router.py +++ b/app/modules/sag/backend/router.py @@ -1022,9 +1022,9 @@ async def create_sale_item(sag_id: int, data: dict): query = """ INSERT INTO sag_salgsvarer - (sag_id, type, description, quantity, unit, unit_price, amount, currency, status, line_date, external_ref) + (sag_id, type, description, quantity, unit, unit_price, amount, currency, status, line_date, external_ref, product_id) VALUES - (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) + (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING * """ params = ( @@ -1039,6 +1039,7 @@ async def create_sale_item(sag_id: int, data: dict): status, data.get("line_date"), data.get("external_ref"), + data.get("product_id"), ) result = execute_query(query, params) if result: @@ -1095,6 +1096,7 @@ async def update_sale_item(sag_id: int, item_id: int, updates: dict): "status", "line_date", "external_ref", + "product_id", ] set_clauses = [] diff --git a/app/modules/sag/templates/detail.html b/app/modules/sag/templates/detail.html index 15f466c..f0ba0e6 100644 --- a/app/modules/sag/templates/detail.html +++ b/app/modules/sag/templates/detail.html @@ -555,6 +555,11 @@ Varekøb & Salg +
  • Ny Ticket
  • Prepaid Cards
  • Fastpris Aftaler
  • +
  • Abonnementer
  • Knowledge Base
  • @@ -259,7 +260,7 @@