0

I am trying to parse out a PURCHASE ORDER in QBFC 13. There are 2 line items, in this particular purchase order

One lineitem has an ItemReceipt against it. One lineitem does not.

There is a column to the right of the LineItem that has a column header with the abbreviation CLSD. I think a safe assumption is that this means CLOSED.

I am starting to string together quite a list of conditions involving ReceivedQuantity, Quantity, and UnbilledQuantity trying to figure out if a line is CLOSED.

I looked in the LinkedTxn collection and there is 1 item. But I am having a problem figuring out how to tie a LinkedTxn to a specific POLine. I can look for an ItemMatch, but thats not great, you can have items repeated.

There must be a more straightforward way? Anyone know how to tell if a line is closed? Or more specifically, if the column is marked.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
greg
  • 1,673
  • 1
  • 17
  • 30

1 Answers1

1

There's an easier way to do this without using a LinkedTxn collection. An IORPurchaseOrderRet has two fields for the order as a whole; IsManuallyClosed and IsFullyReceived. These two fields let you know about all the items on the PO.

Next, each IORPurchaseOrderLineRet has a ReceivedQuantity, UnbilledQuantity, IsBilled, and IsManuallyClosed fields. These will allow you to determine for each item what the status is.

You can view the details of these fields using the On Screen Reference: https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html

Also keep in mind that to get the lines for a PurchaseOrder query, you need to set IncluldeLineItems(true) on your query.

Hpjchobbes
  • 1,309
  • 1
  • 8
  • 11
  • i appreciate the comments, and if no one else answers, ill mark this, but I am already muddling w/ these fields as per my question. I am sort of hoping all these get rolled into one yes/no field that qbooks uses to mark that column or not. My hunch is that there is not such a field, but always hopeful... – greg May 09 '15 at 22:01
  • There's not just a yes or no as there's multiple 'states' a Purchase Order can be in; Open with nothing received, Open with partial received, Closed manually with nothing received, Closed manually and partially received, or Closed received in full. – Hpjchobbes May 11 '15 at 12:56