ej2 / python-quickbooks

A Python library for accessing the Quickbooks API.
MIT License
394 stars 193 forks source link

ShipMethodRef not initialized in Invoice class #320

Closed xqtive closed 10 months ago

xqtive commented 11 months ago

` class Invoice(DeleteMixin, QuickbooksPdfDownloadable, QuickbooksManagedObject, QuickbooksTransactionEntity, LinkedTxnMixin, SendMixin, VoidMixin): """ QBO definition: An Invoice represents a sales form where the customer pays for a product or service later.

"""

    class_dict = {
        "DepartmentRef": Ref,
        "CurrencyRef": Ref,
        "CustomerRef": Ref,
        "ClassRef": Ref,
        "SalesTermRef": Ref,
        "ShipMethodRef": Ref,
        "DepositToAccountRef": Ref,
        "BillAddr": Address,
        "ShipAddr": Address,
        "TxnTaxDetail": TxnTaxDetail,
        "BillEmail": EmailAddress,
        "BillEmailCc": EmailAddress,
        "BillEmailBcc": EmailAddress,
        "CustomerMemo": CustomerMemo,
        "DeliveryInfo": DeliveryInfo,
        "RecurDataRef": Ref,
        "TaxExemptionRef": Ref,
        "MetaData": MetaData
    }

    list_dict = {
        "CustomField": CustomField,
        "Line": DetailLine,
        "LinkedTxn": LinkedTxn,
    }

    detail_dict = {
        "SalesItemLineDetail": SalesItemLine,
        "SubTotalLineDetail": SubtotalLine,
        "DiscountLineDetail": DiscountLine,
        "DescriptionOnly": DescriptionOnlyLine,
        "GroupLineDetail": GroupLine
    }

    qbo_object_name = "Invoice"

    def __init__(self):
        super(Invoice, self).__init__()
        self.Deposit = 0
        self.Balance = 0
        self.AllowIPNPayment = True
        self.AllowOnlineCreditCardPayment = False
        self.AllowOnlineACHPayment = False
        self.DocNumber = None

        self.PrivateNote = ""
        self.DueDate = ""
        self.ShipDate = ""
        self.TrackingNum = ""
        self.TotalAmt = ""
        self.TxnDate = ""
        self.ApplyTaxAfterDiscount = False
        self.PrintStatus = "NotSet"
        self.EmailStatus = "NotSet"
        self.ExchangeRate = 1
        self.GlobalTaxCalculation = "TaxExcluded"
        self.InvoiceLink = ""
        self.HomeBalance = 0
        self.HomeTotalAmt = 0
        self.FreeFormAddress = False

        self.EInvoiceStatus = None

        self.BillAddr = None
        self.ShipAddr = None
        self.BillEmail = None
        self.BillEmailCc = None
        self.BillEmailBcc = None
        self.CustomerRef = None
        self.CurrencyRef = None
        self.CustomerMemo = None
        self.DepartmentRef = None
        self.TxnTaxDetail = None
        self.DeliveryInfo = None
        self.RecurDataRef = None
        self.TaxExemptionRef = None
        self.MetaData = None

        self.CustomField = []
        self.Line = []
        self.LinkedTxn = []

`

ej2 commented 10 months ago

Fixed in 0.9.5