Tax free products enhancement

Issue #571 new
Former user created an issue

In the UK sales tax is called VAT (17.5% sales tax) and not all products/goods are VAT rated

Here is a solution that works for taxable and non taxable items

satchmo-tax-modules-percent CHANGE

def by_price(self,taxclass,price): if taxclass: percent = config_value('TAX', 'PERCENT') else: percent = 0 p=price *(percent/100) return p

satchmo contact models.py def recalculate

line 573
CHANGE itemprices.append(linetiem.unit_price_with_tax * lineitem.quantity)

comment out lines 594 taxProcessor = tax.get_processor(self) to line 607 incl log.debug("recalc: etc

ADD

    tax = 0
    for lineitem in self.orderitem_set.all():
        line_tax = lineitem.tax
        tax = tax + line_tax
    self.tax = tax

This then allows calculation of total and taxes of products with and without sales tax applied

Reported by MikeKJ

Comments (0)

  1. Log in to comment