"VER1.0","Presupuesto","Presupuesto de Clientes"
;Versio, Categoria, Descripcion
;Ampla, Llarg, [EspaiCos]
;MargenX, MargenY, EtiLin, EtiPag
; 0, 152, 30
[DOCUM]
 V, 9, 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] 1
2, "Anagrama.bmp", 17, 10, 195, 55

[FICAP]

; En Impresos recomendable crear con valor PrintAll a True
[PEU]
0, 5, #TRUE#, 2, #FALSE#, #TRUE#, 2
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[FIPEU]
[FIGRUP]

;--------------------------------------------------------------------------
;Tipo, NomGrup, Select, From, GropBy
[GRUP]
0, "GENERAL", #FALSE#
""
""
""
[CAPSALERA]
0, 0, #TRUE#, 0, #FALSE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 44
8, "0", "Campo('CAB 1','ModoPago')+' '+Campo('CAB 1','TipoPago')", 72, 80, "Times New Roman", 8, 0, 0, "0000", ""
1, "CuadroNum", 5, 55, 68, 85, 8, 0,
1, "CuadroOtros", 70, 55, 128, 85, 8, 0,
1, "CuadroAdrea", 130, 55, 202, 85, 8, 0,
1, "lineaH", 5, 65, 68, 65,,,
1, "lineaH", 5, 75, 68, 75,,,
1, "lineaV", 22, 55, 22, 65,,,
1, "lineaV", 60, 55, 60, 65,,,
1, "lineaV", 50, 65, 50, 75,,,
1, "lineaH", 70, 65, 128, 65,,,
1, "lineaH", 70, 75, 128, 75,,,
0,"Fact. Proforma",7,56,"Times New Roman",7,0,0,"0000"
0,"Fecha/Date",24,56,"Times New Roman",7,0,0,"0000"
0,"Proveed/Supplier",40,56,"Times New Roman",7,0,0,"0000"
0,"Hoja",62,56,"Times New Roman",7,0,0,"0000"
0,"Cdigo/Code",7,66,"Times New Roman",7,0,0,"0000"
0,"N.I.F / V.A.T",30,66,"Times New Roman",7,0,0,"0000"
0,"Pedido/Order",52,66,"Times New Roman",7,0,0,"0000"
0,"Forma de Envo/Transport",7,76,"Times New Roman",7,0,0,"0000"
0,"Peso",52,76,"Times New Roman",7,0,0,"0000"
0,"Bulto",61,76,"Times New Roman",7,0,0,"0000"
0,"S/Referencia/Reference",72,56,"Times New Roman",7,0,0,"0000"
0,"Representante/Agent",72,66,"Times New Roman",7,0,0,"0000"
0,"Forma de pago/Payment Terms",72,76,"Times New Roman",7,0,0,"0000"
1, "CuadroCos", 5, 92, 202, 240, 8, 0,
0,"Pedido",7,93,"Times New Roman",8,0,0,"0000"
0,"Artculo.Talla",32,93,"Times New Roman",8,0,0,"0000"
0,"Color",57,93,"Times New Roman",8,0,0,"0000"
0,"",82,93,"Times New Roman",8,0,0,"0000"
0,"Cantidad",160,93,"Times New Roman",8,0,0,"0000"
0,"Total",192,93,"Times New Roman",8,0,0,"0000"
0,"Precio",177,93,"Times New Roman",8,0,0,"0000"
0,"Precios por 100 unidades",202,88,"Times New Roman",8,0,1,"0000"
1, "lineaH", 5, 97, 202, 97,,,
1, "lineaV", 155, 92, 155, 240,,,
1, "lineaV", 80, 92, 80, 240,,,
1, "lineaV", 55, 92, 55, 240,,,
1, "lineaV", 28, 92, 28, 240,,,
1, "lineaV", 175, 92, 175, 240,,,
1, "lineaV", 188, 92, 188, 240,,,
1, "lineaV", 22, 65, 22, 75,,,
1, "lineaV", 38, 55, 38, 65,,,
1, "lineaV", 50, 75, 50, 85,,,
1, "lineaV", 60, 75, 60, 85,,,

[FICAP]

[PEU]
0, 11, #FALSE#, 0, #FALSE#, #TRUE#, 2
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 0
;0, "TOTAL :", 170, 0,"Times New Roman",12,0,1,"1000"
;0,"OBSERVACIONES :", 0, 5,"Times New Roman",9,0,0,"0000"

[FIPEU]
[FIGRUP]

;--------------------------------------------------------------------------
;tipo, NomGrup, Select, From, GropBy
[GRUP]
2,"CAB 1", #TRUE#
"SELECT ((VenPrev.DescuentoPP*VenPrev.total/100)*-1) as DstoPP,  (VenPrev.Total-((VenPrev.DescuentoPP*VenPrev.total/100))+ VenPrev.ImportePorte) as BaseImpo, round(BaseImpo,2) as BaseRedondeada, (((VenPrev.Total-((VenPrev.DescuentoPP*VenPrev.total/100))+ VenPrev.ImportePorte))*0.21) as ImportIva, round(ImportIva,2) as ImportIvaRed, (((VenPrev.Total-((VenPrev.DescuentoPP*VenPrev.total/100))+ VenPrev.ImportePorte))*0.052*(abs(Clientes.ReEquivalencia)*1)) as ImportReqEquiv, round (ImportReqEquiv,2) as ImportReqEquivRed, VenPrev.*, CodigosPostales.CodPostal & ' - ' & CodigosPostales.Ciudad AS Ciudad1, Provincias.Provincia & '  ' & Paises.Pais AS ProPais, Monedas.Decimales, Monedas.ValorVenta AS Cambio, Clientes.NumCopiasAlb, Clientes.NumCopiasAlbSV, Clientes.NIF, iif(Clientes.ReEquivalencia=true,1,0) as ReEquivalenc, Direccion.*, ModoPago.Descripcion AS ModoPago, TipoPago.Descripcion AS TipoPago, VenPrev.CodCliente AS CodCliente, Agencias.NombreAgencia, Representantes.Nombre"
"FROM (((((((((VenPrev LEFT JOIN CodigosPostales ON (VenPrev.CodPais = CodigosPostales.CodPais) AND (VenPrev.CodPostal = CodigosPostales.CodPostal)) LEFT JOIN Provincias ON (CodigosPostales.CodProvincia = Provincias.CodProvincia) AND (CodigosPostales.CodPais = Provincias.CodPais)) LEFT JOIN Paises ON VenPrev.CodPais = Paises.CodPais) LEFT JOIN ModoPago ON VenPrev.CodFormaPago = ModoPago.CodPago) LEFT JOIN TipoPago ON VenPrev.CodTipoPago = TipoPago.CodPago) LEFT JOIN Monedas ON VenPrev.CodMoneda = Monedas.CodMoneda) LEFT JOIN Clientes ON VenPrev.CodCliente = Clientes.CodCliente) LEFT JOIN Direccion ON (VenPrev.CodDireccion = Direccion.CodDireccion) AND (VenPrev.CodCliente = Direccion.CodCliente)) LEFT JOIN Agencias ON VenPrev.CodAgenciaTransporte = Agencias.CodAgencia) LEFT JOIN Representantes ON VenPrev.CodRepresentante = Representantes.CodRepresentante"
""

[CONDICIONS] 4
"Numero","Nmero Presupuesto",0,0
"Seccion","Seccin",0,1
"Fecha","Fecha",0,2
"NombreCliente","Nombre Cliente",0,1

[CAPSALERA]
0, 100, #TRUE#, 0, #TRUE#, #TRUE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 15
3,"CAB 1","Nombre", 72,70,"Times New Roman",8,0,0,"0000",""
8, "0", "RIGHT$(Campo('CAB 1','VenPrev.CodCliente'),7)",7,70,"Times New Roman",8,0,25,"0000",""
6,"Pagina",64,60,"Times New Roman",8,0,0,"0000",""
3,"CAB 1","VenPrev.Destinatario", 132,57,"Times New Roman",10,0,0,"0000",""
8, "0", "LEFT$(Campo('CAB 1','VenPrev.Direccion'),45)",132,62,"Times New Roman",10,0,0,"0000",""
8, "0", "MID$(Campo('CAB 1','VenPrev.Direccion'),46,45)",132,67,"Times New Roman",10,0,0,"0000",""
3,"CAB 1","Ciudad1", 132,72,"Times New Roman",10,0,0,"0000",""
3,"CAB 1","ProPais", 132,77,"Times New Roman",10,0,0,"0000",""
3,"CAB 1","Numero",6,60,"Times New Roman",8,0,0,"0000",""
3,"CAB 1","Fecha",23,60,"Times New Roman",8,0,0,"0000",""
3,"CAB 1","NIF",36,70,"Times New Roman",8,0,2,"0000",""
3,"CAB 1","NumPedido",52,70,"Times New Roman",8,0,2,"0000",""
3,"CAB 1","NombreAgencia",7,80,"Times New Roman",8,0,0,"0000",""
3,"CAB 1","Peso",51,80,"Times New Roman",8,0,0,"0000",""
3,"CAB 1","Bultos",61,80,"Times New Roman",8,0,0,"0000",""
[FICAP]

[PEU]
0,11, #TRUE#, 0, #FALSE#, #TRUE#, 2
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 21
0,"Condiciones :", 7, -34,"Times New Roman",11,0,0,"1101"
3, "CABECERA", "LineaObsAutomatica", 92, -11, "Times New Roman", 9, 0, 0,"0000", ""
0, "Imp.Bruto", 72, -30, "Times New Roman", 8, 0, 0, "1000"
0, "% P.P.", 90, -30, "Times New Roman", 8, 0, 0, "1000"
3,"CAB 1","DescuentoPP", 94,-25,"Times New Roman",8,0,1,"1000",""
0, "Des. PP", 102, -30, "Times New Roman", 8, 0, 0, "1000"
3,"CAB 1","DstoPP", 109,-25,"Times New Roman",8,0,1,"1000","Total"
0, "Portes", 128, -30, "Times New Roman", 8, 0, 1, "1000"
3,"CAB 1","ImportePorte", 123,-25,"Times New Roman",8,0,1,"1000","Total"
0, "21% IVA", 163, -30, "Times New Roman", 8, 0, 1, "1000"
0, "Base Imp.", 147, -30, "Times New Roman", 8, 0, 1, "1000"
3,"CAB 1","BaseRedondeada", 137,-25,"Times New Roman",8,0,0,"1000","Total"
0, "TOTAL", 200, -30, "Times New Roman", 8, 0, 1, "1000"
3,"CAB 1","ImportIva", 160,-25,"Times New Roman",8,0,1,"1000","Total"
0, "", 198, -25, "Times New Roman", 8, 0, 0, "1000"
1, "CuadroCond", 5, -35, 68, -5, 8, 0,
1, "CuadroPeu", 70, -35, 202, -30, 8, 0,
8, "1", "Campo('CAB 1','ImportIvaRed')+Campo('CAB 1','ImportReqEquivRed')+Campo('CAB 1','BaseRedondeada')", 196, -25, "Times New Roman",8,0,1,"1000","Total"
5, 0, "TotalBrut", 80, -25, "Times New Roman", 8, 0, 1, "1000","Total"
0, "Req. Equival.", 168, -30, "Times New Roman", 8, 0, 0, "1000"
3,"CAB 1","ImportReqEquiv", 178,-25,"Times New Roman",8,0,1,"1000","Total"
;8, "1", "Campo('CAB 1','Total')+Campo('CAB 1','ImportePorte')+((DIV(Campo('CAB 1','DescuentoPP')*Campo('CAB 1','Total'),100))*-1)+DIV((Campo('CAB 1','Total')+Campo('CAB 1','ImportePorte')+((DIV(Campo('CAB 1','DescuentoPP')*Campo('CAB 1','Total'),100))*-1))*21,100)+(Campo('CAB 1','Total')+Campo('CAB 1','ImportePorte')+((DIV(Campo('CAB 1','DescuentoPP')*Campo('CAB 1','Total'),100))*-1))*0.052*ABS(Campo('CAB 1','ReEquivalenc'))*1)", 196, -25, "Times New Roman",8,0,1,"1000","Total"
;8, "1", "(Campo('CAB 1','Total')+Campo('CAB 1','ImportePorte')+((DIV(Campo('CAB 1','DescuentoPP')*Campo('CAB 1','Total'),100))*-1))*0.052*ABS(Campo('CAB 1','ReEquivalenc'))*1", 178, -25, "Times New Roman", 8, 105, 1, "1000", "Total"
;;8, "1", "DIV((Campo('CAB 1','Total')+Campo('CAB 1','ImportePorte')+((DIV(Campo('CAB 1','DescuentoPP')*Campo('CAB 1','Total'),100))*-1))*21,100", 160, -25, "Times New Roman",8,0,1,"1000","Total"
;3,"CAB 1","ReEquivalenc", 70,-29,"Times New Roman",18,0,0,"1000",""
;5, 0, "CuotaNeto", 198, -25, "Times New Roman", 8, 0, 1, "1000","##.##"
;5, 0, "CuotaIvaaa", 180, -25, "Times New Roman", 8, 0, 1, "1000","##.##"
;6, "@DTO", 100, -5, "Times New Roman", 12, 0, 1, "1000","Total"
;6, "@RE", 135, -5, "Times New Roman", 12, 0, 1, "1000","Total"
;6, "@BASE", 155, -5, "Times New Roman", 12, 0, 1, "1000","Total"
;0, "R.E.", 135, -30, "Times New Roman", 8, 0, 1, "1000"
;0, "Portes", 161, -30, "Times New Roman", 8, 0, 1, "1000"
;6, "@CuotaIva", 108, -25, "Times New Roman", 8, 0, 1, "1000","Total"
;6, "@Neto", 200, -25, "Times New Roman", 8, 0, 1, "1000","Total"
;0, "Descuentos", 55, -30, "Times New Roman", 8, 0, 1, "1000"
;0, "BaseImponible", 82, -30, "Times New Roman", 8, 0, 1, "1000"
[FIPEU]
[FIGRUP]

;--------------------------------------------------------
;tipo, NomGrup, Select, From, GropBy
[GRUP]
3,"COS", #FALSE#
"SELECT VenPrevLin.Lote, VenPrevLin.CodCliente, VenPrevLin.Total, VenPrevLin.Recargo, VenPrevLin.Iva, VenPrevLin.CodIVA, VenPrevLin.CodDescuento, VenPrevLin.Precio, VenPrevLin.Numero, VenPrevLin.Cantidad, VenPrevLin.NumLinea, VenPrevLin.LineaNeta, VenPrevLin.Seccion, VenPrevLin.CodAlmacen, VenPrevLin.Descripcion, VenPrevLin.CodArticulo, IIf(LineaNeta,' Neta','') & Descuento1 & ' ' & Descuento2 & ' ' & Descuento3 AS Descuentos, [Total]*[Iva]/100 AS CuotaIva, [Total]+[CuotaIva] AS Neto, VenPrevLin.Iva"
"FROM VenPrevLin"
""

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

[CONDICIONS] 3
"Numero","Nmero de presupuesto",1,0,"CAB 1","Numero"
"Seccion","Nmero de presupuesto",1,1,"CAB 1","Seccion"
"CodCliente","Nmero de presupuesto",1,1,"CAB 1","CodCliente"

[CAPSALERA]
0, 5, #TRUE#, 0, #TRUE#, #FALSE#, 0
; RAp(n), Alt(n), SMin(b), Salto(D), GA(b), All(b), Rel(D)
[CAMPS] 6
3,"COS","CodArticulo",30,0,"Times New Roman",8,0,0,"0000",""
3,"COS","Lote",57,0,"Times New Roman",8,0,0,"0000",""
3,"COS","Descripcion",82,0,"Times New Roman",8,0,0,"0000",""
3,"COS","Cantidad",173,0,"Times New Roman",8,0,1,"0000",""
3,"COS","Precio",186,0,"Times New Roman",8,0,1,"0000","Total"
3,"COS","Total",201,0,"Times New Roman",8,0,1,"0000","Total"
[FICAP]
[FIGRUP]

[CALCULS] 5
"TotalBrut","COS","Total","CAB 1"
"CuotaIvaaa","COS","CuotaIva","CAB 1"
"CuotaNeto","COS","Neto","CAB 1"
"@CAM","CAB 1","Cambio","CAB 1"
"@DEC","CAB 1","Decimales","CAB 1"
[FIDOCUM]
