Connector API: Add cancelled reservation items to reservations/getall response
With the reservation response from the Connector API, the total price of a cancelled reservation is not returned. With this extension, it would be possible.
You can filter it by States and get all accounting items.
-
Magnus Fernsten commented
This doesn't really help. What I need is the items to be shown with the correct state. Look at example 116068 at Mornington Hotel Bromma. Looking in the API the cancelled night isn't shown.
"Items": [
{
"Id": "8cb85d11-2d6c-4b06-ab7f-ab6c00d10b19",
"CustomerId": "182eb36c-acdc-4fc4-954d-ab6c00d107a8",
"OrderId": "d69a054b-84d7-4218-9323-ab6c00d10a71",
"ServiceId": "ad0d9d14-5881-4d0c-b11f-a6c0a6e65b2c",
"ProductId": "dd132ec6-4fc9-4a66-8610-b22a93826042",
"BillId": null,
"InvoiceId": null,
"AccountingCategoryId": "c003aa77-f7cb-4b50-b606-8276309b34b6",
"CreditCardId": null,
"Type": "ProductRevenue",
"SubType": "ProductOrder",
"Name": "Breakfast/Frukost",
"Notes": null,
"ConsumptionUtc": "2020-04-06T10:00:00Z",
"ClosedUtc": null,
"State": "Open",
"Amount": {
"Value": 58.0,
"Net": 51.79,
"Tax": 6.21,
"TaxRate": 0.12,
"Currency": "SEK",
"NetValue": 51.79,
"GrossValue": 58.0,
"TaxValues": [
{
"Code": "SE-R",
"Value": 6.21
}
]
}
},
{
"Id": "02852a55-3239-46ee-98b1-ab760063387d",
"CustomerId": "182eb36c-acdc-4fc4-954d-ab6c00d107a8",
"OrderId": "d69a054b-84d7-4218-9323-ab6c00d10a71",
"ServiceId": "ad0d9d14-5881-4d0c-b11f-a6c0a6e65b2c",
"ProductId": null,
"BillId": null,
"InvoiceId": null,
"AccountingCategoryId": "38a14b9a-f75b-45d3-9638-ca2d26a2a7ed",
"CreditCardId": null,
"Type": "ServiceRevenue",
"SubType": "SpaceOrder",
"Name": "Night 05/04/2020",
"Notes": null,
"ConsumptionUtc": "2020-04-05T13:00:00Z",
"ClosedUtc": null,
"State": "Open",
"Amount": {
"Value": 553.0,
"Net": 493.75,
"Tax": 59.25,
"TaxRate": 0.12,
"Currency": "SEK",
"NetValue": 493.75,
"GrossValue": 553.0,
"TaxValues": [
{
"Code": "SE-R",
"Value": 59.25
}
]
}
}
]