SELECT c.setid , l.cntrct_id , l.cntrct_line_nbr , SUM(l.qty_ordered) , SUM(l.extended_list_prc) , %Round(SUM(l.extended_net_price) + SUM(%DecMult(l.extended_net_price, (%DecMult(o.addtl_adjust_pct, .01)))) + o.addtl_adjust_amt ,4) , SUM(l.ext_list_prc_base) , %Round(SUM(l.ext_net_prc_base) + SUM(%DecMult(l.ext_net_prc_base, (%DecMult(o.addtl_adjust_pct, .01)))) + o.addtl_adjust_base ,4) FROM PS_SCON_LINE c , ps_ord_header o , ps_ord_tot_ln_vw l , ps_set_cntrl_rec s WHERE o.business_unit = l.business_unit AND o.order_no = l.order_no AND c.cntrct_id = l.cntrct_id AND c.line_nbr = l.cntrct_line_nbr AND c.product_id = l.product_id AND s.setcntrlvalue = l.business_unit AND s.recname = 'CUSTOMER' GROUP BY c.setid, l.cntrct_id, l.cntrct_line_nbr, o.addtl_adjust_pct, o.addtl_adjust_amt, o.addtl_adjust_base
|