Models

class shopkit.vat.simple.models.VATItemBase(*args, **kwargs)

Bases: shopkit.core.basemodels.AbstractPricedItemBase

This item extends any priced item (subclasses of AbstractPricedItemBase) with functions that yield the prices with and without VAT. In doing this, it might be imported in what order the base classes for the VAT’ed item are listed. Feedback about this is welcomed.

..todo::
Write unittests for this piece of code.
get_price(with_vat=True, **kwargs)

If with_vat=False, simply returns the original price. Otherwise it takes the result of get_vat() and adds it to the original price.

get_price_with_vat(**kwargs)

Gets the price including VAT. This is a wrapper function around get_price as to allow for specific prices to be queried from within templates.

get_price_without_vat(**kwargs)

Gets the price excluding VAT. This is a wrapper function around get_price as to allow for specific prices to be queried from within templates.

get_vat(**kwargs)

Gets the amount of VAT for the current item.