"VER1.0","Clientes","Listado de Clientes"
;Versio, Categoria, Descripcion

;Ampla, Llarg, [EspaiCos]
;MargenX,MargenY, EtiLin, EtiPag
[DOCUM]
0, 0, 0
0,0,0,0
; Tipo, NomGrup, InicNumPag,   Select, From, GropBy
[GRUP]
1,"CABECERA", #FALSE#
"SELECT * , CodigoPostal & ' - ' & Poblacion as Direc, 'Tel : ' & Telefono1 as Tel "
"FROM Configuracion"
""
[CAPSALERA]
0, 0, #FALSE#, 0, #FALSE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 1
3,"CABECERA","NombreComercial",10,0,"ARIAL",22,0,0,"1000",""
;3,"CABECERA","Domicilio",10,8,"ARIAL",8,0,0,"1000",""
;3,"CABECERA","Direc",10,11,"ARIAL",8,0,0,"1000",""
;3,"CABECERA","Provincia",10,14,"ARIAL",8,0,0,"1000",""
;3,"CABECERA","Tel",10,17,"ARIAL",8,0,0,"1000",""
;3,"CABECERA","Nif",10,20,"ARIAL",8,0,0,"1000",""
[FICAP]

[PEU]
0, 10, #TRUE#, 0, #TRUE#, #FALSE#, 2
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 0
;0,"Total General",160,0,"ARIAL",12,0,1,"1000"
;5,0,"Total",170,0,"ARIAL",10,0,0,"1000","Total"
[FIPEU]
[FIGRUP]

;-----------------------------------------


; Tipo, NomGrup, InicNumPag,   Select, From, GropBy
[GRUP]
0, "DISENY", #FALSE#
""
""
""
;[ordenaciones] y [condiciones]
[CAPSALERA]
10, 25, #TRUE#, 0, #TRUE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 6
0,"Pgina :",170,0,"ARIAL",8,0,0,"1000"
6,"Pagina",200,0,"ARIAL",8,0,1,"1000",""
0,"Fecha :",170,5,"ARIAL",8,0,0,"1000"
6,"Fecha",200,5,"ARIAL",8,0,1,"1000","dd-mm-yyyy"
0, "Listado de clientes", 105, 7, "ARIAL", 22, 0, 2, "1000"
1, "lineaH1", 5, 17, 200, 17,,,
;0,"Cdigo",5,18,"ARIAL",8,0,0,"1000"
;0,"Nombre",25,18,"ARIAL",8,0,0,"1000"
;0,"NIF",80,18,"ARIAL",8,0,0,"1000"
;0,"Persona Contacto",100,18,"ARIAL",8,0,0,"1000"
;0,"Cargo Contacto",140,18,"ARIAL",8,0,0,"1000"
;0,"Telfono",185,18,"ARIAL",8,0,0,"1000"
;0,"Domicilio",25,22,"ARIAL",8,0,0,"1000"
;0,"Poblacin",140,22,"ARIAL",8,0,0,"1000"
;0,"Fax",185,22,"ARIAL",8,0,0,"1000"
;1, "lineaH2", 5, 27, 200, 27,,,

[FICAP]

[PEU]
0, 10, #TRUE#, 0, #TRUE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 0
;0,"Total Acumulado",160,0,"ARIAL",12,0,1,"1000"
;5,0,"Total",170,0,"ARIAL",10,0,0,"1000","Total"
[FIPEU]

[FIGRUP]

;-----------------------------------------


;tipo, NomGrup, Select, From, GropBy
[GRUP]
3,"COS", #FALSE#
"SELECT First(Direccion.CodPostal & ' - ' & Direccion.Ciudad) AS pobla, First(Direccion.Direccion) AS PrimeroDeDireccion, First(Clientes.CodRepresentante) AS PrimeroDeCodRepresentante, First(Clientes.CodFormaPago) AS PrimeroDeCodFormaPago, First(Representantes.Nombre) AS PrimeroDeNombre, First(CuentasBanc.CodCuenta) AS PrimeroDeCodCuenta, First(CuentasBanc.CodEntidad) AS PrimeroDeCodEntidad, First(CuentasBanc.CodOficina) AS PrimeroDeCodOficina, First(CuentasBanc.NumCuenta) AS PrimeroDeNumCuenta, First(CuentasBanc.DC) AS PrimeroDeDC, First(CuentasBanc.BIC) AS PrimeroDeBIC, First(CuentasBanc.IBAN) AS PrimeroDeIBAN, First(Agencias.NombreAgencia) AS PrimeroDeNombreAgencia, First(CuentasBanc.FechaFirma) AS PrimeroDeFechaFirma, Clientes.CodCliente as Client, Clientes.CodCliente, First(Clientes.Nombre) AS PrimeroDeNombre1, First(Clientes.NombreFiscal) AS PrimeroDeNombreFiscal, First(Clientes.NIF) AS PrimeroDeNIF, First(Clientes.PersonaContacto) AS PrimeroDePersonaContacto, First(Clientes.CargoContacto) AS PrimeroDeCargoContacto, First(Clientes.Telefono) AS PrimeroDeTelefono, First(Clientes.FAX) AS PrimeroDeFAX, First(Clientes.Mail) AS PrimeroDeMail, First(Clientes.Web) AS PrimeroDeWeb, First(Clientes.mailEnvio) AS PrimeroDemailEnvio, First(Clientes.CodFormaPago) AS PrimeroDeCodFormaPago1, First(Clientes.CodTipoPago) AS PrimeroDeCodTipoPago, First(Clientes.CodRepresentante) AS PrimeroDeCodRepresentante1, First(Representantes.Nombre) AS PrimeroDeNombre2, First(Clientes.CodAgenciaTransporte) AS PrimeroDeCodAgenciaTransporte, First(Agencias.NombreAgencia) AS PrimeroDeNombreAgencia1, First(Clientes.CodZona) AS PrimeroDeCodZona, First(Clientes.Observaciones) AS PrimeroDeObservaciones, Sum(VenFacturas.Total) AS SumaDeTotal, Max(VenFacturas.FechaFactura) AS UltimoDeFechaFactura, Max(VenFacturas.Total) AS UltimoDeTotalFactura , Count(VenFacturas.Total) AS NumeroDeFactura"
"FROM ((((Clientes LEFT JOIN Direccion ON (Clientes.CodCliente = Direccion.CodCliente) AND (Clientes.CodDireccion = Direccion.CodDireccion)) LEFT JOIN Representantes ON Clientes.CodRepresentante = Representantes.CodRepresentante) LEFT JOIN CuentasBanc ON (Clientes.CodCliente = CuentasBanc.CodCliente) AND (Clientes.CodCuentaBancaria = CuentasBanc.CodCuenta)) LEFT JOIN Agencias ON Clientes.CodAgenciaTransporte = Agencias.CodAgencia) LEFT JOIN VenFacturas ON Clientes.CodCliente = VenFacturas.CodCliente "
" GROUP BY Clientes.CodCliente"

[CONDICIONS] 5
"Clientes.CodCliente","Codigo",0,1, -10
"Clientes.Nombre","Nombre",0,1
"Clientes.CodRepresentante", "Cod Representante", 0, 1
"Clientes.CodFormaPago", "Cod Forma Pago", 0, 1
"FechaFactura", "Fecha", 0, 2
;Clientes.CodRepresentante"PrimeroDeCodRepresentante", "Cod Representante", 0, 1

;"CodFamilia", "Cod", 1, 1, "CAB1", "CodFamilia"
;"CodProveedor", "proveedor", 1, 1, "CAB2", "CodProveedor"
;"CodIva", "Iva", 1, 1, "CAB3", "CodIva"

[ORDENACIONS] 3
"Clientes.CodCliente","Codigo cliente",3
"PrimeroDeNombre1","Nombre",3
"PrimeroDeCodPostal","Cod. Postal",3
;"UltimoDeFechaFactura", "Fecha", 3



[CAPSALERA]
0, 55, #TRUE#, 0, #TRUE#, #FALSE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 61
0,"Cdigo:",5,0,"ARIAL",8,0,0,"1000"
3,"COS","CodCliente",20,0,"ARIAL",8,0,0,"0000",""
0,"Nombre:",45,0,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeNombre1",60,0,"ARIAL",8,70,0,"1000",""
0,"N. Fiscal:",130,0,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeNombreFiscal",150,0,"ARIAL",8,40,0,"0000",""
0,"NIF:",5,5,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeNIF",20,5,"ARIAL",8,0,0,"0000",""
0,"Contacto:",45,5,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDePersonaContacto",60,5,"ARIAL",8,0,0,"0000",""
0,"Cargo Cont:",90,5,"ARIAL",8,0,0,"1000"
3,"COS","CargoContacto",110,5,"ARIAL",8,0,0,"0000",""
0,"Telfono:",130,5,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeTelefono",145,5,"ARIAL",8,0,0,"0000",""
0,"FAX:",165,5,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeFax",180,5,"ARIAL",8,0,0,"0000",""
0,"Direccin:",5,10,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeDireccion",25,10,"ARIAL",8,0,0,"0000",""
0,"Poblacin:",130,10,"ARIAL",8,0,0,"1000"
3,"COS","Pobla",150,10,"ARIAL",8,0,0,"0000",""
0,"eMail:",5,15,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDemail",17,15,"ARIAL",8,0,0,"0000",""
0,"eMail Envio:",75,15,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDemailEnvio",95,15,"ARIAL",8,0,0,"0000",""
0,"Web:",150,15,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeWeb",160,15,"ARIAL",8,0,0,"0000",""
0,"Cod. Forma Pago:",5,20,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeCodFormaPago",32,20,"ARIAL",8,0,0,"0000",""
0,"Cod. Tipo Pago:",40,20,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeCodTipoPago",65,20,"ARIAL",8,0,0,"0000",""
0,"Entidad:",85,25,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeCodEntidad",98,25,"ARIAL",8,0,0,"0000",""
0,"Oficina",110,25,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeCodOficina",125,25,"ARIAL",8,0,0,"0000",""
0,"DC:",140,25,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeDC",150,25,"ARIAL",8,0,0,"0000",""
0,"Num.Cuenta:",165,25,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeNumCuenta",185,25,"ARIAL",8,0,0,"0000",""
0,"BIC:",5,25,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeBIC",12,25,"ARIAL",8,0,0,"0000",""
0,"IBAN:",32,25,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeIBAN",42,25,"ARIAL",8,0,0,"0000",""
0,"Fecha Firma:",165,20,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeFechaFirma",185,20,"ARIAL",8,0,0,"0000",""
0,"Representante:",5,30,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeNombre",29,30,"ARIAL",8,0,0,"0000",""
0,"Agencia Trans.:",80,30,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeNombreAgencia",104,30,"ARIAL",8,0,0,"0000",""
0,"Zona:",175,30,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeCodZona",185,30,"ARIAL",8,0,0,"0000",""
0,"Observaciones:",5,40,"ARIAL",8,0,0,"1000"
3,"COS","PrimeroDeObservaciones",30,40,"ARIAL",8,0,0,"0000",""
0,"Total Facturado:",5,35,"ARIAL",8,0,0,"1000"
3,"COS","SumaDeTotal",30,35,"ARIAL",8,0,0,"0000",""
0,"Importe Factura Mayor:",46,35,"ARIAL",8,0,0,"1000"
3,"COS","UltimoDeTotalFactura",81,35,"ARIAL",8,0,0,"0000",""
0,"Fecha ltima factura:",100,35,"ARIAL",8,0,0,"1000"
3,"COS","UltimoDeFechaFactura",135,35,"ARIAL",8,0,0,"0000",""
0,"Cantidad de facturas:",155,35,"ARIAL",8,0,0,"1000"
3,"COS","NumeroDeFactura",188,35,"ARIAL",8,0,0,"0000",""
1, "lineaH2", 85, 50, 130, 50,,,

[FICAP]
[FIGRUP]

[CALCULS] 0
;"TotalF","COS","PrecioCoste","CAB1"
;"TotalP","COS","PrecioCoste","CAB2"
;"TotalI","COS","PrecioCoste","CAB3"
;"Total","COS","PrecioCoste","GENERAL"

[FIDOCUM]





