Poder poner fecha de ultima actualización del precio de articulo
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1037 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
ddf8611bcf
commit
ed73b587cd
@ -438,7 +438,8 @@ CREATE TABLE ARTICULOS_PROVEEDORES (
|
||||
PRECIO_NETO TIPO_IMPORTE,
|
||||
PRECIO_PORTE TIPO_IMPORTE,
|
||||
PRECIO_PVP_VENTA TIPO_IMPORTE,
|
||||
PRECIO_PVP_TOTAL TIPO_IMPORTE
|
||||
PRECIO_PVP_TOTAL TIPO_IMPORTE,
|
||||
FECHA_ACTUALIZACION DATE
|
||||
);
|
||||
|
||||
CREATE TABLE CATEGORIAS (
|
||||
|
||||
@ -14,12 +14,12 @@ inherited DataModuleArticulos: TDataModuleArticulos
|
||||
Top = 84
|
||||
end
|
||||
object rda_Articulos: TDARemoteDataAdapter
|
||||
DataStreamer = Bin2DataStreamer
|
||||
GetSchemaCall.RemoteService = RORemoteService
|
||||
GetDataCall.RemoteService = RORemoteService
|
||||
UpdateDataCall.RemoteService = RORemoteService
|
||||
GetScriptsCall.RemoteService = RORemoteService
|
||||
RemoteService = RORemoteService
|
||||
DataStreamer = Bin2DataStreamer
|
||||
Left = 51
|
||||
Top = 151
|
||||
end
|
||||
@ -196,8 +196,6 @@ inherited DataModuleArticulos: TDataModuleArticulos
|
||||
Params = <>
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteDataAdapter = rda_Articulos
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Articulos'
|
||||
IndexDefs = <>
|
||||
Left = 232
|
||||
@ -229,8 +227,6 @@ inherited DataModuleArticulos: TDataModuleArticulos
|
||||
end>
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteDataAdapter = rda_Articulos
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'ProveedoresConArticulos'
|
||||
IndexDefs = <>
|
||||
Left = 232
|
||||
@ -305,6 +301,10 @@ inherited DataModuleArticulos: TDataModuleArticulos
|
||||
Name = 'PRECIO_PVP_TOTAL'
|
||||
DataType = datCurrency
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ACTUALIZACION'
|
||||
DataType = datDateTime
|
||||
end>
|
||||
Params = <>
|
||||
MasterMappingMode = mmWhere
|
||||
@ -313,8 +313,6 @@ inherited DataModuleArticulos: TDataModuleArticulos
|
||||
MasterSource = ds_Articulos
|
||||
MasterFields = 'ID'
|
||||
DetailFields = 'ID_ARTICULO'
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'Articulos_Proveedores'
|
||||
IndexDefs = <>
|
||||
Left = 368
|
||||
@ -512,8 +510,6 @@ inherited DataModuleArticulos: TDataModuleArticulos
|
||||
Params = <>
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
RemoteDataAdapter = rda_Articulos
|
||||
DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
|
||||
MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
|
||||
LogicalName = 'ArticulosParaCompra'
|
||||
IndexDefs = <>
|
||||
Left = 416
|
||||
|
||||
@ -3,16 +3,16 @@ unit schArticulosClient_Intf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
||||
Classes, DB, SysUtils, uROClasses, uDAInterfaces, uDADataTable, FmtBCD, uROXMLIntf;
|
||||
|
||||
const
|
||||
{ Data table rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_ProveedoresConArticulos = '{5C4B513D-A09F-4964-93E6-DD87A4AAA324}';
|
||||
RID_Articulos_Proveedores = '{C23E90C0-7019-447D-ACD4-12687E51658B}';
|
||||
RID_Articulos = '{730B578C-0743-43FF-87A3-1D580A528918}';
|
||||
RID_ArticulosParaCompra = '{CF8E3694-1AA8-41E9-B4D8-0A3A002BDCB9}';
|
||||
RID_ProveedoresConArticulos = '{BAF6A9A2-1271-475E-8ABE-86F31A9521E4}';
|
||||
RID_Articulos_Proveedores = '{05C7981B-25DB-497F-A713-CF2319B35EAC}';
|
||||
RID_Articulos = '{17F5C1E9-1571-48E3-A06C-BC21BD4D051B}';
|
||||
RID_ArticulosParaCompra = '{3366025F-0A8D-4073-9E99-792C6770B974}';
|
||||
|
||||
{ Data table names }
|
||||
nme_ProveedoresConArticulos = 'ProveedoresConArticulos';
|
||||
@ -39,6 +39,7 @@ const
|
||||
fld_Articulos_ProveedoresPRECIO_PORTE = 'PRECIO_PORTE';
|
||||
fld_Articulos_ProveedoresPRECIO_PVP_VENTA = 'PRECIO_PVP_VENTA';
|
||||
fld_Articulos_ProveedoresPRECIO_PVP_TOTAL = 'PRECIO_PVP_TOTAL';
|
||||
fld_Articulos_ProveedoresFECHA_ACTUALIZACION = 'FECHA_ACTUALIZACION';
|
||||
|
||||
{ Articulos_Proveedores field indexes }
|
||||
idx_Articulos_ProveedoresID = 0;
|
||||
@ -51,6 +52,7 @@ const
|
||||
idx_Articulos_ProveedoresPRECIO_PORTE = 7;
|
||||
idx_Articulos_ProveedoresPRECIO_PVP_VENTA = 8;
|
||||
idx_Articulos_ProveedoresPRECIO_PVP_TOTAL = 9;
|
||||
idx_Articulos_ProveedoresFECHA_ACTUALIZACION = 10;
|
||||
|
||||
{ Articulos fields }
|
||||
fld_ArticulosID = 'ID';
|
||||
@ -173,7 +175,7 @@ const
|
||||
type
|
||||
{ IProveedoresConArticulos }
|
||||
IProveedoresConArticulos = interface(IDAStronglyTypedDataTable)
|
||||
['{EE9B47ED-6CFF-405D-A2B1-027A58BF0562}']
|
||||
['{74DCA1E1-B23A-4112-A6DC-7EA496B10A91}']
|
||||
{ Property getters and setters }
|
||||
function GetID_PROVEEDORValue: Integer;
|
||||
procedure SetID_PROVEEDORValue(const aValue: Integer);
|
||||
@ -193,7 +195,7 @@ type
|
||||
end;
|
||||
|
||||
{ TProveedoresConArticulosDataTableRules }
|
||||
TProveedoresConArticulosDataTableRules = class(TIntfObjectDADataTableRules, IProveedoresConArticulos)
|
||||
TProveedoresConArticulosDataTableRules = class(TDADataTableRules, IProveedoresConArticulos)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -220,7 +222,7 @@ type
|
||||
|
||||
{ IArticulos_Proveedores }
|
||||
IArticulos_Proveedores = interface(IDAStronglyTypedDataTable)
|
||||
['{202E2D67-E014-4CC6-8E1A-60E915C329A7}']
|
||||
['{24901826-7207-4500-87E5-F0D5C55E16EB}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -262,6 +264,10 @@ type
|
||||
procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency);
|
||||
function GetPRECIO_PVP_TOTALIsNull: Boolean;
|
||||
procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean);
|
||||
function GetFECHA_ACTUALIZACIONValue: DateTime;
|
||||
procedure SetFECHA_ACTUALIZACIONValue(const aValue: DateTime);
|
||||
function GetFECHA_ACTUALIZACIONIsNull: Boolean;
|
||||
procedure SetFECHA_ACTUALIZACIONIsNull(const aValue: Boolean);
|
||||
|
||||
|
||||
{ Properties }
|
||||
@ -285,10 +291,12 @@ type
|
||||
property PRECIO_PVP_VENTAIsNull: Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull;
|
||||
property PRECIO_PVP_TOTAL: Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue;
|
||||
property PRECIO_PVP_TOTALIsNull: Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull;
|
||||
property FECHA_ACTUALIZACION: DateTime read GetFECHA_ACTUALIZACIONValue write SetFECHA_ACTUALIZACIONValue;
|
||||
property FECHA_ACTUALIZACIONIsNull: Boolean read GetFECHA_ACTUALIZACIONIsNull write SetFECHA_ACTUALIZACIONIsNull;
|
||||
end;
|
||||
|
||||
{ TArticulos_ProveedoresDataTableRules }
|
||||
TArticulos_ProveedoresDataTableRules = class(TIntfObjectDADataTableRules, IArticulos_Proveedores)
|
||||
TArticulos_ProveedoresDataTableRules = class(TDADataTableRules, IArticulos_Proveedores)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -332,6 +340,10 @@ type
|
||||
procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); virtual;
|
||||
function GetPRECIO_PVP_TOTALIsNull: Boolean; virtual;
|
||||
procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); virtual;
|
||||
function GetFECHA_ACTUALIZACIONValue: DateTime; virtual;
|
||||
procedure SetFECHA_ACTUALIZACIONValue(const aValue: DateTime); virtual;
|
||||
function GetFECHA_ACTUALIZACIONIsNull: Boolean; virtual;
|
||||
procedure SetFECHA_ACTUALIZACIONIsNull(const aValue: Boolean); virtual;
|
||||
|
||||
{ Properties }
|
||||
property ID: Integer read GetIDValue write SetIDValue;
|
||||
@ -354,6 +366,8 @@ type
|
||||
property PRECIO_PVP_VENTAIsNull: Boolean read GetPRECIO_PVP_VENTAIsNull write SetPRECIO_PVP_VENTAIsNull;
|
||||
property PRECIO_PVP_TOTAL: Currency read GetPRECIO_PVP_TOTALValue write SetPRECIO_PVP_TOTALValue;
|
||||
property PRECIO_PVP_TOTALIsNull: Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull;
|
||||
property FECHA_ACTUALIZACION: DateTime read GetFECHA_ACTUALIZACIONValue write SetFECHA_ACTUALIZACIONValue;
|
||||
property FECHA_ACTUALIZACIONIsNull: Boolean read GetFECHA_ACTUALIZACIONIsNull write SetFECHA_ACTUALIZACIONIsNull;
|
||||
|
||||
public
|
||||
constructor Create(aDataTable: TDADataTable); override;
|
||||
@ -363,7 +377,7 @@ type
|
||||
|
||||
{ IArticulos }
|
||||
IArticulos = interface(IDAStronglyTypedDataTable)
|
||||
['{92E42697-A92B-46A4-9A19-3214D8C788E6}']
|
||||
['{BDCB8C2D-6A38-4C2F-9240-84F377997169}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -526,7 +540,7 @@ type
|
||||
end;
|
||||
|
||||
{ TArticulosDataTableRules }
|
||||
TArticulosDataTableRules = class(TIntfObjectDADataTableRules, IArticulos)
|
||||
TArticulosDataTableRules = class(TDADataTableRules, IArticulos)
|
||||
private
|
||||
f_IMAGEN: IROStream;
|
||||
procedure IMAGEN_OnChange(Sender: TObject);
|
||||
@ -701,7 +715,7 @@ type
|
||||
}
|
||||
{ IArticulosParaCompra }
|
||||
IArticulosParaCompra = interface(IDAStronglyTypedDataTable)
|
||||
['{3D547837-FB04-4E59-AD87-C00D844EE481}']
|
||||
['{F24589CD-50A2-4A1B-A274-B3D08F638BD4}']
|
||||
{ Property getters and setters }
|
||||
function GetIDValue: Integer;
|
||||
procedure SetIDValue(const aValue: Integer);
|
||||
@ -882,7 +896,7 @@ type
|
||||
end;
|
||||
|
||||
{ TArticulosParaCompraDataTableRules }
|
||||
TArticulosParaCompraDataTableRules = class(TIntfObjectDADataTableRules, IArticulosParaCompra)
|
||||
TArticulosParaCompraDataTableRules = class(TDADataTableRules, IArticulosParaCompra)
|
||||
private
|
||||
f_IMAGEN: IROStream;
|
||||
procedure IMAGEN_OnChange(Sender: TObject);
|
||||
@ -1349,6 +1363,27 @@ begin
|
||||
DataTable.Fields[idx_Articulos_ProveedoresPRECIO_PVP_TOTAL].AsVariant := Null;
|
||||
end;
|
||||
|
||||
function TArticulos_ProveedoresDataTableRules.GetFECHA_ACTUALIZACIONValue: DateTime;
|
||||
begin
|
||||
result := DataTable.Fields[idx_Articulos_ProveedoresFECHA_ACTUALIZACION].AsDateTime;
|
||||
end;
|
||||
|
||||
procedure TArticulos_ProveedoresDataTableRules.SetFECHA_ACTUALIZACIONValue(const aValue: DateTime);
|
||||
begin
|
||||
DataTable.Fields[idx_Articulos_ProveedoresFECHA_ACTUALIZACION].AsDateTime := aValue;
|
||||
end;
|
||||
|
||||
function TArticulos_ProveedoresDataTableRules.GetFECHA_ACTUALIZACIONIsNull: boolean;
|
||||
begin
|
||||
result := DataTable.Fields[idx_Articulos_ProveedoresFECHA_ACTUALIZACION].IsNull;
|
||||
end;
|
||||
|
||||
procedure TArticulos_ProveedoresDataTableRules.SetFECHA_ACTUALIZACIONIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
DataTable.Fields[idx_Articulos_ProveedoresFECHA_ACTUALIZACION].AsVariant := Null;
|
||||
end;
|
||||
|
||||
|
||||
{ TArticulosDataTableRules }
|
||||
constructor TArticulosDataTableRules.Create(aDataTable: TDADataTable);
|
||||
|
||||
@ -9,15 +9,15 @@ const
|
||||
{ Delta rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_ProveedoresConArticulosDelta = '{6C804022-5DF5-4E60-A6EC-E3C04900D4FC}';
|
||||
RID_Articulos_ProveedoresDelta = '{C38F7153-6FAD-4064-8EAC-D97A9F9780AE}';
|
||||
RID_ArticulosDelta = '{132D6F55-09CD-4018-A2CB-1D2552713417}';
|
||||
RID_ArticulosParaCompraDelta = '{F30257BA-3AC6-486E-B33C-0F429FBA0D62}';
|
||||
RID_ProveedoresConArticulosDelta = '{98D18961-09C6-4F9F-83B3-5309087AD9E7}';
|
||||
RID_Articulos_ProveedoresDelta = '{FD7F2229-5620-407B-8E20-02B2EC81ED46}';
|
||||
RID_ArticulosDelta = '{02CA2687-D121-46D8-BAFB-32AF6AF7B820}';
|
||||
RID_ArticulosParaCompraDelta = '{42F51495-15BF-49C2-8E14-19B02C1CBC32}';
|
||||
|
||||
type
|
||||
{ IProveedoresConArticulosDelta }
|
||||
IProveedoresConArticulosDelta = interface(IProveedoresConArticulos)
|
||||
['{6C804022-5DF5-4E60-A6EC-E3C04900D4FC}']
|
||||
['{98D18961-09C6-4F9F-83B3-5309087AD9E7}']
|
||||
{ Property getters and setters }
|
||||
function GetOldID_PROVEEDORValue : Integer;
|
||||
function GetOldNOMBREValue : String;
|
||||
@ -63,7 +63,7 @@ type
|
||||
|
||||
{ IArticulos_ProveedoresDelta }
|
||||
IArticulos_ProveedoresDelta = interface(IArticulos_Proveedores)
|
||||
['{C38F7153-6FAD-4064-8EAC-D97A9F9780AE}']
|
||||
['{FD7F2229-5620-407B-8E20-02B2EC81ED46}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_ARTICULOValue : Integer;
|
||||
@ -75,6 +75,7 @@ type
|
||||
function GetOldPRECIO_PORTEValue : Currency;
|
||||
function GetOldPRECIO_PVP_VENTAValue : Currency;
|
||||
function GetOldPRECIO_PVP_TOTALValue : Currency;
|
||||
function GetOldFECHA_ACTUALIZACIONValue : DateTime;
|
||||
|
||||
{ Properties }
|
||||
property OldID : Integer read GetOldIDValue;
|
||||
@ -87,6 +88,7 @@ type
|
||||
property OldPRECIO_PORTE : Currency read GetOldPRECIO_PORTEValue;
|
||||
property OldPRECIO_PVP_VENTA : Currency read GetOldPRECIO_PVP_VENTAValue;
|
||||
property OldPRECIO_PVP_TOTAL : Currency read GetOldPRECIO_PVP_TOTALValue;
|
||||
property OldFECHA_ACTUALIZACION : DateTime read GetOldFECHA_ACTUALIZACIONValue;
|
||||
end;
|
||||
|
||||
{ TArticulos_ProveedoresBusinessProcessorRules }
|
||||
@ -154,6 +156,12 @@ type
|
||||
function GetOldPRECIO_PVP_TOTALIsNull: Boolean; virtual;
|
||||
procedure SetPRECIO_PVP_TOTALValue(const aValue: Currency); virtual;
|
||||
procedure SetPRECIO_PVP_TOTALIsNull(const aValue: Boolean); virtual;
|
||||
function GetFECHA_ACTUALIZACIONValue: DateTime; virtual;
|
||||
function GetFECHA_ACTUALIZACIONIsNull: Boolean; virtual;
|
||||
function GetOldFECHA_ACTUALIZACIONValue: DateTime; virtual;
|
||||
function GetOldFECHA_ACTUALIZACIONIsNull: Boolean; virtual;
|
||||
procedure SetFECHA_ACTUALIZACIONValue(const aValue: DateTime); virtual;
|
||||
procedure SetFECHA_ACTUALIZACIONIsNull(const aValue: Boolean); virtual;
|
||||
|
||||
{ Properties }
|
||||
property ID : Integer read GetIDValue write SetIDValue;
|
||||
@ -196,6 +204,10 @@ type
|
||||
property PRECIO_PVP_TOTALIsNull : Boolean read GetPRECIO_PVP_TOTALIsNull write SetPRECIO_PVP_TOTALIsNull;
|
||||
property OldPRECIO_PVP_TOTAL : Currency read GetOldPRECIO_PVP_TOTALValue;
|
||||
property OldPRECIO_PVP_TOTALIsNull : Boolean read GetOldPRECIO_PVP_TOTALIsNull;
|
||||
property FECHA_ACTUALIZACION : DateTime read GetFECHA_ACTUALIZACIONValue write SetFECHA_ACTUALIZACIONValue;
|
||||
property FECHA_ACTUALIZACIONIsNull : Boolean read GetFECHA_ACTUALIZACIONIsNull write SetFECHA_ACTUALIZACIONIsNull;
|
||||
property OldFECHA_ACTUALIZACION : DateTime read GetOldFECHA_ACTUALIZACIONValue;
|
||||
property OldFECHA_ACTUALIZACIONIsNull : Boolean read GetOldFECHA_ACTUALIZACIONIsNull;
|
||||
|
||||
public
|
||||
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
|
||||
@ -205,7 +217,7 @@ type
|
||||
|
||||
{ IArticulosDelta }
|
||||
IArticulosDelta = interface(IArticulos)
|
||||
['{132D6F55-09CD-4018-A2CB-1D2552713417}']
|
||||
['{02CA2687-D121-46D8-BAFB-32AF6AF7B820}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_EMPRESAValue : Integer;
|
||||
@ -540,7 +552,7 @@ type
|
||||
|
||||
{ IArticulosParaCompraDelta }
|
||||
IArticulosParaCompraDelta = interface(IArticulosParaCompra)
|
||||
['{F30257BA-3AC6-486E-B33C-0F429FBA0D62}']
|
||||
['{42F51495-15BF-49C2-8E14-19B02C1CBC32}']
|
||||
{ Property getters and setters }
|
||||
function GetOldIDValue : Integer;
|
||||
function GetOldID_EMPRESAValue : Integer;
|
||||
@ -1309,6 +1321,37 @@ begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_Articulos_ProveedoresPRECIO_PVP_TOTAL] := Null;
|
||||
end;
|
||||
|
||||
function TArticulos_ProveedoresBusinessProcessorRules.GetFECHA_ACTUALIZACIONValue: DateTime;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.NewValueByName[fld_Articulos_ProveedoresFECHA_ACTUALIZACION];
|
||||
end;
|
||||
|
||||
function TArticulos_ProveedoresBusinessProcessorRules.GetFECHA_ACTUALIZACIONIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_Articulos_ProveedoresFECHA_ACTUALIZACION]);
|
||||
end;
|
||||
|
||||
function TArticulos_ProveedoresBusinessProcessorRules.GetOldFECHA_ACTUALIZACIONValue: DateTime;
|
||||
begin
|
||||
result := BusinessProcessor.CurrentChange.OldValueByName[fld_Articulos_ProveedoresFECHA_ACTUALIZACION];
|
||||
end;
|
||||
|
||||
function TArticulos_ProveedoresBusinessProcessorRules.GetOldFECHA_ACTUALIZACIONIsNull: Boolean;
|
||||
begin
|
||||
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_Articulos_ProveedoresFECHA_ACTUALIZACION]);
|
||||
end;
|
||||
|
||||
procedure TArticulos_ProveedoresBusinessProcessorRules.SetFECHA_ACTUALIZACIONValue(const aValue: DateTime);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_Articulos_ProveedoresFECHA_ACTUALIZACION] := aValue;
|
||||
end;
|
||||
|
||||
procedure TArticulos_ProveedoresBusinessProcessorRules.SetFECHA_ACTUALIZACIONIsNull(const aValue: Boolean);
|
||||
begin
|
||||
if aValue then
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_Articulos_ProveedoresFECHA_ACTUALIZACION] := Null;
|
||||
end;
|
||||
|
||||
|
||||
{ TArticulosBusinessProcessorRules }
|
||||
constructor TArticulosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
||||
@ -1329,7 +1372,7 @@ end;
|
||||
|
||||
procedure TArticulosBusinessProcessorRules.IMAGEN_OnChange(Sender: TObject);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN] := VariantBinaryFromBinary((TROStream(Sender) as IROStream).Stream);
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN] := BinaryToBlobVariant((TROStream(Sender) as IROStream).Stream);
|
||||
end;
|
||||
|
||||
function TArticulosBusinessProcessorRules.GetIDValue: Integer;
|
||||
@ -1523,7 +1566,7 @@ begin
|
||||
result := f_IMAGEN;
|
||||
result.Position := 0;
|
||||
if not Result.InUpdateMode then begin
|
||||
WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN], result.Stream);
|
||||
BlobVariantToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosIMAGEN], result.Stream);
|
||||
result.Position := 0;
|
||||
end;
|
||||
end;
|
||||
@ -1536,7 +1579,7 @@ end;
|
||||
function TArticulosBusinessProcessorRules.GetOldIMAGENValue: IROStream;
|
||||
begin
|
||||
result := NewROStream();
|
||||
WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosIMAGEN], result.Stream);
|
||||
BlobVariantToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosIMAGEN], result.Stream);
|
||||
end;
|
||||
|
||||
function TArticulosBusinessProcessorRules.GetOldIMAGENIsNull: Boolean;
|
||||
@ -2159,7 +2202,7 @@ end;
|
||||
|
||||
procedure TArticulosParaCompraBusinessProcessorRules.IMAGEN_OnChange(Sender: TObject);
|
||||
begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaCompraIMAGEN] := VariantBinaryFromBinary((TROStream(Sender) as IROStream).Stream);
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaCompraIMAGEN] := BinaryToBlobVariant((TROStream(Sender) as IROStream).Stream);
|
||||
end;
|
||||
|
||||
function TArticulosParaCompraBusinessProcessorRules.GetIDValue: Integer;
|
||||
@ -2353,7 +2396,7 @@ begin
|
||||
result := f_IMAGEN;
|
||||
result.Position := 0;
|
||||
if not Result.InUpdateMode then begin
|
||||
WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaCompraIMAGEN], result.Stream);
|
||||
BlobVariantToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_ArticulosParaCompraIMAGEN], result.Stream);
|
||||
result.Position := 0;
|
||||
end;
|
||||
end;
|
||||
@ -2366,7 +2409,7 @@ end;
|
||||
function TArticulosParaCompraBusinessProcessorRules.GetOldIMAGENValue: IROStream;
|
||||
begin
|
||||
result := NewROStream();
|
||||
WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaCompraIMAGEN], result.Stream);
|
||||
BlobVariantToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_ArticulosParaCompraIMAGEN], result.Stream);
|
||||
end;
|
||||
|
||||
function TArticulosParaCompraBusinessProcessorRules.GetOldIMAGENIsNull: Boolean;
|
||||
|
||||
@ -271,6 +271,10 @@ object srvArticulos: TsrvArticulos
|
||||
item
|
||||
DatasetField = 'PRECIO_PVP_TOTAL'
|
||||
TableField = 'PRECIO_PVP_TOTAL'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA_ACTUALIZACION'
|
||||
TableField = 'FECHA_ACTUALIZACION'
|
||||
end>
|
||||
end>
|
||||
Name = 'Articulos_Proveedores'
|
||||
@ -328,6 +332,10 @@ object srvArticulos: TsrvArticulos
|
||||
Name = 'PRECIO_PVP_TOTAL'
|
||||
DataType = datCurrency
|
||||
ServerAutoRefresh = True
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ACTUALIZACION'
|
||||
DataType = datDateTime
|
||||
end>
|
||||
end
|
||||
item
|
||||
@ -1104,38 +1112,53 @@ object srvArticulos: TsrvArticulos
|
||||
end
|
||||
item
|
||||
Name = 'ID_ARTICULO'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID_PROVEEDOR'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA_PROV'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_COSTE'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'DESCUENTO'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_NETO'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_PORTE'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_PVP_VENTA'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_PVP_TOTAL'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ACTUALIZACION'
|
||||
DataType = datDateTime
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
@ -1147,10 +1170,11 @@ object srvArticulos: TsrvArticulos
|
||||
SQL =
|
||||
'INSERT'#10' INTO ARTICULOS_PROVEEDORES'#10' (ID, ID_ARTICULO, ID_PRO' +
|
||||
'VEEDOR, REFERENCIA_PROV, PRECIO_COSTE, '#10' DESCUENTO, PRECIO_N' +
|
||||
'ETO, PRECIO_PORTE, PRECIO_PVP_VENTA, PRECIO_PVP_TOTAL)'#10' VALUES'#10 +
|
||||
' (:ID, :ID_ARTICULO, :ID_PROVEEDOR, :REFERENCIA_PROV, '#10' :' +
|
||||
'PRECIO_COSTE, :DESCUENTO, :PRECIO_NETO, :PRECIO_PORTE, '#10' :PR' +
|
||||
'ECIO_PVP_VENTA, :PRECIO_PVP_TOTAL)'#10
|
||||
'ETO, PRECIO_PORTE, PRECIO_PVP_VENTA, PRECIO_PVP_TOTAL,'#10' FECH' +
|
||||
'A_ACTUALIZACION)'#10' VALUES'#10' (:ID, :ID_ARTICULO, :ID_PROVEEDOR,' +
|
||||
' :REFERENCIA_PROV, '#10' :PRECIO_COSTE, :DESCUENTO, :PRECIO_NETO' +
|
||||
', :PRECIO_PORTE, '#10' :PRECIO_PVP_VENTA, :PRECIO_PVP_TOTAL, :FE' +
|
||||
'CHA_ACTUALIZACION)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
@ -1181,38 +1205,53 @@ object srvArticulos: TsrvArticulos
|
||||
Params = <
|
||||
item
|
||||
Name = 'ID_ARTICULO'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID_PROVEEDOR'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'REFERENCIA_PROV'
|
||||
DataType = datString
|
||||
Size = 255
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_COSTE'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'DESCUENTO'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_NETO'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_PORTE'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_PVP_VENTA'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'PRECIO_PVP_TOTAL'
|
||||
DataType = datCurrency
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_ACTUALIZACION'
|
||||
DataType = datDateTime
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
@ -1231,8 +1270,8 @@ object srvArticulos: TsrvArticulos
|
||||
'FERENCIA_PROV, '#10' PRECIO_COSTE = :PRECIO_COSTE, '#10' DESCUENTO' +
|
||||
' = :DESCUENTO, '#10' PRECIO_NETO = :PRECIO_NETO, '#10' PRECIO_PORT' +
|
||||
'E = :PRECIO_PORTE, '#10' PRECIO_PVP_VENTA = :PRECIO_PVP_VENTA, '#10' ' +
|
||||
' PRECIO_PVP_TOTAL = :PRECIO_PVP_TOTAL'#10' WHERE'#10' (ID = :OLD_I' +
|
||||
'D)'#10
|
||||
' PRECIO_PVP_TOTAL = :PRECIO_PVP_TOTAL,'#10' FECHA_ACTUALIZACION' +
|
||||
' = :FECHA_ACTUALIZACION'#10' WHERE'#10' (ID = :OLD_ID)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
|
||||
@ -38,6 +38,11 @@ inherited frViewArticulosProveedores: TfrViewArticulosProveedores
|
||||
Caption = 'Ref. proveedor'
|
||||
DataBinding.FieldName = 'REFERENCIA_PROV'
|
||||
end
|
||||
object cxGridViewFECHA_ACTUALIZACION: TcxGridDBColumn
|
||||
Caption = 'Fecha '#250'ltima actualizaci'#243'n'
|
||||
DataBinding.FieldName = 'FECHA_ACTUALIZACION'
|
||||
PropertiesClassName = 'TcxDateEditProperties'
|
||||
end
|
||||
object cxGridViewPRECIO_COSTE: TcxGridDBColumn
|
||||
Caption = 'Precio material'
|
||||
DataBinding.FieldName = 'PRECIO_COSTE'
|
||||
|
||||
@ -11,7 +11,7 @@ uses
|
||||
cxControls, cxGridCustomView, cxGrid, cxDBLookupComboBox, cxSpinEdit,
|
||||
uBizContactos, uProveedoresController, uDAInterfaces,
|
||||
uBizArticulos, uArticulosController,
|
||||
cxTextEdit;
|
||||
cxTextEdit, cxCalendar;
|
||||
|
||||
type
|
||||
IViewArticulosProveedores = interface(IViewBase)
|
||||
@ -37,6 +37,7 @@ type
|
||||
cxGridViewPRECIO_PVP_TOTAL: TcxGridDBColumn;
|
||||
cxGridViewID_PROVEEDOR: TcxGridDBColumn;
|
||||
cxGridViewID_ARTICULO: TcxGridDBColumn;
|
||||
cxGridViewFECHA_ACTUALIZACION: TcxGridDBColumn;
|
||||
procedure cxGridViewPROVEEDORPropertiesEditValueChanged(Sender: TObject);
|
||||
procedure CustomViewShow(Sender: TObject);
|
||||
protected
|
||||
|
||||
@ -97,8 +97,6 @@ uses
|
||||
uBizEmpresasServer in '..\ApplicationBase\Empresas\Model\uBizEmpresasServer.pas',
|
||||
schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas',
|
||||
schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas',
|
||||
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
|
||||
schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas',
|
||||
uRptPresupuestosCliente_Server in '..\Modulos\Presupuestos de cliente\Reports\uRptPresupuestosCliente_Server.pas' {RptPresupuestosCliente: TDataModule},
|
||||
uRptWordPresupuestoCliente in '..\Modulos\Presupuestos de cliente\Reports\uRptWordPresupuestoCliente.pas' {RptWordPresupuestoCliente: TDataModule},
|
||||
srvGestorDocumentos_Impl in '..\Modulos\Gestion de documentos\Servidor\srvGestorDocumentos_Impl.pas' {srvGestorDocumentos: TDataAbstractService},
|
||||
@ -135,7 +133,9 @@ uses
|
||||
schEmpresasClient_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasClient_Intf.pas',
|
||||
schEmpresasServer_Intf in '..\ApplicationBase\Empresas\Model\schEmpresasServer_Intf.pas',
|
||||
schContactosClient_Intf in '..\Modulos\Contactos\Model\schContactosClient_Intf.pas',
|
||||
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas';
|
||||
schContactosServer_Intf in '..\Modulos\Contactos\Model\schContactosServer_Intf.pas',
|
||||
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
|
||||
schArticulosServer_Intf in '..\Modulos\Articulos\Model\schArticulosServer_Intf.pas';
|
||||
|
||||
{$R *.res}
|
||||
{$R ..\Servicios\RODLFile.res}
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">/standalone</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">8</VersionInfo><VersionInfo Name="Release">8</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.8.8.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.8.8.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">miércoles, 19 de enero de 2011 18:10</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD11.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">FactuGES_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user