Apply country specific VAT rates for Generic Products
This commit is contained in:
parent
e0b2a0b6e2
commit
44a20a5029
3 changed files with 22 additions and 6 deletions
|
|
@ -82,9 +82,10 @@ class GenericProduct(AssignPermissionsMixin, models.Model):
|
|||
def __str__(self):
|
||||
return self.product_name
|
||||
|
||||
def get_actual_price(self):
|
||||
def get_actual_price(self, vat_rate=None):
|
||||
VAT = vat_rate if vat_rate is not None else self.product_vat
|
||||
return round(
|
||||
self.product_price + (self.product_price * self.product_vat), 2
|
||||
self.product_price + (self.product_price * VAT), 2
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue