%@ LANGUAGE = "VBScript" %> <%Response.Buffer = False%> <% Session.Timeout = 120 Server.ScriptTimeout = 5000 busca=request.QueryString("busca") doc=request.QueryString("doc") origen=request.QueryString("origen") Date_ini=Request.Form("Date_ini") Date_end=Request.Form("Date_end") lvende=Request.Form("cvende") criterio22=Request.Form("criterio22") if criterio22="" then xcriterio22=" Todos " end if if Date_ini="" or Date_ini=null then 'Date_ini=date()-(day(date()))+1 Date_ini=date() Date_end=date() end if dia1=right("00"&day(Date_ini),2) mes1=right("00"&month(Date_ini),2) anno1=right("00"&year(Date_ini),4) 'Date_inii=cdate(dia1+"/"+mes1+"/"+anno1) cfechai=cdbl(anno1+mes1+dia1) dia2=right("00"&day(Date_end),2) mes2=right("00"&month(Date_end),2) anno2=right("00"&year(Date_end),4) 'cfechaf=cdate((dia2+"/"+mes2+"/"+anno2)) cfechaf=cdbl(anno2+mes2+dia2) '''''''''''''''''''''''''''''''''''''' strday = Right("00" & Day(Date_ini), 2) strmonth = Right("00" & Month(Date_ini), 2) stryear = Right("00" & Year(Date_ini), 4) strday2 = Right("00" & Day(Date_end), 2) strmonth2 = Right("00" & Month(Date_end), 2) stryear2 = Right("00" & Year(Date_end), 4) fechainicial = CDbl(stryear + strmonth + strday) fechafinal = CDbl(stryear2 + strmonth2 + strday2) '''''''''''''''''''''''''''''''''''''' %>
<% '''''''''''calcula strday = Right("00" & Day(Date_ini), 2) strmonth = Right("00" & Month(Date_ini), 2) stryear = Right("00" & Year(Date_ini), 4) strday2 = Right("00" & Day(Date()-1), 2) strmonth2 = Right("00" & Month(Date()-1), 2) stryear2 = Right("00" & Year(Date()-1), 4) fechainicial = CStr("01/01/"+stryear) fechafinal = CStr(stryear2 + strmonth2 + strday2) 'response.write(fechainicial)&" FI " ' response.write(fechafinal)&" Ff " '************** Inventory Dim Rsinven1, Rsinven2,rswip Dim Sqlinven1,sqlinven2,sqlwip set Rsinven1=dbsql.execute("select a.crp_id, a.bal_date, right(a.bal_date,6) bal_day, a.jaje_seq, a.bal_seq, a.bal_sub, (select cust_nm from stb010t where cust_cd = a.cust_cd ) cust_nm, c.jaje_nm, c.jaje_danwi, a.cust_cd, a.bal_qty, a.nap_date, a.bal_price, a.bal_amt, a.bal_kind, case a.money_chk when '1' then 'Dollar' when '2' then 'Peso' end money_chk, a.po_no, a.terms, a.attn, a.note1, a.note2, a.user_nm, a.prt_chk, a.ship_cust, a.ship_addr1, a.ship_addr2, a.ship_addr3, a.ship_tel, a.ship_fax, a.vat_class, b.ipgo_qty, (select code_nm from sta010t(nolock) where major_cd = '9020' and minor_cd = a.class) class, case c.jaje_kind when '' then '' else (select code_nm from sta010t where major_cd = '9200' and minor_cd = c.jaje_kind) end jaje_kind_nm, case c.proc_cd when '' then '' else (select code_nm from sta010t where major_cd = '9300' and minor_cd = c.proc_cd) end proc_nm, a.r_no1, a.r_no2, a.r_no3, substring(a.req_indate,5,2) + substring(a.req_indate,7,2) + substring(a.req_indate,1,4) req_indate from mtd011t a(nolock) left outer join ( select crp_id, bal_Date, bal_seq, bal_sub, po_no, sum(ipgo_qty) ipgo_qty from mtd020t(nolock) group by crp_id, bal_Date, bal_seq, bal_sub, po_no) b on a.crp_id = b.crp_id and a.bal_date = b.bal_date and a.bal_seq = b.bal_seq and a.bal_sub = b.bal_sub and a.po_no = b.po_no, mtd010t c(nolock) where a.jaje_seq = c.jaje_seq and a.bal_date between right('0000' + convert(varchar(4), year(getdate()-1)),4)+'0101' and right('0000' + convert(varchar(4), year(getdate()-1)),4)+right('00' + convert(varchar(2), month(getdate()-1)),2)+right('00' + convert(varchar(2), day(getdate()-1)),2) and a.cust_cd like '%' and a.po_no like '%' and a.jaje_seq like '%' and c.jaje_kind like '%' and isnull(c.proc_cd,'000') like '%' and (a.r_no1 like '%' or a.r_no2 like '%' or a.r_no3 like '%') and a.money_chk like '%' and a.prt_chk like '%' order by a.bal_date, a.bal_seq, a.bal_sub") If Rsinven1.EOF And Rsinven1.BOF Then ExisteUsuario = False Msg = "No records exist for this date." Style = vbDefaultButton2 Title = "Msg from System" Help = "" ctxt = 1000 'Response = MsgBox(Msg, Style, Title, Help, ctxt) response.Write("No records exist for this date.") Else %>
| P/O Date | Seq | PO_NO | Vendor | Kind | Code | Description | PLANT | Qty | DATE(m/d/y) | Currency | U/P | Amount | REC_QTY |
| <%= Rsinven1("bal_day")%> | <%= Rsinven1("bal_seq")%> | <%= Rsinven1("po_no")%> | <%= Rsinven1("cust_nm")%> | <%= Rsinven1("jaje_kind_nm")%> | <%= Rsinven1("jaje_seq")%> | <%= Rsinven1("jaje_nm")%> | <%= Rsinven1("class")%> | <%= Rsinven1("bal_qty")%> | <%= Rsinven1("nap_date")%> | <%= Rsinven1("money_chk")%> | <%= Rsinven1("bal_price")%> | <%= Rsinven1("bal_amt")%> |