Jerry Welliver
Jerry Welliver

Reputation: 377

Add bill to QuickBooks with QBFC

I am using QBFC to add invoices and bills to QB from my C# app. I have it successfully creating invoices, but I am having trouble creating bills.

I have updated this question to remove most of the code. I have been removing pieces of the message to determine the issue and it turns out I am getting the error from the VendorAddress attribute. The attribute comes up in intellisense, but generates the error when sent to QuickBooks. Is there no way to override the vendor address?

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="6.0"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError">
        <BillAddRq requestID = "0">
            <BillAdd>
                <VendorRef>
                    <FullName>SENECA</FullName>
                </VendorRef>

                <VendorAddress>
                    <Addr1>SENECA SAWMILL CO.</Addr1>
                    <Addr2>UNIT 136</Addr2>
                    <Addr3>PO BOX 5037</Addr3>
                    <Addr4/>
                    <City>PORTLAND</City>
                    <State>OR</State>
                    <PostalCode>97208-5037</PostalCode>
                    <Country>US</Country>
                </VendorAddress>

                <TxnDate>2018-07-12</TxnDate>
                <DueDate>2018-07-22</DueDate>
                <RefNumber>12345</RefNumber>
                <TermsRef>
                    <FullName>1.0% 20 DAYS</FullName>
                </TermsRef>
                <ItemLineAdd>
                    <ItemRef>
                        <FullName>1248SK</FullName>
                    </ItemRef>
                    <Desc>94080 BF @ $410 per MBF
STUD GRADE FIR S4S ALS KD GM 2x4x8</Desc>
                    <Quantity>17640</Quantity>
                    <Cost>2.1867</Cost>
                    <Amount>38572.86</Amount>
                </ItemLineAdd>
                <ItemLineAdd>
                    <ItemRef>
                        <FullName>124PCSK</FullName>
                    </ItemRef>
                    <Desc>18816 BF @ $400 per MBF
STUD GRADE FIR S4S ALS KD GM 2x4x7&apos; 8 5/8</Desc>
                    <Quantity>3528</Quantity>
                    <Cost>2.1333</Cost>
                    <Amount>7526.39</Amount>
                </ItemLineAdd>
            </BillAdd>
        </BillAddRq>
    </QBXMLMsgsRq>
</QBXML>

Upvotes: 1

Views: 840

Answers (3)

jjthebig1
jjthebig1

Reputation: 638

If you're using QBFC, then you can specify the version when creating the message set request

 IMsgSetRequest rqMsgSet = qbSsnMgr.CreateMsgSetRequest("US", 13, 0);

Upvotes: 0

Keith Palmer Jr.
Keith Palmer Jr.

Reputation: 27952

The QuickBooks desktop API is versioned, and the versioning is controlled by this line in your example:

<?qbxml version="6.0"?>

You're using version 6.0 of qbXML, and if you refer to the QuickBooks OSR:

You'll see that the VendorAddress component isn't supported until 13.0:

enter image description here

You need to either not include this tag, or change the qbXML version you're using (or potentially do both, if you want to cater to QuickBooks versions that support this qbXML version AND QuickBooks versions that do not support this qbXML version).

Upvotes: 1

ARr0w
ARr0w

Reputation: 1731

try changing the version number and try again. Let's see if your Quickbook APP desktop version is compatible to it or not.

Example :

<?qbxml version="13.0"?>

Upvotes: 0

Related Questions