From dda9e3847ff3ebf2da5c80944a3184637c9f5a60 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Thu, 14 Nov 2024 23:16:11 +0100 Subject: [PATCH] also for sync sync --- internal/server/handle_bookings.go | 2 +- internal/service/booking/sync.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/server/handle_bookings.go b/internal/server/handle_bookings.go index f7073f3..541bf11 100644 --- a/internal/server/handle_bookings.go +++ b/internal/server/handle_bookings.go @@ -256,7 +256,7 @@ func handleCreateItem(bs *booking.Service, hc *config.Host) echo.HandlerFunc { return fmt.Errorf("invalid item name %q", ni.Item) } - newItems := bs.CreateItem(b.Id, itm, ni.Quantity, ni.Price, ni.PaymentMethod, b.CustomerNumber) + newItems := bs.CreateItem(b.Id, itm, ni.Quantity, ni.Price, ni.PaymentMethod, b.CustomerNumber, b.Platform) // TODO: fix the calendar integration // if err = cs.Create( diff --git a/internal/service/booking/sync.go b/internal/service/booking/sync.go index 6f29cd3..8cf7858 100644 --- a/internal/service/booking/sync.go +++ b/internal/service/booking/sync.go @@ -28,7 +28,7 @@ func (bs Service) ParseFromApi(rawContent string) (*Booking, error) { b := bs.Create(*formatDate(arrivalDate), *formatDate(departureDate), customerName, "", customerEmail, "Booking", customerNumber, commissionAmount, &externalId) if item, ok := config.NewHost().Items[itemName]; ok { - bs.CreateItem(b.Id, item, stayLength, standardRate, "Card", customerNumber) + bs.CreateItem(b.Id, item, stayLength, standardRate, "Card", customerNumber, b.Platform) } return b, nil