Linking purchase order and purchase invoice

How do I find a common column linked between purchase order and purchase invoice? Please help

Please elaborate the query. What do you mean by common column?

I want to calculate the difference between purchase order amount and purchase invoice amount. I am not able to fetch the purchase invoice amount i.e. “pi.grand_total” and hence also not able to fetch the difference of “(pi.grand_total - po.grand_total)” . Please help.Below is my query. PO = Purchase Order PI = Purchase Invoice. I am not even getting any error.Don’t know what’s wrong. Please help

 SELECT DISTINCT AS "PO #:Link/Purchase Order:120",
    po.supplier AS "Supplier:Link/Supplier:120",
    po.Company AS "Company:Data:120",
    po.currency AS "Currency:Link/Currency:120",
    po.base_grand_total AS "Grand Total:Currency:120",
    po.status AS "Status:Data:120",
    po.per_received AS "Per Received:Data:120",
    CEILING(po.per_billed) AS "Per Billed:Data:120",
    po.delivery_date AS "Delivery Date:Date:120",
    pi.grand_total AS "Final PI Total:120",
    (pi.grand_total - po.grand_total) AS "Amount Difference:120"
    "tabPurchase Order" as po
    LEFT JOIN "tabPurchase Invoice" as pi ON = pi.parent

    po.per_received = 100
    CEILING(po.per_billed) < 100
    ORDER BY po.delivery_date ASC

@michelle can you please help me ?