Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. select distinct ol.em_sc_sell_price - (sum(od.em_Sc_fee_amount) + mpp.pricelist)
  2. from c_orderline ol
  3. join m_product mp on ol.m_product_id = mp.m_product_id
  4. join m_productprice mpp on mp.m_product_id = mpp.m_product_id
  5. join c_order o on ol.c_order_id = o.c_order_id
  6. join c_order_discount od on o.c_order_id = od.c_order_id
  7. join m_pricelist_version pv on pv.m_pricelist_version_id = mpp.m_pricelist_version_id
  8. join m_pricelist pl on pl.m_pricelist_id = pv.m_pricelist_id
  9. where ol.C_ORDERLINE_ID = 'FAEF4117F7754A10B7B633B5DF89C2E5'
  10. and mpp.isactive = 'Y'
  11. and o.documentno = '15036326'
  12. and pl.issopricelist = 'Y';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement