1- from base import QuickbooksBaseObject , Ref , CustomField , QuickbooksManagedObject , LinkedTxnMixin
1+ from base import QuickbooksBaseObject , Ref , CustomField , QuickbooksManagedObject , LinkedTxnMixin , Address , \
2+ EmailAddress , QuickbooksTransactionEntity , LinkedTxn
23from tax import TxnTaxDetail
4+ from detailline import DetailLine
35
46
5- class SalesItemLineDetail (QuickbooksBaseObject ):
6- class_dict = {
7- "ItemRef" : Ref ,
8- "TaxCodeRef" : Ref
9- }
10-
11- def __init__ (self ):
12- super (SalesItemLineDetail , self ).__init__ ()
13- self .UnitPrice = 0
14- self .Qty = 0
15- self .ItemRef = None
16- self .TaxCodeRef = None
17-
18- def __unicode__ (self ):
19- return str (self .UnitPrice )
20-
21-
22- class SalesReceiptLine (QuickbooksBaseObject ):
23- class_dict = {
24- "SalesItemLineDetail" : SalesItemLineDetail
25- }
26-
27- def __init__ (self ):
28- super (SalesReceiptLine , self ).__init__ ()
29- self .LineNum = ""
30- self .Description = ""
31- self .Amount = 0
32- self .DetailType = ""
33-
34- self .SalesItemLineDetail = None
35-
36- def __unicode__ (self ):
37- return str (self .Amount )
38-
39-
40- class SalesReceipt (QuickbooksManagedObject , LinkedTxnMixin ):
7+ class SalesReceipt (QuickbooksManagedObject , QuickbooksTransactionEntity , LinkedTxnMixin ):
418 """
429 QBO definition: SalesReceipt represents the sales receipt that is given to a customer. A sales receipt is
4310 similar to an invoice. However, for a sales receipt, payment is received as part of the sale of goods and
@@ -50,33 +17,57 @@ class SalesReceipt(QuickbooksManagedObject, LinkedTxnMixin):
5017 "TxnTaxDetail" : TxnTaxDetail ,
5118 "DepositToAccountRef" : Ref ,
5219 "CustomerRef" : Ref ,
20+ "BillAddr" : Address ,
21+ "ShipAddr" : Address ,
22+ "ClassRef" : Ref ,
23+ "BillEmail" : EmailAddress ,
24+ "PaymentMethodRef" : Ref ,
25+ "ShipMethodRef" : Ref ,
5326 }
5427
5528 list_dict = {
5629 "CustomField" : CustomField ,
57- "Line" : SalesReceiptLine ,
30+ "Line" : DetailLine ,
31+ "LinkedTxn" : LinkedTxn
5832 }
5933
6034 qbo_object_name = "SalesReceipt"
6135
6236 def __init__ (self ):
6337 super (SalesReceipt , self ).__init__ ()
6438 self .DocNumber = ""
39+ self .TxnDate = ""
6540 self .PrivateNote = ""
41+ self .CustomerMemo = ""
42+ self .ShipDate = ""
43+ self .TrackingNum = ""
6644 self .TotalAmt = 0
6745 self .PrintStatus = "NotSet"
6846 self .EmailStatus = "NotSet"
47+ self .DeliveryInfo = ""
6948 self .Balance = 0
7049 self .PaymentRefNum = ""
50+ self .CreditCardPayment = ""
51+ self .TxnSource = ""
7152 self .ApplyTaxAfterDiscount = False
53+ self .ExchangeRate = 1
54+ self .GlobalTaxCalculation = "TaxExcluded"
7255
73- self .DepositToAccountRef = None
74- self .CurrencyRef = None
7556 self .DepartmentRef = None
76- self .CustomerRef = None
57+ self .CurrencyRef = None
7758 self .TxnTaxDetail = None
59+ self .DepositToAccountRef = None
60+ self .BillAddr = None
61+ self .ShipAddr = None
62+ self .ShipMethodRef = None
63+ self .BillEmail = None
64+ self .CustomerRef = None
65+ self .ClassRef = None
66+ self .PaymentMethodRef = None
67+
7868 self .CustomField = []
7969 self .Line = []
70+ self .LinkedTxn = []
8071
8172 def __unicode__ (self ):
8273 return str (self .TotalAmt )
0 commit comments