From 8d8fdce519bedd0195f2eb6dc8c6400d850fd0b3 Mon Sep 17 00:00:00 2001 From: kavore <161734431+kavore@users.noreply.github.com> Date: Sat, 17 Jan 2026 21:10:46 +0300 Subject: [PATCH] bugfix --- bot/services/nalogo_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/services/nalogo_service.py b/bot/services/nalogo_service.py index 9f7c116..c9438eb 100644 --- a/bot/services/nalogo_service.py +++ b/bot/services/nalogo_service.py @@ -61,10 +61,12 @@ class NalogoService: return None try: + # API expects quantity as integer when it's a whole number + qty = int(quantity) if float(quantity).is_integer() else Decimal(str(quantity)) service_item = IncomeServiceItem( name=item_name, amount=Decimal(str(amount)), - quantity=Decimal(str(quantity)), + quantity=qty, ) total_amount = service_item.get_total_amount() request = IncomeRequest(