Repaso de informes
git-svn-id: https://192.168.0.254/svn/Proyectos.Noviseda_FactuGES2/trunk@39 f33bb606-9f5c-448d-9c99-757f00063c96
This commit is contained in:
parent
3add333cc1
commit
8c1698ae5d
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TfrxReport Version="4.7.71" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="40197,4474470023" ScriptLanguage="PascalScript" ScriptText.Text="var Pagina: Variant; procedure Memo2OnBeforePrint(Sender: TfrxComponent); begin Memo2.Lines.Clear; if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then Memo2.Lines.Add('ORDEN DE DEVOLUCIÓN') else Memo2.Lines.Add('ALBARÁN DE CLIENTE') end; procedure Memo5OnBeforePrint(Sender: TfrxComponent); begin if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then begin Memo5.Lines.Clear; Memo5.Lines.Add('Nº orden:'); end; end; procedure Memo9OnBeforePrint(Sender: TfrxComponent); begin if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then begin Memo9.Lines.Clear; Memo9.Lines.Add('Fecha orden:'); end; end; procedure PageHeader1OnBeforePrint(Sender: TfrxComponent); begin if not Engine.FinalPass then Set('TotalPaginas', (<TotalPaginas> + 1)); if Engine.FinalPass then Set('Pagina', (<Pagina> + 1)); if Marca = 1 then eCopia.Visible := True; if Marca = 2 then eContabilidad.Visible := True; end; procedure frxReportOnStartReport(Sender: TfrxComponent); begin Set('Pagina', 0); Set('TotalPaginas', 0); end; begin end." ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403910003546F70021008446174617365747301010C3400000020446174615365743D22667278444243616265636572612220446174615365744E616D653D22667278444243616265636572612200010C3400000020446174615365743D226672784442446574616C6C65732220446174615365744E616D653D226672784442446574616C6C65732200010C3C00000020446174615365743D22667278444256656E63696D69656E746F732220446174615365744E616D653D22667278444256656E63696D69656E746F73220000095661726961626C657301010C13000000204E616D653D2220506167696E6163696F6E2200010C0E000000204E616D653D22506167696E612200010C14000000204E616D653D22546F74616C506167696E61732200010C16000000204E616D653D222056697375616C697A6163696F6E2200010C0D000000204E616D653D224D61726361220000055374796C650100">
|
||||
<TfrxReport Version="4.7.71" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="40197,5781416319" ScriptLanguage="PascalScript" ScriptText.Text="var Pagina: Variant; procedure Memo2OnBeforePrint(Sender: TfrxComponent); begin Memo2.Lines.Clear; if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then Memo2.Lines.Add('ORDEN DE DEVOLUCIÓN') else Memo2.Lines.Add('ALBARÁN DE CLIENTE') end; procedure Memo5OnBeforePrint(Sender: TfrxComponent); begin if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then begin Memo5.Lines.Clear; Memo5.Lines.Add('Nº orden:'); end; end; procedure Memo9OnBeforePrint(Sender: TfrxComponent); begin if (StrToFloat(<frxDBCabecera."IMPORTE_TOTAL">) < 0) then begin Memo9.Lines.Clear; Memo9.Lines.Add('Fecha orden:'); end; end; procedure PageHeader1OnBeforePrint(Sender: TfrxComponent); begin if not Engine.FinalPass then Set('TotalPaginas', (<TotalPaginas> + 1)); if Engine.FinalPass then Set('Pagina', (<Pagina> + 1)); if <Marca> = 1 then eOriginal.Visible := True; if <Marca> = 2 then eCopia.Visible := True; if <Marca> = 3 then eContabilidad.Visible := True; end; procedure frxReportOnStartReport(Sender: TfrxComponent); begin Set('Pagina', 0); Set('TotalPaginas', 0); end; begin end." ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403910003546F70021008446174617365747301010C3400000020446174615365743D22667278444243616265636572612220446174615365744E616D653D22667278444243616265636572612200010C3400000020446174615365743D226672784442446574616C6C65732220446174615365744E616D653D226672784442446574616C6C65732200010C3C00000020446174615365743D22667278444256656E63696D69656E746F732220446174615365744E616D653D22667278444256656E63696D69656E746F73220000095661726961626C657301010C13000000204E616D653D2220506167696E6163696F6E2200010C0E000000204E616D653D22506167696E612200010C14000000204E616D653D22546F74616C506167696E61732200010C0D000000204E616D653D224D61726361220000055374796C650100">
|
||||
<TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
|
||||
<TfrxReportPage Name="Page1" PaperWidth="215" PaperHeight="297" PaperSize="256" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
|
||||
<TfrxMasterData Name="MasterData1" Height="24" Left="0" Top="373" Width="737,00835" ColumnWidth="0" ColumnGap="0" DataSet="frxDBDetalles" DataSetName="frxDBDetalles" RowCount="0" Stretched="True">
|
||||
@ -39,7 +39,7 @@
|
||||
<TfrxSubreport Name="Subreport1" Left="475" Top="121" Width="258" Height="62" ShowHint="False" Page="Page2" PrintOnParent="True"/>
|
||||
</TfrxPageFooter>
|
||||
<TfrxPageHeader Name="PageHeader1" Height="296,96075685" Left="0" Top="16" Width="737,00835" OnBeforePrint="PageHeader1OnBeforePrint">
|
||||
<TfrxMemoView Name="eContabilidad" Left="4" Top="79" Width="204,46444" Height="33,78740157" Visible="False" ShowHint="False" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="8421504" Font.Height="-24" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" Text="CONTABILIDAD"/>
|
||||
<TfrxMemoView Name="eContabilidad" Left="0" Top="79" Width="204,46444" Height="33,78740157" Visible="False" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="8421504" Font.Height="-24" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" Text="CONTABILIDAD"/>
|
||||
<TfrxMemoView Name="Memo15" Align="baLeft" Left="631,15748031" Top="270,01979" Width="105,71653543" Height="26,45669291" ShowHint="False" Color="16777215" Font.Charset="0" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Color="8421504" Frame.Typ="12" HAlign="haRight" ParentFont="False" VAlign="vaCenter" Text="Importe total"/>
|
||||
<TfrxMemoView Name="Memo12" Align="baLeft" Left="530,44094488" Top="270,01979" Width="100,71653543" Height="26,45669291" ShowHint="False" Color="16777215" Font.Charset="0" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Color="8421504" Frame.Typ="12" HAlign="haRight" ParentFont="False" VAlign="vaCenter" Text="Importe unidad"/>
|
||||
<TfrxMemoView Name="Memo23" Align="baLeft" Left="76,2" Top="270,01979" Width="392,7" Height="26,45669291" ShowHint="False" Color="16777215" Font.Charset="0" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Color="8421504" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Concepto"/>
|
||||
@ -55,7 +55,7 @@
|
||||
<TfrxMemoView Name="Memo22" Left="0" Top="142,51979" Width="129,90538" Height="17,00787157" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="[frxDBCabecera."REFERENCIA"]"/>
|
||||
<TfrxMemoView Name="Memo1" Left="60,5906" Top="224,09462" Width="62,46444" Height="17,00787402" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" Frame.Color="13056" ParentFont="False" VAlign="vaCenter" Text="[<Pagina>]/[<TotalPaginas>]"/>
|
||||
<TfrxMemoView Name="Memo2" Left="1" Top="224,09462" Width="60,85807" Height="17,00787402" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" Frame.Color="13056" ParentFont="False" VAlign="vaCenter" Text="Página nº:"/>
|
||||
<TfrxMemoView Name="Memo28" Left="3,5906" Top="40" Width="183,46444" Height="33,78740157" ShowHint="False" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-24" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" ParentFont="False" Text="FACTURA"/>
|
||||
<TfrxMemoView Name="Memo28" Left="0" Top="40" Width="127,46444" Height="33,78740157" ShowHint="False" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-24" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" ParentFont="False" Text="FACTURA"/>
|
||||
<TfrxMemoView Name="Memo3" Left="130,44094" Top="121,84261" Width="130,05504" Height="20" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" Text="Fecha Fac."/>
|
||||
<TfrxMemoView Name="Memo4" Left="130,44094" Top="142,51979" Width="129,90538" Height="17,00787157" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="[frxDBCabecera."FECHA_FACTURA"]"/>
|
||||
<TfrxMemoView Name="Memo5" Left="47,03154" Top="166,44094" Width="85,46444" Height="17,00787402" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" Frame.Color="13056" ParentFont="False" VAlign="vaCenter" Text="[frxDBCabecera."REF_CLIENTE"]"/>
|
||||
@ -66,7 +66,8 @@
|
||||
<TfrxMemoView Name="Memo11" Left="0,44094" Top="187,44094" Width="57,85807" Height="17,00787402" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" Frame.Color="13056" ParentFont="False" VAlign="vaCenter" Text="Vendedor:"/>
|
||||
<TfrxLineView Name="Line6" Left="469" Top="269,50406638" Width="0" Height="588" ShowHint="False" Frame.Color="8421504" Frame.Typ="1"/>
|
||||
<TfrxLineView Name="Line7" Left="632" Top="269,50406638" Width="0" Height="588" ShowHint="False" Frame.Color="8421504" Frame.Typ="1"/>
|
||||
<TfrxMemoView Name="eCopia" Left="4" Top="79" Width="96,46444" Height="33,78740157" Visible="False" ShowHint="False" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="8421504" Font.Height="-24" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" Text="COPIA"/>
|
||||
<TfrxMemoView Name="eCopia" Left="0" Top="79" Width="96,46444" Height="33,78740157" Visible="False" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="8421504" Font.Height="-24" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" Text="COPIA"/>
|
||||
<TfrxMemoView Name="eOriginal" Left="0" Top="78" Width="143,46444" Height="33,78740157" Visible="False" ShowHint="False" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" DisplayFormat.DecimalSeparator="," Font.Charset="1" Font.Color="8421504" Font.Height="-24" Font.Name="Tahoma" Font.Style="1" Frame.Color="13056" Frame.Typ="15" HAlign="haCenter" ParentFont="False" Text="ORIGINAL"/>
|
||||
</TfrxPageHeader>
|
||||
</TfrxReportPage>
|
||||
<TfrxReportPage Name="Page2" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
|
||||
|
||||
@ -1764,7 +1764,7 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
PrintOptions.Printer = 'Por defecto'
|
||||
PrintOptions.PrintOnSheet = 0
|
||||
ReportOptions.CreateDate = 39065.872423495400000000
|
||||
ReportOptions.LastChange = 40197.425634756900000000
|
||||
ReportOptions.LastChange = 40197.447447002300000000
|
||||
ScriptLanguage = 'PascalScript'
|
||||
ScriptText.Strings = (
|
||||
'var'
|
||||
@ -1805,6 +1805,14 @@ object RptFacturasCliente: TRptFacturasCliente
|
||||
''
|
||||
' if Engine.FinalPass then'
|
||||
' Set('#39'Pagina'#39', (<Pagina> + 1));'
|
||||
''
|
||||
' if Marca = 1 then'
|
||||
' eCopia.Visible := True;'
|
||||
' '
|
||||
' if Marca = 2 then'
|
||||
|
||||
' eContabilidad.Visible := True; ' +
|
||||
' '
|
||||
'end;'
|
||||
''
|
||||
'procedure frxReportOnStartReport(Sender: TfrxComponent);'
|
||||
|
||||
@ -92,6 +92,7 @@ type
|
||||
schReport: TDASchema;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
procedure DataModuleDestroy(Sender: TObject);
|
||||
|
||||
private
|
||||
FConnection: IDAConnection;
|
||||
FIdEmpresa: Integer;
|
||||
@ -112,9 +113,9 @@ type
|
||||
function _GenerarInforme(const TipoInforme: String): Binary;
|
||||
procedure IniciarParametrosInforme;
|
||||
procedure RecuperarNombresClientes;
|
||||
|
||||
public
|
||||
function GenerarFactura(const ListaID : TIntegerArray; const Marca: Integer): Binary;
|
||||
function GenerarFacturaEnPDF(const ListaID : TIntegerArray; const VerSello: Boolean = True): Binary;
|
||||
function GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
function GenerarInformeListadoFacturas(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
function GenerarInformeListadoFacturasPendientes(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const FechaVenInicio: Variant; const FechaVenFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
@ -186,22 +187,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptFacturasCliente.GenerarFacturaEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean = True): Binary;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
try
|
||||
//Vamos generando todos y cada una de las facturas recibidas
|
||||
for i := 0 to ListaID.Count - 1 do
|
||||
// _GenerarFactura(ListaID.Items[i], VerSello);
|
||||
|
||||
frxPDFExport1.Stream := Result;
|
||||
frxReport.Export(frxPDFExport1)
|
||||
finally
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRptFacturasCliente.GenerarInformeIVA(const IdEmpresa: Integer; const FechaInicio: Variant; const FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; const ImporteMinimo: Currency): Binary;
|
||||
var
|
||||
ATipoInforme: String;
|
||||
@ -677,14 +662,8 @@ begin
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
|
||||
//La primera impresion siempre es sin la etiqueta copia
|
||||
frxReport.Variables.Variables['Marca'] := 0;
|
||||
frxReport.Variables.Variables['Marca'] := Marca;
|
||||
frxReport.PrepareReport(False);
|
||||
// if VerCopia then
|
||||
// begin
|
||||
// frxReport.Variables.Variables['VerCopia'] := 1;
|
||||
// frxReport.Variables.Variables['VerSello'] := 0; //El sello nunca saldrá en la copia
|
||||
// frxReport.PrepareReport(False);
|
||||
// end;
|
||||
|
||||
finally
|
||||
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
|
||||
@ -35,8 +35,6 @@ type
|
||||
protected
|
||||
{ IsrvFacturasCliente methods }
|
||||
function GenerarInforme(const ListaID: TIntegerArray; const Marca: Integer): Binary;
|
||||
function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean = True): Binary;
|
||||
function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean = True): Binary;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -83,18 +81,6 @@ begin
|
||||
ConnectionName := dmServer.ConnectionName;
|
||||
end;
|
||||
|
||||
function TsrvFacturasCliente.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean = True): Binary;
|
||||
var
|
||||
AReportGenerator : TRptFacturasCliente;
|
||||
begin
|
||||
AReportGenerator := TRptFacturasCliente.Create(nil);
|
||||
try
|
||||
Result := AReportGenerator.GenerarFacturaEnPDF(ListaID, VerSello);
|
||||
finally
|
||||
FreeAndNIL(AReportGenerator);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvFacturasCliente.GenerarInforme(const ListaID: TIntegerArray; const Marca: Integer): Binary;
|
||||
var
|
||||
AReportGenerator : TRptFacturasCliente;
|
||||
@ -107,25 +93,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TsrvFacturasCliente.GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean = True): Binary;
|
||||
var
|
||||
AReportGenerator : TRptWordFacturaCliente;
|
||||
AFicheroTMP : TFileName;
|
||||
begin
|
||||
Result := NIL;
|
||||
AFicheroTMP := DarFicheroTemporal;
|
||||
AReportGenerator := TRptWordFacturaCliente.Create(nil);
|
||||
try
|
||||
if AReportGenerator.Exportar(IntToStr(ID), AFicheroTMP, VerSello) then
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
Result.LoadFromFile(AFicheroTMP);
|
||||
SysUtils.DeleteFile(AFicheroTMP)
|
||||
end;
|
||||
finally
|
||||
FreeAndNIL(AReportGenerator);
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
TROClassFactory.Create('srvFacturasCliente', Create_srvFacturasCliente, TsrvFacturasCliente_Invoker);
|
||||
|
||||
@ -52,40 +52,32 @@ inherited fDialogOpcionesImpresionFacturasCliente: TfDialogOpcionesImpresionFact
|
||||
Height = 130
|
||||
ExplicitWidth = 418
|
||||
ExplicitHeight = 130
|
||||
object cbContabilidad: TCheckBox
|
||||
AlignWithMargins = True
|
||||
object opcion1: TcxRadioButton
|
||||
Left = 50
|
||||
Top = 51
|
||||
Width = 279
|
||||
Top = 16
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Indicar '#39'CONTABILIDAD'#39' en la cabecera'
|
||||
Caption = 'ORIGINAL'
|
||||
Checked = True
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
end
|
||||
object cbCopia: TCheckBox
|
||||
AlignWithMargins = True
|
||||
object opcion2: TcxRadioButton
|
||||
Left = 50
|
||||
Top = 28
|
||||
Width = 200
|
||||
Top = 50
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Indicar '#39'COPIA'#39' en la cabecera'
|
||||
Caption = 'COPIA'
|
||||
TabOrder = 1
|
||||
end
|
||||
object cxRadioButton1: TcxRadioButton
|
||||
object opcion3: TcxRadioButton
|
||||
Left = 50
|
||||
Top = 4
|
||||
Top = 87
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'cxRadioButton1'
|
||||
Caption = 'CONTABILIDAD'
|
||||
TabOrder = 2
|
||||
end
|
||||
object cxRadioButton2: TcxRadioButton
|
||||
Left = 50
|
||||
Top = 84
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'cxRadioButton1'
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
inherited ActionList1: TActionList
|
||||
Top = 16
|
||||
|
||||
@ -8,10 +8,9 @@ uses
|
||||
|
||||
type
|
||||
TfDialogOpcionesImpresionFacturasCliente = class(TfDialogBase)
|
||||
cbCopia: TCheckBox;
|
||||
cbContabilidad: TCheckBox;
|
||||
cxRadioButton1: TcxRadioButton;
|
||||
cxRadioButton2: TcxRadioButton;
|
||||
opcion1: TcxRadioButton;
|
||||
opcion2: TcxRadioButton;
|
||||
opcion3: TcxRadioButton;
|
||||
procedure actAceptarExecute(Sender: TObject);
|
||||
procedure actCancelarExecute(Sender: TObject);
|
||||
private
|
||||
@ -32,16 +31,18 @@ var
|
||||
begin
|
||||
AEditor := TfDialogOpcionesImpresionFacturasCliente.Create(NIL);
|
||||
try
|
||||
AEditor.cbCopia.Checked := False;
|
||||
AEditor.cbContabilidad.Checked := False;
|
||||
|
||||
Result := (AEditor.ShowModal = mrOk);
|
||||
if Result then
|
||||
begin
|
||||
if True then
|
||||
|
||||
// AVerSello := ;
|
||||
// AVerCopia := AEditor.cbVerCopia.Checked;
|
||||
begin
|
||||
if AEditor.opcion1.Checked then
|
||||
AMarca := 1
|
||||
else if AEditor.opcion2.Checked then
|
||||
AMarca := 2
|
||||
else if AEditor.opcion3.Checked then
|
||||
AMarca := 3
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
AEditor.Release;
|
||||
|
||||
@ -250,26 +250,6 @@
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarInformeEnWord" UID="{04A25AE7-9AC6-474F-9A4A-04D8292959E6}">
|
||||
<Parameters>
|
||||
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||
</Parameter>
|
||||
<Parameter Name="ID" DataType="Integer" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="VerSello" DataType="Boolean" Flag="In" >
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
<Operation Name="GenerarInformeEnPDF" UID="{F2F894D3-6C63-4931-999B-79D3C9C5EAFC}">
|
||||
<Parameters>
|
||||
<Parameter Name="Result" DataType="Binary" Flag="Result">
|
||||
</Parameter>
|
||||
<Parameter Name="ListaID" DataType="TIntegerArray" Flag="In" >
|
||||
</Parameter>
|
||||
<Parameter Name="VerSello" DataType="Boolean" Flag="In" >
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
</Operation>
|
||||
</Operations>
|
||||
</Interface>
|
||||
</Interfaces>
|
||||
|
||||
@ -501,8 +501,6 @@ type
|
||||
IsrvFacturasCliente = interface(IDataAbstractService)
|
||||
['{56B4FFF0-AB1B-46B2-BA16-ABD5360F6311}']
|
||||
function GenerarInforme(const ListaID: TIntegerArray; const Marca: Integer): Binary;
|
||||
function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary;
|
||||
function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ CosrvFacturasCliente }
|
||||
@ -516,8 +514,6 @@ type
|
||||
function __GetInterfaceName:string; override;
|
||||
|
||||
function GenerarInforme(const ListaID: TIntegerArray; const Marca: Integer): Binary;
|
||||
function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary;
|
||||
function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary;
|
||||
end;
|
||||
|
||||
{ IsrvFacturasProveedor }
|
||||
@ -1675,42 +1671,6 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvFacturasCliente_Proxy.GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary;
|
||||
begin
|
||||
try
|
||||
result := nil;
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnWord');
|
||||
__Message.Write('ID', TypeInfo(Integer), ID, []);
|
||||
__Message.Write('VerSello', TypeInfo(Boolean), VerSello, []);
|
||||
__Message.Finalize;
|
||||
|
||||
__TransportChannel.Dispatch(__Message);
|
||||
|
||||
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||
finally
|
||||
__Message.UnsetAttributes(__TransportChannel);
|
||||
__Message.FreeStream;
|
||||
end
|
||||
end;
|
||||
|
||||
function TsrvFacturasCliente_Proxy.GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary;
|
||||
begin
|
||||
try
|
||||
result := nil;
|
||||
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerarInformeEnPDF');
|
||||
__Message.Write('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||
__Message.Write('VerSello', TypeInfo(Boolean), VerSello, []);
|
||||
__Message.Finalize;
|
||||
|
||||
__TransportChannel.Dispatch(__Message);
|
||||
|
||||
__Message.Read('Result', TypeInfo(Binary), result, []);
|
||||
finally
|
||||
__Message.UnsetAttributes(__TransportChannel);
|
||||
__Message.FreeStream;
|
||||
end
|
||||
end;
|
||||
|
||||
{ CosrvFacturasProveedor }
|
||||
|
||||
class function CosrvFacturasProveedor.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFacturasProveedor;
|
||||
|
||||
@ -168,8 +168,6 @@ type
|
||||
constructor Create; override;
|
||||
published
|
||||
procedure Invoke_GenerarInforme(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
procedure Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
end;
|
||||
|
||||
TsrvFacturasProveedor_Invoker = class(TDataAbstractService_Invoker)
|
||||
@ -793,68 +791,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvFacturasCliente_Invoker.Invoke_GenerarInformeEnWord(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerarInformeEnWord(const ID: Integer; const VerSello: Boolean): Binary; }
|
||||
var
|
||||
ID: Integer;
|
||||
VerSello: Boolean;
|
||||
lResult: Binary;
|
||||
__lObjectDisposer: TROObjectDisposer;
|
||||
begin
|
||||
lResult := nil;
|
||||
try
|
||||
__Message.Read('ID', TypeInfo(Integer), ID, []);
|
||||
__Message.Read('VerSello', TypeInfo(Boolean), VerSello, []);
|
||||
|
||||
lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnWord(ID, VerSello);
|
||||
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerarInformeEnWordResponse');
|
||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||
__Message.Finalize;
|
||||
__Message.UnsetAttributes(__Transport);
|
||||
|
||||
finally
|
||||
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||
try
|
||||
__lObjectDisposer.Add(lResult);
|
||||
finally
|
||||
__lObjectDisposer.Free();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TsrvFacturasCliente_Invoker.Invoke_GenerarInformeEnPDF(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
|
||||
{ function GenerarInformeEnPDF(const ListaID: TIntegerArray; const VerSello: Boolean): Binary; }
|
||||
var
|
||||
ListaID: FactuGES_Intf.TIntegerArray;
|
||||
VerSello: Boolean;
|
||||
lResult: Binary;
|
||||
__lObjectDisposer: TROObjectDisposer;
|
||||
begin
|
||||
ListaID := nil;
|
||||
lResult := nil;
|
||||
try
|
||||
__Message.Read('ListaID', TypeInfo(FactuGES_Intf.TIntegerArray), ListaID, []);
|
||||
__Message.Read('VerSello', TypeInfo(Boolean), VerSello, []);
|
||||
|
||||
lResult := (__Instance as IsrvFacturasCliente).GenerarInformeEnPDF(ListaID, VerSello);
|
||||
|
||||
__Message.InitializeResponseMessage(__Transport, 'FactuGES', 'srvFacturasCliente', 'GenerarInformeEnPDFResponse');
|
||||
__Message.Write('Result', TypeInfo(Binary), lResult, []);
|
||||
__Message.Finalize;
|
||||
__Message.UnsetAttributes(__Transport);
|
||||
|
||||
finally
|
||||
__lObjectDisposer := TROObjectDisposer.Create(__Instance);
|
||||
try
|
||||
__lObjectDisposer.Add(ListaID);
|
||||
__lObjectDisposer.Add(lResult);
|
||||
finally
|
||||
__lObjectDisposer.Free();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TsrvFacturasProveedor_Invoker }
|
||||
|
||||
constructor TsrvFacturasProveedor_Invoker.Create;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user