#sql("queryRealAsn")

    SELECT
        c.qcqty_completed AS backQty, c.userdefine5 AS backStatus,
        d.lotatt06 AS registerNo, d.lotatt01 AS productionDate,d.lotatt02 AS expiryDate
    FROM doc_pa_details a
    LEFT JOIN doc_qc_header b ON a.PANO = b.pano
    LEFT JOIN doc_qc_details c ON b.qcno = c.qcno AND c.palineno = a.PALINENO
    LEFT JOIN inv_lot_att d ON d.lotnum = c.lotnum
    WHERE a.ASNNO = #para(asnno) AND a.ASNLINENO = #para(asnlineno) AND a.LINESTATUS = '40'

#end


