forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsalesreceipt.py
More file actions
75 lines (67 loc) · 2.42 KB
/
salesreceipt.py
File metadata and controls
75 lines (67 loc) · 2.42 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
from six import python_2_unicode_compatible
from .base import QuickbooksBaseObject, Ref, CustomField, QuickbooksManagedObject, LinkedTxnMixin, Address, \
EmailAddress, QuickbooksTransactionEntity, LinkedTxn
from .tax import TxnTaxDetail
from .detailline import DetailLine
@python_2_unicode_compatible
class SalesReceipt(QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
"""
QBO definition: SalesReceipt represents the sales receipt that is given to a customer. A sales receipt is
similar to an invoice. However, for a sales receipt, payment is received as part of the sale of goods and
services. The sales receipt specifies a deposit account where the customer deposits the payment. If the
deposit account is not specified, the payment type is classified as Undeposited Account.
"""
class_dict = {
"DepartmentRef": Ref,
"CurrencyRef": Ref,
"TxnTaxDetail": TxnTaxDetail,
"DepositToAccountRef": Ref,
"CustomerRef": Ref,
"BillAddr": Address,
"ShipAddr": Address,
"ClassRef": Ref,
"BillEmail": EmailAddress,
"PaymentMethodRef": Ref,
"ShipMethodRef": Ref,
}
list_dict = {
"CustomField": CustomField,
"Line": DetailLine,
"LinkedTxn": LinkedTxn
}
qbo_object_name = "SalesReceipt"
def __init__(self):
super(SalesReceipt, self).__init__()
self.DocNumber = ""
self.TxnDate = ""
self.PrivateNote = ""
self.CustomerMemo = ""
self.ShipDate = ""
self.TrackingNum = ""
self.TotalAmt = 0
self.PrintStatus = "NotSet"
self.EmailStatus = "NotSet"
self.DeliveryInfo = ""
self.Balance = 0
self.PaymentRefNum = ""
self.CreditCardPayment = ""
self.TxnSource = ""
self.ApplyTaxAfterDiscount = False
self.ExchangeRate = 1
self.GlobalTaxCalculation = "TaxExcluded"
self.DepartmentRef = None
self.CurrencyRef = None
self.TxnTaxDetail = None
self.DepositToAccountRef = None
self.BillAddr = None
self.ShipAddr = None
self.ShipMethodRef = None
self.BillEmail = None
self.CustomerRef = None
self.ClassRef = None
self.PaymentMethodRef = None
self.CustomField = []
self.Line = []
self.LinkedTxn = []
def __str__(self):
return str(self.TotalAmt)