



MATCH (incominginvoice:/erp_demo/incominginvoice)-[:incominginvoice_purchaseorder*1..1]->(purchaseorder:/erp_demo/purchaseorder  where oid = '1167141'), 
(incominginvoice)-[:incominginvoice_materialdocument*1..1]->(materialdocument:/erp_demo/materialdocument) 
RETURN purchaseorder.oid AS "po_oid", purchaseorder.documentnumber AS "po_documentnumber", purchaseorder.documentdate AS "po_documentdate", materialdocument.oid AS "md_oid", materialdocument.documentnumber AS "md_documentnumber", materialdocument.postingdate AS "md_postingdate"
/**
output()
**/
;

SELECT temp01.po_oid AS "采购订单ID", temp01.po_documentnumber AS "采购订单编号", temp01.po_documentdate AS "采购订单凭证日期", temp01.md_oid AS "物料凭证ID", temp01.md_documentnumber AS "物料凭证编号", temp01.md_postingdate AS "物料凭证过账日期" FROM (
    MATCH (incominginvoice:/erp_demo/incominginvoice)-[:incominginvoice_purchaseorder*1..1]->(purchaseorder:/erp_demo/purchaseorder  where oid = '1167141'), (incominginvoice)-[:incominginvoice_materialdocument*1..1]->(materialdocument:/erp_demo/materialdocument) RETURN purchaseorder.oid AS "po_oid", purchaseorder.documentnumber AS "po_documentnumber", purchaseorder.documentdate AS "po_documentdate", materialdocument.oid AS "md_oid", materialdocument.documentnumber AS "md_documentnumber", materialdocument.postingdate AS "md_postingdate"
) temp01 LIMIT 0, 500000 WITH TIMEOUT = 6m
/**
output()
**/
;

SELECT documentdate from /erp_demo/purchaseorder where oid = '1167141'
/**
output()
**/
;
