Advertisement
marcopolorez

Enselli - Consulta IPI Inventario

Apr 8th, 2016
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select
  2. cod_item,
  3. (select i.vl_ipi/quantidade from ek_item_nota i
  4. inner join ek_nota n on i.seq_nota = n.seq_nota
  5. where ind_oper = '0' and cod_item = v.cod_item and quantidade > 0
  6. order by dt_e_s desc limit 1) as ipi
  7. from
  8. ek_dados_inventario v
  9. where seq_inventario = 38
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement