Repaso informes
git-svn-id: https://192.168.0.254/svn/Proyectos.Noviseda_FactuGES2/trunk@31 f33bb606-9f5c-448d-9c99-757f00063c96
This commit is contained in:
parent
7534e2037d
commit
54e71de25e
@ -23,20 +23,27 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
' v_facturas_cliente.referencia, v_facturas_cliente.tipo,'#10' v_' +
|
' v_facturas_cliente.referencia, v_facturas_cliente.tipo,'#10' v_' +
|
||||||
'facturas_cliente.fecha_factura, v_facturas_cliente.fecha_VENCIMI' +
|
'facturas_cliente.fecha_factura, v_facturas_cliente.fecha_VENCIMI' +
|
||||||
'ENTO,'#10' v_facturas_cliente.base_imponible,'#10' v_facturas_client' +
|
'ENTO,'#10' v_facturas_cliente.base_imponible,'#10' v_facturas_client' +
|
||||||
'e.situacion, v_facturas_cliente.descuento,'#10' v_facturas_cliente' +
|
'e.situacion, v_facturas_cliente.descuento, v_facturas_cliente.de' +
|
||||||
'.importe_descuento, v_facturas_cliente.iva,'#10' v_facturas_client' +
|
'scuento2,'#10' v_facturas_cliente.importe_descuento, v_facturas_cl' +
|
||||||
'e.importe_iva, v_facturas_cliente.re,'#10' v_facturas_cliente.impo' +
|
'iente.importe_descuento2,'#10' v_facturas_cliente.iva, v_facturas_' +
|
||||||
'rte_re, v_facturas_cliente.importe_total,'#10' v_facturas_cliente.' +
|
'cliente.importe_iva, v_facturas_cliente.re,'#10' v_facturas_client' +
|
||||||
'observaciones, v_facturas_cliente.nif_cif,'#10' v_facturas_cliente' +
|
'e.importe_re, v_facturas_cliente.importe_total,'#10' v_facturas_cl' +
|
||||||
'.id_cliente, v_facturas_cliente.nombre,'#10' v_facturas_cliente.ca' +
|
'iente.observaciones, v_facturas_cliente.nif_cif,'#10' contactos.RE' +
|
||||||
'lle, v_facturas_cliente.provincia,'#10' v_facturas_cliente.poblaci' +
|
'FERENCIA as REF_CLIENTE,'#10' contactos.PERSONA_CONTACTO,'#10' conta' +
|
||||||
'on, v_facturas_cliente.codigo_postal,'#10' v_facturas_cliente.reca' +
|
'ctos2.nombre as nombre_vendedor,'#10' v_facturas_cliente.id_client' +
|
||||||
'rgo_equivalencia, v_facturas_cliente.importe_neto,'#10' v_facturas' +
|
'e, v_facturas_cliente.nombre,'#10' v_facturas_cliente.calle, v_fac' +
|
||||||
'_cliente.importe_porte, formas_pago.descripcion as FORMA_PAGO,'#10' ' +
|
'turas_cliente.provincia,'#10' v_facturas_cliente.poblacion, v_fact' +
|
||||||
' v_facturas_cliente.DATOS_BANCARIOS, v_facturas_cliente.RETENCI' +
|
'uras_cliente.codigo_postal,'#10' v_facturas_cliente.recargo_equiva' +
|
||||||
'ON, v_facturas_cliente.IMPORTE_RETENCION'#10'from v_facturas_cliente' +
|
'lencia, v_facturas_cliente.importe_neto,'#10' v_facturas_cliente.i' +
|
||||||
#10' left outer join formas_pago on (formas_pago.id = v_facturas_' +
|
'mporte_porte, formas_pago.descripcion as FORMA_PAGO,'#10' v_factur' +
|
||||||
'cliente.id_forma_pago)'#10'WHERE V_FACTURAS_CLIENTE.ID = :ID'#10
|
'as_cliente.DATOS_BANCARIOS, v_facturas_cliente.RETENCION, v_fact' +
|
||||||
|
'uras_cliente.IMPORTE_RETENCION'#10'from v_facturas_cliente'#10' left o' +
|
||||||
|
'uter join contactos on (contactos.id = v_facturas_cliente.id_cli' +
|
||||||
|
'ente)'#10' left outer join formas_pago on (formas_pago.id = v_fact' +
|
||||||
|
'uras_cliente.id_forma_pago)'#10' left outer join clientes_datos on' +
|
||||||
|
' (clientes_datos.id_cliente = v_facturas_cliente.id_cliente)'#10' ' +
|
||||||
|
'left outer join contactos contactos2 on (contactos2.id = cliente' +
|
||||||
|
's_datos.id_agente)'#10'WHERE V_FACTURAS_CLIENTE.ID = :ID'#10
|
||||||
StatementType = stSQL
|
StatementType = stSQL
|
||||||
ColumnMappings = <
|
ColumnMappings = <
|
||||||
item
|
item
|
||||||
@ -158,6 +165,26 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
item
|
item
|
||||||
DatasetField = 'IMPORTE_RETENCION'
|
DatasetField = 'IMPORTE_RETENCION'
|
||||||
TableField = 'IMPORTE_RETENCION'
|
TableField = 'IMPORTE_RETENCION'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
DatasetField = 'DESCUENTO2'
|
||||||
|
TableField = 'DESCUENTO2'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
DatasetField = 'IMPORTE_DESCUENTO2'
|
||||||
|
TableField = 'IMPORTE_DESCUENTO2'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
DatasetField = 'REF_CLIENTE'
|
||||||
|
TableField = 'REF_CLIENTE'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
DatasetField = 'PERSONA_CONTACTO'
|
||||||
|
TableField = 'PERSONA_CONTACTO'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
DatasetField = 'NOMBRE_VENDEDOR'
|
||||||
|
TableField = 'NOMBRE_VENDEDOR'
|
||||||
end>
|
end>
|
||||||
end>
|
end>
|
||||||
Name = 'InformeFacturasCliente'
|
Name = 'InformeFacturasCliente'
|
||||||
@ -205,17 +232,25 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'DESCUENTO'
|
Name = 'DESCUENTO'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
DictionaryEntry = 'FacturasCliente_DESCUENTO'
|
DictionaryEntry = 'FacturasCliente_DESCUENTO'
|
||||||
end
|
end
|
||||||
|
item
|
||||||
|
Name = 'DESCUENTO2'
|
||||||
|
DataType = datCurrency
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Name = 'IMPORTE_DESCUENTO'
|
Name = 'IMPORTE_DESCUENTO'
|
||||||
DataType = datCurrency
|
DataType = datCurrency
|
||||||
DictionaryEntry = 'FacturasCliente_IMPORTE_DESCUENTO'
|
DictionaryEntry = 'FacturasCliente_IMPORTE_DESCUENTO'
|
||||||
end
|
end
|
||||||
|
item
|
||||||
|
Name = 'IMPORTE_DESCUENTO2'
|
||||||
|
DataType = datCurrency
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Name = 'IVA'
|
Name = 'IVA'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
DictionaryEntry = 'FacturasCliente_IVA'
|
DictionaryEntry = 'FacturasCliente_IVA'
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
@ -225,7 +260,7 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'RE'
|
Name = 'RE'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'IMPORTE_RE'
|
Name = 'IMPORTE_RE'
|
||||||
@ -247,6 +282,21 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
Size = 15
|
Size = 15
|
||||||
DictionaryEntry = 'FacturasCliente_NIF_CIF'
|
DictionaryEntry = 'FacturasCliente_NIF_CIF'
|
||||||
end
|
end
|
||||||
|
item
|
||||||
|
Name = 'REF_CLIENTE'
|
||||||
|
DataType = datString
|
||||||
|
Size = 255
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'PERSONA_CONTACTO'
|
||||||
|
DataType = datString
|
||||||
|
Size = 255
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'NOMBRE_VENDEDOR'
|
||||||
|
DataType = datString
|
||||||
|
Size = 255
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Name = 'ID_CLIENTE'
|
Name = 'ID_CLIENTE'
|
||||||
DataType = datInteger
|
DataType = datInteger
|
||||||
@ -306,7 +356,7 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'RETENCION'
|
Name = 'RETENCION'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'IMPORTE_RETENCION'
|
Name = 'IMPORTE_RETENCION'
|
||||||
@ -1529,17 +1579,25 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'DESCUENTO'
|
Name = 'DESCUENTO'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
DictionaryEntry = 'FacturasCliente_DESCUENTO'
|
DictionaryEntry = 'FacturasCliente_DESCUENTO'
|
||||||
end
|
end
|
||||||
|
item
|
||||||
|
Name = 'DESCUENTO2'
|
||||||
|
DataType = datCurrency
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Name = 'IMPORTE_DESCUENTO'
|
Name = 'IMPORTE_DESCUENTO'
|
||||||
DataType = datCurrency
|
DataType = datCurrency
|
||||||
DictionaryEntry = 'FacturasCliente_IMPORTE_DESCUENTO'
|
DictionaryEntry = 'FacturasCliente_IMPORTE_DESCUENTO'
|
||||||
end
|
end
|
||||||
|
item
|
||||||
|
Name = 'IMPORTE_DESCUENTO2'
|
||||||
|
DataType = datCurrency
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Name = 'IVA'
|
Name = 'IVA'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
DictionaryEntry = 'FacturasCliente_IVA'
|
DictionaryEntry = 'FacturasCliente_IVA'
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
@ -1549,7 +1607,7 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'RE'
|
Name = 'RE'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'IMPORTE_RE'
|
Name = 'IMPORTE_RE'
|
||||||
@ -1571,6 +1629,21 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
Size = 15
|
Size = 15
|
||||||
DictionaryEntry = 'FacturasCliente_NIF_CIF'
|
DictionaryEntry = 'FacturasCliente_NIF_CIF'
|
||||||
end
|
end
|
||||||
|
item
|
||||||
|
Name = 'REF_CLIENTE'
|
||||||
|
DataType = datString
|
||||||
|
Size = 255
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'PERSONA_CONTACTO'
|
||||||
|
DataType = datString
|
||||||
|
Size = 255
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Name = 'NOMBRE_VENDEDOR'
|
||||||
|
DataType = datString
|
||||||
|
Size = 255
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Name = 'ID_CLIENTE'
|
Name = 'ID_CLIENTE'
|
||||||
DataType = datInteger
|
DataType = datInteger
|
||||||
@ -1630,7 +1703,7 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'RETENCION'
|
Name = 'RETENCION'
|
||||||
DataType = datFloat
|
DataType = datCurrency
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Name = 'IMPORTE_RETENCION'
|
Name = 'IMPORTE_RETENCION'
|
||||||
@ -1691,63 +1764,38 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
PrintOptions.Printer = 'Por defecto'
|
PrintOptions.Printer = 'Por defecto'
|
||||||
PrintOptions.PrintOnSheet = 0
|
PrintOptions.PrintOnSheet = 0
|
||||||
ReportOptions.CreateDate = 39065.872423495400000000
|
ReportOptions.CreateDate = 39065.872423495400000000
|
||||||
ReportOptions.LastChange = 39920.656640081000000000
|
ReportOptions.LastChange = 40197.425634756900000000
|
||||||
ScriptLanguage = 'PascalScript'
|
ScriptLanguage = 'PascalScript'
|
||||||
ScriptText.Strings = (
|
ScriptText.Strings = (
|
||||||
''
|
|
||||||
'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
|
|
||||||
'var'
|
'var'
|
||||||
' Cadena: String;'
|
' Pagina: Variant;'
|
||||||
|
''
|
||||||
|
''
|
||||||
|
'procedure Memo2OnBeforePrint(Sender: TfrxComponent);'
|
||||||
'begin'
|
'begin'
|
||||||
'{ DatosEmpresa.Lines.Clear;'
|
' Memo2.Lines.Clear;'
|
||||||
' if (<frxDBCabecera."TELEFONO_1_EMPRESA"> <> '#39#39') then'
|
' if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then'
|
||||||
' Cadena := '#39'TLF: '#39' + <frxDBCabecera."TELEFONO_1_EMPRESA">;'
|
' Memo2.Lines.Add('#39'ORDEN DE DEVOLUCI'#211'N'#39')'
|
||||||
' if (<frxDBCabecera."FAX_EMPRESA"> <> '#39#39') then'
|
' else'
|
||||||
|
' Memo2.Lines.Add('#39'ALBAR'#193'N DE CLIENTE'#39')'
|
||||||
' Cadena := Cadena + '#39' FAX: '#39' + <frxDBCabecera."FAX_EMPRESA' +
|
|
||||||
'">;'
|
|
||||||
' DatosEmpresa.Lines.Add(Cadena);'
|
|
||||||
'}'
|
|
||||||
'end;'
|
'end;'
|
||||||
''
|
''
|
||||||
'procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent);'
|
'procedure Memo5OnBeforePrint(Sender: TfrxComponent);'
|
||||||
'begin'
|
'begin'
|
||||||
'{ NombreEmpresa.Lines.Clear;'
|
' if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then'
|
||||||
' NombreEmpresa.Lines.Add(<frxDBCabecera."NOMBRE_EMPRESA">);'
|
' begin'
|
||||||
'}'
|
' Memo5.Lines.Clear;'
|
||||||
|
' Memo5.Lines.Add('#39'N'#186' orden:'#39');'
|
||||||
|
' end;'
|
||||||
'end;'
|
'end;'
|
||||||
''
|
''
|
||||||
'procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent);'
|
'procedure Memo9OnBeforePrint(Sender: TfrxComponent);'
|
||||||
'var'
|
|
||||||
' ACadena : String;'
|
|
||||||
'begin'
|
'begin'
|
||||||
'{ ACadena := '#39#39';'
|
' if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then'
|
||||||
' DireccionEnvio.Lines.Clear;'
|
' begin'
|
||||||
' if (<frxDBCabecera."REFERENCIA_CLIENTE"> <> '#39#39') then'
|
' Memo9.Lines.Clear;'
|
||||||
' ACadena := <frxDBCabecera."REFERENCIA_CLIENTE">;'
|
' Memo9.Lines.Add('#39'Fecha orden:'#39');'
|
||||||
''
|
' end;'
|
||||||
' if (<frxDBCabecera."PERSONA_CONTACTO"> <> '#39#39') then'
|
|
||||||
|
|
||||||
' ACadena := ACadena + '#39' '#39' + <frxDBCabecera."PERSONA_CONTACT' +
|
|
||||||
'O">;'
|
|
||||||
''
|
|
||||||
' DireccionEnvio.Lines.Add(ACadena);'
|
|
||||||
' ACadena := '#39#39';'
|
|
||||||
' DireccionEnvio.Lines.Add(<frxDBCabecera."CALLE">);'
|
|
||||||
' if (<frxDBCabecera."CODIGO_POSTAL"> <> '#39#39') then'
|
|
||||||
' ACadena := <frxDBCabecera."CODIGO_POSTAL"> + '#39' '#39';'
|
|
||||||
' if (<frxDBCabecera."POBLACION"> <> '#39#39') then'
|
|
||||||
' ACadena := ACadena + <frxDBCabecera."CODIGO_POSTAL">;'
|
|
||||||
''
|
|
||||||
' if (ACadena <> '#39#39') then'
|
|
||||||
' DireccionEnvio.Lines.Add(ACadena);'
|
|
||||||
''
|
|
||||||
' if (<frxDBCabecera."PROVINCIA"> <> '#39#39') then'
|
|
||||||
' DireccionEnvio.Lines.Add(<frxDBCabecera."PROVINCIA">);'
|
|
||||||
''
|
|
||||||
' if (<frxDBCabecera."TELEFONO"> <> '#39#39') then'
|
|
||||||
' DireccionEnvio.Lines.Add(<frxDBCabecera."TELEFONO">);'
|
|
||||||
'}'
|
|
||||||
'end;'
|
'end;'
|
||||||
''
|
''
|
||||||
'procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);'
|
'procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);'
|
||||||
@ -1756,111 +1804,13 @@ object RptFacturasCliente: TRptFacturasCliente
|
|||||||
' Set('#39'TotalPaginas'#39', (<TotalPaginas> + 1));'
|
' Set('#39'TotalPaginas'#39', (<TotalPaginas> + 1));'
|
||||||
''
|
''
|
||||||
' if Engine.FinalPass then'
|
' if Engine.FinalPass then'
|
||||||
' Set('#39'Pagina'#39', (<Pagina> + 1)); '
|
' Set('#39'Pagina'#39', (<Pagina> + 1));'
|
||||||
'end;'
|
'end;'
|
||||||
''
|
''
|
||||||
'procedure frxReportOnStartReport(Sender: TfrxComponent);'
|
'procedure frxReportOnStartReport(Sender: TfrxComponent);'
|
||||||
'begin'
|
'begin'
|
||||||
' Set('#39'Pagina'#39', 0);'
|
' Set('#39'Pagina'#39', 0);'
|
||||||
' Set('#39'TotalPaginas'#39', 0);'
|
' Set('#39'TotalPaginas'#39', 0);'
|
||||||
' Set('#39'Capitulo'#39', 0);'
|
|
||||||
' Set('#39'NumCapitulos'#39', 0); '
|
|
||||||
'end;'
|
|
||||||
''
|
|
||||||
'procedure Memo4OnBeforePrint(Sender: TfrxComponent);'
|
|
||||||
'begin'
|
|
||||||
' if (Length(<frxDBCabecera."OBSERVACIONES">) = 0) then'
|
|
||||||
' Memo4.Visible := False; '
|
|
||||||
'end;'
|
|
||||||
''
|
|
||||||
'procedure Memo22OnBeforePrint(Sender: TfrxComponent);'
|
|
||||||
'begin'
|
|
||||||
' if (<frxDBCabecera."DESCUENTO"> = 0) then'
|
|
||||||
' begin '
|
|
||||||
' Subtotal.Text := '#39'Base imponible:'#39';'
|
|
||||||
' BaseImponible.Text := '#39'Importe total:'#39'; '
|
|
||||||
' BaseImponible.Font.Style := fsBold;'
|
|
||||||
''
|
|
||||||
|
|
||||||
' ImpBaseImponible.Text := FormatFloat('#39'#,##0.00 '#8364#39', <frxDBCa' +
|
|
||||||
'becera."IMPORTE_TOTAL">);'
|
|
||||||
' ImpBaseImponible.Font.Style := fsBold; '
|
|
||||||
' '
|
|
||||||
' Descuento.Text := '#39'[<frxDBCabecera."IVA">]% IVA:'#39';'
|
|
||||||
' ImpDescuento.Text := '#39'[frxDBCabecera."IMPORTE_IVA"]'#39';'
|
|
||||||
' Memo11.Color := $00CCFFCC;'
|
|
||||||
''
|
|
||||||
' if (<frxDBCabecera."IMPORTE_RETENCION"> > 0) then'
|
|
||||||
' begin '
|
|
||||||
' BaseImponible.Text := '#39'Total certificaci'#243'n:'#39';'
|
|
||||||
|
|
||||||
' IVA.Text := FormatFloat('#39'#,##0.00 %'#39',<frxDBCabecera."RET' +
|
|
||||||
'ENCION">) + '#39' Retenci'#243'n:'#39'; '
|
|
||||||
|
|
||||||
' ImpIVA.Text := FormatFloat('#39'-#,##0.00 '#8364#39',<frxDBCabecera.' +
|
|
||||||
'"IMPORTE_RETENCION">);'
|
|
||||||
|
|
||||||
' ImporteTotal.Text := '#39'TOTAL FACTURA'#39'; ' +
|
|
||||||
' ' +
|
|
||||||
' '
|
|
||||||
|
|
||||||
' ImpImporteTotal.Text := FormatFloat('#39'#,##0.00 '#8364#39', (<frxD' +
|
|
||||||
'BCabecera."IMPORTE_TOTAL"> - <frxDBCabecera."IMPORTE_RETENCION">' +
|
|
||||||
')); '
|
|
||||||
' end '
|
|
||||||
' else'
|
|
||||||
' begin'
|
|
||||||
' IVA.Visible := False;'
|
|
||||||
' ImpIVA.Visible := False;'
|
|
||||||
' ImporteTotal.Visible := False;'
|
|
||||||
' ImpImporteTotal.Visible := False;'
|
|
||||||
' Memo16.Visible := False; '
|
|
||||||
' Memo17.Visible := False;'
|
|
||||||
' end;'
|
|
||||||
' end'
|
|
||||||
' else'
|
|
||||||
' begin '
|
|
||||||
' if (<frxDBCabecera."IMPORTE_RETENCION"> > 0) then'
|
|
||||||
' begin'
|
|
||||||
' ImporteTotal.Text := '#39'Total certificaci'#243'n:'#39'; '
|
|
||||||
' Retencion.Visible := True;'
|
|
||||||
' ImpRetencion.Visible := True;'
|
|
||||||
' LinRetencion.Visible := True; '
|
|
||||||
' TotalFacturaRet.Visible := True;'
|
|
||||||
' ImpTotalFacturaRet.Visible := True;'
|
|
||||||
' LinImporteTotalFacturaRet.Visible := True; '
|
|
||||||
' end'
|
|
||||||
' end '
|
|
||||||
'end;'
|
|
||||||
''
|
|
||||||
'procedure Memo39OnBeforePrint(Sender: TfrxComponent);'
|
|
||||||
'begin'
|
|
||||||
' Memo39.Clear; '
|
|
||||||
' if (<frxDBCabecera."TIPO"> = '#39'F'#39') then'
|
|
||||||
|
|
||||||
' Memo39.Text := '#39'FACTURA'#39' ' +
|
|
||||||
' '
|
|
||||||
' else'
|
|
||||||
' Memo39.Text := '#39'ABONO'#39'; '
|
|
||||||
'end;'
|
|
||||||
''
|
|
||||||
'procedure Picture4OnBeforePrint(Sender: TfrxComponent);'
|
|
||||||
'begin'
|
|
||||||
' if (<VerSello> = 1) then'
|
|
||||||
' Picture4.Visible := True'
|
|
||||||
' else'
|
|
||||||
' Picture4.Visible := False; '
|
|
||||||
'end;'
|
|
||||||
''
|
|
||||||
'procedure eCopiaOnBeforePrint(Sender: TfrxComponent);'
|
|
||||||
'begin'
|
|
||||||
' if (<VerCopia> = 1) then'
|
|
||||||
' begin '
|
|
||||||
' eCopia.Visible := True; '
|
|
||||||
' Picture4.Visible := False; '
|
|
||||||
' end '
|
|
||||||
' else'
|
|
||||||
' eCopia.Visible := False; '
|
|
||||||
'end;'
|
'end;'
|
||||||
''
|
''
|
||||||
'begin'
|
'begin'
|
||||||
|
|||||||
@ -85,11 +85,11 @@ type
|
|||||||
frxDBInformeListadoFacturasPendientes: TfrxDBDataset;
|
frxDBInformeListadoFacturasPendientes: TfrxDBDataset;
|
||||||
DADSInformeListadoFacturasPendientes: TDADataSource;
|
DADSInformeListadoFacturasPendientes: TDADataSource;
|
||||||
tbl_InformeListadoFacturasPendientes: TDAMemDataTable;
|
tbl_InformeListadoFacturasPendientes: TDAMemDataTable;
|
||||||
schReport: TDASchema;
|
|
||||||
frxDBInformeListadoFacturasResumen: TfrxDBDataset;
|
frxDBInformeListadoFacturasResumen: TfrxDBDataset;
|
||||||
DADSInformeListadoFacturasResumen: TDADataSource;
|
DADSInformeListadoFacturasResumen: TDADataSource;
|
||||||
tbl_InformeListadoFacturasResumen: TDAMemDataTable;
|
tbl_InformeListadoFacturasResumen: TDAMemDataTable;
|
||||||
Bin2DataStreamer: TDABin2DataStreamer;
|
Bin2DataStreamer: TDABin2DataStreamer;
|
||||||
|
schReport: TDASchema;
|
||||||
procedure DataModuleCreate(Sender: TObject);
|
procedure DataModuleCreate(Sender: TObject);
|
||||||
procedure DataModuleDestroy(Sender: TObject);
|
procedure DataModuleDestroy(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -675,20 +675,16 @@ begin
|
|||||||
raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe ' + rptFacturaCliente));
|
raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe ' + rptFacturaCliente));
|
||||||
|
|
||||||
frxReport.LoadFromFile(AInforme, True);
|
frxReport.LoadFromFile(AInforme, True);
|
||||||
if VerSello then
|
|
||||||
frxReport.Variables.Variables['VerSello'] := 1
|
|
||||||
else
|
|
||||||
frxReport.Variables.Variables['VerSello'] := 0;
|
|
||||||
|
|
||||||
//La primera impresion siempre es sin la etiqueta copia
|
//La primera impresion siempre es sin la etiqueta copia
|
||||||
frxReport.Variables.Variables['VerCopia'] := 0;
|
frxReport.Variables.Variables['VerCopia'] := 0;
|
||||||
frxReport.PrepareReport(False);
|
frxReport.PrepareReport(False);
|
||||||
if VerCopia then
|
// if VerCopia then
|
||||||
begin
|
// begin
|
||||||
frxReport.Variables.Variables['VerCopia'] := 1;
|
// frxReport.Variables.Variables['VerCopia'] := 1;
|
||||||
frxReport.Variables.Variables['VerSello'] := 0; //El sello nunca saldrá en la copia
|
// frxReport.Variables.Variables['VerSello'] := 0; //El sello nunca saldrá en la copia
|
||||||
frxReport.PrepareReport(False);
|
// frxReport.PrepareReport(False);
|
||||||
end;
|
// end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||||
|
|||||||
@ -52,26 +52,22 @@ inherited fDialogOpcionesImpresionFacturasCliente: TfDialogOpcionesImpresionFact
|
|||||||
Height = 130
|
Height = 130
|
||||||
ExplicitWidth = 418
|
ExplicitWidth = 418
|
||||||
ExplicitHeight = 130
|
ExplicitHeight = 130
|
||||||
object cbVerCopia: TCheckBox
|
object cbContabilidad: TCheckBox
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 50
|
Left = 50
|
||||||
Top = 51
|
Top = 51
|
||||||
Width = 279
|
Width = 279
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Indicar '#39'COPIA'#39' en la cabecera'
|
Caption = 'Indicar '#39'CONTABILIDAD'#39' en la cabecera'
|
||||||
Checked = True
|
|
||||||
State = cbChecked
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object cbVerSello: TCheckBox
|
object cbCopia: TCheckBox
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 50
|
Left = 50
|
||||||
Top = 28
|
Top = 28
|
||||||
Width = 200
|
Width = 200
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Mostrar sello de la empresa'
|
Caption = 'Indicar '#39'COPIA'#39' en la cabecera'
|
||||||
Checked = True
|
|
||||||
State = cbChecked
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -8,8 +8,8 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
TfDialogOpcionesImpresionFacturasCliente = class(TfDialogBase)
|
TfDialogOpcionesImpresionFacturasCliente = class(TfDialogBase)
|
||||||
cbVerSello: TCheckBox;
|
cbCopia: TCheckBox;
|
||||||
cbVerCopia: TCheckBox;
|
cbContabilidad: TCheckBox;
|
||||||
procedure actAceptarExecute(Sender: TObject);
|
procedure actAceptarExecute(Sender: TObject);
|
||||||
procedure actCancelarExecute(Sender: TObject);
|
procedure actCancelarExecute(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -18,25 +18,27 @@ type
|
|||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ElegirOpcionesImpresionFacturaCliente(var AVerSello : Boolean; var AVerCopia : Boolean): Boolean;
|
function ElegirOpcionesImpresionFacturaCliente(var AMarca : Integer): Boolean;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
function ElegirOpcionesImpresionFacturaCliente(var AVerSello : Boolean; var AVerCopia : Boolean): Boolean;
|
function ElegirOpcionesImpresionFacturaCliente(var AMarca : Integer): Boolean;
|
||||||
var
|
var
|
||||||
AEditor : TfDialogOpcionesImpresionFacturasCliente;
|
AEditor : TfDialogOpcionesImpresionFacturasCliente;
|
||||||
begin
|
begin
|
||||||
AEditor := TfDialogOpcionesImpresionFacturasCliente.Create(NIL);
|
AEditor := TfDialogOpcionesImpresionFacturasCliente.Create(NIL);
|
||||||
try
|
try
|
||||||
AEditor.cbVerSello.Checked := AVerSello;
|
AEditor.cbCopia.Checked := False;
|
||||||
AEditor.cbVerCopia.Checked := AVerCopia;
|
AEditor.cbContabilidad.Checked := False;
|
||||||
|
|
||||||
Result := (AEditor.ShowModal = mrOk);
|
Result := (AEditor.ShowModal = mrOk);
|
||||||
if Result then
|
if Result then
|
||||||
begin
|
begin
|
||||||
AVerSello := AEditor.cbVerSello.Checked;
|
if True then
|
||||||
|
|
||||||
|
AVerSello := ;
|
||||||
AVerCopia := AEditor.cbVerCopia.Checked;
|
AVerCopia := AEditor.cbVerCopia.Checked;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
|||||||
@ -303,13 +303,12 @@ var
|
|||||||
Respuesta : Integer;
|
Respuesta : Integer;
|
||||||
AFacturas: IBizFacturaCliente;
|
AFacturas: IBizFacturaCliente;
|
||||||
AllItems: Boolean;
|
AllItems: Boolean;
|
||||||
AVerSello: Boolean;
|
AMarca: Integer;
|
||||||
AVerCopia: Boolean;
|
|
||||||
begin
|
begin
|
||||||
AFacturas := Nil;
|
AFacturas := Nil;
|
||||||
AllItems := False;
|
AllItems := False;
|
||||||
AVerSello := True;
|
AMarca := 0;
|
||||||
AVerCopia := True;
|
|
||||||
|
|
||||||
if MultiSelect and Assigned(ViewGrid) then
|
if MultiSelect and Assigned(ViewGrid) then
|
||||||
AllItems := (ViewGrid.NumSeleccionados > 1);
|
AllItems := (ViewGrid.NumSeleccionados > 1);
|
||||||
@ -336,7 +335,7 @@ begin
|
|||||||
AFacturas := Facturas;
|
AFacturas := Facturas;
|
||||||
|
|
||||||
//Preguntamos si desea que en las facturas se vea el Sello
|
//Preguntamos si desea que en las facturas se vea el Sello
|
||||||
if ElegirOpcionesImpresionFacturaCliente(AVerSello, AVerCopia) then
|
if ElegirOpcionesImpresionFacturaCliente(AMarca) then
|
||||||
if Assigned(AFacturas) then
|
if Assigned(AFacturas) then
|
||||||
FController.Print(AFacturas, AllItems, AVerSello, AVerCopia);
|
FController.Print(AFacturas, AllItems, AVerSello, AVerCopia);
|
||||||
end;
|
end;
|
||||||
|
|||||||
Reference in New Issue
Block a user