Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions quickbooks/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ def handle_exceptions(self, results):
message = error["Message"]

detail = ""
if "Detail" in error:
if "Detail" in error and error["Detail"] != 'null':
detail = error["Detail"]

code = ""
if "code" in error:
code = 0
if "code" in error and error["code"] != 'null':
code = int(error["code"])

if code >= 10000:
Expand Down
2 changes: 1 addition & 1 deletion quickbooks/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def from_json(cls, json_data):
sub_list.append(sub_obj)

setattr(obj, key, sub_list)
else:
elif key in vars(obj):
setattr(obj, key, json_data[key])

return obj
Expand Down
2 changes: 1 addition & 1 deletion quickbooks/objects/detailline.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class ItemBasedExpenseLineDetail(QuickbooksBaseObject):

def __init__(self):
super(ItemBasedExpenseLineDetail, self).__init__()
self.BillableStatus = ""
self.BillableStatus = None
self.UnitPrice = 0
self.TaxInclusiveAmt = 0
self.Qty = 0
Expand Down
1 change: 1 addition & 0 deletions quickbooks/objects/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(self):
self.AllowIPNPayment = True
self.DocNumber = ""
self.PrivateNote = ""
self.TxnDate = ""
self.DueDate = ""
self.ShipDate = ""
self.TrackingNum = ""
Expand Down
4 changes: 2 additions & 2 deletions quickbooks/objects/salesreceipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .base import Ref, CustomField, QuickbooksManagedObject, LinkedTxnMixin, Address, \
EmailAddress, QuickbooksTransactionEntity, LinkedTxn
from .tax import TxnTaxDetail
from .detailline import DetailLine
from .detailline import DetailLine, SalesItemLine
from ..mixins import QuickbooksPdfDownloadable, DeleteMixin


Expand Down Expand Up @@ -37,7 +37,7 @@ class SalesReceipt(DeleteMixin, QuickbooksPdfDownloadable, QuickbooksManagedObje
}

detail_dict = {

"SalesItemLineDetail": SalesItemLine
}

qbo_object_name = "SalesReceipt"
Expand Down