select
DCK_CODE AS RECEIPTCODE,
DCK_ORG AS RECEIPTORGANIZATION,
DCK_SUPPLIER AS SUPPLIERCODE,
DCK_DOCKID AS STORECODE,
DCK_REFERENCE AS REFERENCENUMBER,
DCK_DESC AS RECEIPTDESCRIPTION,
DCK_ORDER AS PURCHASEORDERCODE,
DCK_CLASS AS CLASSCODE,
DCK_RECVDATE AS DATERECEIVED,
DCK_RECEIVER AS RECEIVEDBY,
DCK_SHIPVIA AS SHIPVIA,
DCK_STATUS AS PORECEIPTSTATUSDESCRIPTION
FROM r5dockreceipts where DCK_RSTATUS<>'A' AND DCK_RSTATUS <>'C'
