"VER1.0","Factura","Facturas de Clientes"
;Versio, Categoria, Descripcion


;Ampla, Llarg, [EspaiCos]
;MargenX, ,MargenY, EtiLin, EtiPag
[DOCUM]
 0, 0, 62
 0, 0, 0, 0
;-----------------------------------------


;Tipo, NomGrup, Select, From, GropBy
[GRUP]
1,"CABECERA", #FALSE#
"SELECT *, CodigoPostal & ' - ' & Poblacion as Pueblo, Provincia & ' ' & Pais as  ProvPais"
"FROM Configuracion"
""
[CAPSALERA]
0, 0, #TRUE#, 0, #FALSE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 13
2, "Anagrama.bmp", 5, 5, 110, 42
3, "CABECERA", "NombreFiscal", 120, 5, "ARIAL", 8, 0, 0, "1000", ""
3, "CABECERA", "Domicilio", 120, 8, "ARIAL", 8, 0, 0, "0000", ""
0, "Tel. ", 120, 11, "ARIAL", 8, 0, 0, "0000"
3, "CABECERA", "Telefono1", 127,11, "ARIAL", 8, 0, 0, "0000", ""
0, "FAX. ", 150, 11, "ARIAL", 8, 0, 0, "0000"
3, "CABECERA", "Fax", 157, 11, "ARIAL", 8, 0, 0, "0000", ""
3, "CABECERA", "Pueblo", 120, 14, "ARIAL", 8, 0, 0, "0000", ""
3, "CABECERA", "ProvPais", 120, 17, "ARIAL", 8, 0, 0,"0000", ""
3, "CABECERA", "E-Mail", 120, 20, "ARIAL", 8, 0, 0, "0000", ""
3, "CABECERA", "Web", 120, 23, "ARIAL", 8, 0, 0,"0000", ""
0, "C.I.F. / N.I.F. :", 120, 26, "ARIAL", 8, 0, 0, "0000"
3, "CABECERA", "Nif", 143, 26, "ARIAL", 8, 0, 0, "0000", ""
[FICAP]

; En Impresos recomendable crear con valor PrintAll a True
[PEU]
0, 7, #TRUE#, 2, #FALSE#, #TRUE#, 2
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 3
0, "Observ: ", 88, -8, "ARIAL", 9, 0, 0, "0000"
3, "CABECERA", "RegistroMercantil", 100, 0, "ARIAL", 6, 0,2, "0000", ""
3, "CABECERA", "LineaObsAutomatica", 100, -8, "ARIAL", 9, 0,0, "0000", ""
[FIPEU]
[FIGRUP]

;-----------------------------------------
;Tipo, NomGrup, Select, From, GropBy
[GRUP]
0, "GENERAL", #FALSE#
""
""
""

;[ordenaciones] y [condiciones]

[CAPSALERA]
0, 0, #TRUE#, 0, #TRUE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 23
1, "CuadroAdrea", 113, 33, 200, 75, 1, 0,
1, "CuadroFact", 6, 45, 102, 58, 1, 0,
0,"Fecha",10,46,"ARIAL",8,0,0,"0000"
0,"N Factura",45,46,"ARIAL",8,0,0,"0000"
0,"C.I.F./N.I.F.",75,46,"ARIAL",8,0,0,"0000"
1, "CuadroOtros", 6, 59, 102, 75, 1, 0,
0,"Representante",10,60,"ARIAL",8,0,0,"0000"
0,"Contacto",45,60,"ARIAL",8,0,0,"0000"
1, "CuadroCos", 0, 78, 200, -64, 1, 0,
1, "lineaH", 0, 84, 200, 84,,,
1, "lineaV", 182, 78, 182, -64,,,
1, "lineaV", 175, 78, 175, -64,,,
1, "lineaV", 165, 78, 165, -64,,,
1, "lineaV", 151, 78, 151, -64,,,
1, "lineaV", 137, 78, 137, -64,,,
1, "lineaV", 29, 78, 29, -64,,,
0,"Cdigo",5,79,"ARIAL",8,0,0,"0000"
0,"Descripcin",30,79,"ARIAL",8,0,0,"0000"
0,"Cantidad",150,79,"ARIAL",8,0,1,"0000"
0,"Precio",163,79,"ARIAL",8,0,1,"0000"
0,"Dto",173,79,"ARIAL",8,0,1,"0000"
0,"Iva",180,79,"ARIAL",8,0,1,"0000"
0,"Total",199,79,"ARIAL",8,0,1,"0000"
[FICAP]
;0, "Total Ptas :", 160, 35,"ARIAL",8,0,0,"0000"
[PEU]
0, 60, #FALSE#, 0, #FALSE#, #TRUE#, 2
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 21
1, "CuadroBrut", 0, 0, 170, 16, 1, 0,#FALSE#
0, "Importe Bruto", 3, 1,"ARIAL",8,0,0,"0000"
0, "% Dto. Comercial", 62, 1,"ARIAL",8,0,1,"0000"
0, "% Dto. Pronto Pago", 90, 1,"ARIAL",8,0,1,"0000"
0, "%   Gastos Financiacin", 125, 1,"ARIAL",8,0,1,"0000"
0, "I.V.A.", 130, 1,"ARIAL",8,0,0,"0000"
0, "R.E.", 154, 1,"ARIAL",8,0,0,"0000"
1, "CuadroTot", 173, 0, 200, 16, 1, 0,
0, "Total", 190, 1,"ARIAL",12,0,1,"0000"
1, "CuadroFP", 0, 19, 77, 41, 1, 0,
0, "Condiciones de pago", 3, 20,"ARIAL",8,0,0,"0000"
1, "CuadroIva", 78, 19, 200, 41, 1, 0,
0, "Desglose de I.V.A.", 80, 20,"ARIAL",8,0,0,"0000"
0, "Tipo", 108, 20,"ARIAL",8,0,0,"0000"
0, "B.Imponible", 118, 20,"ARIAL",8,0,0,"0000"
0, "I.V.A.      Importe", 142, 20,"ARIAL",8,0,0,"0000"
0, "%  R.E.     Importe", 174, 20,"ARIAL",8,0,0,"0000"
0, "ENTIDAD", 10, 42,"ARIAL",8,0,0,"0000"
0, "OFICINA", 30, 42,"ARIAL",8,0,0,"0000"
0, "NUM.CUENTA", 45, 42,"ARIAL",8,0,0,"0000"
0, "D.C.", 70, 42,"ARIAL",8,0,0,"0000"
;0, "OBSERVACIONES :", 0, 42,"ARIAL",9,0,0,"0000"
[FIPEU]

[FIGRUP]


;-----------------------------------------
;round(Iva1*BaseImponible1/100, 0) & '' as I1, round(Iva2*BaseImponible2/100 , 0) & '' as I2, round(Iva3*BaseImponible3/100, 0) & '' as I3, (Re1*BaseImponible1/100) & '' as R1, (Re2*BaseImponible2/100) & '' as R2, (Re3*BaseImponible3/100) & '' as R3, (val(I1)+val(I2)+val(I3)) as TI, (val(R1)+val(R2)+val(R3)) as TR, 
;tipo, NomGrup, Select, From, GropBy
[GRUP]
2,"CAB 1", #TRUE#
"SELECT VenFacturas.*, VenImp.*, VenVto.*, Domiciliacion.*, CodigoPostal & ' - ' & Poblacion as Pueblo, VenFacturas.Provincia & ' - ' & VenFacturas.Pais as Ciudad, Monedas.Decimales, Clientes.*, Representantes.*, Descuento1 & ' ' & Descuento2 & ' ' & Descuento3 as Descuentos "
"FROM (((((VenFacturas LEFT JOIN VenImp ON (VenFacturas.Seccion = VenImp.Seccion) AND (VenFacturas.NumFactura = VenImp.NumFactura)) LEFT JOIN VenVto ON (VenFacturas.Seccion = VenVto.Seccion) AND (VenFacturas.NumFactura = VenVto.NumFactura)) LEFT JOIN Domiciliacion ON (Domiciliacion.CodCuenta = VenFacturas.CodCuentaBancaria) AND (VenFacturas.CodCliente = Domiciliacion.CodCliente)) LEFT JOIN Monedas ON (Monedas.CodMoneda = VenFacturas.CodMoneda)) LEFT JOIN Clientes ON (VenFacturas.CodCliente=Clientes.CodCliente)) LEFT JOIN Representantes ON (Clientes.CodRepresentante=Representantes.CodRepresentante)"
""

[CONDICIONS] 5
"VenFacturas.NumFactura","Nmero Factura",0,1
"VenFacturas.Seccion","Seccin",0,1
"VenFacturas.FechaFactura","Fecha",0,2
"VenFacturas.NombreFiscal","Nombre Cliente",0,1
"@COP", "Nmero Copias :", 9, "", ""

[CAPSALERA]
0, 87, #TRUE#, 0, #TRUE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 14
3,"CAB 1","VenFacturas.CodCliente",120,40,"ARIAL",10,0,0,"0000",""
3,"CAB 1","VenFacturas.NombreFiscal",120,45,"ARIAL",10,0,0,"0000",""
8, "0", "LEFT$(Campo('CAB 1','VenFacturas.Direccion'),35)",120,50,"ARIAL",10,0,0,"0000",""
8, "0", "MID$(Campo('CAB 1','VenFacturas.Direccion'),36,45)",120,55,"ARIAL",10,0,0,"0000",""
3,"CAB 1","Pueblo",120,60,"ARIAL",10,0,0,"0000",""
3,"CAB 1","Ciudad",120,65,"ARIAL",10,0,0,"0000",""
3,"CAB 1","FechaFactura",10,52,"ARIAL",8,0,0,"0000",""
3,"CAB 1","VenFacturas.NumFactura",50,52,"ARIAL",8,0,0,"0000",""
3,"CAB 1","VenFacturas.NIF",75,52,"ARIAL",8,0,0,"0000",""
3,"CAB 1","Nombre",15,65,"ARIAL",8,0,0,"0000",""
3,"CAB 1","PersonaContacto",45,65,"ARIAL",8,0,0,"0000",""
3,"CAB 1","Representantes.Nombre",10,65,"ARIAL",8,0,0,"0000",""
0,"Pgina",75,60,"ARIAL",8,0,0,"0000"
6,"Pagina",75,65,"ARIAL",8,0,0,"0000",""
[FICAP]
;8, "1", "val(Campo('CAB 1','Total')*166.386  ", 180, 35, "ARIAL", 8, 0, 0, "0000", "###,###,###"

[PEU]
0, 60, #TRUE#, 0, #FALSE#, #TRUE#, 2
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 41 TDesCo
3,"CAB 1","RCGOF",93,10,"ARIAL",10,0,0,"0000",""
3,"CAB 1","Financiacion",105,10,"ARIAL",10,0,0,"0000","Total"
5, 0, "TotalBrut", 20, 10, "ARIAL", 10, 0, 0, "0000", "Total"
3, "CAB 1", "Descuentos", 40, 10, "ARIAL", 10, 0, 0, "0000",""
3, "CAB 1", "TDesCo", 62, 10, "ARIAL", 10, 0, 1, "0000","Total"
3, "CAB 1", "VenFacturas.DescuentoPP", 69, 10, "ARIAL", 10, 0, 0, "0000",""
3, "CAB 1", "TDesPP", 87, 10, "ARIAL", 10, 0, 1, "0000","Total"
3, "CAB 1", "BaseImponible1", 135, 25, "ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "Iva1", 145, 25,"ARIAL", 10, 0, 1, "0000", ""
6, "@IVA1", 165, 25,"ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "Re1", 180, 25, "ARIAL", 10, 0, 1, "0000",  ""
6, "@RE1", 198, 25,"ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "BaseImponible2", 135, 30, "ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "Iva2", 145, 30,"ARIAL", 10, 0, 1, "0000", ""
6, "@IVA2", 165, 30,"ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "Re2", 180, 30, "ARIAL", 10, 0, 1, "0000",  ""
6, "@RE2", 198, 30,"ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "BaseImponible3", 135, 35, "ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "Iva3", 145, 35,"ARIAL", 10, 0, 1, "0000", ""
6, "@IVA3", 165, 35,"ARIAL", 10, 0, 1, "0000", "Total"
3, "CAB 1", "Re3", 180, 35, "ARIAL", 10, 0, 1, "0000",  ""
6, "@RE3", 198, 35,"ARIAL", 10, 0, 1, "0000", "Total"
6, "@IVA", 140, 10, "ARIAL", 10, 0, 1, "0000", "Total"
6, "@RE", 160, 10, "ARIAL", 10, 0, 1, "0000", "Total"
8, "1", "Campo('CAB 1','Total')+Campo('CAB 1','Financiacion')", 198, 10, "ARIAL", 12, 0, 1, "0000", "Total"
3, "CAB 1", "Vto1", 5, 25, "ARIAL", 8, 0, 0, "0000", ""
3, "CAB 1", "Vto2", 5, 30, "ARIAL", 8, 0, 0, "0000", ""
3, "CAB 1", "Vto3", 5, 35, "ARIAL", 8, 0, 0, "0000", ""
3, "CAB 1", "Vto4", 40, 25, "ARIAL", 8, 0, 0, "0000", ""
3, "CAB 1", "Vto5", 40, 30, "ARIAL", 8, 0, 0, "0000", ""
3, "CAB 1", "Vto6", 40, 35, "ARIAL", 8, 0, 0, "0000", ""
3, "CAB 1", "Imp1", 35, 25, "ARIAL", 8, 0, 1, "0000", "Total"
3, "CAB 1", "Imp2", 35, 30, "ARIAL", 8, 0, 1, "0000", "Total"
3, "CAB 1", "Imp3", 35, 35, "ARIAL", 8, 0, 1, "0000", "Total"
3, "CAB 1", "Imp4", 70, 25, "ARIAL", 8, 0, 1, "0000", "Total"
3, "CAB 1", "Imp5", 70, 30, "ARIAL", 8, 0, 1, "0000", "Total"
3, "CAB 1", "Imp6", 70, 35, "ARIAL", 8, 0, 1, "0000", "Total"
3, "CAB 1", "CodEntidad", 10, 48, "ARIAL", 10, 0, 0, "0000", ""
3, "CAB 1", "CodOficina", 30, 48, "ARIAL", 10, 0, 0, "0000", ""
3, "CAB 1", "NumCuenta", 45, 48, "ARIAL", 10, 0, 0, "0000", ""
3, "CAB 1", "DC", 70, 48, "ARIAL", 10, 0, 0, "0000", ""
;3, "CAB 1", "Total", 198, 10, "ARIAL", 12, 0, 1, "0000","Total"
;0, "ENTIDAD  OFICINA    NUM.CUENTA.    D.C.", 0, 42,"ARIAL",9,0,0,"0000"
[FIPEU]
[FIGRUP]

;5,0,"Total1",190, 5,"ARIAL",12,0,1,"1001" ,"Total"
;3,"CAB1","Monedas.CodMoneda",195, 5,"ARIAL",12,0,0,"1000",""
;-----------------------------------------

;tipo, NomGrup, Select, From, GropBy
[GRUP]
2,"CAB 2", #FALSE#
"SELECT *, 'Num. Albarn : ' & NumAlbaran & '    Fecha Albarn : ' & FechaAlbaran as NumyFecha "
"FROM VenAlba"
""

[ORDENACIONS] 1
"FechaAlbaran, NumAlbaran","Ordenacion1",3

[CONDICIONS] 2
"NumFactura","Nmero de Factura",1,1,"CAB 1","VenFacturas.NumFactura"
"Seccion","Nmero de Seccion",1,1,"CAB 1","VenFacturas.Seccion"

[CAPSALERA]
0, 5, #TRUE#, 0, #TRUE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 1
3,"CAB 2","NumyFecha",30,0,"ARIAL",8,0,0,"0000",""
;0,"Nmero Albarn",10,0,"ARIAL",10,0,0,"1000"
;3,"CAB 2","NumAlbaran",40,0,"ARIAL",10,0,0,"1000",""
;0,"Fecha Albarn",70,0,"ARIAL",10,0,0,"1000"
;3,"CAB 2","FechaAlbaran",100,0,"ARIAL",10,0,0,"1000",""
[FICAP]

[PEU]
0, 5, #FALSE#, 0, #TRUE#, #FALSE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 0
;5,1,"MiTotal",115,0,"ARIAL",10,0,0,"0000",""
;0,"Fin Albarn",10,0,"ARIAL",10,0,0,"1000"
;5,0,"MiTotal",100,0,"ARIAL",10,0,0,"1000",""
;5,2,"MiTotal",300,0,"ARIAL",10,0,0,"1000",""
;5,"COS","Total",300,0,"ARIAL",10,0,0,"1000",""
[FIPEU]
[FIGRUP]

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

;tipo, NomGrup, Select, From, GropBy
[GRUP]
3,"COS", #FALSE#
"SELECT CodCliente, Total, Recargo, Iva, CodIVA, CodDescuento, Precio, NumAlbaran, Cantidad, NumLinea, LineaNeta, Seccion, CodAlmacen, Descripcion, CodArticulo, Total*166.386 as TotalE , Descuento1 & ' ' & Descuento2 & ' ' & Descuento3 as Descuentos "
"FROM VenAlbaLin"
""

[ORDENACIONS] 1
"NumLinea","NumLinea",3

[CONDICIONS] 3
"NumAlbaran","Nmero de albarn",1,0,"CAB 2","NumAlbaran"
"Seccion","Nmero de albarn",1,1,"CAB 2","Seccion"
"CodCliente","Nmero de albarn",1,1,"CAB 2","CodCliente"

[CAPSALERA]
0, 5, #TRUE#, 0, #TRUE#, #FALSE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 7
3,"COS","CodArticulo",5,0,"ARIAL",8,0,0,"0000",""
3,"COS","Descripcion",30,0,"ARIAL",8,105,0,"0000",""
3,"COS","Cantidad",150,0,"ARIAL",8,0,1,"0000","Cantidad"
3,"COS","Precio",163,0,"ARIAL",8,0,1,"0000","Precio"
3,"COS","Iva",180,0,"ARIAL",8,0,1,"0000",""
3,"COS","Descuentos",173,0,"ARIAL",8,0,1,"0000",""
3,"COS","Total",198,0,"ARIAL",8,0,1,"0000","SubTotal"
[FICAP]
[FIGRUP]

[CALCULS] 6
"MiTotal", "COS", "Total", "CAB 2"
"TotalBrut", "COS", "Total", "CAB 1"
"@CAM", "CAB 1", "Cambio", "CAB 1"
"@DEC", "CAB 1", "Decimales", "CAB 1"
"@COP", "CAB 1", "NumCopiasFra", "CAB 1"
"@DES", "CAB 1", "VenFacturas", "CAB 1"


[FIDOCUM]

; "@DIV","CAB1","Monedas.CodMoneda","CAB1"