简体   繁体   中英

Vendor Bill vs Vendor Credit / Ipp C#

Is there a way using the IPP (in c#) to differentiate between a Bill and a Vendor Credit? right now when I iterate through all the lines on a Bill Payment (A Check in this case) to show what bills are being paid Vendor Credits show up but they do not look any different from a bill (Amounts are positive, there is no Bill type etc).

Intuit.Ipp.Data.Qbo.BillPaymentQuery qbBillPaymentQuery = new BillPaymentQuery();
        qbBillPaymentQuery.DocNumber = "143766";
        List<Intuit.Ipp.Data.Qbo.BillPayment> qboBP = qbBillPaymentQuery.ExecuteQuery<Intuit.Ipp.Data.Qbo.BillPayment>(context).ToList<Intuit.Ipp.Data.Qbo.BillPayment>();

        foreach (BillPayment b in qboBP)
        {
            Response.Write("Bill Payment Amount: " + b.Header.TotalAmt + "<BR>");

            foreach (BillPaymentLine x in b.Line)
            {
                Intuit.Ipp.Data.Qbo.BillQuery qbBillQuery = new BillQuery();
                qbBillQuery.ResultsPerPage = 1;
                //qbBillQuery.PageNumber = 1;

                qbBillQuery.TxnId = x.TxnId;
                //qbBillQuery.SpecifyOperatorOption(FilterProperty.DocNumber, FilterOperatorType.EQUALS);


                 DataServices dataServices = new DataServices(context);
                 Bill b2 = new Bill();
                 b2.Id = x.TxnId;
                 Bill b3 = dataServices.FindById(b2);

                 Response.Write(b3.Header.DocNumber + " - " + x.Amount + "<BR>");




            }
        }

In QBO, VendorCredit is not fully supported for production use. It is available as part of a beta release. Ref Doc - https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0400_quickbooks_online/0500_supported_entities_and_operations

You are right. I was able to replicate your issue. The vendor credit objects are also retrieved as bill objects, which should not be happening.

See sample xml, the first one is a bill, last 3 lines are credit memo. There is really no differentiation between them. Also, the vendor credit amounts are incorrect for me 付款响应XML

公司档案帐单支付

However, this is currently in beta stage for Vendor credits and cannot report this issue until they are production.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM