X Tutup
Skip to content

Commit a09ca18

Browse files
committed
Fixed unicode methods and corresponding tests.
1 parent 1d72e5a commit a09ca18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+115
-113
lines changed

quickbooks/objects/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def __init__(self):
9999
self.TxnLineId = 0
100100

101101
def __unicode__(self):
102-
return self.TxnId
102+
return str(self.TxnId)
103103

104104

105105
class CustomerMemo(QuickbooksBaseObject):

quickbooks/objects/bill.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self):
3535
self.AccountBasedExpenseLineDetail = None
3636

3737
def __unicode__(self):
38-
return self.Amount
38+
return str(self.Amount)
3939

4040

4141
class Bill(QuickbooksManagedObject):
@@ -76,6 +76,6 @@ def __init__(self):
7676
self.Line = []
7777

7878
def __unicode__(self):
79-
return self.Balance
79+
return str(self.Balance)
8080

8181

quickbooks/objects/billpayment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self):
3030
self.LinkedTxn = []
3131

3232
def __unicode__(self):
33-
return self.Amount
33+
return str(self.Amount)
3434

3535

3636
class BillPayment(QuickbooksManagedObject):
@@ -70,4 +70,4 @@ def __init__(self):
7070
self.Line = []
7171

7272
def __unicode__(self):
73-
return self.TotalAmt
73+
return str(self.TotalAmt)

quickbooks/objects/budget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self):
1616
self.CustomerRef = None
1717

1818
def __unicode__(self):
19-
return self.Amount
19+
return str(self.Amount)
2020

2121

2222
class Budget(QuickbooksManagedObject):

quickbooks/objects/creditmemo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self):
1717
self.TaxCodeRef = None
1818

1919
def __unicode__(self):
20-
return self.UnitPrice
20+
return str(self.UnitPrice)
2121

2222

2323
class CreditMemoLine(QuickbooksBaseObject):
@@ -84,4 +84,4 @@ def __init__(self):
8484
self.Line = []
8585

8686
def __unicode__(self):
87-
return self.TotalAmt
87+
return str(self.TotalAmt)

quickbooks/objects/deposit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self):
1818
self.LinkedTxn = []
1919

2020
def __unicode__(self):
21-
return self.Amount
21+
return str(self.Amount)
2222

2323

2424
class Deposit(QuickbooksManagedObject):
@@ -50,4 +50,4 @@ def __init__(self):
5050
self.Line = []
5151

5252
def __unicode__(self):
53-
return self.TotalAmt
53+
return str(self.TotalAmt)

quickbooks/objects/estimate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self):
1313
self.Qty = 0
1414

1515
def __unicode__(self):
16-
return self.UnitPrice
16+
return str(self.UnitPrice)
1717

1818

1919
class EstimateLine(QuickbooksBaseObject):
@@ -30,7 +30,7 @@ def __init__(self):
3030
self.SalesItemLineDetail = None
3131

3232
def __unicode__(self):
33-
return self.Amount
33+
return str(self.Amount)
3434

3535

3636
class Estimate(QuickbooksManagedObject):
@@ -71,4 +71,4 @@ def __init__(self):
7171
self.CustomField = []
7272

7373
def __unicode__(self):
74-
return self.TotalAmt
74+
return str(self.TotalAmt)

quickbooks/objects/invoice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self):
1414
self.DiscountAccountRef = None
1515

1616
def __unicode__(self):
17-
return self.DiscountPercent
17+
return str(self.DiscountPercent)
1818

1919

2020
class SalesItemLineDetail(QuickbooksBaseObject):
@@ -29,7 +29,7 @@ def __init__(self):
2929
self.Qty = 0
3030

3131
def __unicode__(self):
32-
return self.UnitPrice
32+
return str(self.UnitPrice)
3333

3434

3535
class InvoiceDetail(QuickbooksBaseObject):
@@ -101,4 +101,4 @@ def __init__(self):
101101
self.CustomField = []
102102

103103
def __unicode__(self):
104-
return self.TotalAmt
104+
return str(self.TotalAmt)

quickbooks/objects/journalentry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self):
2828
self.DetailType = ""
2929

3030
def __unicode__(self):
31-
return self.Amount
31+
return str(self.Amount)
3232

3333

3434
class JournalEntry(QuickbooksManagedObject):
@@ -58,4 +58,4 @@ def __init__(self):
5858
self.TxnDate = ""
5959

6060
def __unicode__(self):
61-
return self.Adjustment
61+
return str(self.Adjustment)

quickbooks/objects/payment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ def __init__(self):
5656
self.Line = []
5757

5858
def __unicode__(self):
59-
return self.TotalAmt
59+
return str(self.TotalAmt)

0 commit comments

Comments
 (0)
X Tutup