{ --------------------------------------------------------------------------- PROGRAMA : COPRRP101.ACE OBJETIVO : BUSCAR LAS ENTREGAS PARCIALES PROGRAMADOR: JUAN F. SOTO FECHA : MARZO 19, 1993 --------------------------------------------------------------------------- } database rayovac end define variable fech_in date variable fech_fi date variable hora char(5) variable remanente decimal(10,2) variable cierre1 char(2) variable tipo1 char(2) variable num_oc1 integer end input prompt for fech_in using "Entre Fecha Inicial: " prompt for fech_fi using "Entre Fecha Final: " end output left margin 2 report to PRINTER end select a.tipo, a.num_oc, a.cod_n, a.cod_grupo, a.cod_tipo, a.cod_sec, a.fech_ent, a.cantidad, a.cantidad_r, b.descrip_esp, b.unidad_med, c.cierre from cotb00025 a,intb00001 b,cotb00014 c where a.fech_ent between $fech_in and $fech_fi and a.cod_n = b.cod_n and a.cod_grupo = b.cod_grupo and a.cod_tipo = b.cod_tipo and a.cod_sec = b.cod_Sec and (a.tipo = c.tipo and a.num_oc = c.num_oc) and c.cierre = "N" and c.status_t is null order by 2,3,4,5,6,7 end format page header let hora = time print column 1, "coprrp101", column 17, "R A Y .O. V A C D O M I N I C A N A, S. A.", column 73, "Pag. ", pageno using "###" print column 29, "Sistema de Compras", column 73, today using "dd/mm/yy" print column 25,"Reporte Entregas Parciales", column 76, hora skip 1 line print column 1, "De: ",fech_in using "dd/mm/yy", 2 spaces, "A: ",fech_fi using "dd/mm/yy" print "============================================================================" , "====" print column 1, "Orden", 7 spaces, "Fecha", 4 spaces, "M a t e r i a l ", 36 spaces, "Balance" print "============================================================================" , "====" skip 1 line on every row let remanente = cantidad - cantidad_r LET tipo1 = tipo let num_oc1 = num_oc if remanente > 0 then print column 1,tipo," ", num_oc using "######","-",cierre, 1 spaces, fech_ent using "dd/mm/yy", 1 spaces, cod_n using "&","-",cod_grupo using "&","-", cod_tipo using "&&","-",cod_sec using "&&&", 1 spaces, descrip_esp," ",unidad_med, 1 spaces, remanente using "##,###,###.##" after group of 2 skip 1 line on last row skip to top of page end