Advertisement
kuroshan1104

f_get_cargo_desague_periodo ORIGINAL 2017

Feb 8th, 2025
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.47 KB | Source Code | 0 0
  1. -- CODIGO ORIGINAL
  2. BEGIN
  3.  
  4. declare v_cant int;
  5. declare v_monto DOUBLE;
  6.  
  7. SET v_monto=0;
  8.  
  9. select count(*) INTO v_cant
  10. from p_puesto_servicio ps
  11. where ps.idservicio = 3
  12. and ps.idpuesto = vidpuesto
  13. and ps.activo=1 ;
  14.  
  15.  
  16. if v_cant>0  THEN
  17.  
  18.             select IF(f_get_giro_puesto(vidpuesto) = 'CARNES Y POLLOS',m_desague_carne , m_desague_otros) into v_monto
  19.             from g_recibo_cargos gc
  20.             where idconcepto = 7
  21.             and periodo = vperiodo;  
  22.  
  23. end if;
  24.  
  25. RETURN v_monto;
  26.  
  27. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement