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
83 lines (74 loc) · 2.54 KB
/
estimate.py
File metadata and controls
83 lines (74 loc) · 2.54 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
from six import python_2_unicode_compatible
from .base import CustomField, Ref, CustomerMemo, Address, EmailAddress, QuickbooksManagedObject, \
LinkedTxnMixin, QuickbooksTransactionEntity, LinkedTxn
from .tax import TxnTaxDetail
from .detailline import DetailLine, SalesItemLine, GroupLine, DescriptionLine, DiscountLine, SubtotalLine
from ..mixins import QuickbooksPdfDownloadable, DeleteMixin, SendMixin
@python_2_unicode_compatible
class Estimate(DeleteMixin,
QuickbooksPdfDownloadable,
QuickbooksManagedObject,
QuickbooksTransactionEntity,
LinkedTxnMixin,
SendMixin):
"""
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,
}
detail_dict = {
"SalesItemLineDetail": SalesItemLine,
"GroupLineDetail": GroupLine,
"DescriptionOnly": DescriptionLine,
"DiscountLineDetail": DiscountLine,
"SubTotalLineDetail": SubtotalLine,
}
qbo_object_name = "Estimate"
def __init__(self):
super(Estimate, self).__init__()
self.DocNumber = None
self.TxnDate = None
self.TxnStatus = None
self.PrivateNote = None
self.TotalAmt = 0
self.ExchangeRate = 1
self.ApplyTaxAfterDiscount = False
self.PrintStatus = "NotSet"
self.EmailStatus = "NotSet"
self.DueDate = None
self.ShipDate = None
self.ExpirationDate = None
self.AcceptedBy = None
self.AcceptedDate = None
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)