forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtax.py
More file actions
53 lines (40 loc) · 1.14 KB
/
tax.py
File metadata and controls
53 lines (40 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from six import python_2_unicode_compatible
from .base import QuickbooksBaseObject, Ref, QuickbooksManagedObject
@python_2_unicode_compatible
class TaxLineDetail(QuickbooksBaseObject):
class_dict = {
"TaxRateRef": Ref
}
def __init__(self):
super(TaxLineDetail, self).__init__()
self.PercentBased = True
self.TaxPercent = 0
self.NetAmountTaxable = 0
def __str__(self):
return str(self.TaxPercent)
@python_2_unicode_compatible
class TaxLine(QuickbooksBaseObject):
class_dict = {
"TaxLineDetail": TaxLineDetail
}
def __init__(self):
super(TaxLine, self).__init__()
self.Amount = 0
self.DetailType = ""
def __str__(self):
return str(self.Amount)
@python_2_unicode_compatible
class TxnTaxDetail(QuickbooksBaseObject):
class_dict = {
"TxnTaxCodeRef": Ref,
}
list_dict = {
"TaxLine": TaxLine
}
def __init__(self):
super(TxnTaxDetail, self).__init__()
self.TotalTax = 0
self.TxnTaxCodeRef = None
self.TaxLine = []
def __str__(self):
return str(self.TotalTax)