Wups, Sligro is excl. VAT

This commit is contained in:
polyfloyd 2024-01-22 21:17:17 +01:00
parent 2c47ab3a0d
commit 56c724e8d0

View file

@ -9,6 +9,9 @@ import subprocess
import logging import logging
vat = Decimal('1.09')
class Product: class Product:
def __init__(self, *, name, price, gtin, units, aliases=[]): def __init__(self, *, name, price, gtin, units, aliases=[]):
self.name = name self.name = name
@ -128,7 +131,7 @@ def sligro_get_by_gtin(gtin13):
return Product( return Product(
name=f'{product["brandName"]} {product["name"]} ({volume})', name=f'{product["brandName"]} {product["name"]} ({volume})',
price=Decimal(price_obj['value']), price=Decimal(price_obj['value']) * vat,
gtin=gtin13, gtin=gtin13,
units=units, units=units,
aliases=[sub_gtin] if sub_gtin else [], aliases=[sub_gtin] if sub_gtin else [],