How do I get every AP reserve invoice for a purchase order using the SQL version of SAP Business One?
My current query:
SELECT
OPOR.CardCode,
OPOR.CardName,
OPOR.U_ReferenceNo,
OPOR.NumAtCard,
OPOR.DocNum,
OPOR.U_ShipmentTime,
OPOR.U_DealType,
OPOR.DocDate,
OPOR.U_Origin,
OPOR.U_DealQuantity,
OPOR.U_ContainerNo,
POR1.ItemCode,
POR1.Dscription,
POR1.Price,
por1.U_CopperRate,
POR1.U_AluminiumRate,
POR1.U_IronRate,
POR1.U_CopperPer,
por1.U_AluminiumPer,
POR1.U_LeadPer,
POR1.U_IronPer,
POR1.U_PlasticPer
FROM
OPOR
INNER JOIN POR1 ON OPOR.DocEntry = POR1.DocEntry
WHERE
OPOR.DocStatus = 'o'