forked from routablehq/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvendorcredit.py
More file actions
50 lines (40 loc) · 1.48 KB
/
vendorcredit.py
File metadata and controls
50 lines (40 loc) · 1.48 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
from six import python_2_unicode_compatible
from .base import Ref, QuickbooksManagedObject, QuickbooksTransactionEntity, \
LinkedTxnMixin
from .detailline import DetailLine, AccountBasedExpenseLine, ItemBasedExpenseLine, TDSLine
from ..mixins import DeleteMixin
@python_2_unicode_compatible
class VendorCredit(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin):
"""
QBO definition: The Vendor Credit entity is an accounts payable transaction that represents a refund or credit
of payment for goods or services. It is a credit that a vendor owes you for various reasons such as overpaid
bill, returned merchandise, or other reasons.
"""
class_dict = {
"VendorRef": Ref,
"APAccountRef": Ref,
"DepartmentRef": Ref,
"CurrencyRef": Ref,
}
list_dict = {
"Line": DetailLine
}
detail_dict = {
"AccountBasedExpenseLineDetail": AccountBasedExpenseLine,
"ItemBasedExpenseLineDetail": ItemBasedExpenseLine,
"TDSLineDetail": TDSLine,
}
qbo_object_name = "VendorCredit"
def __init__(self):
super(VendorCredit, self).__init__()
self.DocNumber = ""
self.TxnDate = ""
self.PrivateNote = ""
self.TotalAmt = 0
self.ExchangeRate = 1
self.GlobalTaxCalculation = "TaxExcluded"
self.FromAccountRef = None
self.ToAccountRef = None
self.Line = []
def __str__(self):
return str(self.TotalAmt)