tapzhou
28th September 2004, 12:58
Hi all

I am doing a report to pick outstanding purchase orders (without any receipt numbers entered). I have selected the following

tdpur045.orno ,T$suno,T$item,T$price, T$reno and T$odat from tdpur040.

tdpur045.orno=tdpur040.orno and
tdpur045.T$reno=0

This gives me everything including orders that have been received. I guess each order has two lines one with T$reno=0 and another one where T$reno=xxx where xxxx when order has been received?
How do I pick out only those orders strictly without receipts?

Thanks in avdance for your assistance.


Regards
Tapiwa

mark_h
28th September 2004, 15:44
We use something like this in our queries for open purchase orders:


and ((tdpur041.oqua > tdpur041.dqua)
or (tdpur041.bqua > 0))


If you want to find those that have nothing received then just use tdpur041.dqua = 0. You really do not need tdpur045 unless you want to actually check receipts.

Mark

avpatil
30th September 2004, 14:21
Mark,
In your logic if a PO is short shipped then won't it will still show open as you have or condition.
We use following logic
(tdpur041.oqua <> 0
and (tdpur041.bqua <> 0
or(tdpur041.dqua = 0 and tdpur041.bqua = 0)
)


Arvind

mark_h
30th September 2004, 15:25
Yes - it will still show as open. Our buyers and finance personnel always want to know what is still open and needs to be received. They monitor these open orders and track this type of information. In our business we do not pay a vendor until a PO/line is fully received.

Mark