also for sync

sync
This commit is contained in:
Ruidy 2024-11-14 23:16:11 +01:00
parent 472985351a
commit dda9e3847f
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
2 changed files with 2 additions and 2 deletions

View file

@ -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(

View file

@ -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