forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathestimate.py
More file actions
69 lines (61 loc) · 2.05 KB
/
estimate.py
File metadata and controls
69 lines (61 loc) · 2.05 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from six import python_2_unicode_compatible
from .base import QuickbooksBaseObject, CustomField, Ref, CustomerMemo, Address, EmailAddress, QuickbooksManagedObject, \
LinkedTxnMixin, QuickbooksTransactionEntity, LinkedTxn
from .tax import TxnTaxDetail
from .detailline import DetailLine
@python_2_unicode_compatible
class Estimate(QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
"""
QBO definition: The Estimate represents a proposal for a financial transaction from a business to a customer
for goods or services proposed to be sold, including proposed pricing.
"""
class_dict = {
"BillAddr": Address,
"ShipAddr": Address,
"CustomerRef": Ref,
"TxnTaxDetail": TxnTaxDetail,
"CustomerMemo": CustomerMemo,
"BillEmail": EmailAddress,
"DepartmentRef": Ref,
"CurrencyRef": Ref,
"ClassRef": Ref,
"SalesTermRef": Ref,
"ShipMethodRef": Ref,
}
list_dict = {
"CustomField": CustomField,
"LinkedTxn": LinkedTxn,
"Line": DetailLine,
}
qbo_object_name = "Estimate"
def __init__(self):
super(Estimate, self).__init__()
self.DocNumber = ""
self.TxnDate = ""
self.TxnStatus = ""
self.PrivateNote = ""
self.TotalAmt = 0
self.ExchangeRate = 1
self.ApplyTaxAfterDiscount = False
self.PrintStatus = "NotSet"
self.EmailStatus = "NotSet"
self.DueDate = ""
self.ShipDate = ""
self.ExpirationDate = ""
self.AcceptedBy = ""
self.AcceptedDate = ""
self.GlobalTaxCalculation = "TaxExcluded"
self.BillAddr = None
self.ShipAddr = None
self.BillEmail = None
self.CustomerRef = None
self.TxnTaxDetail = None
self.CustomerMemo = None
self.ClassRef = None
self.SalesTermRef = None
self.ShipMethodRef = None
self.CustomField = []
self.LinkedTxn = []
self.Line = []
def __str__(self):
return str(self.TotalAmt)