<%@language=vbscript%>
<%
Response.Buffer=True
If Session("ID")=0 then
Response.Redirect("http://www.grupo-mim.com")
Response.End
Else
%>
<!--#include file="UsrRepcxc.asp"-->
<!--#include file="fpdf/numeros.asp"-->
<!--#include file="fpdf.asp"-->
<%Session.LCID=2058%>
<% Session.timeout = 1000 %>
<%
Dim colorFila, Color
E1= Empresa
Moneda = Request("Moneda")
B1=rs1("Nombre")
B2=rs1("Direccion")
B3=rs1("Colonia")
B4=rs1("Poblacion")
B5=rs1("Telefono")
B6=rs1("Fax")
B7=rs1("website")
Fe1=rs2("Clacli")
Fe2=rs2("Nomcli")
Fe3=rs2("Calcli")
Fe4=rs2("colcli")
Fe5=rs2("Pobcli")
Fe6=rs2("Edocli")
Fe7=rs2("Cpcli")
Fe8=rs2("rfccli")
Fe9=rs2("stacli")
if fe9 ="A" then
fe10 = "Activo"
Else if fe9 = "S" then
fe10 = "Suspendido"
else if fe9 = "B" then
fe10 = "Baja"
End if
End if
End if
if Moneda=0 then
fe11="Todas"
else if Moneda=1 then
fe11="Pesos"
else if Moneda=2 then
fe11="Dolares"
else
fe11=fe11
end If
end if
end If
Set pdf=CreateJsObject("FPDF")
pdf.CreatePDF "L", "mm", "Letter"
pdf.SetPath("fpdf/")
pdf.SetFillColor 13,16,121
pdf.Open()
pdf.LoadModels("CxcRa")
pdf.SetLeftMargin(8.0)
pdf.AddPage()
pdf.SetFont "Arial","b",6
fechA = date()
fecha = FormatDateTime(fecha)
Do while Not(RS3.EOF)
Digital = Cstr(RS3("NFACXCG"))
Digitalb = right("0000000000" + Digital, 10 )
'Sqla="SELECT * FROM CFDENC where nodocumento = '"& digitalb &"'"
'Rsa.Open Sqla,cn2,1,2
'If Rsa.Eof then
FolioFiscal = 0
'else
'FolioFiscal = Rsa("FolioFiscal")
'END iF
'rSA.CLOSE
FD1=RS3("DESCXCC")
FD2=RS3("NFACXCG")
FD3=RS3("PECCXCG")
FD4=CSTR(RS3("FRECXCG"))
Fd5=CSTR(RS3("FPACXCG"))
FD6=formatnumber(RS3("IMPCXCG"))
Fd7=cstr(RS3("CIVACXCG"))
Fd8=formatnumber(RS3("ANTICXCG"))
FD9=cstr(RS3("vencimiento"))
If cdbl(fd6) > 0 then
Fd10=formatnumber(Cdbl(RS3("Salcxcg"))+Cdbl(Rs3("pagcxcg")))
else
Fd10=formatnumber(Cdbl(RS3("Salcxcg"))-Cdbl(Rs3("pagcxcg")))
end If
Fd11=formatnumber(Cdbl(RS3("Pagcxcg")) - Cdbl(RS3("ANTICXCG")))
Fd12=formatnumber(RS3("SALCXCG"))
if fd3 = "" then
fd13 = ""
else if isnull(fd3) then
fd13 = ""
else
fd13 = fd3
end If
End if
acumulado = cdbl(acumulado) + cdbl(fd12)
acumulado = Formatnumber(acumulado)
venc = cdate(fecha) - cdate(fd5)
pdf.Cell 25,4,Fd1,0,0,"L",0
pdf.Cell 15,4,FolioFiscal,0,0,"L",0
pdf.Cell 15,4,Fd2,0,0,"L",0
pdf.Cell 35,4,left(Fd13,15),0,0,"r",0
pdf.Cell 15,4,Fd4,0,0,"L",0
pdf.Cell 15,4,Fd5,0,0,"l",0
pdf.Cell 19,4,Fd6,0,0,"R",0
pdf.Cell 19,4,formatnumber(fd7,2),0,0,"R",0
pdf.Cell 19,4,Fd8,0,0,"R",0
pdf.Cell 19,4,Fd10,0,0,"R",0
pdf.Cell 19,4,Fd11,0,0,"R",0
pdf.Cell 19,4,Fd12,0,0,"R",0
if acumulado = 0 then
pdf.Cell 19,4,"0",0,0,"R",0
else
pdf.Cell 19,4,acumulado,0,0,"R",0
end if
pdf.Cell 10,4,fd9,0,0,"R",0
pdf.Ln(4)
RS3.Movenext
loop
acumulado = Acumulado
pdf.cell 220,4," ",0,0,"l",0
pdf.cell 20,4,"TOTAL SALDO: " & acumulado,0,0,"l",0
pdf.Output()
End If
%>