Se adaptan los informes para que se busquen en profundidad
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@339 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
0904a0dc59
commit
cb2d151e44
@ -50,11 +50,13 @@ function PreguntarFicheroExcelExportar (var Fichero : String) : Boolean;
|
||||
function EscapeIllegalChars(AFileName: string): string;
|
||||
function FindFile(const filespec: TFileName; attributes: integer = faReadOnly Or faHidden Or faSysFile Or faArchive): TStringList;
|
||||
|
||||
function DarRutaFichero(const ARutaIni: String; const AFichero: String; const ADirectorio1: String = ''; const ADirectorio2: String = ''): Variant;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Windows, Dialogs, JclFileUtils,
|
||||
Windows, Variants, Dialogs, JclFileUtils,
|
||||
Messages, Graphics, Controls, Forms,
|
||||
StdCtrls, SHFolder, cxShellBrowserDialog,
|
||||
cxLookAndFeels, uStringsUtils;
|
||||
@ -435,4 +437,27 @@ begin
|
||||
Result := DarRutaTemporal + Cadena + '\';
|
||||
end;
|
||||
|
||||
end.
|
||||
function DarRutaFichero(const ARutaIni: String; const AFichero: String; const ADirectorio1: String = ''; const ADirectorio2: String = ''): Variant;
|
||||
var
|
||||
ARutaCompleta: String;
|
||||
begin
|
||||
Result := Null;
|
||||
|
||||
ARutaCompleta := ARutaIni + '\' + ADirectorio1 + '\' + ADirectorio2 + '\' + AFichero;
|
||||
if FileExists(ARutaCompleta) then
|
||||
Result := ARutaCompleta
|
||||
else
|
||||
begin
|
||||
ARutaCompleta := ARutaIni + '\' + ADirectorio1 + '\' + AFichero;
|
||||
if FileExists(ARutaCompleta) then
|
||||
Result := ARutaCompleta
|
||||
else
|
||||
begin
|
||||
ARutaCompleta := ARutaIni + '\' + AFichero;
|
||||
if FileExists(ARutaCompleta) then
|
||||
Result := ARutaCompleta
|
||||
end
|
||||
end
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TfrxReport Version="3.23.7" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="39329,8475497222" ScriptLanguage="PascalScript" ScriptText.Text="var Pagina: Variant; procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent); var Cadena: String; begin DatosEmpresa.Lines.Clear; if (<frxDBCabecera."TELEFONO_1_EMPRESA"> <> '') then Cadena := 'TLF: ' + <frxDBCabecera."TELEFONO_1_EMPRESA">; DatosEmpresa.Lines.Add(Cadena); Cadena := ''; if (<frxDBCabecera."FAX_EMPRESA"> <> '') then Cadena := 'FAX: ' + <frxDBCabecera."FAX_EMPRESA">; DatosEmpresa.Lines.Add(Cadena); end; procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent); begin NombreEmpresa.Lines.Clear; NombreEmpresa.Lines.Add(<frxDBCabecera."NOMBRE_EMPRESA">); end; procedure PageHeader1OnBeforePrint(Sender: TfrxComponent); begin if not Engine.FinalPass then Set('TotalPaginas', (<TotalPaginas> + 1)); if Engine.FinalPass then Set('Pagina', (<Pagina> + 1)); end; procedure frxReportOnStartReport(Sender: TfrxComponent); begin Set('Pagina', 0); Set('TotalPaginas', 0); end; begin end." ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403A90003546F70021008446174617365747301010C3400000020446174615365743D22667278444243616265636572612220446174615365744E616D653D2266727844424361626563657261220000095661726961626C657301010C13000000204E616D653D2220506167696E6163696F6E2200010C0E000000204E616D653D22506167696E612200010C14000000204E616D653D22546F74616C506167696E6173220000055374796C650100">
|
||||
<TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
|
||||
<TfrxPageFooter Name="PageFooter1" Height="72,87953" Left="0" Top="884,41002" Width="718,1107">
|
||||
<TfrxLineView Name="Line4" Align="baCenter" Left="-0,94465" Top="4" Width="720" Height="0" Frame.Color="8421504" Frame.Typ="4"/>
|
||||
</TfrxPageFooter>
|
||||
<TfrxPageHeader Name="PageHeader1" Height="806,61414638" Left="0" Top="18,89765" Width="718,1107" OnBeforePrint="PageHeader1OnBeforePrint">
|
||||
<TfrxMemoView Name="Memo24" Left="3,77953" Top="555,59091" Width="708,34694" Height="47,84261" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."FORMACION_RECIBIDA"]"/>
|
||||
<TfrxMemoView Name="Memo18" Left="3,77953" Top="476,22078" Width="708,34694" Height="40,28355" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."EXPERIENCIA"]"/>
|
||||
<TfrxMemoView Name="Memo2" Left="392,37786" Top="3,33859" Width="317,70099" Height="38,89765" Font.Charset="1" Font.Color="8421504" Font.Height="-29" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="FICHA DE EMPLEADO"/>
|
||||
<TfrxMemoView Name="NombreEmpresa" Left="139,84261" Top="3,77953" Width="240,22047" Height="26,89765" OnBeforePrint="NombreEmpresaOnBeforePrint" Font.Charset="1" Font.Color="8421504" Font.Height="-19" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text=""/>
|
||||
<TfrxMemoView Name="Memo12" Left="417,32313" Top="52,91342" Width="291,90569" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" HAlign="haRight" ParentFont="False" Text="Página nº: [<Pagina>]/[<TotalPaginas>]"/>
|
||||
<TfrxMemoView Name="DatosEmpresa" Left="139,84261" Top="35,77953" Width="240,22047" Height="53,35436" OnBeforePrint="DatosEmpresaOnBeforePrint" Font.Charset="1" Font.Color="8421504" Font.Height="-15" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text=""/>
|
||||
<TfrxMemoView Name="Memo5" Left="245,44898" Top="147,40167" Width="34,23624" Height="18,9" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="DNI:"/>
|
||||
<TfrxMemoView Name="Memo4" Left="3,55906" Top="111,55906" Width="114,04731" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Nombre y apellidos:"/>
|
||||
<TfrxMemoView Name="Memo11" Left="121,3859" Top="111,55906" Width="585,26005" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."NOMBRE"]"/>
|
||||
<TfrxMemoView Name="Memo3" Left="283,46475" Top="147,40167" Width="93,92115" Height="18,9" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."NIF_CIF"]"/>
|
||||
<TfrxLineView Name="Line1" Left="718,5" Top="103,93696638" Width="0" Height="876,53556" Frame.Color="8421504" Frame.Typ="1"/>
|
||||
<TfrxMemoView Name="Memo1" Left="3,77953" Top="180,9765" Width="61,13389" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Dirección:"/>
|
||||
<TfrxMemoView Name="Memo6" Left="71,81107" Top="180,9765" Width="634,39394" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."CALLE"]"/>
|
||||
<TfrxMemoView Name="Memo9" Left="3,77953" Top="268,34663" Width="64,91342" Height="18,9" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Fecha alta:"/>
|
||||
<TfrxMemoView Name="Memo15" Left="72,47248" Top="268,34663" Width="211,08658" Height="18,9" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" HideZeros="True" ParentFont="False" Text="[frxDBCabecera."FECHA_ALTA_EMPRESA"]"/>
|
||||
<TfrxMemoView Name="Memo16" Left="3,77953" Top="147,40167" Width="114,04731" Height="18,9" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Fecha nacimiento:"/>
|
||||
<TfrxMemoView Name="Memo17" Left="121,60637" Top="147,40167" Width="109,03927" Height="18,9" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" HideZeros="True" ParentFont="False" Text="[frxDBCabecera."FECHA_NACIMIENTO"]"/>
|
||||
<TfrxMemoView Name="Memo20" Left="3,77953" Top="328,81911" Width="708,34694" Height="30,23616677" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."FORMACION_BASE"]"/>
|
||||
<TfrxMemoView Name="Memo14" Left="3,77953" Top="207,87415" Width="61,13389" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Población:"/>
|
||||
<TfrxMemoView Name="Memo25" Left="71,81107" Top="207,87415" Width="316,91342" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."POBLACION"]"/>
|
||||
<TfrxMemoView Name="Memo26" Left="393,07112" Top="207,87415" Width="68,69295" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Cód. postal:"/>
|
||||
<TfrxMemoView Name="Memo27" Left="464,88219" Top="207,87415" Width="241,32282" Height="18,9" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."CODIGO_POSTAL"]"/>
|
||||
<TfrxMemoView Name="Memo28" Left="3,77953" Top="234,33086" Width="61,13389" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Provincia:"/>
|
||||
<TfrxMemoView Name="Memo29" Left="71,81107" Top="234,33086" Width="634,39394" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."PROVINCIA"]"/>
|
||||
<TfrxMemoView Name="Memo30" Left="393,07112" Top="147,40167" Width="61,13389" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text="Categoría:"/>
|
||||
<TfrxMemoView Name="Memo31" Left="464,88219" Top="147,40167" Width="241,32282" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."CATEGORIA"]"/>
|
||||
<TfrxPictureView Name="Picture1" Left="3,77953" Top="0" Width="132,28355" Height="86,92919" DataField="LOGOTIPO" DataSet="frxDBCabecera" DataSetName="frxDBCabecera"/>
|
||||
<TfrxMemoView Name="Memo21" Left="3,77953" Top="396,85065" Width="708,34694" Height="40,28355" StretchMode="smMaxHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."FORMACION_COMPLE"]"/>
|
||||
<TfrxLineView Name="Line3" Left="0" Top="136,06308" Width="718,1107" Height="0" Frame.Typ="4"/>
|
||||
<TfrxMemoView Name="Memo7" Left="0" Top="297,07086126" Width="717,5436" Height="26,45906" Color="-16777194" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Typ="15" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text=" FORMACIÓN BÁSICA"/>
|
||||
<TfrxMemoView Name="Memo10" Left="0" Top="365,85820669" Width="717,5436" Height="26,45906" Color="-16777194" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Typ="15" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text=" FORMACIÓN COMPLEMENTARIA"/>
|
||||
<TfrxLineView Name="Line2" Left="0" Top="102,04731" Width="0" Height="876,53556" Frame.Color="8421504" Frame.Typ="1"/>
|
||||
<TfrxLineView Name="Line5" Left="0" Top="102,04731" Width="718,1107" Height="0" Frame.Typ="4"/>
|
||||
<TfrxMemoView Name="Memo8" Left="0" Top="442,20501" Width="717,5436" Height="26,45906" Color="-16777194" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Typ="15" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text=" EXPERIENCIA"/>
|
||||
<TfrxMemoView Name="Memo13" Left="0" Top="521,57514" Width="717,5436" Height="26,45906" Color="-16777194" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Typ="15" HideZeros="True" ParentFont="False" VAlign="vaCenter" Text=" FORMACIÓN RECIBIDA"/>
|
||||
</TfrxPageHeader>
|
||||
</TfrxReportPage>
|
||||
</TfrxReport>
|
||||
@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TfrxReport Version="3.23.7" DotMatrixReport="False" EngineOptions.DoublePass="True" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Por defecto" ReportOptions.CreateDate="39065,8724234954" ReportOptions.Description.Text="" ReportOptions.LastChange="39399,7768037384" ScriptLanguage="PascalScript" ScriptText.Text=" procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent); var Cadena: String; begin { DatosEmpresa.Lines.Clear; if (<frxDBCabecera."TELEFONO_1_EMPRESA"> <> '') then Cadena := 'TLF: ' + <frxDBCabecera."TELEFONO_1_EMPRESA">; if (<frxDBCabecera."FAX_EMPRESA"> <> '') then Cadena := Cadena + ' FAX: ' + <frxDBCabecera."FAX_EMPRESA">; DatosEmpresa.Lines.Add(Cadena); } end; procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent); begin { NombreEmpresa.Lines.Clear; NombreEmpresa.Lines.Add(<frxDBCabecera."NOMBRE_EMPRESA">); } end; procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent); var ACadena : String; begin { ACadena := ''; DireccionEnvio.Lines.Clear; if (<frxDBCabecera."REFERENCIA_CLIENTE"> <> '') then ACadena := <frxDBCabecera."REFERENCIA_CLIENTE">; if (<frxDBCabecera."PERSONA_CONTACTO"> <> '') then ACadena := ACadena + ' ' + <frxDBCabecera."PERSONA_CONTACTO">; DireccionEnvio.Lines.Add(ACadena); ACadena := ''; DireccionEnvio.Lines.Add(<frxDBCabecera."CALLE">); if (<frxDBCabecera."CODIGO_POSTAL"> <> '') then ACadena := <frxDBCabecera."CODIGO_POSTAL"> + ' '; if (<frxDBCabecera."POBLACION"> <> '') then ACadena := ACadena + <frxDBCabecera."CODIGO_POSTAL">; if (ACadena <> '') then DireccionEnvio.Lines.Add(ACadena); if (<frxDBCabecera."PROVINCIA"> <> '') then DireccionEnvio.Lines.Add(<frxDBCabecera."PROVINCIA">); if (<frxDBCabecera."TELEFONO"> <> '') then DireccionEnvio.Lines.Add(<frxDBCabecera."TELEFONO">); } end; procedure PageHeader1OnBeforePrint(Sender: TfrxComponent); begin if not Engine.FinalPass then Set('TotalPaginas', (<TotalPaginas> + 1)); if Engine.FinalPass then Set('Pagina', (<Pagina> + 1)); end; procedure frxReportOnStartReport(Sender: TfrxComponent); begin Set('Pagina', 0); Set('TotalPaginas', 0); end; begin end." ShowProgress="False" StoreInDFM="False" OnStartReport="frxReportOnStartReport" PropData="044C65667403A90003546F70021008446174617365747301010C3400000020446174615365743D22667278444243616265636572612220446174615365744E616D653D22667278444243616265636572612200010C3400000020446174615365743D226672784442446574616C6C65732220446174615365744E616D653D226672784442446574616C6C6573220000095661726961626C657301010C13000000204E616D653D2220506167696E6163696F6E2200010C0E000000204E616D653D22506167696E612200010C14000000204E616D653D22546F74616C506167696E6173220000055374796C650100">
|
||||
<TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
|
||||
<TfrxMasterData Name="MasterData1" Height="24" Left="0" Top="283,46475" Width="718,1107" ColumnWidth="0" ColumnGap="0" DataSet="frxDBDetalles" DataSetName="frxDBDetalles" RowCount="0" Stretched="True">
|
||||
<TfrxMemoView Name="Memo14" Left="1" Top="1,5" Width="75" Height="18" StretchMode="smMaxHeight" DataSet="frxDBDetalles" DataSetName="frxDBDetalles" DisplayFormat.DecimalSeparator="," DisplayFormat.FormatStr="#0 " DisplayFormat.Kind="fkNumeric" Font.Charset="0" Font.Color="-16777208" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" GapY="3" HAlign="haRight" HideZeros="True" LineSpacing="4" ParentFont="False" Style="Concepto normal" Text="[frxDBDetalles."REFERENCIA_PROVEEDOR"] "/>
|
||||
<TfrxMemoView Name="MemoCampo2" Left="78" Top="1,5" Width="56,03148874" Height="18" StretchMode="smMaxHeight" DataSet="frxDBDetalles" DataSetName="frxDBDetalles" DisplayFormat.DecimalSeparator="," DisplayFormat.FormatStr="#0 " DisplayFormat.Kind="fkNumeric" Font.Charset="0" Font.Color="-16777208" Font.Height="-12" Font.Name="Tahoma" Font.Style="0" GapY="3" HAlign="haRight" HideZeros="True" LineSpacing="4" ParentFont="False" Style="Concepto normal" Text="[frxDBDetalles."CANTIDAD"]"/>
|
||||
<TfrxRichView Name="MemoCampo12" ShiftMode="smWhenOverlapped" Left="137,5" Top="1,5" Width="580,5436" Height="18" StretchMode="smMaxHeight" DataField="CONCEPTO" DataSet="frxDBDetalles" DataSetName="frxDBDetalles" GapX="2" GapY="3" Wysiwyg="False" PropData="0852696368456469740A6C0000007B5C727466315C616E73695C616E7369637067313235325C64656666305C6465666C616E67333038327B5C666F6E7474626C7B5C66305C666E696C205461686F6D613B7D7D0D0A5C766965776B696E64345C7563315C706172645C66305C667331365C7061720D0A7D0D0A00"/>
|
||||
</TfrxMasterData>
|
||||
<TfrxPageFooter Name="PageFooter1" Height="69,1" Left="0" Top="366,61441" Width="718,1107">
|
||||
<TfrxLineView Name="Line4" Align="baCenter" Left="-0,944650000000024" Top="0" Width="720" Height="0" Frame.Typ="4"/>
|
||||
</TfrxPageFooter>
|
||||
<TfrxPageHeader Name="PageHeader1" Height="202,20472441" Left="0" Top="18,89765" Width="718,1107" OnBeforePrint="PageHeader1OnBeforePrint">
|
||||
<TfrxMemoView Name="Memo23" Left="135,5" Top="172,92517" Width="583,2" Height="26,45669291" Color="16777215" Font.Charset="0" Font.Color="-16777208" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Color="8421504" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Concepto"/>
|
||||
<TfrxMemoView Name="Memo8" Left="76" Top="172,92517" Width="59,25726667" Height="26,45669291" Color="16777215" Font.Charset="0" Font.Color="-16777208" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Color="8421504" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Cantidad"/>
|
||||
<TfrxMemoView Name="Memo13" Left="0" Top="172,92517" Width="76,2" Height="26,45669291" Color="16777215" Font.Charset="0" Font.Color="-16777208" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" Frame.Color="8421504" Frame.Typ="12" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="Referencia"/>
|
||||
<TfrxShapeView Name="Shape2" Left="357,60637" Top="76" Width="360,69295" Height="96,5" Color="16777215" Frame.Color="8421504"/>
|
||||
<TfrxMemoView Name="Memo2" Left="358,36209" Top="18,89765" Width="355,49629" Height="38,89765" Font.Charset="1" Font.Color="8421504" Font.Height="-29" Font.Name="Tahoma" Font.Style="1" HAlign="haRight" ParentFont="False" Text="PEDIDO DE CLIENTE"/>
|
||||
<TfrxMemoView Name="NombreEmpresa" Left="0" Top="8" Width="414,07885" Height="26,89765" OnBeforePrint="NombreEmpresaOnBeforePrint" Font.Charset="1" Font.Color="8421504" Font.Height="-19" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text=""/>
|
||||
<TfrxMemoView Name="Memo7" Left="366,39394" Top="79,81107" Width="80,03154" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="Página nº:"/>
|
||||
<TfrxMemoView Name="Memo12" Left="446,42548" Top="79,81107" Width="157,63791" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[<Pagina>] / [<TotalPaginas>]"/>
|
||||
<TfrxShapeView Name="Shape1" Left="0" Top="76" Width="357,92122079" Height="96,50391016" Color="16777215" Frame.Color="8421504"/>
|
||||
<TfrxMemoView Name="Memo10" Left="3,68491" Top="80" Width="349,29159" Height="15,60637" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="DIRECCIÓN DESTINO:"/>
|
||||
<TfrxMemoView Name="DatosEmpresa" Left="0" Top="40" Width="414,07885" Height="26,89765" OnBeforePrint="DatosEmpresaOnBeforePrint" Font.Charset="1" Font.Color="8421504" Font.Height="-16" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text=""/>
|
||||
<TfrxMemoView Name="Memo5" Left="366,39394" Top="101,35436" Width="68,69295" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="Nº pedido:"/>
|
||||
<TfrxMemoView Name="Memo4" Left="366,39394" Top="123,33859" Width="53,57483" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="Cliente:"/>
|
||||
<TfrxMemoView Name="Memo11" Left="423,7483" Top="123,33859" Width="290,45671" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."NOMBRE"]"/>
|
||||
<TfrxMemoView Name="Memo3" Left="446,42548" Top="101,57483" Width="207,30705" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."REFERENCIA"]"/>
|
||||
<TfrxMemoView Name="DireccionEnvio" Left="11,5" Top="100" Width="341,18522" Height="68,94812" OnBeforePrint="DireccionEnvioOnBeforePrint" StretchMode="smActualHeight" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Tahoma" Font.Style="0" ParentFont="False" Text=""/>
|
||||
<TfrxLineView Name="Line1" Left="718,5" Top="174,73995" Width="0" Height="802,69" Frame.Typ="1"/>
|
||||
<TfrxLineView Name="Line2" Left="0" Top="174,73995" Width="0" Height="802,69" Frame.Color="8421504" Frame.Typ="1"/>
|
||||
<TfrxMemoView Name="Memo1" Left="366,61441" Top="147,40167" Width="83,81107" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="Cliente final:"/>
|
||||
<TfrxMemoView Name="Memo6" Left="454,20501" Top="147,40167" Width="260,22047" Height="18,67718" DataSet="frxDBCabecera" DataSetName="frxDBCabecera" Font.Charset="1" Font.Color="0" Font.Height="-12" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Text="[frxDBCabecera."NOMBRE_COMERCIAL"]"/>
|
||||
<TfrxLineView Name="Line3" Left="76,2" Top="174,73995" Width="0" Height="802,69" Frame.Color="8421504" Frame.Typ="1"/>
|
||||
<TfrxLineView Name="Line5" Left="135,5" Top="174,73995" Width="0" Height="802,69" Frame.Color="8421504" Frame.Typ="1"/>
|
||||
</TfrxPageHeader>
|
||||
</TfrxReportPage>
|
||||
</TfrxReport>
|
||||
@ -26,12 +26,16 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIENDA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_CLIENTE'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA'
|
||||
Name = 'NOMBRE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
@ -40,13 +44,19 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'NIF_CIF'
|
||||
DataType = datString
|
||||
Size = 15
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ALBARAN'
|
||||
DataType = datDateTime
|
||||
end
|
||||
item
|
||||
Name = 'ID_PEDIDO'
|
||||
DataType = datInteger
|
||||
Name = 'REFERENCIA'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA_CLIENTE'
|
||||
@ -54,29 +64,24 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'OBSERVACIONES'
|
||||
DataType = datMemo
|
||||
Name = 'ID_PEDIDO'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'REF_PEDIDO'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'NOMBRE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CALLE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'CODIGO_POSTAL'
|
||||
DataType = datString
|
||||
Size = 10
|
||||
end
|
||||
item
|
||||
Name = 'POBLACION'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'PROVINCIA'
|
||||
DataType = datString
|
||||
@ -93,13 +98,17 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
Size = 25
|
||||
end
|
||||
item
|
||||
Name = 'POBLACION'
|
||||
Name = 'CALLE'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
end
|
||||
item
|
||||
Name = 'OBSERVACIONES'
|
||||
DataType = datMemo
|
||||
end
|
||||
item
|
||||
Name = 'IMPORTE_TOTAL'
|
||||
DataType = datFloat
|
||||
DataType = datCurrency
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_PREVISTA_ENVIO'
|
||||
@ -303,27 +312,28 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
TargetTable = 'ALBARANES_CLIENTE'
|
||||
SQL =
|
||||
'SELECT'#10' V_ALBARANES_CLIENTE.ID,'#10' V_ALBARANES_CLIENTE.ID_EMPRES' +
|
||||
'A,'#10' V_ALBARANES_CLIENTE.ID_CLIENTE,'#10' V_ALBARANES_CLIENTE.NOMBR' +
|
||||
'E,'#10' V_CLIENTES.NOMBRE_COMERCIAL,'#10' V_CLIENTES.NIF_CIF,'#10' V_ALBA' +
|
||||
'RANES_CLIENTE.FECHA_ALBARAN,'#10' V_ALBARANES_CLIENTE.REFERENCIA,'#10' ' +
|
||||
' V_ALBARANES_CLIENTE.REFERENCIA_CLIENTE,'#10' V_ALBARANES_CLIENTE.I' +
|
||||
'D_PEDIDO,'#10' V_ALBARANES_CLIENTE.REF_PEDIDO,'#10' V_ALBARANES_CLIENT' +
|
||||
'E.CODIGO_POSTAL,'#10' V_ALBARANES_CLIENTE.POBLACION,'#10' V_ALBARANES_' +
|
||||
'CLIENTE.PROVINCIA,'#10' V_ALBARANES_CLIENTE.PERSONA_CONTACTO,'#10' V_A' +
|
||||
'LBARANES_CLIENTE.TELEFONO,'#10' V_ALBARANES_CLIENTE.CALLE,'#10' V_ALBA' +
|
||||
'RANES_CLIENTE.OBSERVACIONES,'#10' V_ALBARANES_CLIENTE.IMPORTE_TOTAL' +
|
||||
','#10' V_ALBARANES_CLIENTE.FECHA_PREVISTA_ENVIO,'#10' EMPRESAS.NIF_CIF' +
|
||||
' AS NIF_CIF_EMPRESA,'#10' EMPRESAS.NOMBRE AS NOMBRE_EMPRESA,'#10' EMPR' +
|
||||
'ESAS.RAZON_SOCIAL AS RAZON_SOCIAL_EMPRESA,'#10' EMPRESAS.CALLE AS C' +
|
||||
'ALLE_EMPRESA,'#10' EMPRESAS.CODIGO_POSTAL AS CODIGO_POSTAL_EMPRESA,' +
|
||||
#10' EMPRESAS.POBLACION AS POBLACION_EMPRESA,'#10' EMPRESAS.PROVINCIA' +
|
||||
' AS PROVINCIA_EMPRESA,'#10' EMPRESAS.TELEFONO_1 AS TELEFONO_1_EMPRE' +
|
||||
'SA,'#10' EMPRESAS.FAX AS FAX_EMPRESA,'#10' EMPRESAS.MOVIL_1 AS MOVIL_1' +
|
||||
'_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS EMAIL_1_EMPRESA,'#10' EMPRESAS.PAGI' +
|
||||
'NA_WEB AS PAGINA_WEB_EMPRESA'#10'FROM'#10' V_ALBARANES_CLIENTE'#10' LEFT' +
|
||||
' OUTER JOIN V_CLIENTES ON (V_CLIENTES.ID = V_ALBARANES_CLIENTE.I' +
|
||||
'D_CLIENTE)'#10' LEFT OUTER JOIN EMPRESAS ON (EMPRESAS.ID = V_ALBARA' +
|
||||
'NES_CLIENTE.ID_EMPRESA)'#10'WHERE V_ALBARANES_CLIENTE.ID = :ID'#10
|
||||
'A,'#10' V_ALBARANES_CLIENTE.ID_TIENDA,'#10' V_ALBARANES_CLIENTE.ID_CLI' +
|
||||
'ENTE,'#10' V_ALBARANES_CLIENTE.NOMBRE,'#10' V_CLIENTES.NOMBRE_COMERCIA' +
|
||||
'L,'#10' V_CLIENTES.NIF_CIF,'#10' V_ALBARANES_CLIENTE.FECHA_ALBARAN,'#10' ' +
|
||||
'V_ALBARANES_CLIENTE.REFERENCIA,'#10' V_ALBARANES_CLIENTE.REFERENCIA' +
|
||||
'_CLIENTE,'#10' V_ALBARANES_CLIENTE.ID_PEDIDO,'#10' V_ALBARANES_CLIENTE' +
|
||||
'.REF_PEDIDO,'#10' V_ALBARANES_CLIENTE.CODIGO_POSTAL,'#10' V_ALBARANES_' +
|
||||
'CLIENTE.POBLACION,'#10' V_ALBARANES_CLIENTE.PROVINCIA,'#10' V_ALBARANE' +
|
||||
'S_CLIENTE.PERSONA_CONTACTO,'#10' V_ALBARANES_CLIENTE.TELEFONO,'#10' V_' +
|
||||
'ALBARANES_CLIENTE.CALLE,'#10' V_ALBARANES_CLIENTE.OBSERVACIONES,'#10' ' +
|
||||
'V_ALBARANES_CLIENTE.IMPORTE_TOTAL,'#10' V_ALBARANES_CLIENTE.FECHA_P' +
|
||||
'REVISTA_ENVIO,'#10' EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS' +
|
||||
'.NOMBRE AS NOMBRE_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCI' +
|
||||
'AL_EMPRESA,'#10' EMPRESAS.CALLE AS CALLE_EMPRESA,'#10' EMPRESAS.CODIGO' +
|
||||
'_POSTAL AS CODIGO_POSTAL_EMPRESA,'#10' EMPRESAS.POBLACION AS POBLAC' +
|
||||
'ION_EMPRESA,'#10' EMPRESAS.PROVINCIA AS PROVINCIA_EMPRESA,'#10' EMPRES' +
|
||||
'AS.TELEFONO_1 AS TELEFONO_1_EMPRESA,'#10' EMPRESAS.FAX AS FAX_EMPRE' +
|
||||
'SA,'#10' EMPRESAS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10' EMPRESAS.EMAIL_1 AS' +
|
||||
' EMAIL_1_EMPRESA,'#10' EMPRESAS.PAGINA_WEB AS PAGINA_WEB_EMPRESA'#10'FR' +
|
||||
'OM'#10' V_ALBARANES_CLIENTE'#10' LEFT OUTER JOIN V_CLIENTES ON (V_CL' +
|
||||
'IENTES.ID = V_ALBARANES_CLIENTE.ID_CLIENTE)'#10' LEFT OUTER JOIN EM' +
|
||||
'PRESAS ON (EMPRESAS.ID = V_ALBARANES_CLIENTE.ID_EMPRESA)'#10'WHERE V' +
|
||||
'_ALBARANES_CLIENTE.ID = :ID'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -454,6 +464,10 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
DatasetField = 'NIF_CIF'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'NIF_CIF'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_TIENDA'
|
||||
TableField = 'ID_TIENDA'
|
||||
end>
|
||||
end>
|
||||
Name = 'Informe_Cabecera'
|
||||
@ -466,6 +480,10 @@ object RptAlbaranesCliente: TRptAlbaranesCliente
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIENDA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_CLIENTE'
|
||||
DataType = datInteger
|
||||
|
||||
@ -30,9 +30,9 @@ type
|
||||
tbl_Etiquetas: TDAMemDataTable;
|
||||
DADataEtiquetas: TDADataSource;
|
||||
frxDBEtiquetas: TfrxDBDataset;
|
||||
frxPDFExport1: TfrxPDFExport;
|
||||
schReport: TDASchema;
|
||||
DataDictionary: TDADataDictionary;
|
||||
frxPDFExport1: TfrxPDFExport;
|
||||
procedure DataModuleCreate(Sender: TObject);
|
||||
private
|
||||
FConnection: IDAConnection;
|
||||
@ -49,7 +49,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer, schAlbaranesClienteClient_Intf;
|
||||
uSistemaFunc, uDataModuleServer, schAlbaranesClienteClient_Intf;
|
||||
|
||||
const
|
||||
rptInfAlbaran = 'InfAlbaranCliente.fr3';
|
||||
@ -99,6 +99,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TRptAlbaranesCliente._GenerarAlbaran(const ID: integer);
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
try
|
||||
@ -107,7 +110,11 @@ begin
|
||||
tbl_Cabecera.Active := True;
|
||||
tbl_Detalles.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptInfAlbaran, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptInfAlbaran, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarAlbaran, no encuentra informe' + rptInfAlbaran));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.PrepareReport(False);
|
||||
finally
|
||||
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
@ -115,10 +122,9 @@ begin
|
||||
end;
|
||||
|
||||
function TRptAlbaranesCliente.GenerarEtiquetas(const AID: Integer; withRefCliente: Boolean): Binary;
|
||||
{var
|
||||
dsMaster: IDADataset;
|
||||
dsDetail: IDADataset;
|
||||
AStream: TMemoryStream;}
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
FConnection.BeginTransaction;
|
||||
@ -127,7 +133,11 @@ begin
|
||||
tbl_Etiquetas.ParamByName('ID_ALBARAN').AsInteger := AID;
|
||||
tbl_Etiquetas.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptInfEtiquetas, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptInfEtiquetas);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: GenerarEtiquetas, no encuentra informe' + rptInfEtiquetas));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
if withRefCliente then
|
||||
frxReport.Variables.Variables['withRefCliente'] := 1
|
||||
else
|
||||
@ -138,35 +148,6 @@ begin
|
||||
finally
|
||||
FConnection.RollbackTransaction;
|
||||
end;
|
||||
|
||||
{
|
||||
AStream := TMemoryStream.Create;
|
||||
Result := Binary.Create;
|
||||
FConnection.BeginTransaction;
|
||||
try
|
||||
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]);
|
||||
dsDetail := schReport.NewDataset(FConnection, ds_InformeDetallesEtiquetas, ['ID_ALBARAN'], [AID], False);
|
||||
|
||||
AStream.Clear;
|
||||
DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1);
|
||||
DABINAdapter.ReadDataset(AStream, tbl_Cabecera, TRUE, '', TRUE, TRUE);
|
||||
|
||||
AStream.Clear;
|
||||
DABINAdapter.WriteDataset(AStream, dsDetail, [woRows, woSchema], -1);
|
||||
DABINAdapter.ReadDataset(AStream, tbl_Detalles, TRUE, '', TRUE, TRUE);
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptInfEtiquetas, True);
|
||||
if withRefCliente then
|
||||
frxReport.Variables.Variables['withRefCliente'] := 1
|
||||
else
|
||||
frxReport.Variables.Variables['withRefCliente'] := 0;
|
||||
frxReport.PrepareReport(False);
|
||||
frxReport.PreviewPages.SaveToStream(Result);
|
||||
finally
|
||||
AStream.Free;
|
||||
FConnection.RollbackTransaction;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -45,7 +45,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer;
|
||||
uSistemaFunc, uDataModuleServer;
|
||||
|
||||
const
|
||||
rptComision = 'InfComision.fr3';
|
||||
@ -60,6 +60,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TRptComisiones.GenerarComision(const ID: integer);
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
FConnection.BeginTransaction;
|
||||
try
|
||||
@ -70,7 +73,11 @@ begin
|
||||
tbl_Facturas.Active := True;
|
||||
tbl_Vendedores.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptComision, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptComision, tbl_Comisiones.FieldByName('ID_EMPRESA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: GenerarComision, no encuentra informe' + rptComision));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.PrepareReport(False);
|
||||
finally
|
||||
FConnection.RollbackTransaction;
|
||||
|
||||
@ -37,7 +37,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer, schContactosClient_Intf;
|
||||
uSistemaFunc, uDataModuleServer, schContactosClient_Intf;
|
||||
|
||||
const
|
||||
rptEtiquetasContacto = 'InfEtiquetasContacto.fr3';
|
||||
@ -57,6 +57,9 @@ begin
|
||||
end;
|
||||
|
||||
function TRptEtiquetasContacto.GenerarInforme(const AID: String): Binary;
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
|
||||
@ -75,10 +78,12 @@ begin
|
||||
tbl_Contactos.Where.AddCondition(fld_ContactosID, cIn, '(' + AID + ')');
|
||||
tbl_Contactos.Active := True;
|
||||
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptEtiquetasContacto);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: GenerarInforme, no encuentra informe' + rptEtiquetasContacto));
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptEtiquetasContacto, True);
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.PrepareReport(True);
|
||||
|
||||
frxReport.PreviewPages.SaveToStream(Result);
|
||||
|
||||
finally
|
||||
|
||||
@ -52,11 +52,10 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer, schFacturasClienteClient_Intf;
|
||||
uSistemaFunc, uDataModuleServer, schFacturasClienteClient_Intf;
|
||||
|
||||
const
|
||||
rptFacturaCliente = 'InfFacturaCliente.fr3';
|
||||
rptFacturaClienteAbeto = 'InfFacturaClienteAbeto.fr3';
|
||||
|
||||
rptInformeIVA = 'InformeIVAClientes.fr3';
|
||||
rptInformeIVADesglosado = 'InformeIVAClientesDesglosado.fr3';
|
||||
@ -158,6 +157,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TRptFacturasCliente._GenerarFactura(const ID: integer);
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
try
|
||||
@ -173,12 +175,11 @@ begin
|
||||
tbl_Detalles.Active := True;
|
||||
tbl_Vencimientos.Active := True;
|
||||
|
||||
// frxReport.LoadFromFile(DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptFacturaCliente, True);
|
||||
if (tbl_Cabecera.FieldByName('ID_TIENDA').AsInteger <> 3) then
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptFacturaCliente, True)
|
||||
else
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptFacturaClienteAbeto, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe' + rptFacturaCliente));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.PrepareReport(False);
|
||||
finally
|
||||
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
@ -191,6 +192,7 @@ function TRptFacturasCliente._GenerarInforme(const TipoInforme: String;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
i: Integer;
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
@ -263,11 +265,13 @@ begin
|
||||
|
||||
tbl_InformeListadoFacturas.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
|
||||
// frxReport.LoadFromFile(DarRutaInformes + IntToStr(IdEmpresa) + '\' + TipoInforme, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, tbl_InformeListadoFacturas.FieldByName('ID_EMPRESA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe' + TipoInforme));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
|
||||
frxReport.Variables.Variables['FechaFin'] := FechaFin;
|
||||
|
||||
frxReport.PrepareReport(False);
|
||||
frxReport.PreviewPages.SaveToStream(Result);
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer, schFacturasProveedorClient_Intf;
|
||||
uSistemaFunc, uDataModuleServer, schFacturasProveedorClient_Intf;
|
||||
|
||||
const
|
||||
rptFacturaProveedor = 'InfFacturaProveedor.fr3';
|
||||
@ -138,6 +138,7 @@ function TRptFacturasProveedor._GenerarInforme(const TipoInforme: String;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
i: Integer;
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
@ -209,8 +210,11 @@ begin
|
||||
|
||||
tbl_InformeListadoFacturas.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
|
||||
// frxReport.LoadFromFile(DarRutaInformes + IntToStr(IdEmpresa) + '\' + TipoInforme, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, tbl_InformeListadoFacturas.FieldByName('ID_EMPRESA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe' + TipoInforme));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
|
||||
frxReport.Variables.Variables['FechaFin'] := FechaFin;
|
||||
|
||||
|
||||
@ -200,14 +200,14 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
|
||||
Connection = 'IBX'
|
||||
TargetTable = 'V_PRESUPUESTOS_CLIENTE'
|
||||
SQL =
|
||||
'SELECT '#10' ID, ID_EMPRESA, FECHA_PRESUPUESTO, FECHA_DECISION, '#10 +
|
||||
' REFERENCIA, SITUACION, ID_CLIENTE, NIF_CIF, NOMBRE, '#10' REF' +
|
||||
'ERENCIA_CLIENTE, CLIENTE_FINAL, PORTADA, MEMORIA, '#10' OBSERVACI' +
|
||||
'ONES, INCIDENCIAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, '#10' FECHA_M' +
|
||||
'ODIFICACION, USUARIO, IMPORTE_NETO, IMPORTE_PORTE, '#10' DESCUENT' +
|
||||
'O, IMPORTE_DESCUENTO, BASE_IMPONIBLE, IVA, '#10' IMPORTE_IVA, IMP' +
|
||||
'ORTE_TOTAL, ID_FORMA_PAGO'#10' FROM'#10' V_PRESUPUESTOS_CLIENTE'#10' WH' +
|
||||
'ERE V_PRESUPUESTOS_CLIENTE.ID = :ID'#10
|
||||
'SELECT '#10' ID, ID_EMPRESA, ID_TIENDA, FECHA_PRESUPUESTO, FECHA_' +
|
||||
'DECISION,'#10' REFERENCIA, SITUACION, ID_CLIENTE, NIF_CIF, NOMBRE' +
|
||||
', '#10' REFERENCIA_CLIENTE, CLIENTE_FINAL, PORTADA, MEMORIA, '#10' ' +
|
||||
' OBSERVACIONES, INCIDENCIAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, '#10' ' +
|
||||
' FECHA_MODIFICACION, USUARIO, IMPORTE_NETO, IMPORTE_PORTE, '#10' ' +
|
||||
' DESCUENTO, IMPORTE_DESCUENTO, BASE_IMPONIBLE, IVA, '#10' IMPORT' +
|
||||
'E_IVA, IMPORTE_TOTAL, ID_FORMA_PAGO'#10' FROM'#10' V_PRESUPUESTOS_CL' +
|
||||
'IENTE'#10' WHERE V_PRESUPUESTOS_CLIENTE.ID = :ID'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -321,6 +321,10 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
|
||||
item
|
||||
DatasetField = 'ID_FORMA_PAGO'
|
||||
TableField = 'ID_FORMA_PAGO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_TIENDA'
|
||||
TableField = 'ID_TIENDA'
|
||||
end>
|
||||
end>
|
||||
Name = 'Informe_Cabecera'
|
||||
@ -335,6 +339,10 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIENDA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_PRESUPUESTO'
|
||||
DataType = datDateTime
|
||||
@ -712,6 +720,10 @@ object RptPresupuestosCliente: TRptPresupuestosCliente
|
||||
Name = 'ID_EMPRESA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'ID_TIENDA'
|
||||
DataType = datInteger
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_PRESUPUESTO'
|
||||
DataType = datDateTime
|
||||
|
||||
@ -54,7 +54,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer, schPresupuestosClienteClient_Intf;
|
||||
uSistemaFunc, uDataModuleServer, schPresupuestosClienteClient_Intf;
|
||||
|
||||
const
|
||||
rptInforme = 'InfPresupuestoCliente.fr3';
|
||||
@ -132,6 +132,7 @@ function TRptPresupuestosCliente._GenerarInforme(const TipoInforme: String;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
i: Integer;
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
@ -204,8 +205,11 @@ begin
|
||||
|
||||
tbl_InformeListadoPresupuestos.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
|
||||
// frxReport.LoadFromFile(DarRutaInformes + IntToStr(IdEmpresa) + '\' + TipoInforme, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, tbl_InformeListadoPresupuestos.FieldByName('ID_EMPRESA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe' + TipoInforme));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
|
||||
frxReport.Variables.Variables['FechaFin'] := FechaFin;
|
||||
|
||||
@ -218,6 +222,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TRptPresupuestosCliente._GenerarPresupuesto(const AID: Integer);
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
try
|
||||
@ -228,7 +235,11 @@ begin
|
||||
tbl_Cabecera.Active := True;
|
||||
tbl_Detalles.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptInforme, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptInforme, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarPresupuesto, no encuentra informe' + rptInforme));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.PrepareReport(False);
|
||||
finally
|
||||
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
|
||||
@ -48,7 +48,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer, schRecibosClienteClient_Intf;
|
||||
uSistemaFunc, uDataModuleServer, schRecibosClienteClient_Intf;
|
||||
|
||||
const
|
||||
rptInforme = 'InfReciboCliente.fr3';
|
||||
@ -138,6 +138,7 @@ function TRptRecibosCliente._GenerarInforme(const TipoInforme: String;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
i: Integer;
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
@ -209,8 +210,11 @@ begin
|
||||
|
||||
tbl_InformeListadoRecibos.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
|
||||
// frxReport.LoadFromFile(DarRutaInformes + IntToStr(IdEmpresa) + '\' + TipoInforme, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, tbl_InformeListadoRecibos.FieldByName('ID_EMPRESA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe' + TipoInforme));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
|
||||
frxReport.Variables.Variables['FechaFin'] := FechaFin;
|
||||
|
||||
@ -223,6 +227,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TRptRecibosCliente._GenerarRecibo(const ID: Integer);
|
||||
var
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
FConnection.BeginTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
try
|
||||
@ -235,8 +242,11 @@ begin
|
||||
tbl_Cabecera.Active := True;
|
||||
tbl_Compensados.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + rptInforme, True);
|
||||
// frxReport.LoadFromFile(DarRutaInformes + tbl_Cabecera.FieldByName('ID_EMPRESA').AsString + '\' + rptInforme, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, rptInforme, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarRecibo, no encuentra informe' + rptInforme));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.PrepareReport(False);
|
||||
finally
|
||||
FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"
|
||||
|
||||
@ -40,7 +40,7 @@ implementation
|
||||
{$R *.dfm}
|
||||
|
||||
uses
|
||||
uDataModuleServer, schRecibosProveedorClient_Intf;
|
||||
uSistemaFunc, uDataModuleServer, schRecibosProveedorClient_Intf;
|
||||
|
||||
const
|
||||
rptInformeListadoRecibosProveedorDesglosado = 'InformeListadoRecibosProveedorDesglosado.fr3';
|
||||
@ -117,6 +117,7 @@ function TRptRecibosProveedor._GenerarInforme(const TipoInforme: String;
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
i: Integer;
|
||||
AInforme: Variant;
|
||||
|
||||
begin
|
||||
Result := Binary.Create;
|
||||
@ -188,8 +189,11 @@ begin
|
||||
|
||||
tbl_InformeListadoRecibos.Active := True;
|
||||
|
||||
frxReport.LoadFromFile(DarRutaInformes + TipoInforme, True);
|
||||
// frxReport.LoadFromFile(DarRutaInformes + IntToStr(IdEmpresa) + '\' + TipoInforme, True);
|
||||
AInforme := DarRutaFichero(DarRutaInformes, TipoInforme, tbl_InformeListadoRecibos.FieldByName('ID_EMPRESA').AsString);
|
||||
if VarIsNull(AInforme) then
|
||||
raise Exception.Create (('Error Servidor: _GenerarInforme, no encuentra informe' + TipoInforme));
|
||||
|
||||
frxReport.LoadFromFile(AInforme, True);
|
||||
frxReport.Variables.Variables['FechaInicio'] := FechaInicio;
|
||||
frxReport.Variables.Variables['FechaFin'] := FechaFin;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user