Pedidos a proveedor:

- repaso general 
 - código de fabricante en los detalles
 - unidad de medida en los detalles
 - informe FastReport y Word.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@342 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-03-12 18:11:46 +00:00
parent a0f44df1f7
commit f05a21155a
21 changed files with 2106 additions and 803 deletions

View File

@ -900,6 +900,7 @@ CREATE TABLE PEDIDOS_PROVEEDOR_DETALLES (
ID_ARTICULO TIPO_ID, ID_ARTICULO TIPO_ID,
CONCEPTO TIPO_CONCEPTO, CONCEPTO TIPO_CONCEPTO,
CANTIDAD INTEGER, CANTIDAD INTEGER,
UNIDAD_MEDIDA VARCHAR(255),
IMPORTE_UNIDAD TIPO_IMPORTE, IMPORTE_UNIDAD TIPO_IMPORTE,
DESCUENTO TIPO_PORCENTAJE, DESCUENTO TIPO_PORCENTAJE,
IMPORTE_PORTE TIPO_IMPORTE, IMPORTE_PORTE TIPO_IMPORTE,

File diff suppressed because one or more lines are too long

View File

@ -338,6 +338,7 @@ inherited DataModulePedidosProveedor: TDataModulePedidosProveedor
item item
Name = 'ID_PEDIDO' Name = 'ID_PEDIDO'
DataType = datInteger DataType = datInteger
DictionaryEntry = 'PedidosProveedor_Detalles_ID_PEDIDO'
end end
item item
Name = 'POSICION' Name = 'POSICION'
@ -348,11 +349,13 @@ inherited DataModulePedidosProveedor: TDataModulePedidosProveedor
Name = 'TIPO_DETALLE' Name = 'TIPO_DETALLE'
DataType = datString DataType = datString
Size = 10 Size = 10
DictionaryEntry = 'PedidosProveedor_Detalles_TIPO_DETALLE'
end end
item item
Name = 'CONCEPTO' Name = 'CONCEPTO'
DataType = datString DataType = datString
Size = 2000 Size = 2000
DictionaryEntry = 'PedidosProveedor_Detalles_CONCEPTO'
end end
item item
Name = 'CANTIDAD' Name = 'CANTIDAD'
@ -360,39 +363,72 @@ inherited DataModulePedidosProveedor: TDataModulePedidosProveedor
Alignment = taRightJustify Alignment = taRightJustify
DictionaryEntry = 'CANTIDAD' DictionaryEntry = 'CANTIDAD'
end end
item
Name = 'UNIDAD_MEDIDA'
DataType = datString
Size = 255
DisplayLabel = 'Unidad de medida'
DictionaryEntry = 'PedidosProveedor_Detalles_UNIDAD_MEDIDA'
end
item item
Name = 'IMPORTE_UNIDAD' Name = 'IMPORTE_UNIDAD'
DataType = datCurrency DataType = datCurrency
DisplayLabel = 'Importe unidad'
Alignment = taRightJustify
DictionaryEntry = 'PedidosProveedor_Detalles_IMPORTE_UNIDAD'
end end
item item
Name = 'IMPORTE_TOTAL' Name = 'IMPORTE_TOTAL'
DataType = datCurrency DataType = datCurrency
DisplayLabel = 'Importe total'
Alignment = taRightJustify
DictionaryEntry = 'PedidosProveedor_Detalles_IMPORTE_TOTAL'
end end
item item
Name = 'VISIBLE' Name = 'VISIBLE'
DataType = datSmallInt DataType = datInteger
DictionaryEntry = 'PedidosProveedor_Detalles_VISIBLE'
end end
item item
Name = 'ID_ARTICULO' Name = 'ID_ARTICULO'
DataType = datInteger DataType = datInteger
DictionaryEntry = 'PedidosProveedor_Detalles_ID_ARTICULO'
end end
item item
Name = 'DESCUENTO' Name = 'DESCUENTO'
DataType = datFloat DataType = datFloat
DisplayLabel = 'Descuento'
DisplayFormat = ',0.00 %;-,0.00 %'
Alignment = taRightJustify
DictionaryEntry = 'PedidosProveedor_Detalles_DESCUENTO'
end end
item item
Name = 'IMPORTE_PORTE' Name = 'IMPORTE_PORTE'
DataType = datCurrency DataType = datCurrency
DisplayLabel = 'Importe porte'
Alignment = taRightJustify
DictionaryEntry = 'PedidosProveedor_Detalles_IMPORTE_PORTE'
end end
item item
Name = 'REFERENCIA' Name = 'REFERENCIA'
DataType = datString DataType = datString
Size = 255 Size = 255
DisplayLabel = 'Referencia'
DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA'
end end
item item
Name = 'REFERENCIA_PROVEEDOR' Name = 'REFERENCIA_PROVEEDOR'
DataType = datString DataType = datString
Size = 255 Size = 255
DisplayLabel = 'Ref. proveedor'
DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA_PROVEEDOR'
end
item
Name = 'REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
DisplayLabel = 'Ref. fabricante'
DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA_FABRICANTE'
end> end>
Params = <> Params = <>
MasterMappingMode = mmWhere MasterMappingMode = mmWhere

View File

@ -41,81 +41,18 @@
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType> <Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject> <BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters> <BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Package_Options><Package_Options Name="ImplicitBuild">True</Package_Options><Package_Options Name="DesigntimeOnly">False</Package_Options><Package_Options Name="RuntimeOnly">False</Package_Options></Package_Options><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Package_Options>
<Package_Options Name="ImplicitBuild">True</Package_Options>
<Package_Options Name="DesigntimeOnly">False</Package_Options>
<Package_Options Name="RuntimeOnly">False</Package_Options>
</Package_Options>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">3082</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages> <Excluded_Packages Name="C:\Archivos de programa\RemObjects Software\Pascal Script\Dcu\D10\PascalScript_RO_D10.bpl">RemObjects Pascal Script - RemObjects SDK 3.0 Integration</Excluded_Packages>
<Excluded_Packages Name="C:\Archivos de programa\EurekaLog 5\Delphi10\ExceptionExpert10.bpl">EurekaLog 5.1.9</Excluded_Packages> <Excluded_Packages Name="C:\Archivos de programa\EurekaLog 5\Delphi10\ExceptionExpert10.bpl">EurekaLog 5.1.9</Excluded_Packages>
</Excluded_Packages> </Excluded_Packages><Source><Source Name="MainSource">PedidosProveedor_model.dpk</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
<Source>
<Source Name="MainSource">PedidosProveedor_model.dpk</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions> </ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" /> <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup> <ItemGroup>
<DelphiCompile Include="PedidosProveedor_model.dpk"> <DelphiCompile Include="PedidosProveedor_model.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\Lib\Base.dcp" /> <DCCReference Include="Base.dcp" />
<DCCReference Include="..\..\Lib\Contactos_model.dcp" /> <DCCReference Include="Contactos_model.dcp" />
<DCCReference Include="Data\uIDataModulePedidosProveedor.pas" /> <DCCReference Include="Data\uIDataModulePedidosProveedor.pas" />
<DCCReference Include="Data\uIDataModulePedidosProveedorReport.pas" /> <DCCReference Include="Data\uIDataModulePedidosProveedorReport.pas" />
<DCCReference Include="schPedidosProveedorClient_Intf.pas" /> <DCCReference Include="schPedidosProveedorClient_Intf.pas" />
@ -125,10 +62,9 @@
<None Include="ModelSupport_PedidosProveedor_model\default.txaPackage" /> <None Include="ModelSupport_PedidosProveedor_model\default.txaPackage" />
</ItemGroup> </ItemGroup>
</Project> </Project>
<!-- EurekaLog First Line <!-- EurekaLog First Line
[Exception Log] [Exception Log]
EurekaLog Version=6006 EurekaLog Version=6011
Activate=0 Activate=0
Activate Handle=1 Activate Handle=1
Save Log File=1 Save Log File=1

View File

@ -0,0 +1,22 @@
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "FileVersion", "1.0.0.0\0"
VALUE "ProductVersion", "1.0.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0C0A, 1252
END
END

View File

@ -9,9 +9,9 @@ const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_PedidosProveedor = '{58DE490F-21E7-46A0-8553-F18015CAF07E}'; RID_PedidosProveedor = '{2F38A1ED-3A7F-46F7-B320-466FB2BB4214}';
RID_PedidosProveedor_Detalles = '{1F8FEB94-42A3-4DC3-BB9B-33D96BAB6B5E}'; RID_PedidosProveedor_Detalles = '{32CF76F8-6744-4027-A852-5378F5D96C95}';
RID_PedidosProveedor_Articulos_Pendientes = '{0864581D-D5D3-441D-9296-22C2CFB6DE3B}'; RID_PedidosProveedor_Articulos_Pendientes = '{276A7DCD-86B0-4816-A798-6DBDCFDE5152}';
{ Data table names } { Data table names }
nme_PedidosProveedor = 'PedidosProveedor'; nme_PedidosProveedor = 'PedidosProveedor';
@ -99,6 +99,7 @@ const
fld_PedidosProveedor_DetallesTIPO_DETALLE = 'TIPO_DETALLE'; fld_PedidosProveedor_DetallesTIPO_DETALLE = 'TIPO_DETALLE';
fld_PedidosProveedor_DetallesCONCEPTO = 'CONCEPTO'; fld_PedidosProveedor_DetallesCONCEPTO = 'CONCEPTO';
fld_PedidosProveedor_DetallesCANTIDAD = 'CANTIDAD'; fld_PedidosProveedor_DetallesCANTIDAD = 'CANTIDAD';
fld_PedidosProveedor_DetallesUNIDAD_MEDIDA = 'UNIDAD_MEDIDA';
fld_PedidosProveedor_DetallesIMPORTE_UNIDAD = 'IMPORTE_UNIDAD'; fld_PedidosProveedor_DetallesIMPORTE_UNIDAD = 'IMPORTE_UNIDAD';
fld_PedidosProveedor_DetallesIMPORTE_TOTAL = 'IMPORTE_TOTAL'; fld_PedidosProveedor_DetallesIMPORTE_TOTAL = 'IMPORTE_TOTAL';
fld_PedidosProveedor_DetallesVISIBLE = 'VISIBLE'; fld_PedidosProveedor_DetallesVISIBLE = 'VISIBLE';
@ -115,14 +116,15 @@ const
idx_PedidosProveedor_DetallesTIPO_DETALLE = 3; idx_PedidosProveedor_DetallesTIPO_DETALLE = 3;
idx_PedidosProveedor_DetallesCONCEPTO = 4; idx_PedidosProveedor_DetallesCONCEPTO = 4;
idx_PedidosProveedor_DetallesCANTIDAD = 5; idx_PedidosProveedor_DetallesCANTIDAD = 5;
idx_PedidosProveedor_DetallesIMPORTE_UNIDAD = 6; idx_PedidosProveedor_DetallesUNIDAD_MEDIDA = 6;
idx_PedidosProveedor_DetallesIMPORTE_TOTAL = 7; idx_PedidosProveedor_DetallesIMPORTE_UNIDAD = 7;
idx_PedidosProveedor_DetallesVISIBLE = 8; idx_PedidosProveedor_DetallesIMPORTE_TOTAL = 8;
idx_PedidosProveedor_DetallesID_ARTICULO = 9; idx_PedidosProveedor_DetallesVISIBLE = 9;
idx_PedidosProveedor_DetallesDESCUENTO = 10; idx_PedidosProveedor_DetallesID_ARTICULO = 10;
idx_PedidosProveedor_DetallesIMPORTE_PORTE = 11; idx_PedidosProveedor_DetallesDESCUENTO = 11;
idx_PedidosProveedor_DetallesREFERENCIA = 12; idx_PedidosProveedor_DetallesIMPORTE_PORTE = 12;
idx_PedidosProveedor_DetallesREFERENCIA_PROVEEDOR = 13; idx_PedidosProveedor_DetallesREFERENCIA = 13;
idx_PedidosProveedor_DetallesREFERENCIA_PROVEEDOR = 14;
{ PedidosProveedor_Articulos_Pendientes fields } { PedidosProveedor_Articulos_Pendientes fields }
fld_PedidosProveedor_Articulos_PendientesID_PEDIDO = 'ID_PEDIDO'; fld_PedidosProveedor_Articulos_PendientesID_PEDIDO = 'ID_PEDIDO';
@ -143,7 +145,7 @@ const
type type
{ IPedidosProveedor } { IPedidosProveedor }
IPedidosProveedor = interface(IDAStronglyTypedDataTable) IPedidosProveedor = interface(IDAStronglyTypedDataTable)
['{045CE31C-5F13-4365-94D8-09C247E0B609}'] ['{333644C7-E17E-4FD7-BFD1-3078A5D13F1E}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -586,7 +588,7 @@ type
{ IPedidosProveedor_Detalles } { IPedidosProveedor_Detalles }
IPedidosProveedor_Detalles = interface(IDAStronglyTypedDataTable) IPedidosProveedor_Detalles = interface(IDAStronglyTypedDataTable)
['{10B7129B-0AD0-476C-AA42-807F150AA7B3}'] ['{109F0849-4B0E-4D32-BF3F-F6449B8D2CE5}']
{ Property getters and setters } { Property getters and setters }
function GetIDValue: Integer; function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer); procedure SetIDValue(const aValue: Integer);
@ -612,6 +614,10 @@ type
procedure SetCANTIDADValue(const aValue: Integer); procedure SetCANTIDADValue(const aValue: Integer);
function GetCANTIDADIsNull: Boolean; function GetCANTIDADIsNull: Boolean;
procedure SetCANTIDADIsNull(const aValue: Boolean); procedure SetCANTIDADIsNull(const aValue: Boolean);
function GetUNIDAD_MEDIDAValue: String;
procedure SetUNIDAD_MEDIDAValue(const aValue: String);
function GetUNIDAD_MEDIDAIsNull: Boolean;
procedure SetUNIDAD_MEDIDAIsNull(const aValue: Boolean);
function GetIMPORTE_UNIDADValue: Currency; function GetIMPORTE_UNIDADValue: Currency;
procedure SetIMPORTE_UNIDADValue(const aValue: Currency); procedure SetIMPORTE_UNIDADValue(const aValue: Currency);
function GetIMPORTE_UNIDADIsNull: Boolean; function GetIMPORTE_UNIDADIsNull: Boolean;
@ -620,8 +626,8 @@ type
procedure SetIMPORTE_TOTALValue(const aValue: Currency); procedure SetIMPORTE_TOTALValue(const aValue: Currency);
function GetIMPORTE_TOTALIsNull: Boolean; function GetIMPORTE_TOTALIsNull: Boolean;
procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean); procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean);
function GetVISIBLEValue: SmallInt; function GetVISIBLEValue: Integer;
procedure SetVISIBLEValue(const aValue: SmallInt); procedure SetVISIBLEValue(const aValue: Integer);
function GetVISIBLEIsNull: Boolean; function GetVISIBLEIsNull: Boolean;
procedure SetVISIBLEIsNull(const aValue: Boolean); procedure SetVISIBLEIsNull(const aValue: Boolean);
function GetID_ARTICULOValue: Integer; function GetID_ARTICULOValue: Integer;
@ -659,11 +665,13 @@ type
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull; property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property CANTIDAD: Integer read GetCANTIDADValue write SetCANTIDADValue; property CANTIDAD: Integer read GetCANTIDADValue write SetCANTIDADValue;
property CANTIDADIsNull: Boolean read GetCANTIDADIsNull write SetCANTIDADIsNull; property CANTIDADIsNull: Boolean read GetCANTIDADIsNull write SetCANTIDADIsNull;
property UNIDAD_MEDIDA: String read GetUNIDAD_MEDIDAValue write SetUNIDAD_MEDIDAValue;
property UNIDAD_MEDIDAIsNull: Boolean read GetUNIDAD_MEDIDAIsNull write SetUNIDAD_MEDIDAIsNull;
property IMPORTE_UNIDAD: Currency read GetIMPORTE_UNIDADValue write SetIMPORTE_UNIDADValue; property IMPORTE_UNIDAD: Currency read GetIMPORTE_UNIDADValue write SetIMPORTE_UNIDADValue;
property IMPORTE_UNIDADIsNull: Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull; property IMPORTE_UNIDADIsNull: Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull;
property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue; property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue;
property IMPORTE_TOTALIsNull: Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull; property IMPORTE_TOTALIsNull: Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull;
property VISIBLE: SmallInt read GetVISIBLEValue write SetVISIBLEValue; property VISIBLE: Integer read GetVISIBLEValue write SetVISIBLEValue;
property VISIBLEIsNull: Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull; property VISIBLEIsNull: Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull;
property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue; property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull; property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull;
@ -706,6 +714,10 @@ type
procedure SetCANTIDADValue(const aValue: Integer); virtual; procedure SetCANTIDADValue(const aValue: Integer); virtual;
function GetCANTIDADIsNull: Boolean; virtual; function GetCANTIDADIsNull: Boolean; virtual;
procedure SetCANTIDADIsNull(const aValue: Boolean); virtual; procedure SetCANTIDADIsNull(const aValue: Boolean); virtual;
function GetUNIDAD_MEDIDAValue: String; virtual;
procedure SetUNIDAD_MEDIDAValue(const aValue: String); virtual;
function GetUNIDAD_MEDIDAIsNull: Boolean; virtual;
procedure SetUNIDAD_MEDIDAIsNull(const aValue: Boolean); virtual;
function GetIMPORTE_UNIDADValue: Currency; virtual; function GetIMPORTE_UNIDADValue: Currency; virtual;
procedure SetIMPORTE_UNIDADValue(const aValue: Currency); virtual; procedure SetIMPORTE_UNIDADValue(const aValue: Currency); virtual;
function GetIMPORTE_UNIDADIsNull: Boolean; virtual; function GetIMPORTE_UNIDADIsNull: Boolean; virtual;
@ -714,8 +726,8 @@ type
procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual; procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual;
function GetIMPORTE_TOTALIsNull: Boolean; virtual; function GetIMPORTE_TOTALIsNull: Boolean; virtual;
procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean); virtual; procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean); virtual;
function GetVISIBLEValue: SmallInt; virtual; function GetVISIBLEValue: Integer; virtual;
procedure SetVISIBLEValue(const aValue: SmallInt); virtual; procedure SetVISIBLEValue(const aValue: Integer); virtual;
function GetVISIBLEIsNull: Boolean; virtual; function GetVISIBLEIsNull: Boolean; virtual;
procedure SetVISIBLEIsNull(const aValue: Boolean); virtual; procedure SetVISIBLEIsNull(const aValue: Boolean); virtual;
function GetID_ARTICULOValue: Integer; virtual; function GetID_ARTICULOValue: Integer; virtual;
@ -752,11 +764,13 @@ type
property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull; property CONCEPTOIsNull: Boolean read GetCONCEPTOIsNull write SetCONCEPTOIsNull;
property CANTIDAD: Integer read GetCANTIDADValue write SetCANTIDADValue; property CANTIDAD: Integer read GetCANTIDADValue write SetCANTIDADValue;
property CANTIDADIsNull: Boolean read GetCANTIDADIsNull write SetCANTIDADIsNull; property CANTIDADIsNull: Boolean read GetCANTIDADIsNull write SetCANTIDADIsNull;
property UNIDAD_MEDIDA: String read GetUNIDAD_MEDIDAValue write SetUNIDAD_MEDIDAValue;
property UNIDAD_MEDIDAIsNull: Boolean read GetUNIDAD_MEDIDAIsNull write SetUNIDAD_MEDIDAIsNull;
property IMPORTE_UNIDAD: Currency read GetIMPORTE_UNIDADValue write SetIMPORTE_UNIDADValue; property IMPORTE_UNIDAD: Currency read GetIMPORTE_UNIDADValue write SetIMPORTE_UNIDADValue;
property IMPORTE_UNIDADIsNull: Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull; property IMPORTE_UNIDADIsNull: Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull;
property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue; property IMPORTE_TOTAL: Currency read GetIMPORTE_TOTALValue write SetIMPORTE_TOTALValue;
property IMPORTE_TOTALIsNull: Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull; property IMPORTE_TOTALIsNull: Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull;
property VISIBLE: SmallInt read GetVISIBLEValue write SetVISIBLEValue; property VISIBLE: Integer read GetVISIBLEValue write SetVISIBLEValue;
property VISIBLEIsNull: Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull; property VISIBLEIsNull: Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull;
property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue; property ID_ARTICULO: Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull; property ID_ARTICULOIsNull: Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull;
@ -777,7 +791,7 @@ type
{ IPedidosProveedor_Articulos_Pendientes } { IPedidosProveedor_Articulos_Pendientes }
IPedidosProveedor_Articulos_Pendientes = interface(IDAStronglyTypedDataTable) IPedidosProveedor_Articulos_Pendientes = interface(IDAStronglyTypedDataTable)
['{0F474AE2-91D1-4747-B9B7-3825145A2CE3}'] ['{0C6DE081-242A-4ADF-99BE-2AFE45A142B1}']
{ Property getters and setters } { Property getters and setters }
function GetID_PEDIDOValue: Integer; function GetID_PEDIDOValue: Integer;
procedure SetID_PEDIDOValue(const aValue: Integer); procedure SetID_PEDIDOValue(const aValue: Integer);
@ -1770,6 +1784,27 @@ begin
DataTable.Fields[idx_PedidosProveedor_DetallesCANTIDAD].AsVariant := Null; DataTable.Fields[idx_PedidosProveedor_DetallesCANTIDAD].AsVariant := Null;
end; end;
function TPedidosProveedor_DetallesDataTableRules.GetUNIDAD_MEDIDAValue: String;
begin
result := DataTable.Fields[idx_PedidosProveedor_DetallesUNIDAD_MEDIDA].AsString;
end;
procedure TPedidosProveedor_DetallesDataTableRules.SetUNIDAD_MEDIDAValue(const aValue: String);
begin
DataTable.Fields[idx_PedidosProveedor_DetallesUNIDAD_MEDIDA].AsString := aValue;
end;
function TPedidosProveedor_DetallesDataTableRules.GetUNIDAD_MEDIDAIsNull: boolean;
begin
result := DataTable.Fields[idx_PedidosProveedor_DetallesUNIDAD_MEDIDA].IsNull;
end;
procedure TPedidosProveedor_DetallesDataTableRules.SetUNIDAD_MEDIDAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_PedidosProveedor_DetallesUNIDAD_MEDIDA].AsVariant := Null;
end;
function TPedidosProveedor_DetallesDataTableRules.GetIMPORTE_UNIDADValue: Currency; function TPedidosProveedor_DetallesDataTableRules.GetIMPORTE_UNIDADValue: Currency;
begin begin
result := DataTable.Fields[idx_PedidosProveedor_DetallesIMPORTE_UNIDAD].AsCurrency; result := DataTable.Fields[idx_PedidosProveedor_DetallesIMPORTE_UNIDAD].AsCurrency;
@ -1812,14 +1847,14 @@ begin
DataTable.Fields[idx_PedidosProveedor_DetallesIMPORTE_TOTAL].AsVariant := Null; DataTable.Fields[idx_PedidosProveedor_DetallesIMPORTE_TOTAL].AsVariant := Null;
end; end;
function TPedidosProveedor_DetallesDataTableRules.GetVISIBLEValue: SmallInt; function TPedidosProveedor_DetallesDataTableRules.GetVISIBLEValue: Integer;
begin begin
result := DataTable.Fields[idx_PedidosProveedor_DetallesVISIBLE].AsSmallInt; result := DataTable.Fields[idx_PedidosProveedor_DetallesVISIBLE].AsInteger;
end; end;
procedure TPedidosProveedor_DetallesDataTableRules.SetVISIBLEValue(const aValue: SmallInt); procedure TPedidosProveedor_DetallesDataTableRules.SetVISIBLEValue(const aValue: Integer);
begin begin
DataTable.Fields[idx_PedidosProveedor_DetallesVISIBLE].AsSmallInt := aValue; DataTable.Fields[idx_PedidosProveedor_DetallesVISIBLE].AsInteger := aValue;
end; end;
function TPedidosProveedor_DetallesDataTableRules.GetVISIBLEIsNull: boolean; function TPedidosProveedor_DetallesDataTableRules.GetVISIBLEIsNull: boolean;

View File

@ -9,14 +9,14 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_PedidosProveedorDelta = '{6B35580D-7178-4FFA-B9D7-5267221E9EC2}'; RID_PedidosProveedorDelta = '{E6771CAE-270F-4C79-BDF5-0C7EFC7CDF68}';
RID_PedidosProveedor_DetallesDelta = '{D3FC4AC8-B811-4DEF-B9E5-7EDF82012F3D}'; RID_PedidosProveedor_DetallesDelta = '{A2EF2F8A-B1CB-4122-919F-06604309B1B8}';
RID_PedidosProveedor_Articulos_PendientesDelta = '{CACE01FB-F88B-48FB-9693-CF3432BAF0D6}'; RID_PedidosProveedor_Articulos_PendientesDelta = '{7AA8D557-941A-4B44-A8D2-35781BEBD144}';
type type
{ IPedidosProveedorDelta } { IPedidosProveedorDelta }
IPedidosProveedorDelta = interface(IPedidosProveedor) IPedidosProveedorDelta = interface(IPedidosProveedor)
['{6B35580D-7178-4FFA-B9D7-5267221E9EC2}'] ['{E6771CAE-270F-4C79-BDF5-0C7EFC7CDF68}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -460,7 +460,7 @@ type
{ IPedidosProveedor_DetallesDelta } { IPedidosProveedor_DetallesDelta }
IPedidosProveedor_DetallesDelta = interface(IPedidosProveedor_Detalles) IPedidosProveedor_DetallesDelta = interface(IPedidosProveedor_Detalles)
['{D3FC4AC8-B811-4DEF-B9E5-7EDF82012F3D}'] ['{A2EF2F8A-B1CB-4122-919F-06604309B1B8}']
{ Property getters and setters } { Property getters and setters }
function GetOldIDValue : Integer; function GetOldIDValue : Integer;
function GetOldID_PEDIDOValue : Integer; function GetOldID_PEDIDOValue : Integer;
@ -468,9 +468,10 @@ type
function GetOldTIPO_DETALLEValue : String; function GetOldTIPO_DETALLEValue : String;
function GetOldCONCEPTOValue : String; function GetOldCONCEPTOValue : String;
function GetOldCANTIDADValue : Integer; function GetOldCANTIDADValue : Integer;
function GetOldUNIDAD_MEDIDAValue : String;
function GetOldIMPORTE_UNIDADValue : Currency; function GetOldIMPORTE_UNIDADValue : Currency;
function GetOldIMPORTE_TOTALValue : Currency; function GetOldIMPORTE_TOTALValue : Currency;
function GetOldVISIBLEValue : SmallInt; function GetOldVISIBLEValue : Integer;
function GetOldID_ARTICULOValue : Integer; function GetOldID_ARTICULOValue : Integer;
function GetOldDESCUENTOValue : Float; function GetOldDESCUENTOValue : Float;
function GetOldIMPORTE_PORTEValue : Currency; function GetOldIMPORTE_PORTEValue : Currency;
@ -484,9 +485,10 @@ type
property OldTIPO_DETALLE : String read GetOldTIPO_DETALLEValue; property OldTIPO_DETALLE : String read GetOldTIPO_DETALLEValue;
property OldCONCEPTO : String read GetOldCONCEPTOValue; property OldCONCEPTO : String read GetOldCONCEPTOValue;
property OldCANTIDAD : Integer read GetOldCANTIDADValue; property OldCANTIDAD : Integer read GetOldCANTIDADValue;
property OldUNIDAD_MEDIDA : String read GetOldUNIDAD_MEDIDAValue;
property OldIMPORTE_UNIDAD : Currency read GetOldIMPORTE_UNIDADValue; property OldIMPORTE_UNIDAD : Currency read GetOldIMPORTE_UNIDADValue;
property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue; property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue;
property OldVISIBLE : SmallInt read GetOldVISIBLEValue; property OldVISIBLE : Integer read GetOldVISIBLEValue;
property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue; property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
property OldDESCUENTO : Float read GetOldDESCUENTOValue; property OldDESCUENTO : Float read GetOldDESCUENTOValue;
property OldIMPORTE_PORTE : Currency read GetOldIMPORTE_PORTEValue; property OldIMPORTE_PORTE : Currency read GetOldIMPORTE_PORTEValue;
@ -535,6 +537,12 @@ type
function GetOldCANTIDADIsNull: Boolean; virtual; function GetOldCANTIDADIsNull: Boolean; virtual;
procedure SetCANTIDADValue(const aValue: Integer); virtual; procedure SetCANTIDADValue(const aValue: Integer); virtual;
procedure SetCANTIDADIsNull(const aValue: Boolean); virtual; procedure SetCANTIDADIsNull(const aValue: Boolean); virtual;
function GetUNIDAD_MEDIDAValue: String; virtual;
function GetUNIDAD_MEDIDAIsNull: Boolean; virtual;
function GetOldUNIDAD_MEDIDAValue: String; virtual;
function GetOldUNIDAD_MEDIDAIsNull: Boolean; virtual;
procedure SetUNIDAD_MEDIDAValue(const aValue: String); virtual;
procedure SetUNIDAD_MEDIDAIsNull(const aValue: Boolean); virtual;
function GetIMPORTE_UNIDADValue: Currency; virtual; function GetIMPORTE_UNIDADValue: Currency; virtual;
function GetIMPORTE_UNIDADIsNull: Boolean; virtual; function GetIMPORTE_UNIDADIsNull: Boolean; virtual;
function GetOldIMPORTE_UNIDADValue: Currency; virtual; function GetOldIMPORTE_UNIDADValue: Currency; virtual;
@ -547,11 +555,11 @@ type
function GetOldIMPORTE_TOTALIsNull: Boolean; virtual; function GetOldIMPORTE_TOTALIsNull: Boolean; virtual;
procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual; procedure SetIMPORTE_TOTALValue(const aValue: Currency); virtual;
procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean); virtual; procedure SetIMPORTE_TOTALIsNull(const aValue: Boolean); virtual;
function GetVISIBLEValue: SmallInt; virtual; function GetVISIBLEValue: Integer; virtual;
function GetVISIBLEIsNull: Boolean; virtual; function GetVISIBLEIsNull: Boolean; virtual;
function GetOldVISIBLEValue: SmallInt; virtual; function GetOldVISIBLEValue: Integer; virtual;
function GetOldVISIBLEIsNull: Boolean; virtual; function GetOldVISIBLEIsNull: Boolean; virtual;
procedure SetVISIBLEValue(const aValue: SmallInt); virtual; procedure SetVISIBLEValue(const aValue: Integer); virtual;
procedure SetVISIBLEIsNull(const aValue: Boolean); virtual; procedure SetVISIBLEIsNull(const aValue: Boolean); virtual;
function GetID_ARTICULOValue: Integer; virtual; function GetID_ARTICULOValue: Integer; virtual;
function GetID_ARTICULOIsNull: Boolean; virtual; function GetID_ARTICULOIsNull: Boolean; virtual;
@ -609,6 +617,10 @@ type
property CANTIDADIsNull : Boolean read GetCANTIDADIsNull write SetCANTIDADIsNull; property CANTIDADIsNull : Boolean read GetCANTIDADIsNull write SetCANTIDADIsNull;
property OldCANTIDAD : Integer read GetOldCANTIDADValue; property OldCANTIDAD : Integer read GetOldCANTIDADValue;
property OldCANTIDADIsNull : Boolean read GetOldCANTIDADIsNull; property OldCANTIDADIsNull : Boolean read GetOldCANTIDADIsNull;
property UNIDAD_MEDIDA : String read GetUNIDAD_MEDIDAValue write SetUNIDAD_MEDIDAValue;
property UNIDAD_MEDIDAIsNull : Boolean read GetUNIDAD_MEDIDAIsNull write SetUNIDAD_MEDIDAIsNull;
property OldUNIDAD_MEDIDA : String read GetOldUNIDAD_MEDIDAValue;
property OldUNIDAD_MEDIDAIsNull : Boolean read GetOldUNIDAD_MEDIDAIsNull;
property IMPORTE_UNIDAD : Currency read GetIMPORTE_UNIDADValue write SetIMPORTE_UNIDADValue; property IMPORTE_UNIDAD : Currency read GetIMPORTE_UNIDADValue write SetIMPORTE_UNIDADValue;
property IMPORTE_UNIDADIsNull : Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull; property IMPORTE_UNIDADIsNull : Boolean read GetIMPORTE_UNIDADIsNull write SetIMPORTE_UNIDADIsNull;
property OldIMPORTE_UNIDAD : Currency read GetOldIMPORTE_UNIDADValue; property OldIMPORTE_UNIDAD : Currency read GetOldIMPORTE_UNIDADValue;
@ -617,9 +629,9 @@ type
property IMPORTE_TOTALIsNull : Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull; property IMPORTE_TOTALIsNull : Boolean read GetIMPORTE_TOTALIsNull write SetIMPORTE_TOTALIsNull;
property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue; property OldIMPORTE_TOTAL : Currency read GetOldIMPORTE_TOTALValue;
property OldIMPORTE_TOTALIsNull : Boolean read GetOldIMPORTE_TOTALIsNull; property OldIMPORTE_TOTALIsNull : Boolean read GetOldIMPORTE_TOTALIsNull;
property VISIBLE : SmallInt read GetVISIBLEValue write SetVISIBLEValue; property VISIBLE : Integer read GetVISIBLEValue write SetVISIBLEValue;
property VISIBLEIsNull : Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull; property VISIBLEIsNull : Boolean read GetVISIBLEIsNull write SetVISIBLEIsNull;
property OldVISIBLE : SmallInt read GetOldVISIBLEValue; property OldVISIBLE : Integer read GetOldVISIBLEValue;
property OldVISIBLEIsNull : Boolean read GetOldVISIBLEIsNull; property OldVISIBLEIsNull : Boolean read GetOldVISIBLEIsNull;
property ID_ARTICULO : Integer read GetID_ARTICULOValue write SetID_ARTICULOValue; property ID_ARTICULO : Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
property ID_ARTICULOIsNull : Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull; property ID_ARTICULOIsNull : Boolean read GetID_ARTICULOIsNull write SetID_ARTICULOIsNull;
@ -650,7 +662,7 @@ type
{ IPedidosProveedor_Articulos_PendientesDelta } { IPedidosProveedor_Articulos_PendientesDelta }
IPedidosProveedor_Articulos_PendientesDelta = interface(IPedidosProveedor_Articulos_Pendientes) IPedidosProveedor_Articulos_PendientesDelta = interface(IPedidosProveedor_Articulos_Pendientes)
['{CACE01FB-F88B-48FB-9693-CF3432BAF0D6}'] ['{7AA8D557-941A-4B44-A8D2-35781BEBD144}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_PEDIDOValue : Integer; function GetOldID_PEDIDOValue : Integer;
function GetOldREFERENCIAValue : String; function GetOldREFERENCIAValue : String;
@ -2055,6 +2067,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesCANTIDAD] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesCANTIDAD] := Null;
end; end;
function TPedidosProveedor_DetallesBusinessProcessorRules.GetUNIDAD_MEDIDAValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesUNIDAD_MEDIDA];
end;
function TPedidosProveedor_DetallesBusinessProcessorRules.GetUNIDAD_MEDIDAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesUNIDAD_MEDIDA]);
end;
function TPedidosProveedor_DetallesBusinessProcessorRules.GetOldUNIDAD_MEDIDAValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedor_DetallesUNIDAD_MEDIDA];
end;
function TPedidosProveedor_DetallesBusinessProcessorRules.GetOldUNIDAD_MEDIDAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedor_DetallesUNIDAD_MEDIDA]);
end;
procedure TPedidosProveedor_DetallesBusinessProcessorRules.SetUNIDAD_MEDIDAValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesUNIDAD_MEDIDA] := aValue;
end;
procedure TPedidosProveedor_DetallesBusinessProcessorRules.SetUNIDAD_MEDIDAIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesUNIDAD_MEDIDA] := Null;
end;
function TPedidosProveedor_DetallesBusinessProcessorRules.GetIMPORTE_UNIDADValue: Currency; function TPedidosProveedor_DetallesBusinessProcessorRules.GetIMPORTE_UNIDADValue: Currency;
begin begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesIMPORTE_UNIDAD]; result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesIMPORTE_UNIDAD];
@ -2117,7 +2160,7 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesIMPORTE_TOTAL] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesIMPORTE_TOTAL] := Null;
end; end;
function TPedidosProveedor_DetallesBusinessProcessorRules.GetVISIBLEValue: SmallInt; function TPedidosProveedor_DetallesBusinessProcessorRules.GetVISIBLEValue: Integer;
begin begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesVISIBLE]; result := BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesVISIBLE];
end; end;
@ -2127,7 +2170,7 @@ begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesVISIBLE]); result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesVISIBLE]);
end; end;
function TPedidosProveedor_DetallesBusinessProcessorRules.GetOldVISIBLEValue: SmallInt; function TPedidosProveedor_DetallesBusinessProcessorRules.GetOldVISIBLEValue: Integer;
begin begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedor_DetallesVISIBLE]; result := BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedor_DetallesVISIBLE];
end; end;
@ -2137,7 +2180,7 @@ begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedor_DetallesVISIBLE]); result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PedidosProveedor_DetallesVISIBLE]);
end; end;
procedure TPedidosProveedor_DetallesBusinessProcessorRules.SetVISIBLEValue(const aValue: SmallInt); procedure TPedidosProveedor_DetallesBusinessProcessorRules.SetVISIBLEValue(const aValue: Integer);
begin begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesVISIBLE] := aValue; BusinessProcessor.CurrentChange.NewValueByName[fld_PedidosProveedor_DetallesVISIBLE] := aValue;
end; end;

View File

@ -7,31 +7,64 @@ uses
Dialogs, frxClass, frxDBSet, uDAScriptingProvider, Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient, uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes, frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
uDAInterfaces; uDAInterfaces, uDADataStreamer, IBCustomDataSet, IBQuery, IBDatabase,
uDAMemDataTable;
type type
TRptPedidosProveedor = class(TDataModule) TRptPedidosProveedor = class(TDataModule)
DADataCabecera: TDADataSource;
DADataDetalles: TDADataSource;
tbl_Cabecera: TDACDSDataTable;
tbl_Detalles: TDACDSDataTable;
DABINAdapter: TDABINAdapter; DABINAdapter: TDABINAdapter;
frxRichObject1: TfrxRichObject;
frxBarCodeObject1: TfrxBarCodeObject;
frxOLEObject1: TfrxOLEObject;
frxCrossObject1: TfrxCrossObject;
frxCheckBoxObject1: TfrxCheckBoxObject;
frxGradientObject1: TfrxGradientObject;
frxChartObject1: TfrxChartObject;
frxDBCabecera: TfrxDBDataset; frxDBCabecera: TfrxDBDataset;
frxDBDetalles: TfrxDBDataset; frxDBDetalles: TfrxDBDataset;
frxReport: TfrxReport;
IBDatabase1: TIBDatabase;
IBTransaction1: TIBTransaction;
DataSource1: TDataSource;
DataSource2: TDataSource;
cabecera: TIBQuery;
detalles: TIBQuery;
frxCheckBoxObject1: TfrxCheckBoxObject;
frxChartObject1: TfrxChartObject;
frxGradientObject1: TfrxGradientObject;
frxCrossObject1: TfrxCrossObject;
frxOLEObject1: TfrxOLEObject;
frxBarCodeObject1: TfrxBarCodeObject;
frxRichObject1: TfrxRichObject;
DADSCabecera: TDADataSource;
DADSDetalles: TDADataSource;
tbl_Detalles: TDAMemDataTable;
tbl_Cabecera: TDAMemDataTable;
cabeceraID: TIntegerField;
cabeceraID_EMPRESA: TIntegerField;
cabeceraREFERENCIA: TIBStringField;
cabeceraFECHA_PEDIDO: TDateField;
cabeceraOBSERVACIONES: TMemoField;
cabeceraNOMBRE: TIBStringField;
cabeceraFAX: TIBStringField;
cabeceraNOMBRE_ALMACEN: TIBStringField;
cabeceraCALLE: TIBStringField;
cabeceraPOBLACION: TIBStringField;
cabeceraPROVINCIA: TIBStringField;
cabeceraCODIGO_POSTAL: TIBStringField;
cabeceraPERSONA_CONTACTO: TIBStringField;
cabeceraTELEFONO: TIBStringField;
schReport: TDASchema; schReport: TDASchema;
DataDictionary: TDADataDictionary; DataDictionary: TDADataDictionary;
frxReport: TfrxReport; detallesID: TIntegerField;
detallesID_PEDIDO: TIntegerField;
detallesPOSICION: TIntegerField;
detallesTIPO_DETALLE: TIBStringField;
detallesREFERENCIA: TIBStringField;
detallesCONCEPTO: TIBStringField;
detallesCANTIDAD: TIntegerField;
detallesUNIDAD_MEDIDA: TIBStringField;
detallesIMPORTE_UNIDAD: TIBBCDField;
detallesIMPORTE_TOTAL: TIBBCDField;
detallesREFERENCIA_PROVEEDOR: TIBStringField;
detallesREFERENCIA_FABRICANTE: TIBStringField;
procedure DataModuleCreate(Sender: TObject); procedure DataModuleCreate(Sender: TObject);
private private
FConnection: IDAConnection; FConnection: IDAConnection;
procedure GenerarPedido(const AID : Integer); overload; procedure GenerarPedido(const ID : Integer); overload;
public public
function GenerarPedido(const AID : String): Binary; overload; function GenerarPedido(const AID : String): Binary; overload;
end; end;
@ -68,7 +101,7 @@ var
begin begin
Result := Binary.Create; Result := Binary.Create;
FConnection.BeginTransaction; //FConnection.BeginTransaction; <--- Creo que no va a hacer falta.
try try
ID_Pedidos := TStringList.Create; ID_Pedidos := TStringList.Create;
@ -81,11 +114,11 @@ begin
frxReport.PreviewPages.SaveToStream(Result); frxReport.PreviewPages.SaveToStream(Result);
finally finally
FConnection.RollbackTransaction; //FConnection.RollbackTransaction; <--- Creo que no va a hacer falta.
end; end;
end; end;
procedure TRptPedidosProveedor.GenerarPedido(const AID: Integer); procedure TRptPedidosProveedor.GenerarPedido(const ID: Integer);
var var
AStream: TMemoryStream; AStream: TMemoryStream;
dsMaster: IDADataset; dsMaster: IDADataset;
@ -94,16 +127,14 @@ begin
AStream := TMemoryStream.Create; AStream := TMemoryStream.Create;
try try
dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]); frxDBCabecera.DataSource := DADSCabecera;
dsDetail := schReport.NewDataset(FConnection, ds_InformeDetalles, ['ID_PEDIDO'], [AID], False); frxDBDetalles.DataSource := DADSDetalles;
AStream.Clear; tbl_Cabecera.ParamByName('ID').AsInteger := ID;
DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1); tbl_Detalles.ParamByName('ID_FACTURA').AsInteger := ID;
DABINAdapter.ReadDataset(AStream, tbl_Cabecera, TRUE, '', TRUE, TRUE);
AStream.Clear; tbl_Cabecera.Active := True;
DABINAdapter.WriteDataset(AStream, dsDetail, [woRows, woSchema], -1); tbl_Detalles.Active := True;
DABINAdapter.ReadDataset(AStream, tbl_Detalles, TRUE, '', TRUE, TRUE);
frxReport.LoadFromFile(DarRutaInformes + rptInforme, True); frxReport.LoadFromFile(DarRutaInformes + rptInforme, True);
frxReport.PrepareReport(False); frxReport.PrepareReport(False);

View File

@ -0,0 +1,543 @@
object RptWordPedidoProveedor: TRptWordPedidoProveedor
OldCreateOrder = False
OnCreate = DataModuleCreate
Height = 366
Width = 514
object schReport: TDASchema
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DataDictionary
Datasets = <
item
IsPublic = False
Params = <
item
Name = 'ID'
Value = '2'
ParamType = daptInput
end>
Statements = <
item
Connection = 'IBX'
SQL =
'SELECT'#10' V_PEDIDOS_PROVEEDOR.ID,'#10' V_PEDIDOS_PROVEEDOR.ID_EMPRES' +
'A,'#10' V_PEDIDOS_PROVEEDOR.REFERENCIA,'#10' V_PEDIDOS_PROVEEDOR.FECHA' +
'_PEDIDO,'#10' V_PEDIDOS_PROVEEDOR.OBSERVACIONES,'#10' V_PROVEEDORES.NO' +
'MBRE,'#10' V_PROVEEDORES.FAX,'#10' ALMACENES.NOMBRE AS NOMBRE_ALMACEN,' +
#10#10' CASE WHEN (ALMACENES.ID > 0)'#10' THEN ALMACENES.CALL' +
'E'#10' ELSE V_PEDIDOS_PROVEEDOR.CALLE'#10' END as CALLE,'#10#10' ' +
'CASE WHEN (ALMACENES.ID > 0)'#10' THEN ALMACENES.POBLACIO' +
'N'#10' ELSE V_PEDIDOS_PROVEEDOR.POBLACION'#10' END as POBLAC' +
'ION,'#10#10' CASE WHEN (ALMACENES.ID > 0)'#10' THEN ALMACENES.' +
'PROVINCIA'#10' ELSE V_PEDIDOS_PROVEEDOR.PROVINCIA'#10' END a' +
's PROVINCIA,'#10#10' CASE WHEN (ALMACENES.ID > 0)'#10' THEN AL' +
'MACENES.CODIGO_POSTAL'#10' ELSE V_PEDIDOS_PROVEEDOR.CODIG' +
'O_POSTAL'#10' END as CODIGO_POSTAL,'#10#10' CASE WHEN (ALMACENES.ID > 0)' +
#10' THEN ALMACENES.PERSONA_CONTACTO'#10' ELSE V_' +
'PEDIDOS_PROVEEDOR.PERSONA_CONTACTO'#10' END as PERSONA_CONTACTO,'#10#10' ' +
' CASE WHEN (ALMACENES.ID > 0)'#10' THEN ALMACENES.TELEFON' +
'O'#10' ELSE V_PEDIDOS_PROVEEDOR.TELEFONO'#10' END as TELEFON' +
'O'#10'FROM'#10' V_PEDIDOS_PROVEEDOR'#10' LEFT OUTER JOIN V_PROVEEDORES ON ' +
'(V_PROVEEDORES.ID = V_PEDIDOS_PROVEEDOR.ID_PROVEEDOR)'#10' LEFT OUT' +
'ER JOIN ALMACENES ON (ALMACENES.ID = V_PEDIDOS_PROVEEDOR.ID_ALMA' +
'CEN)'#10'WHERE V_PEDIDOS_PROVEEDOR.ID = :ID'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'FECHA_PEDIDO'
TableField = 'FECHA_PEDIDO'
end
item
DatasetField = 'OBSERVACIONES'
TableField = 'OBSERVACIONES'
end
item
DatasetField = 'NOMBRE'
TableField = 'NOMBRE'
end
item
DatasetField = 'FAX'
TableField = 'FAX'
end
item
DatasetField = 'NOMBRE_ALMACEN'
TableField = 'NOMBRE_ALMACEN'
end
item
DatasetField = 'CALLE'
TableField = 'CALLE'
end
item
DatasetField = 'POBLACION'
TableField = 'POBLACION'
end
item
DatasetField = 'PROVINCIA'
TableField = 'PROVINCIA'
end
item
DatasetField = 'CODIGO_POSTAL'
TableField = 'CODIGO_POSTAL'
end
item
DatasetField = 'PERSONA_CONTACTO'
TableField = 'PERSONA_CONTACTO'
end
item
DatasetField = 'TELEFONO'
TableField = 'TELEFONO'
end>
end>
Name = 'Informe_Cabecera'
Fields = <
item
Name = 'ID'
DataType = datInteger
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'FECHA_PEDIDO'
DataType = datDateTime
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end
item
Name = 'FAX'
DataType = datString
Size = 25
end
item
Name = 'NOMBRE_ALMACEN'
DataType = datString
Size = 255
end
item
Name = 'CALLE'
DataType = datString
Size = 255
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
end
item
Name = 'TELEFONO'
DataType = datString
Size = 25
end>
ReadOnly = True
end
item
IsPublic = False
Params = <
item
Name = 'ID_PEDIDO'
Value = '2'
ParamType = daptInput
end>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
SQL =
'SELECT DET.ID, DET.ID_PEDIDO,'#10' DET.POSICION, DET.TIPO_DETA' +
'LLE,'#10' ARTICULOS.REFERENCIA, DET.CONCEPTO, DET.CANTIDAD,'#10' ' +
' DET.UNIDAD_MEDIDA, DET.IMPORTE_UNIDAD, DET.IMPORTE_TOTAL,'#10' ' +
' ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR,'#10' ' +
'ARTICULOS.REFERENCIA_FABR as REFERENCIA_FABRICANTE'#10'FROM PEDIDOS_' +
'PROVEEDOR_DETALLES DET'#10'LEFT OUTER JOIN ARTICULOS ON (DET.ID_ARTI' +
'CULO = ARTICULOS.ID)'#10'WHERE DET.ID_PEDIDO = :ID_PEDIDO AND DET.VI' +
'SIBLE = 1 AND {Where}'#10'ORDER BY DET.ID_PEDIDO, DET.POSICION;'#10#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_PEDIDO'
TableField = 'ID_PEDIDO'
end
item
DatasetField = 'POSICION'
TableField = 'POSICION'
end
item
DatasetField = 'TIPO_DETALLE'
TableField = 'TIPO_DETALLE'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'CONCEPTO'
TableField = 'CONCEPTO'
end
item
DatasetField = 'CANTIDAD'
TableField = 'CANTIDAD'
end
item
DatasetField = 'UNIDAD_MEDIDA'
TableField = 'UNIDAD_MEDIDA'
end
item
DatasetField = 'IMPORTE_UNIDAD'
TableField = 'IMPORTE_UNIDAD'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end
item
DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = 'REFERENCIA_PROVEEDOR'
end
item
DatasetField = 'REFERENCIA_FABRICANTE'
TableField = 'REFERENCIA_FABRICANTE'
end>
end>
Name = 'Informe_Detalles'
Fields = <
item
Name = 'ID'
DataType = datInteger
end
item
Name = 'ID_PEDIDO'
DataType = datInteger
end
item
Name = 'POSICION'
DataType = datInteger
end
item
Name = 'TIPO_DETALLE'
DataType = datString
Size = 10
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
end
item
Name = 'CANTIDAD'
DataType = datInteger
end
item
Name = 'UNIDAD_MEDIDA'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
end
item
Name = 'REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
end>
ReadOnly = True
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <>
RelationShips = <>
UpdateRules = <>
Version = 0
Left = 48
Top = 16
end
object DataDictionary: TDADataDictionary
Fields = <>
Left = 46
Top = 142
end
object DABin2DataStreamer: TDABin2DataStreamer
Left = 48
Top = 80
end
object tbl_Cabecera: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID'
DataType = datInteger
Required = True
InPrimaryKey = True
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'TIPO'
DataType = datString
Size = 1
end
item
Name = 'FECHA_FACTURA'
DataType = datDateTime
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
end
item
Name = 'SITUACION'
DataType = datString
Size = 19
end
item
Name = 'DESCUENTO'
DataType = datFloat
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
end
item
Name = 'IVA'
DataType = datFloat
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
end
item
Name = 'RE'
DataType = datFloat
end
item
Name = 'IMPORTE_RE'
DataType = datCurrency
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
end
item
Name = 'CALLE'
DataType = datString
Size = 255
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
end
item
Name = 'RECARGO_EQUIVALENCIA'
DataType = datSmallInt
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
end
item
Name = 'FORMA_PAGO'
DataType = datString
Size = 255
end>
Params = <
item
Name = 'ID'
Value = ''
ParamType = daptInput
end>
LogChanges = False
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteFetchEnabled = False
LocalSchema = schReport
LocalDataStreamer = DABin2DataStreamer
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Informe_Cabecera'
IndexDefs = <>
Left = 168
Top = 16
end
object tbl_Detalles: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID'
DataType = datInteger
InPrimaryKey = True
end
item
Name = 'ID_FACTURA'
DataType = datInteger
end
item
Name = 'POSICION'
DataType = datInteger
end
item
Name = 'TIPO_DETALLE'
DataType = datString
Size = 10
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
end
item
Name = 'CANTIDAD'
DataType = datInteger
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
end
item
Name = 'DESCUENTO'
DataType = datFloat
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
end
item
Name = 'VISIBLE'
DataType = datSmallInt
end>
Params = <
item
Name = 'ID_FACTURA'
Value = ''
ParamType = daptInput
end>
MasterParamsMappings.Strings = (
'ID_PRESUPUESTO=ID_PRESUPUESTO')
LogChanges = False
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteFetchEnabled = False
LocalSchema = schReport
LocalDataStreamer = DABin2DataStreamer
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Informe_Detalles'
IndexDefs = <>
Left = 264
Top = 16
end
object tbl_Empresa: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <>
Params = <
item
Name = 'ID'
Value = '31'
ParamType = daptInput
end>
LogChanges = False
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteFetchEnabled = False
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
LogicalName = 'Empresa'
IndexDefs = <>
Left = 168
Top = 80
end
end

View File

@ -0,0 +1,323 @@
unit uRptWordPedidoProveedor;
interface
uses
SysUtils, Classes, AHWord97, IB, IBCustomDataSet, IBDatabase,
Word2000, uDAInterfaces, uDADataStreamer, uDABin2DataStreamer, uDAClasses,
uDAScriptingProvider, uDADataTable, uDAMemDataTable;
type
TRptWordPedidoProveedor = class(TDataModule)
DABin2DataStreamer: TDABin2DataStreamer;
tbl_Cabecera: TDAMemDataTable;
tbl_Detalles: TDAMemDataTable;
tbl_Empresa: TDAMemDataTable;
schReport: TDASchema;
DataDictionary: TDADataDictionary;
procedure DataModuleCreate(Sender: TObject);
private
FConnection: IDAConnection;
FPlantilla : string;
FWordApp : TWordApp;
FDocumento : TWordDoc;
FNumCapitulos : Integer;
FCodigoPedido : string;
FNombreFichero : String;
FImportes : Boolean;
function DarNumCapitulos : Integer;
procedure InsertarConceptos(Tabla : Table);
function Generar : Boolean;
function RellenarDatosPedido : Boolean;
function RellenarDatosDetalle : Boolean;
procedure _GenerarPedido(const AID: String);
public
function Exportar(Codigo, Fichero : String): Boolean;
constructor Create (AOwner : TComponent); override;
destructor Destroy; override;
end;
implementation
{ TRptWordPedidoProveedor }
{$R *.dfm}
uses
Windows, Variants, Dialogs, uDataModuleServer, uStringsUtils, uSistemaFunc,
srvEmpresas_Impl, uROTypes, uROClasses;
const
rptInforme = 'PedidoProveedor.rdx';
constructor TRptWordPedidoProveedor.Create(AOwner: TComponent);
begin
inherited;
FDocumento := NIL;
FPlantilla := DarRutaInformes + rptInforme;
end;
function TRptWordPedidoProveedor.DarNumCapitulos: Integer;
var
AuxNumCapitulos : integer;
begin
AuxNumCapitulos := 0;
tbl_Cabecera.First;
while not tbl_Cabecera.Eof do
begin
if tbl_Cabecera.FieldByName('TIPO_DETALLE').AsString = 'Titulo' then
AuxNumCapitulos := AuxNumCapitulos + 1;
tbl_Cabecera.Next;
end;
tbl_Cabecera.First;
Result := AuxNumCapitulos;
end;
destructor TRptWordPedidoProveedor.Destroy;
begin
if FDocumento <> NIL then
FDocumento.Free;
FDocumento := NIL;
inherited;
end;
function TRptWordPedidoProveedor.Exportar(Codigo, Fichero: String): Boolean;
begin
if EsCadenaVacia(Fichero) then
begin
Result := False;
raise Exception.Create('Falta indicar el fichero donde se exportará el listado.');
end;
FNombreFichero := Fichero;
FCodigoPedido := Codigo;
_GenerarPedido(Codigo);
Result := True;
end;
procedure TRptWordPedidoProveedor.DataModuleCreate(Sender: TObject);
begin
schReport.ConnectionManager := dmServer.ConnectionManager;
FConnection := dmServer.DarNuevaConexion;
end;
function TRptWordPedidoProveedor.Generar : Boolean;
var
Aux : OleVariant;
begin
FWordApp := TWordApp.Create (False, False);
with FWordApp do
begin
Visible := False;
ScreenUpdating := False;
end;
FDocumento := TWordDoc.CreateNewDoc(FWordApp, FPlantilla);
FWordApp.ScreenUpdating := False;
try
if not RellenarDatosPedido then
RaiseError('Se producido un error al generar la cabecera en MS Word.');
if not RellenarDatosDetalle then
RaiseError('Se producido un error al generar el informe en MS Word.');
FDocumento.SaveAs(FNombreFichero);
FWordApp.CloseApp(wdDoNotSaveChanges);
Result := True;
finally
FDocumento := NIL;
FWordApp := NIL;
end;
end;
procedure TRptWordPedidoProveedor.InsertarConceptos(Tabla : Table);
var
numRows, numCols, mergeSplit, shiftCells : OleVariant;
iContador : Integer;
TotalConceptos : Double;
begin
numRows := 2;
numCols := 1;
mergeSplit := False;
shiftCells := False;
iContador := 2; // Empezar en la 2ª fila de celdas. La primera es la
// cabecera de la tabla.
with Tabla, tbl_Detalles do
begin
while not EOF do
begin
if FieldByName('TIPO_DETALLE').AsString <> 'Concepto' then
Break;
// Partir la celda actual en 2 filas de 1 columna.
Rows.Item(iContador).Cells.Split (numRows, numCols, mergesplit);
Cell(iContador, 1).Range.Text := FieldByName('CONCEPTO').AsString;
Cell(iContador, 2).Range.Text := FieldByName('CANTIDAD').AsString;
Cell(iContador, 3).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat);
Cell(iContador, 4).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat);
TotalConceptos := TotalConceptos + FieldByName('IMPORTE_TOTAL').AsFloat;
Next;
Inc (iContador);
end;
// Borrar la fila vacía que sobra
Rows.Item(iContador).Cells.Delete(shiftCells);
Cell(iContador, 1).Range.Text := 'Total: ' + FormatFloat(DISPLAY_EUROS2, TotalConceptos);
AutoFitBehavior(wdAutoFitWindow);
end;
end;
function TRptWordPedidoProveedor.RellenarDatosDetalle : Boolean;
var
numRows, numCols, mergesplit : OleVariant;
MaxCols, iRowCount : Integer;
begin
iRowCount := 2;
numrows := 2;
numcols := 1;
mergeSplit := False;
MaxCols := 12;
with FDocumento.Document.Tables.Item(1), tbl_Detalles do
begin
tbl_Detalles.First;
while not tbl_Detalles.EOF do
begin
Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit);
Cell(iRowCount, 1).Range.Text := FieldByName('REFPROVEEDOR').AsString;
Cell(iRowCount, 2).Range.Text := FieldByName('REFFABRICANTE').AsString;
Cell(iRowCount, 3).Range.Text := FieldByName('DESCRIPCION').AsString;
Cell(iRowCount, 4).Range.Text := FieldByName('CANTIDAD').AsString + ' ' + FieldByName('UNIDADESMEDIDA').AsString;
if FImportes then
Cell(iRowCount, 5).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_UNIDAD').AsFloat)
else
Cell(iRowCount, 5).Range.Text := '';
if FImportes then
Cell(iRowCount, 6).Range.Text := FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat)
else
Cell(iRowCount, 6).Range.Text := '';
Next;
Inc (iRowCount);
end;
Rows.Item(iRowCount).Delete;
{while iRowCount <= MaxCols do
begin
Rows.Item (iRowCount).Cells.Split (numRows, numCols, mergesplit);
inc (iRowCount);
end;}
end;
Result := True;
end;
function TRptWordPedidoProveedor.RellenarDatosPedido : Boolean;
var
DireccionEntrega, FicheroTemporal : String;
LinkToFile, SaveWithDocument, _Range : OleVariant;
Imagen : InlineShape;
begin
//PARA DIBUJAR EL LOGOTIPO MULTIEMPRESA
{if (EmpresaActiva.Logotipo <> Nil) then
begin
//Activamos cabecera
FWordApp.Application.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader;
LinkToFile := False;
SaveWithDocument := True;
_Range := EmptyParam;
FicheroTemporal := DarFicheroTemporal;
EmpresaActiva.Logotipo.SaveToFile (FicheroTemporal);
Imagen := FWordApp.Application.ActiveWindow.ActivePane.Selection.InlineShapes.AddPicture(ficherotemporal, LinkToFile, SaveWithDocument, _Range);
//Formateamos imagen
if ((Imagen.Get_Width > ANCHO_LOGO_INF)) then
begin
Imagen.Set_Height(((ANCHO_LOGO_INF * Imagen.Get_Height) /Imagen.Get_Width));
Imagen.Set_Width(ANCHO_LOGO_INF);
end;
end;}
with FDocumento, tbl_Cabecera do
begin
ReplaceBookmark('CodigoPedido', FieldByName('CODIGO').AsString);
ReplaceBookmark('FechaPedido', FieldByName('FECHAEMISION').AsString);
// En la dirección mostrar aquellos campos que estén rellenos.
DireccionEntrega := '';
if not EsCadenaVacia(FieldByName('CALLEALMACEN').AsString) then
DireccionEntrega := DireccionEntrega + FieldByName('CALLEALMACEN').AsString;
if not EsCadenaVacia(FieldByName('NUMEROALMACEN').AsString) then
DireccionEntrega := DireccionEntrega + ' ' + FieldByName('NUMEROALMACEN').AsString;
if not EsCadenaVacia(FieldByName('PISOALMACEN').AsString) then
DireccionEntrega := DireccionEntrega + ', ' + FieldByName('PISOALMACEN').AsString;
if not EsCadenaVacia(FieldByName('CODIGOPOSTALALMACEN').AsString) then
DireccionEntrega := DireccionEntrega + ', ' + FieldByName('CODIGOPOSTALALMACEN').AsString;
if not EsCadenaVacia(FieldByName('POBLACIONALMACEN').AsString) then
DireccionEntrega := DireccionEntrega + ', ' + FieldByName('POBLACIONALMACEN').AsString;
if not EsCadenaVacia(FieldByName('PROVINCIAALMACEN').AsString) then
DireccionEntrega := DireccionEntrega + ', ' + FieldByName('PROVINCIAALMACEN').AsString;
ReplaceBookmark('LugarEntrega', DireccionEntrega);
{ ReplaceBookmark('LugarEntrega', FieldByName('CALLEALMACEN').AsString + ' ' +
FieldByName('NUMEROALMACEN').AsString + ', ' + FieldByName('PISOALMACEN').AsString + ', ' +
FieldByName('CODIGOPOSTALALMACEN').AsString + ' ' + FieldByName('POBLACIONALMACEN').AsString + ', ' + FieldByName('PROVINCIAALMACEN').AsString);}
ReplaceBookmark('PersonaEntrega', FieldByName('PERSONACONTACTOALMACEN').AsString);
ReplaceBookmark('NombreProveedor', FieldByName('NOMBRE').AsString);
ReplaceBookmark('FaxProveedor', FieldByName('FAX').AsString);
ReplaceBookmark('PersonaContactoProveedor', FieldByName('PERSONACONTACTO').AsString);
ReplaceBookmark('CodigoClienteProveedor', FieldByName('CODIGOCLIENTE').AsString);
if FImportes then
ReplaceBookmark('ImporteTotal', FormatFloat(DISPLAY_EUROS2, FieldByName('IMPORTE_TOTAL').AsFloat))
else
ReplaceBookmark('ImporteTotal', '');
ReplaceBookmark('NotasPedido', FieldByName('NOTAS').AsString);
ReplaceBookmark('NombreEmpresa', tbl_Empresa.FieldByName('NOMBRE').AsString);
ReplaceBookmark('NombreEmpresa2', tbl_Empresa.FieldByName('NOMBRE').AsString);
ReplaceBookmark('CifEmpresa', tbl_Empresa.FieldByName('NIF_CIF').AsString);
ReplaceBookmark('DireccionEmpresa',
Format('%s. %s %s', [tbl_Empresa.FieldByName('CALLE').AsString,
tbl_Empresa.FieldByName('CODIGO_POSTAL').AsString, tbl_Empresa.FieldByName('POBLACION').AsString]));
ReplaceBookmark('TelefonoEmpresa', tbl_Empresa.FieldByName('TELEFONO_1').AsString);
ReplaceBookmark('FaxEmpresa', tbl_Empresa.FieldByName('FAX').AsString);
ReplaceBookmark('CorreoEmpresa', tbl_Empresa.FieldByName('EMAIL_1').AsString);
end;
Result := True;
end;
procedure TRptWordPedidoProveedor._GenerarPedido(const AID: String);
var
ACopiaPlantilla : String;
begin
tbl_Cabecera.ParamByName('ID').AsString := AID;
tbl_Detalles.ParamByName('ID_PEDIDO').AsString := AID;
tbl_Cabecera.Active := True;
tbl_Detalles.Active := True;
FCodigoPedido := AID;
if RecuperarEmpresa(tbl_Cabecera.FieldByName('ID_EMPRESA').AsInteger, tbl_Empresa) then
begin
ACopiaPlantilla := DarFicheroTemporal;
CopiarFichero(FPlantilla, ACopiaPlantilla);
FPlantilla := ACopiaPlantilla;
try
Generar;
finally
SysUtils.DeleteFile(ACopiaPlantilla);
end;
end;
end;
end.

View File

@ -8,8 +8,8 @@ object srvPedidosProveedor: TsrvPedidosProveedor
ServiceDataStreamer = Bin2DataStreamer ServiceDataStreamer = Bin2DataStreamer
ExportedDataTables = <> ExportedDataTables = <>
BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
Height = 240 Height = 231
Width = 473 Width = 353
object schPedidosProveedor: TDASchema object schPedidosProveedor: TDASchema
ConnectionManager = dmServer.ConnectionManager ConnectionManager = dmServer.ConnectionManager
DataDictionary = DADataDictionary DataDictionary = DADataDictionary
@ -367,14 +367,15 @@ object srvPedidosProveedor: TsrvPedidosProveedor
'LLES.ID_PEDIDO,'#10' PEDIDOS_PROVEEDOR_DETALLES.POSICION, PEDIDOS' + 'LLES.ID_PEDIDO,'#10' PEDIDOS_PROVEEDOR_DETALLES.POSICION, PEDIDOS' +
'_PROVEEDOR_DETALLES.TIPO_DETALLE,'#10' PEDIDOS_PROVEEDOR_DETALLES' + '_PROVEEDOR_DETALLES.TIPO_DETALLE,'#10' PEDIDOS_PROVEEDOR_DETALLES' +
'.CONCEPTO, PEDIDOS_PROVEEDOR_DETALLES.CANTIDAD,'#10' PEDIDOS_PROV' + '.CONCEPTO, PEDIDOS_PROVEEDOR_DETALLES.CANTIDAD,'#10' PEDIDOS_PROV' +
'EEDOR_DETALLES.IMPORTE_UNIDAD, PEDIDOS_PROVEEDOR_DETALLES.IMPORT' + 'EEDOR_DETALLES.UNIDAD_MEDIDA,'#10' PEDIDOS_PROVEEDOR_DETALLES.IMP' +
'E_TOTAL,'#10' PEDIDOS_PROVEEDOR_DETALLES.VISIBLE,'#10#10' PEDIDOS_PR' + 'ORTE_UNIDAD, PEDIDOS_PROVEEDOR_DETALLES.IMPORTE_TOTAL,'#10' PEDID' +
'OVEEDOR_DETALLES.ID_ARTICULO, PEDIDOS_PROVEEDOR_DETALLES.DESCUEN' + 'OS_PROVEEDOR_DETALLES.VISIBLE,'#10#10' PEDIDOS_PROVEEDOR_DETALLES.I' +
'TO,'#10' PEDIDOS_PROVEEDOR_DETALLES.IMPORTE_PORTE,'#10' ARTICULOS.' + 'D_ARTICULO, PEDIDOS_PROVEEDOR_DETALLES.DESCUENTO,'#10' PEDIDOS_PR' +
'REFERENCIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'F' + 'OVEEDOR_DETALLES.IMPORTE_PORTE,'#10' ARTICULOS.REFERENCIA, ARTICU' +
'ROM PEDIDOS_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON PEDIDOS_PR' + 'LOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR,'#10' ARTICULOS.REFER' +
'OVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'WHERE {where}'#10'ORDER ' + 'ENCIA_FABR as REFERENCIA_FABRICANTE'#10'FROM PEDIDOS_PROVEEDOR_DETAL' +
'BY POSICION;'#10 'LES'#10'LEFT JOIN ARTICULOS ON PEDIDOS_PROVEEDOR_DETALLES.ID_ARTICUL' +
'O = ARTICULOS.ID'#10'WHERE {where}'#10'ORDER BY POSICION;'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = < ColumnMappings = <
item item
@ -434,6 +435,15 @@ object srvPedidosProveedor: TsrvPedidosProveedor
DatasetField = 'REFERENCIA_PROVEEDOR' DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = '<unknown>' TableField = '<unknown>'
SQLOrigin = 'REFERENCIA_PROVEEDOR' SQLOrigin = 'REFERENCIA_PROVEEDOR'
end
item
DatasetField = 'UNIDAD_MEDIDA'
TableField = 'UNIDAD_MEDIDA'
end
item
DatasetField = 'REFERENCIA_FABRICANTE'
TableField = '<unknown>'
SQLOrigin = 'REFERENCIA_FABRICANTE'
end> end>
end> end>
Name = 'PedidosProveedor_Detalles' Name = 'PedidosProveedor_Detalles'
@ -449,6 +459,7 @@ object srvPedidosProveedor: TsrvPedidosProveedor
item item
Name = 'ID_PEDIDO' Name = 'ID_PEDIDO'
DataType = datInteger DataType = datInteger
DictionaryEntry = 'PedidosProveedor_Detalles_ID_PEDIDO'
end end
item item
Name = 'POSICION' Name = 'POSICION'
@ -459,50 +470,72 @@ object srvPedidosProveedor: TsrvPedidosProveedor
Name = 'TIPO_DETALLE' Name = 'TIPO_DETALLE'
DataType = datString DataType = datString
Size = 10 Size = 10
DictionaryEntry = 'PedidosProveedor_Detalles_TIPO_DETALLE'
end end
item item
Name = 'CONCEPTO' Name = 'CONCEPTO'
DataType = datString DataType = datString
Size = 2000 Size = 2000
DictionaryEntry = 'PedidosProveedor_Detalles_CONCEPTO'
end end
item item
Name = 'CANTIDAD' Name = 'CANTIDAD'
DataType = datInteger DataType = datInteger
DictionaryEntry = 'CANTIDAD' DictionaryEntry = 'CANTIDAD'
end end
item
Name = 'UNIDAD_MEDIDA'
DataType = datString
Size = 255
DictionaryEntry = 'PedidosProveedor_Detalles_UNIDAD_MEDIDA'
end
item item
Name = 'IMPORTE_UNIDAD' Name = 'IMPORTE_UNIDAD'
DataType = datCurrency DataType = datCurrency
DictionaryEntry = 'PedidosProveedor_Detalles_IMPORTE_UNIDAD'
end end
item item
Name = 'IMPORTE_TOTAL' Name = 'IMPORTE_TOTAL'
DataType = datCurrency DataType = datCurrency
DictionaryEntry = 'PedidosProveedor_Detalles_IMPORTE_TOTAL'
end end
item item
Name = 'VISIBLE' Name = 'VISIBLE'
DataType = datSmallInt DataType = datInteger
DictionaryEntry = 'PedidosProveedor_Detalles_VISIBLE'
end end
item item
Name = 'ID_ARTICULO' Name = 'ID_ARTICULO'
DataType = datInteger DataType = datInteger
DictionaryEntry = 'PedidosProveedor_Detalles_ID_ARTICULO'
end end
item item
Name = 'DESCUENTO' Name = 'DESCUENTO'
DataType = datFloat DataType = datFloat
DictionaryEntry = 'PedidosProveedor_Detalles_DESCUENTO'
end end
item item
Name = 'IMPORTE_PORTE' Name = 'IMPORTE_PORTE'
DataType = datCurrency DataType = datCurrency
DictionaryEntry = 'PedidosProveedor_Detalles_IMPORTE_PORTE'
end end
item item
Name = 'REFERENCIA' Name = 'REFERENCIA'
DataType = datString DataType = datString
Size = 255 Size = 255
DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA'
end end
item item
Name = 'REFERENCIA_PROVEEDOR' Name = 'REFERENCIA_PROVEEDOR'
DataType = datString DataType = datString
Size = 255 Size = 255
DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA_PROVEEDOR'
end
item
Name = 'REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
DictionaryEntry = 'PedidosProveedor_Detalles_REFERENCIA_FABRICANTE'
end> end>
end end
item item
@ -611,6 +644,10 @@ object srvPedidosProveedor: TsrvPedidosProveedor
Name = 'POSICION' Name = 'POSICION'
Value = '' Value = ''
end end
item
Name = 'UNIDAD_MEDIDA'
Value = ''
end
item item
Name = 'ID' Name = 'ID'
DataType = datAutoInc DataType = datAutoInc
@ -660,10 +697,11 @@ object srvPedidosProveedor: TsrvPedidosProveedor
SQL = SQL =
'INSERT'#10' INTO PEDIDOS_PROVEEDOR_DETALLES'#10' (CANTIDAD, POSICION' + 'INSERT'#10' INTO PEDIDOS_PROVEEDOR_DETALLES'#10' (CANTIDAD, POSICION' +
', ID, TIPO_DETALLE, CONCEPTO, IMPORTE_UNIDAD, '#10' IMPORTE_TOTA' + ', ID, TIPO_DETALLE, CONCEPTO, IMPORTE_UNIDAD, '#10' IMPORTE_TOTA' +
'L, VISIBLE, ID_PEDIDO,'#10' ID_ARTICULO, DESCUENTO, IMPORTE_PORT' + 'L, VISIBLE, ID_PEDIDO, UNIDAD_MEDIDA,'#10' ID_ARTICULO, DESCUENT' +
'E)'#10' VALUES'#10' (:CANTIDAD, :POSICION, :ID, :TIPO_DETALLE, :CONC' + 'O, IMPORTE_PORTE)'#10' VALUES'#10' (:CANTIDAD, :POSICION, :ID, :TIPO' +
'EPTO, '#10' :IMPORTE_UNIDAD, :IMPORTE_TOTAL, :VISIBLE, :ID_PEDID' + '_DETALLE, :CONCEPTO, '#10' :IMPORTE_UNIDAD, :IMPORTE_TOTAL, :VIS' +
'O, '#10' :ID_ARTICULO, :DESCUENTO, :IMPORTE_PORTE)' 'IBLE, :ID_PEDIDO, :UNIDAD_MEDIDA,'#10' :ID_ARTICULO, :DESCUENTO,' +
' :IMPORTE_PORTE)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>
@ -689,6 +727,10 @@ object srvPedidosProveedor: TsrvPedidosProveedor
end end
item item
Params = < Params = <
item
Name = 'UNIDAD_MEDIDA'
Value = ''
end
item item
Name = 'CANTIDAD' Name = 'CANTIDAD'
Value = '' Value = ''
@ -747,12 +789,13 @@ object srvPedidosProveedor: TsrvPedidosProveedor
TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES' TargetTable = 'PEDIDOS_PROVEEDOR_DETALLES'
SQL = SQL =
'UPDATE PEDIDOS_PROVEEDOR_DETALLES'#10' SET '#10' CANTIDAD = :CANTIDA' + 'UPDATE PEDIDOS_PROVEEDOR_DETALLES'#10' SET '#10' CANTIDAD = :CANTIDA' +
'D, '#10' POSICION = :POSICION, '#10' ID = :ID, '#10' TIPO_DETALLE =' + 'D, '#10' UNIDAD_MEDIDA = :UNIDAD_MEDIDA,'#10' POSICION = :POSICION' +
' :TIPO_DETALLE, '#10' CONCEPTO = :CONCEPTO, '#10' IMPORTE_UNIDAD =' + ', '#10' ID = :ID, '#10' TIPO_DETALLE = :TIPO_DETALLE, '#10' CONCEPT' +
' :IMPORTE_UNIDAD, '#10' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' VISI' + 'O = :CONCEPTO, '#10' IMPORTE_UNIDAD = :IMPORTE_UNIDAD, '#10' IMPOR' +
'BLE = :VISIBLE, '#10' ID_PEDIDO = :ID_PEDIDO, '#10' ID_ARTICULO = ' + 'TE_TOTAL = :IMPORTE_TOTAL, '#10' VISIBLE = :VISIBLE, '#10' ID_PEDI' +
':ID_ARTICULO,'#10' DESCUENTO = :DESCUENTO,'#10' IMPORTE_PORTE = :I' + 'DO = :ID_PEDIDO, '#10' ID_ARTICULO = :ID_ARTICULO,'#10' DESCUENTO ' +
'MPORTE_PORTE'#10' WHERE'#10' (ID = :OLD_ID)' '= :DESCUENTO,'#10' IMPORTE_PORTE = :IMPORTE_PORTE'#10' WHERE'#10' (ID' +
' = :OLD_ID)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>
@ -1430,6 +1473,18 @@ object srvPedidosProveedor: TsrvPedidosProveedor
Name = 'PedidosProveedor_REF_PED_CLIENTE' Name = 'PedidosProveedor_REF_PED_CLIENTE'
DataType = datString DataType = datString
Size = 255 Size = 255
end
item
Name = 'PedidosProveedor_Detalles_UNIDAD_MEDIDA'
DataType = datString
Size = 255
DisplayLabel = 'Unidad de medida'
end
item
Name = 'PedidosProveedor_Detalles_REFERENCIA_FABRICANTE'
DataType = datString
Size = 255
DisplayLabel = 'Ref. fabricante'
end> end>
Left = 88 Left = 88
Top = 152 Top = 152

View File

@ -43,8 +43,7 @@ uses
Dialogs, Dialogs,
{Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils, {Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils,
schPedidosProveedorClient_Intf, uRestriccionesUsuarioUtils, schPedidosProveedorClient_Intf, uRestriccionesUsuarioUtils,
uBizPedidosProveedorServer; uBizPedidosProveedorServer, uRptPedidosProveedor_Server;
// uRptPedidosProveedor_Server, ;
{ uRORemoteDataModule, { uRORemoteDataModule,
fServerForm, Variants, IB, schPedidosProveedorClient_Intf; fServerForm, Variants, IB, schPedidosProveedorClient_Intf;
@ -60,14 +59,13 @@ procedure TsrvPedidosProveedor.DARemoteServiceBeforeGetDatasetData(
const Dataset: IDADataset; const IncludeSchema: Boolean; const Dataset: IDADataset; const IncludeSchema: Boolean;
const MaxRecords: Integer); const MaxRecords: Integer);
begin begin
{ if DataSet.Name = nme_PedidosProveedor then if DataSet.Name = nme_PedidosProveedor then
begin begin
{ Aquí se asegura que el usuario sólo accede a pedidos { Aquí se asegura que el usuario sólo accede a pedidos
de las empresas a las que tiene permiso para acceder de las empresas a las que tiene permiso para acceder
filtrando DataSet por ID_EMPRESA. } filtrando DataSet por ID_EMPRESA. }
{ FiltrarAccesoUsuario(Session, Connection, schPedidosProveedor, DataSet, fld_PedidosProveedorID_EMPRESA); FiltrarAccesoUsuario(Session, Connection, schPedidosProveedor, DataSet, fld_PedidosProveedorID_EMPRESA);
end; end;
}
end; end;
procedure TsrvPedidosProveedor.DARemoteServiceCreate(Sender: TObject); procedure TsrvPedidosProveedor.DARemoteServiceCreate(Sender: TObject);
@ -83,16 +81,16 @@ begin
end; end;
function TsrvPedidosProveedor.GenerateReport(const ID: String): Binary; function TsrvPedidosProveedor.GenerateReport(const ID: String): Binary;
//var var
// AReportGenerator : TRptPedidosProveedor; AReportGenerator : TRptPedidosProveedor;
begin begin
{ AReportGenerator := TRptPedidosProveedor.Create(nil); AReportGenerator := TRptPedidosProveedor.Create(nil);
try try
Result := AReportGenerator.GenerarPedido(ID); Result := AReportGenerator.GenerarPedido(ID);
finally finally
FreeAndNIL(AReportGenerator); FreeAndNIL(AReportGenerator);
end; end;
}
end; end;
initialization initialization

View File

@ -62,18 +62,17 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
end end
end end
inherited pgPaginas: TPageControl inherited pgPaginas: TPageControl
Width = 765 Width = 759
Height = 476 Height = 470
ActivePage = pagContenido
TabOrder = 1 TabOrder = 1
OnChanging = pgPaginasChanging OnChanging = pgPaginasChanging
ExplicitWidth = 765 ExplicitWidth = 759
ExplicitHeight = 476 ExplicitHeight = 470
inherited pagGeneral: TTabSheet inherited pagGeneral: TTabSheet
ExplicitLeft = 4 ExplicitLeft = 4
ExplicitTop = 24 ExplicitTop = 24
ExplicitWidth = 757 ExplicitWidth = 751
ExplicitHeight = 448 ExplicitHeight = 442
end end
object pagContenido: TTabSheet object pagContenido: TTabSheet
Caption = 'Contenido' Caption = 'Contenido'
@ -81,8 +80,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
inline frViewDetallesPedidoProveedor1: TfrViewDetallesPedidoProveedor inline frViewDetallesPedidoProveedor1: TfrViewDetallesPedidoProveedor
Left = 0 Left = 0
Top = 0 Top = 0
Width = 757 Width = 751
Height = 448 Height = 442
Align = alClient Align = alClient
BiDiMode = bdLeftToRight BiDiMode = bdLeftToRight
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@ -94,17 +93,107 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 757 ExplicitWidth = 751
ExplicitHeight = 448 ExplicitHeight = 442
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Width = 757 Width = 751
ExplicitWidth = 757 Height = 51
ExplicitWidth = 751
ExplicitHeight = 51
inherited ToolButton3: TToolButton
Wrap = False
end
inherited ToolButton4: TToolButton
Left = 278
Top = 0
ExplicitLeft = 278
ExplicitTop = 0
end
inherited FontName: TJvFontComboBox
Left = 334
Top = 0
ExplicitLeft = 334
ExplicitTop = 0
end
inherited ToolButton14: TToolButton
Left = 479
Top = 0
ExplicitLeft = 479
ExplicitTop = 0
end
inherited FontSize: TEdit
Left = 544
Top = 0
ExplicitLeft = 544
ExplicitTop = 0
end
inherited ToolButton13: TToolButton [7]
Left = 0
Top = 0
Wrap = True
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 27
end
inherited UpDown1: TUpDown [8]
Left = 0
Top = 27
ExplicitLeft = 0
ExplicitTop = 27
end
inherited ToolButton11: TToolButton
Left = 17
Top = 27
ExplicitLeft = 17
ExplicitTop = 27
end
inherited ToolButton12: TToolButton
Left = 158
Top = 27
Wrap = False
ExplicitLeft = 158
ExplicitTop = 27
ExplicitHeight = 22
end
inherited ToolButton9: TToolButton
Left = 166
Top = 27
ExplicitLeft = 166
ExplicitTop = 27
end
inherited ToolButton10: TToolButton
Left = 311
Top = 27
ExplicitLeft = 311
ExplicitTop = 27
end
inherited ToolButton6: TToolButton
Left = 436
Top = 27
ExplicitLeft = 436
ExplicitTop = 27
end
inherited ToolButton7: TToolButton
Left = 502
Top = 27
Wrap = False
ExplicitLeft = 502
ExplicitTop = 27
end
inherited ToolButton8: TToolButton
Left = 569
Top = 27
ExplicitLeft = 569
ExplicitTop = 27
end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Width = 757 Top = 77
Height = 376 Width = 751
ExplicitWidth = 757 Height = 365
ExplicitHeight = 376 ExplicitTop = 77
ExplicitWidth = 751
ExplicitHeight = 365
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
inherited cxGridViewIMPORTENETO: TcxGridDBColumn inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Options.Editing = True Options.Editing = True
@ -112,10 +201,12 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
end end
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Width = 757 Top = 51
ExplicitWidth = 757 Width = 751
ExplicitTop = 51
ExplicitWidth = 751
inherited TBXToolbar1: TTBXToolbar inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 548 ExplicitWidth = 626
end end
end end
end end
@ -126,8 +217,8 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
inline frViewIncidenciasProv: TfrViewIncidencias inline frViewIncidenciasProv: TfrViewIncidencias
Left = 0 Left = 0
Top = 0 Top = 0
Width = 757 Width = 751
Height = 448 Height = 442
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -137,20 +228,17 @@ inherited fEditorPedidoProveedor: TfEditorPedidoProveedor
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ReadOnly = False ReadOnly = False
ExplicitWidth = 757 ExplicitWidth = 751
ExplicitHeight = 448 ExplicitHeight = 442
inherited pnlSup: TPanel inherited pnlSup: TPanel
Width = 757 Width = 751
ExplicitWidth = 757 ExplicitWidth = 751
inherited eIncidenciaActiva: TcxDBCheckBox
ExplicitHeight = 21
end
end end
inherited GroupBox1: TGroupBox inherited GroupBox1: TGroupBox
Width = 757 Width = 751
Height = 420 Height = 414
ExplicitWidth = 757 ExplicitWidth = 751
ExplicitHeight = 420 ExplicitHeight = 414
inherited eIncidencias: TcxDBMemo inherited eIncidencias: TcxDBMemo
ExplicitWidth = 734 ExplicitWidth = 734
ExplicitHeight = 387 ExplicitHeight = 387

View File

@ -198,11 +198,8 @@ end;
procedure TfEditorPedidoProveedor.ImprimirInterno; procedure TfEditorPedidoProveedor.ImprimirInterno;
begin begin
AppFactuGES.ShowCapado;
{
inherited; inherited;
FController.Print(FPedido); FController.Print(FPedido);
}
end; end;
procedure TfEditorPedidoProveedor.OnProveedorChanged(Sender: TObject); procedure TfEditorPedidoProveedor.OnProveedorChanged(Sender: TObject);
@ -246,11 +243,8 @@ end;
procedure TfEditorPedidoProveedor.PrevisualizarInterno; procedure TfEditorPedidoProveedor.PrevisualizarInterno;
begin begin
AppFactuGES.ShowCapado;
{
inherited; inherited;
FController.Preview(FPedido); FController.Preview(FPedido);
}
end; end;
procedure TfEditorPedidoProveedor.RecalcularPortePorUnidad; procedure TfEditorPedidoProveedor.RecalcularPortePorUnidad;

View File

@ -121,8 +121,6 @@ procedure TfEditorPedidosProveedor.DuplicarInterno;
var var
APedido : IBizPedidoProveedor; APedido : IBizPedidoProveedor;
begin begin
AppFactuGES.ShowCapado;
{
inherited; inherited;
APedido := FController.Duplicar(Pedidos); APedido := FController.Duplicar(Pedidos);
try try
@ -130,7 +128,6 @@ AppFactuGES.ShowCapado;
finally finally
actRefrescar.Execute; actRefrescar.Execute;
end; end;
}
end; end;
procedure TfEditorPedidosProveedor.EliminarInterno; procedure TfEditorPedidosProveedor.EliminarInterno;
@ -212,8 +209,6 @@ var
APedidos: IBizPedidoProveedor; APedidos: IBizPedidoProveedor;
AllItems: Boolean; AllItems: Boolean;
begin begin
AppFactuGES.ShowCapado;
{
APedidos := Nil; APedidos := Nil;
AllItems := False; AllItems := False;
@ -247,7 +242,6 @@ AppFactuGES.ShowCapado;
end; end;
end; end;
end; end;
}
end; end;
procedure TfEditorPedidosProveedor.ModificarInterno; procedure TfEditorPedidosProveedor.ModificarInterno;
@ -295,8 +289,6 @@ var
APedidos: IBizPedidoProveedor; APedidos: IBizPedidoProveedor;
AllItems: Boolean; AllItems: Boolean;
begin begin
AppFactuGES.ShowCapado;
{
APedidos := Nil; APedidos := Nil;
AllItems := False; AllItems := False;
@ -330,7 +322,6 @@ AppFactuGES.ShowCapado;
end; end;
end; end;
end; end;
}
end; end;
procedure TfEditorPedidosProveedor.SetController(const Value: IPedidosProveedorController); procedure TfEditorPedidosProveedor.SetController(const Value: IPedidosProveedorController);
@ -347,4 +338,3 @@ begin
end; end;
end. end.

View File

@ -1,92 +1,108 @@
inherited frViewDetallesPedidoProveedor: TfrViewDetallesPedidoProveedor inherited frViewDetallesPedidoProveedor: TfrViewDetallesPedidoProveedor
Width = 734
Height = 415
inherited ToolBar1: TToolBar inherited ToolBar1: TToolBar
Height = 95 Width = 734
ExplicitHeight = 95 Height = 51
inherited FontName: TJvFontComboBox [4] inherited ToolButton14: TToolButton
Left = 56
Top = 22
ExplicitLeft = 56
ExplicitTop = 22
end
inherited ToolButton14: TToolButton [5]
Left = 201
Wrap = False Wrap = False
ExplicitLeft = 201 end
inherited FontName: TJvFontComboBox
Left = 399
Top = 0
ExplicitLeft = 399
ExplicitTop = 0
end end
inherited FontSize: TEdit inherited FontSize: TEdit
Left = 266 Left = 544
Top = 22 Top = 0
ExplicitLeft = 266 ExplicitLeft = 544
ExplicitTop = 22 ExplicitTop = 0
end end
inherited UpDown1: TUpDown inherited UpDown1: TUpDown
Left = 308 Left = 586
Top = 22 Top = 0
ExplicitLeft = 308 ExplicitLeft = 586
ExplicitTop = 22 ExplicitTop = 0
end end
inherited ToolButton13: TToolButton inherited ToolButton13: TToolButton
Left = 325
Top = 22
ExplicitLeft = 325
ExplicitTop = 22
end
inherited ToolButton11: TToolButton [9]
Left = 333
Top = 22
ExplicitLeft = 333
ExplicitTop = 22
end
inherited ToolButton12: TToolButton [10]
Left = 0 Left = 0
Top = 22 Top = 0
Wrap = True Wrap = True
ExplicitLeft = 0 ExplicitLeft = 0
ExplicitTop = 22 ExplicitTop = 0
ExplicitHeight = 27 ExplicitHeight = 27
end end
inherited ToolButton9: TToolButton [11] inherited ToolButton6: TToolButton
Left = 0 Left = 0
Top = 49 Top = 27
ExplicitLeft = 0 ExplicitLeft = 0
ExplicitTop = 49 ExplicitTop = 27
end end
inherited ToolButton10: TToolButton [12] inherited ToolButton7: TToolButton
Left = 145 Left = 66
Top = 49 Top = 27
ExplicitLeft = 145 ExplicitLeft = 66
ExplicitTop = 49 ExplicitTop = 27
end end
inherited ToolButton6: TToolButton [13] inherited ToolButton8: TToolButton
Left = 270 Left = 133
Top = 49 Top = 27
ExplicitLeft = 270 ExplicitLeft = 133
ExplicitTop = 49 ExplicitTop = 27
end end
inherited ToolButton7: TToolButton [14] inherited ToolButton12: TToolButton
Left = 336 Left = 216
Top = 49 Top = 27
Wrap = True Wrap = False
ExplicitLeft = 336 ExplicitLeft = 216
ExplicitTop = 49 ExplicitTop = 27
ExplicitHeight = 22
end end
inherited ToolButton8: TToolButton [15] inherited ToolButton9: TToolButton
Left = 0 Left = 224
Top = 71 Top = 27
ExplicitLeft = 0 ExplicitLeft = 224
ExplicitTop = 71 ExplicitTop = 27
end
inherited ToolButton10: TToolButton
Left = 369
Top = 27
ExplicitLeft = 369
ExplicitTop = 27
end
inherited ToolButton11: TToolButton
Left = 494
Top = 27
ExplicitLeft = 494
ExplicitTop = 27
end end
end end
inherited cxGrid: TcxGrid inherited cxGrid: TcxGrid
Top = 121 Top = 77
Height = 183 Width = 734
Height = 338
inherited cxGridView: TcxGridDBTableView inherited cxGridView: TcxGridDBTableView
inherited cxGridViewTIPO: TcxGridDBColumn
Visible = False
VisibleForCustomization = False
end
inherited cxGridViewIMPORTENETO: TcxGridDBColumn inherited cxGridViewIMPORTENETO: TcxGridDBColumn
Properties.ReadOnly = False Properties.ReadOnly = False
end end
end end
end end
inherited TBXDock1: TTBXDock inherited TBXDock1: TTBXDock
Top = 95 Top = 51
Width = 734
inherited TBXToolbar1: TTBXToolbar
ExplicitWidth = 626
inherited TBXSubmenuItem1: TTBXSubmenuItem
Visible = False
end
inherited TBXSeparatorItem6: TTBXSeparatorItem
Visible = False
end
end
end end
end end

View File

@ -307,7 +307,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
TabOrder = 4 TabOrder = 4
Width = 78 Width = 78
end end
object Button1: TButton object bVerPedidoCliente: TButton
Left = 177 Left = 177
Top = 109 Top = 109
Width = 132 Width = 132
@ -367,6 +367,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
end end
object dxLayoutControl1Group10: TdxLayoutGroup object dxLayoutControl1Group10: TdxLayoutGroup
ShowCaption = False ShowCaption = False
Visible = False
Hidden = True Hidden = True
LayoutDirection = ldHorizontal LayoutDirection = ldHorizontal
ShowBorder = False ShowBorder = False
@ -381,7 +382,7 @@ inherited frViewPedidoProveedor: TfrViewPedidoProveedor
AutoAligns = [aaVertical] AutoAligns = [aaVertical]
AlignHorz = ahRight AlignHorz = ahRight
ShowCaption = False ShowCaption = False
Control = Button1 Control = bVerPedidoCliente
ControlOptions.ShowBorder = False ControlOptions.ShowBorder = False
end end
end end

View File

@ -62,7 +62,7 @@ type
dxLayoutControl1Item11: TdxLayoutItem; dxLayoutControl1Item11: TdxLayoutItem;
eReferenciaPedidoCli: TcxTextEdit; eReferenciaPedidoCli: TcxTextEdit;
dxLayoutControl1Item12: TdxLayoutItem; dxLayoutControl1Item12: TdxLayoutItem;
Button1: TButton; bVerPedidoCliente: TButton;
dxLayoutControl1Group9: TdxLayoutGroup; dxLayoutControl1Group9: TdxLayoutGroup;
dxLayoutControl1Group10: TdxLayoutGroup; dxLayoutControl1Group10: TdxLayoutGroup;
ActionList1: TActionList; ActionList1: TActionList;

View File

@ -64,18 +64,24 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
object cxGridViewREFERENCIA: TcxGridDBColumn object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia' Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA' DataBinding.FieldName = 'REFERENCIA'
BestFitMaxWidth = 40
Width = 56 Width = 56
end end
object cxGridViewSITUACION: TcxGridDBColumn object cxGridViewSITUACION: TcxGridDBColumn
DataBinding.FieldName = 'SITUACION' DataBinding.FieldName = 'SITUACION'
BestFitMaxWidth = 40
Width = 56 Width = 56
end end
object cxGridViewFECHA_PEDIDO: TcxGridDBColumn object cxGridViewFECHA_PEDIDO: TcxGridDBColumn
DataBinding.FieldName = 'FECHA_PEDIDO' DataBinding.FieldName = 'FECHA_PEDIDO'
BestFitMaxWidth = 40
SortIndex = 0
SortOrder = soAscending
Width = 46 Width = 46
end end
object cxGridViewFECHA_ENVIO: TcxGridDBColumn object cxGridViewFECHA_ENVIO: TcxGridDBColumn
DataBinding.FieldName = 'FECHA_ENVIO' DataBinding.FieldName = 'FECHA_ENVIO'
BestFitMaxWidth = 40
Width = 57 Width = 57
end end
object cxGridViewNOMBRE: TcxGridDBColumn object cxGridViewNOMBRE: TcxGridDBColumn
@ -85,43 +91,53 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
end end
object cxGridViewFECHA_CONFIRMACION: TcxGridDBColumn object cxGridViewFECHA_CONFIRMACION: TcxGridDBColumn
DataBinding.FieldName = 'FECHA_CONFIRMACION' DataBinding.FieldName = 'FECHA_CONFIRMACION'
BestFitMaxWidth = 40
Width = 57 Width = 57
end end
object cxGridViewFECHA_ENTREGA: TcxGridDBColumn object cxGridViewFECHA_ENTREGA: TcxGridDBColumn
DataBinding.FieldName = 'FECHA_ENTREGA' DataBinding.FieldName = 'FECHA_ENTREGA'
BestFitMaxWidth = 40
Width = 47 Width = 47
end end
object cxGridViewNOMBRE_ALMACEN: TcxGridDBColumn object cxGridViewNOMBRE_ALMACEN: TcxGridDBColumn
DataBinding.FieldName = 'NOMBRE_ALMACEN' DataBinding.FieldName = 'NOMBRE_ALMACEN'
BestFitMaxWidth = 60
Width = 48 Width = 48
end end
object cxGridViewCALLE: TcxGridDBColumn object cxGridViewCALLE: TcxGridDBColumn
DataBinding.FieldName = 'CALLE' DataBinding.FieldName = 'CALLE'
Visible = False Visible = False
BestFitMaxWidth = 60
end end
object cxGridViewPOBLACION: TcxGridDBColumn object cxGridViewPOBLACION: TcxGridDBColumn
DataBinding.FieldName = 'POBLACION' DataBinding.FieldName = 'POBLACION'
Visible = False Visible = False
BestFitMaxWidth = 60
end end
object cxGridViewPROVINCIA: TcxGridDBColumn object cxGridViewPROVINCIA: TcxGridDBColumn
DataBinding.FieldName = 'PROVINCIA' DataBinding.FieldName = 'PROVINCIA'
Visible = False Visible = False
BestFitMaxWidth = 60
end end
object cxGridViewCODIGO_POSTAL: TcxGridDBColumn object cxGridViewCODIGO_POSTAL: TcxGridDBColumn
DataBinding.FieldName = 'CODIGO_POSTAL' DataBinding.FieldName = 'CODIGO_POSTAL'
Visible = False Visible = False
BestFitMaxWidth = 60
end end
object cxGridViewPERSONA_CONTACTO: TcxGridDBColumn object cxGridViewPERSONA_CONTACTO: TcxGridDBColumn
DataBinding.FieldName = 'PERSONA_CONTACTO' DataBinding.FieldName = 'PERSONA_CONTACTO'
Visible = False Visible = False
BestFitMaxWidth = 60
end end
object cxGridViewTELEFONO: TcxGridDBColumn object cxGridViewTELEFONO: TcxGridDBColumn
DataBinding.FieldName = 'TELEFONO' DataBinding.FieldName = 'TELEFONO'
Visible = False Visible = False
BestFitMaxWidth = 60
end end
object cxGridViewREF_PED_CLIENTE: TcxGridDBColumn object cxGridViewREF_PED_CLIENTE: TcxGridDBColumn
Caption = 'Ref. pedido cli.' Caption = 'Ref. pedido cli.'
DataBinding.FieldName = 'REF_PED_CLIENTE' DataBinding.FieldName = 'REF_PED_CLIENTE'
BestFitMaxWidth = 40
Width = 41 Width = 41
end end
object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn
@ -129,6 +145,7 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
DataBinding.FieldName = 'IMPORTE_TOTAL' DataBinding.FieldName = 'IMPORTE_TOTAL'
PropertiesClassName = 'TcxCurrencyEditProperties' PropertiesClassName = 'TcxCurrencyEditProperties'
Properties.Alignment.Horz = taRightJustify Properties.Alignment.Horz = taRightJustify
BestFitMaxWidth = 40
FooterAlignmentHorz = taRightJustify FooterAlignmentHorz = taRightJustify
HeaderAlignmentHorz = taRightJustify HeaderAlignmentHorz = taRightJustify
Width = 94 Width = 94
@ -161,6 +178,14 @@ inherited frViewPedidosProveedor: TfrViewPedidosProveedor
inherited dxLayoutControl1: TdxLayoutControl inherited dxLayoutControl1: TdxLayoutControl
Width = 596 Width = 596
ExplicitWidth = 596 ExplicitWidth = 596
inherited txtFiltroTodo: TcxTextEdit
ExplicitWidth = 273
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
ExplicitWidth = 121
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 251 Left = 251
ExplicitLeft = 251 ExplicitLeft = 251