Productive Computing, Inc. Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Pages: [1]   Go Down

Author Topic: Query open invoice for specific Customer  (Read 423 times)

Scott Toland

  • Member
  • *
  • Posts: 21
Query open invoice for specific Customer
« on: March 30, 2017, 05:41:10 PM »

I am trying to find only open invoices in QBOnline for a specific customer, I can find all invoices for a specific customer, but how do I return only open invoices?

PCQO_RqNew("Query", "Invoice)
PCQO_ReqAddFieldWithValue("CustomerRef"; Customer ID Field)
PCQO_Execute

This finds all for a customer, What do I add to just find open ones?

Thanks,

Scott
Logged

Jeff Henry

  • Administrator
  • Member
  • *****
  • Posts: 4
Re: Query open invoice for specific Customer
« Reply #1 on: March 31, 2017, 12:48:33 PM »

Hi Scott,

Since there doesn't appear to be a status field in the XML response for an Invoice, you may need to use:

PCQO_RqNew ( "Query" ; "Invoice" )
PCQO_RqAddFieldWithValue ( "CustomerRef" ; Customer ID Field )
PCQO_RqAddFieldWithValue ( "QueryString" ; "SELECT * FROM Invoice WHERE Balance > '0' " )
PCQO_RqExecute

This uses a SQL-style query to perform comparisons of field values instead of strictly matching values.

Let me know if this helps.

- Jeff

Logged

Scott Toland

  • Member
  • *
  • Posts: 21
Re: Query open invoice for specific Customer
« Reply #2 on: March 31, 2017, 02:29:26 PM »

Jeff,

Thanks for the info.  I just didn't know how to do that.

I will give that a shot.

Thanks again.

Scott
Logged

Scott Toland

  • Member
  • *
  • Posts: 21
Re: Query open invoice for specific Customer
« Reply #3 on: April 03, 2017, 03:24:10 PM »

Is it possible to make a payment to a specific Invoice# (Not TxnID).  I suppose I could do a query for that invoice# and grab the TxnID and then submit it using that TxnID, but it would be easier to just make the  payment to the Invoice# (document Number).

Thanks for you help!

Scott
Logged
Pages: [1]   Go Up