Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CODIGO ORIGINAL
- BEGIN
- declare v_cant int;
- declare v_monto DOUBLE;
- SET v_monto=0;
- select count(*) INTO v_cant
- from p_puesto_servicio ps
- where ps.idservicio = 3
- and ps.idpuesto = vidpuesto
- and ps.activo=1 ;
- if v_cant>0 THEN
- select IF(f_get_giro_puesto(vidpuesto) = 'CARNES Y POLLOS',m_desague_carne , m_desague_otros) into v_monto
- from g_recibo_cargos gc
- where idconcepto = 7
- and periodo = vperiodo;
- end if;
- RETURN v_monto;
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement