src-db/database/model/views/FIN_PAYMENT_PROP_DETAIL_V.xml
changeset 6917 20af736f8ca9
parent 6912 38c773f35773
child 6920 d41e52c3f49a
equal deleted inserted replaced
6916:bbc68a0afe71 6917:20af736f8ca9
     1 <?xml version="1.0"?>
     1 <?xml version="1.0"?>
     2   <database name="VIEW FIN_PAYMENT_PROP_DETAIL_V">
     2   <database name="VIEW FIN_PAYMENT_PROP_DETAIL_V">
     3     <view name="FIN_PAYMENT_PROP_DETAIL_V"><![CDATA[SELECT ppd.fin_payment_prop_detail_id AS fin_payment_prop_detail_v_id, ppd.ad_client_id, ppd.ad_org_id, ppd.isactive, ppd.created, ppd.createdby, ppd.updated, ppd.updatedby, psd.fin_payment_scheduledetail_id, ppd.fin_payment_proposal_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.expected, pso.expected) AS expected, ppd.amount AS paidamt, COALESCE(p.c_bpartner_id, i.c_bpartner_id, o.c_bpartner_id) AS c_bpartner_id, ppd.writeoffamt
     3     <view name="FIN_PAYMENT_PROP_DETAIL_V"><![CDATA[SELECT ppd.fin_payment_prop_detail_id AS fin_payment_prop_detail_v_id, ppd.ad_client_id, ppd.ad_org_id, ppd.isactive, ppd.created, ppd.createdby, ppd.updated, ppd.updatedby, psd.fin_payment_scheduledetail_id, ppd.fin_payment_proposal_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.expected, pso.expected) AS expected, ppd.amount AS paidamt, COALESCE(p.c_bpartner_id, i.c_bpartner_id, o.c_bpartner_id) as c_bpartner_id, ppd.writeoffamt
     4    FROM fin_payment_prop_detail ppd, fin_payment_scheduledetail psd
     4    FROM fin_payment_prop_detail ppd, fin_payment_scheduledetail psd
     5    LEFT JOIN fin_payment_sched_inv_v psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_sched_inv_v_id
     5    LEFT JOIN fin_payment_sched_inv_v psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_sched_inv_v_id
     6    LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id
     6    LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id
     7    LEFT JOIN fin_payment_sched_ord_v pso ON psd.fin_payment_schedule_order = pso.fin_payment_sched_ord_v_id
     7    LEFT JOIN fin_payment_sched_ord_v pso ON psd.fin_payment_schedule_order = pso.fin_payment_sched_ord_v_id
     8    LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id
     8    LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id