Thanks Sigrid,
Looking further into the requirements, there are a couple of criteria that needs to be met:
- Has the amount ordered = to the amount received (ordered and received equals); and
- Has the amount that has been received been invoiced;
- Not sure if this impacts the payment, but has the invoice been paid.
If all the above, then provide that list. We would then run a transaction to flag them as complete
The reason i was getting the duplicates is that i linked to the requisition table but the ekpo table already had that information.
thanks,
Frank
------------------------------
Frank Simms | Controller
Equinox Gold Corp | 9289193752
------------------------------
Original Message:
Sent: 08-11-2021 15:28
From: Sigrid Kok
Subject: Purchase orders - items not yet delivered
Please look at the schedule lines, Frank. It's likely the delivery is split, thus one row for each.

FYI
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
------------------------------
Original Message:
Sent: 08-11-2021 15:21
From: Frank Simms
Subject: Purchase orders - items not yet delivered
Thanks Sigrid,
The query works. I now have to figure out why it is returning one row on the PO multiple times.
thanks,
Frank
------------------------------
Frank Simms | Controller
Equinox Gold Corp | 9289193752
Original Message:
Sent: 08-11-2021 11:10
From: Sigrid Kok
Subject: Purchase orders - items not yet delivered
Hi Frank,
Take a look at the attached. It's EKPO (line items), EKET (schedule lines) and EBAN with a left outer join, because in our system, we almost never have a PR prior to a PO created (it's a demo system).
Depending on what you need, you might also include EKBE (PO history), but it's not in this example.
HTH,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA