Gloriafood Sambain bad request for % promotion

Hello everyone!

I integrated Gloriafood with Sambapos V5 but it does not work for the majority of orders with promotions.

The client is added in SambaPOS but not the ticket. I opened the log and I get the following error:

24/11/2021 11:59:02 mutation m {addCalculationToTicket(terminalId:"J78LIOUBnEW1V-8dcBS71w",calculationName:"Promo Discount",amount:17,6){id}}
24/11/2021 11:59:02 WebException: The remote server returned an error: (400) Bad Request.

I noticed that the amount is 17,6, with a coma and without brackets and I think this is why a bad request is thrown. Please note that in my country, a coma is used for numbers with decimals.

Is there a way to correct that? I did not find a way to round the promotions in Gloriafood.

Thanks!

What language did you use for your integration? The GraphQL back end is written in C# and decimals use commas for thousands separator and period for decimal separator. 17,6 as an input in C# means two integers: 17 and 6.

Thanks for your response.
I used Sambain, the utility provided by Samba team. I haven’t developed the integration. This is a snippet from the log file of Sambain.
The result of the calculation after applying the discount is “17.6”. But it seemed like the request is writing it with a coma instead of a dot and without brackets.

Ahh, okay, this is the official integration. I assumed by the wording in your OP that you rolled your own. Unfortunately, I can’t help.

I would send a support ticket into support@sambapos.com.

I will do that, thanks!

As suggested by Mehmet from the amazing support team, I changed the local settings in Windows. I set decimals to “.” instead of “,” and it worked.

Thank you!

1 Like