FInal bank, stripe and paypal sandbox completed
This commit is contained in:
@@ -398,6 +398,20 @@ class Invoice(AccountBaseModel):
|
||||
def tax_amount(self):
|
||||
return self.tax
|
||||
|
||||
@property
|
||||
def tax_rate(self):
|
||||
"""Get tax rate from metadata if stored"""
|
||||
if self.metadata and 'tax_rate' in self.metadata:
|
||||
return self.metadata['tax_rate']
|
||||
return 0
|
||||
|
||||
@property
|
||||
def discount_amount(self):
|
||||
"""Get discount amount from metadata if stored"""
|
||||
if self.metadata and 'discount_amount' in self.metadata:
|
||||
return self.metadata['discount_amount']
|
||||
return 0
|
||||
|
||||
@property
|
||||
def total_amount(self):
|
||||
return self.total
|
||||
|
||||
Reference in New Issue
Block a user