unit schInventarioServer_Intf;

interface

uses
  Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, schInventarioClient_Intf;

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_INVENTARIODelta = '{FD6A3797-743C-4AE0-890F-C651A3E630A5}';
  RID_DETALLE_RESERVAS_INVDelta = '{D5B89CFC-9817-4CF4-9E20-BFB33C0E196B}';

type
  { IINVENTARIODelta }
  IINVENTARIODelta = interface(IINVENTARIO)
  ['{FD6A3797-743C-4AE0-890F-C651A3E630A5}']
    { Property getters and setters }
    function GetOldIDValue : Integer;
    function GetOldID_ALMACENValue : Integer;
    function GetOldID_ARTICULOValue : Integer;
    function GetOldALMACENValue : String;
    function GetOldID_EMPRESAValue : Integer;
    function GetOldREFERENCIAValue : String;
    function GetOldFAMILIAValue : String;
    function GetOldDESCRIPCIONValue : String;
    function GetOldPRECIO_NETOValue : Currency;
    function GetOldREFERENCIA_PROVEEDORValue : String;
    function GetOldUNIDADES_ALMACENValue : Integer;
    function GetOldCOSTE_UNIDADESValue : Currency;
    function GetOldSTOCKValue : Integer;
    function GetOldRESERVAValue : Integer;
    function GetOldPENDIENTE_RECEPCIONValue : Integer;
    function GetOldCANTIDADValue : Integer;
    function GetOldFECHA_MOVIMIENTOValue : DateTime;
    function GetOldCAUSAValue : String;
    function GetOldTIPOValue : String;

    { Properties }
    property OldID : Integer read GetOldIDValue;
    property OldID_ALMACEN : Integer read GetOldID_ALMACENValue;
    property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
    property OldALMACEN : String read GetOldALMACENValue;
    property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
    property OldREFERENCIA : String read GetOldREFERENCIAValue;
    property OldFAMILIA : String read GetOldFAMILIAValue;
    property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
    property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue;
    property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
    property OldUNIDADES_ALMACEN : Integer read GetOldUNIDADES_ALMACENValue;
    property OldCOSTE_UNIDADES : Currency read GetOldCOSTE_UNIDADESValue;
    property OldSTOCK : Integer read GetOldSTOCKValue;
    property OldRESERVA : Integer read GetOldRESERVAValue;
    property OldPENDIENTE_RECEPCION : Integer read GetOldPENDIENTE_RECEPCIONValue;
    property OldCANTIDAD : Integer read GetOldCANTIDADValue;
    property OldFECHA_MOVIMIENTO : DateTime read GetOldFECHA_MOVIMIENTOValue;
    property OldCAUSA : String read GetOldCAUSAValue;
    property OldTIPO : String read GetOldTIPOValue;
  end;

  { TINVENTARIOBusinessProcessorRules }
  TINVENTARIOBusinessProcessorRules = class(TDABusinessProcessorRules, IINVENTARIO, IINVENTARIODelta)
  private
  protected
    { Property getters and setters }
    function GetIDValue: Integer; virtual;
    function GetOldIDValue: Integer; virtual;
    procedure SetIDValue(const aValue: Integer); virtual;
    function GetID_ALMACENValue: Integer; virtual;
    function GetOldID_ALMACENValue: Integer; virtual;
    procedure SetID_ALMACENValue(const aValue: Integer); virtual;
    function GetID_ARTICULOValue: Integer; virtual;
    function GetOldID_ARTICULOValue: Integer; virtual;
    procedure SetID_ARTICULOValue(const aValue: Integer); virtual;
    function GetALMACENValue: String; virtual;
    function GetOldALMACENValue: String; virtual;
    procedure SetALMACENValue(const aValue: String); virtual;
    function GetID_EMPRESAValue: Integer; virtual;
    function GetOldID_EMPRESAValue: Integer; virtual;
    procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
    function GetREFERENCIAValue: String; virtual;
    function GetOldREFERENCIAValue: String; virtual;
    procedure SetREFERENCIAValue(const aValue: String); virtual;
    function GetFAMILIAValue: String; virtual;
    function GetOldFAMILIAValue: String; virtual;
    procedure SetFAMILIAValue(const aValue: String); virtual;
    function GetDESCRIPCIONValue: String; virtual;
    function GetOldDESCRIPCIONValue: String; virtual;
    procedure SetDESCRIPCIONValue(const aValue: String); virtual;
    function GetPRECIO_NETOValue: Currency; virtual;
    function GetOldPRECIO_NETOValue: Currency; virtual;
    procedure SetPRECIO_NETOValue(const aValue: Currency); virtual;
    function GetREFERENCIA_PROVEEDORValue: String; virtual;
    function GetOldREFERENCIA_PROVEEDORValue: String; virtual;
    procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual;
    function GetUNIDADES_ALMACENValue: Integer; virtual;
    function GetOldUNIDADES_ALMACENValue: Integer; virtual;
    procedure SetUNIDADES_ALMACENValue(const aValue: Integer); virtual;
    function GetCOSTE_UNIDADESValue: Currency; virtual;
    function GetOldCOSTE_UNIDADESValue: Currency; virtual;
    procedure SetCOSTE_UNIDADESValue(const aValue: Currency); virtual;
    function GetSTOCKValue: Integer; virtual;
    function GetOldSTOCKValue: Integer; virtual;
    procedure SetSTOCKValue(const aValue: Integer); virtual;
    function GetRESERVAValue: Integer; virtual;
    function GetOldRESERVAValue: Integer; virtual;
    procedure SetRESERVAValue(const aValue: Integer); virtual;
    function GetPENDIENTE_RECEPCIONValue: Integer; virtual;
    function GetOldPENDIENTE_RECEPCIONValue: Integer; virtual;
    procedure SetPENDIENTE_RECEPCIONValue(const aValue: Integer); virtual;
    function GetCANTIDADValue: Integer; virtual;
    function GetOldCANTIDADValue: Integer; virtual;
    procedure SetCANTIDADValue(const aValue: Integer); virtual;
    function GetFECHA_MOVIMIENTOValue: DateTime; virtual;
    function GetOldFECHA_MOVIMIENTOValue: DateTime; virtual;
    procedure SetFECHA_MOVIMIENTOValue(const aValue: DateTime); virtual;
    function GetCAUSAValue: String; virtual;
    function GetOldCAUSAValue: String; virtual;
    procedure SetCAUSAValue(const aValue: String); virtual;
    function GetTIPOValue: String; virtual;
    function GetOldTIPOValue: String; virtual;
    procedure SetTIPOValue(const aValue: String); virtual;

    { Properties }
    property ID : Integer read GetIDValue write SetIDValue;
    property OldID : Integer read GetOldIDValue;
    property ID_ALMACEN : Integer read GetID_ALMACENValue write SetID_ALMACENValue;
    property OldID_ALMACEN : Integer read GetOldID_ALMACENValue;
    property ID_ARTICULO : Integer read GetID_ARTICULOValue write SetID_ARTICULOValue;
    property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue;
    property ALMACEN : String read GetALMACENValue write SetALMACENValue;
    property OldALMACEN : String read GetOldALMACENValue;
    property ID_EMPRESA : Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
    property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
    property REFERENCIA : String read GetREFERENCIAValue write SetREFERENCIAValue;
    property OldREFERENCIA : String read GetOldREFERENCIAValue;
    property FAMILIA : String read GetFAMILIAValue write SetFAMILIAValue;
    property OldFAMILIA : String read GetOldFAMILIAValue;
    property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
    property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
    property PRECIO_NETO : Currency read GetPRECIO_NETOValue write SetPRECIO_NETOValue;
    property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue;
    property REFERENCIA_PROVEEDOR : String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue;
    property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue;
    property UNIDADES_ALMACEN : Integer read GetUNIDADES_ALMACENValue write SetUNIDADES_ALMACENValue;
    property OldUNIDADES_ALMACEN : Integer read GetOldUNIDADES_ALMACENValue;
    property COSTE_UNIDADES : Currency read GetCOSTE_UNIDADESValue write SetCOSTE_UNIDADESValue;
    property OldCOSTE_UNIDADES : Currency read GetOldCOSTE_UNIDADESValue;
    property STOCK : Integer read GetSTOCKValue write SetSTOCKValue;
    property OldSTOCK : Integer read GetOldSTOCKValue;
    property RESERVA : Integer read GetRESERVAValue write SetRESERVAValue;
    property OldRESERVA : Integer read GetOldRESERVAValue;
    property PENDIENTE_RECEPCION : Integer read GetPENDIENTE_RECEPCIONValue write SetPENDIENTE_RECEPCIONValue;
    property OldPENDIENTE_RECEPCION : Integer read GetOldPENDIENTE_RECEPCIONValue;
    property CANTIDAD : Integer read GetCANTIDADValue write SetCANTIDADValue;
    property OldCANTIDAD : Integer read GetOldCANTIDADValue;
    property FECHA_MOVIMIENTO : DateTime read GetFECHA_MOVIMIENTOValue write SetFECHA_MOVIMIENTOValue;
    property OldFECHA_MOVIMIENTO : DateTime read GetOldFECHA_MOVIMIENTOValue;
    property CAUSA : String read GetCAUSAValue write SetCAUSAValue;
    property OldCAUSA : String read GetOldCAUSAValue;
    property TIPO : String read GetTIPOValue write SetTIPOValue;
    property OldTIPO : String read GetOldTIPOValue;

  public
    constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
    destructor Destroy; override;

  end;

  { IDETALLE_RESERVAS_INVDelta }
  IDETALLE_RESERVAS_INVDelta = interface(IDETALLE_RESERVAS_INV)
  ['{D5B89CFC-9817-4CF4-9E20-BFB33C0E196B}']
    { Property getters and setters }
    function GetOldID_ALBValue : Integer;
    function GetOldID_EMPRESAValue : Integer;
    function GetOldREFERENCIA_ALBValue : String;
    function GetOldSITUACION_ALBValue : String;
    function GetOldFECHA_PREVISTA_ENVIO_ALBValue : DateTime;
    function GetOldID_ALMACEN_ALBValue : Integer;
    function GetOldALMACEN_ALBValue : String;
    function GetOldID_CLIENTE_ALBValue : Integer;
    function GetOldCLIENTE_ALBValue : String;
    function GetOldID_ARTValue : Integer;
    function GetOldFAMILIA_ARTValue : String;
    function GetOldREFERENCIA_ARTValue : String;
    function GetOldREFERENCIA_PROV_ARTValue : String;
    function GetOldDESCRIPCION_ARTValue : String;
    function GetOldCANTIDAD_ARTValue : Integer;

    { Properties }
    property OldID_ALB : Integer read GetOldID_ALBValue;
    property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
    property OldREFERENCIA_ALB : String read GetOldREFERENCIA_ALBValue;
    property OldSITUACION_ALB : String read GetOldSITUACION_ALBValue;
    property OldFECHA_PREVISTA_ENVIO_ALB : DateTime read GetOldFECHA_PREVISTA_ENVIO_ALBValue;
    property OldID_ALMACEN_ALB : Integer read GetOldID_ALMACEN_ALBValue;
    property OldALMACEN_ALB : String read GetOldALMACEN_ALBValue;
    property OldID_CLIENTE_ALB : Integer read GetOldID_CLIENTE_ALBValue;
    property OldCLIENTE_ALB : String read GetOldCLIENTE_ALBValue;
    property OldID_ART : Integer read GetOldID_ARTValue;
    property OldFAMILIA_ART : String read GetOldFAMILIA_ARTValue;
    property OldREFERENCIA_ART : String read GetOldREFERENCIA_ARTValue;
    property OldREFERENCIA_PROV_ART : String read GetOldREFERENCIA_PROV_ARTValue;
    property OldDESCRIPCION_ART : String read GetOldDESCRIPCION_ARTValue;
    property OldCANTIDAD_ART : Integer read GetOldCANTIDAD_ARTValue;
  end;

  { TDETALLE_RESERVAS_INVBusinessProcessorRules }
  TDETALLE_RESERVAS_INVBusinessProcessorRules = class(TDABusinessProcessorRules, IDETALLE_RESERVAS_INV, IDETALLE_RESERVAS_INVDelta)
  private
  protected
    { Property getters and setters }
    function GetID_ALBValue: Integer; virtual;
    function GetOldID_ALBValue: Integer; virtual;
    procedure SetID_ALBValue(const aValue: Integer); virtual;
    function GetID_EMPRESAValue: Integer; virtual;
    function GetOldID_EMPRESAValue: Integer; virtual;
    procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
    function GetREFERENCIA_ALBValue: String; virtual;
    function GetOldREFERENCIA_ALBValue: String; virtual;
    procedure SetREFERENCIA_ALBValue(const aValue: String); virtual;
    function GetSITUACION_ALBValue: String; virtual;
    function GetOldSITUACION_ALBValue: String; virtual;
    procedure SetSITUACION_ALBValue(const aValue: String); virtual;
    function GetFECHA_PREVISTA_ENVIO_ALBValue: DateTime; virtual;
    function GetOldFECHA_PREVISTA_ENVIO_ALBValue: DateTime; virtual;
    procedure SetFECHA_PREVISTA_ENVIO_ALBValue(const aValue: DateTime); virtual;
    function GetID_ALMACEN_ALBValue: Integer; virtual;
    function GetOldID_ALMACEN_ALBValue: Integer; virtual;
    procedure SetID_ALMACEN_ALBValue(const aValue: Integer); virtual;
    function GetALMACEN_ALBValue: String; virtual;
    function GetOldALMACEN_ALBValue: String; virtual;
    procedure SetALMACEN_ALBValue(const aValue: String); virtual;
    function GetID_CLIENTE_ALBValue: Integer; virtual;
    function GetOldID_CLIENTE_ALBValue: Integer; virtual;
    procedure SetID_CLIENTE_ALBValue(const aValue: Integer); virtual;
    function GetCLIENTE_ALBValue: String; virtual;
    function GetOldCLIENTE_ALBValue: String; virtual;
    procedure SetCLIENTE_ALBValue(const aValue: String); virtual;
    function GetID_ARTValue: Integer; virtual;
    function GetOldID_ARTValue: Integer; virtual;
    procedure SetID_ARTValue(const aValue: Integer); virtual;
    function GetFAMILIA_ARTValue: String; virtual;
    function GetOldFAMILIA_ARTValue: String; virtual;
    procedure SetFAMILIA_ARTValue(const aValue: String); virtual;
    function GetREFERENCIA_ARTValue: String; virtual;
    function GetOldREFERENCIA_ARTValue: String; virtual;
    procedure SetREFERENCIA_ARTValue(const aValue: String); virtual;
    function GetREFERENCIA_PROV_ARTValue: String; virtual;
    function GetOldREFERENCIA_PROV_ARTValue: String; virtual;
    procedure SetREFERENCIA_PROV_ARTValue(const aValue: String); virtual;
    function GetDESCRIPCION_ARTValue: String; virtual;
    function GetOldDESCRIPCION_ARTValue: String; virtual;
    procedure SetDESCRIPCION_ARTValue(const aValue: String); virtual;
    function GetCANTIDAD_ARTValue: Integer; virtual;
    function GetOldCANTIDAD_ARTValue: Integer; virtual;
    procedure SetCANTIDAD_ARTValue(const aValue: Integer); virtual;

    { Properties }
    property ID_ALB : Integer read GetID_ALBValue write SetID_ALBValue;
    property OldID_ALB : Integer read GetOldID_ALBValue;
    property ID_EMPRESA : Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
    property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
    property REFERENCIA_ALB : String read GetREFERENCIA_ALBValue write SetREFERENCIA_ALBValue;
    property OldREFERENCIA_ALB : String read GetOldREFERENCIA_ALBValue;
    property SITUACION_ALB : String read GetSITUACION_ALBValue write SetSITUACION_ALBValue;
    property OldSITUACION_ALB : String read GetOldSITUACION_ALBValue;
    property FECHA_PREVISTA_ENVIO_ALB : DateTime read GetFECHA_PREVISTA_ENVIO_ALBValue write SetFECHA_PREVISTA_ENVIO_ALBValue;
    property OldFECHA_PREVISTA_ENVIO_ALB : DateTime read GetOldFECHA_PREVISTA_ENVIO_ALBValue;
    property ID_ALMACEN_ALB : Integer read GetID_ALMACEN_ALBValue write SetID_ALMACEN_ALBValue;
    property OldID_ALMACEN_ALB : Integer read GetOldID_ALMACEN_ALBValue;
    property ALMACEN_ALB : String read GetALMACEN_ALBValue write SetALMACEN_ALBValue;
    property OldALMACEN_ALB : String read GetOldALMACEN_ALBValue;
    property ID_CLIENTE_ALB : Integer read GetID_CLIENTE_ALBValue write SetID_CLIENTE_ALBValue;
    property OldID_CLIENTE_ALB : Integer read GetOldID_CLIENTE_ALBValue;
    property CLIENTE_ALB : String read GetCLIENTE_ALBValue write SetCLIENTE_ALBValue;
    property OldCLIENTE_ALB : String read GetOldCLIENTE_ALBValue;
    property ID_ART : Integer read GetID_ARTValue write SetID_ARTValue;
    property OldID_ART : Integer read GetOldID_ARTValue;
    property FAMILIA_ART : String read GetFAMILIA_ARTValue write SetFAMILIA_ARTValue;
    property OldFAMILIA_ART : String read GetOldFAMILIA_ARTValue;
    property REFERENCIA_ART : String read GetREFERENCIA_ARTValue write SetREFERENCIA_ARTValue;
    property OldREFERENCIA_ART : String read GetOldREFERENCIA_ARTValue;
    property REFERENCIA_PROV_ART : String read GetREFERENCIA_PROV_ARTValue write SetREFERENCIA_PROV_ARTValue;
    property OldREFERENCIA_PROV_ART : String read GetOldREFERENCIA_PROV_ARTValue;
    property DESCRIPCION_ART : String read GetDESCRIPCION_ARTValue write SetDESCRIPCION_ARTValue;
    property OldDESCRIPCION_ART : String read GetOldDESCRIPCION_ARTValue;
    property CANTIDAD_ART : Integer read GetCANTIDAD_ARTValue write SetCANTIDAD_ARTValue;
    property OldCANTIDAD_ART : Integer read GetOldCANTIDAD_ARTValue;

  public
    constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
    destructor Destroy; override;

  end;

implementation

uses
  Variants, uROBinaryHelpers;

{ TINVENTARIOBusinessProcessorRules }
constructor TINVENTARIOBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
  inherited;
end;

destructor TINVENTARIOBusinessProcessorRules.Destroy;
begin
  inherited;
end;

function TINVENTARIOBusinessProcessorRules.GetIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID];
end;

function TINVENTARIOBusinessProcessorRules.GetOldIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID];
end;

procedure TINVENTARIOBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetID_ALMACENValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ALMACEN];
end;

function TINVENTARIOBusinessProcessorRules.GetOldID_ALMACENValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID_ALMACEN];
end;

procedure TINVENTARIOBusinessProcessorRules.SetID_ALMACENValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ALMACEN] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetID_ARTICULOValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ARTICULO];
end;

function TINVENTARIOBusinessProcessorRules.GetOldID_ARTICULOValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID_ARTICULO];
end;

procedure TINVENTARIOBusinessProcessorRules.SetID_ARTICULOValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ARTICULO] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetALMACENValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOALMACEN];
end;

function TINVENTARIOBusinessProcessorRules.GetOldALMACENValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOALMACEN];
end;

procedure TINVENTARIOBusinessProcessorRules.SetALMACENValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOALMACEN] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetID_EMPRESAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_EMPRESA];
end;

function TINVENTARIOBusinessProcessorRules.GetOldID_EMPRESAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID_EMPRESA];
end;

procedure TINVENTARIOBusinessProcessorRules.SetID_EMPRESAValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_EMPRESA] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetREFERENCIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA];
end;

function TINVENTARIOBusinessProcessorRules.GetOldREFERENCIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOREFERENCIA];
end;

procedure TINVENTARIOBusinessProcessorRules.SetREFERENCIAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetFAMILIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFAMILIA];
end;

function TINVENTARIOBusinessProcessorRules.GetOldFAMILIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOFAMILIA];
end;

procedure TINVENTARIOBusinessProcessorRules.SetFAMILIAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFAMILIA] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetDESCRIPCIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIODESCRIPCION];
end;

function TINVENTARIOBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIODESCRIPCION];
end;

procedure TINVENTARIOBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIODESCRIPCION] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetPRECIO_NETOValue: Currency;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPRECIO_NETO];
end;

function TINVENTARIOBusinessProcessorRules.GetOldPRECIO_NETOValue: Currency;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOPRECIO_NETO];
end;

procedure TINVENTARIOBusinessProcessorRules.SetPRECIO_NETOValue(const aValue: Currency);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPRECIO_NETO] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetREFERENCIA_PROVEEDORValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA_PROVEEDOR];
end;

function TINVENTARIOBusinessProcessorRules.GetOldREFERENCIA_PROVEEDORValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOREFERENCIA_PROVEEDOR];
end;

procedure TINVENTARIOBusinessProcessorRules.SetREFERENCIA_PROVEEDORValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA_PROVEEDOR] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetUNIDADES_ALMACENValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOUNIDADES_ALMACEN];
end;

function TINVENTARIOBusinessProcessorRules.GetOldUNIDADES_ALMACENValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOUNIDADES_ALMACEN];
end;

procedure TINVENTARIOBusinessProcessorRules.SetUNIDADES_ALMACENValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOUNIDADES_ALMACEN] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetCOSTE_UNIDADESValue: Currency;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCOSTE_UNIDADES];
end;

function TINVENTARIOBusinessProcessorRules.GetOldCOSTE_UNIDADESValue: Currency;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOCOSTE_UNIDADES];
end;

procedure TINVENTARIOBusinessProcessorRules.SetCOSTE_UNIDADESValue(const aValue: Currency);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCOSTE_UNIDADES] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetSTOCKValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOSTOCK];
end;

function TINVENTARIOBusinessProcessorRules.GetOldSTOCKValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOSTOCK];
end;

procedure TINVENTARIOBusinessProcessorRules.SetSTOCKValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOSTOCK] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetRESERVAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIORESERVA];
end;

function TINVENTARIOBusinessProcessorRules.GetOldRESERVAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIORESERVA];
end;

procedure TINVENTARIOBusinessProcessorRules.SetRESERVAValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIORESERVA] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetPENDIENTE_RECEPCIONValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPENDIENTE_RECEPCION];
end;

function TINVENTARIOBusinessProcessorRules.GetOldPENDIENTE_RECEPCIONValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOPENDIENTE_RECEPCION];
end;

procedure TINVENTARIOBusinessProcessorRules.SetPENDIENTE_RECEPCIONValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPENDIENTE_RECEPCION] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetCANTIDADValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCANTIDAD];
end;

function TINVENTARIOBusinessProcessorRules.GetOldCANTIDADValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOCANTIDAD];
end;

procedure TINVENTARIOBusinessProcessorRules.SetCANTIDADValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCANTIDAD] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetFECHA_MOVIMIENTOValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFECHA_MOVIMIENTO];
end;

function TINVENTARIOBusinessProcessorRules.GetOldFECHA_MOVIMIENTOValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOFECHA_MOVIMIENTO];
end;

procedure TINVENTARIOBusinessProcessorRules.SetFECHA_MOVIMIENTOValue(const aValue: DateTime);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFECHA_MOVIMIENTO] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetCAUSAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCAUSA];
end;

function TINVENTARIOBusinessProcessorRules.GetOldCAUSAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOCAUSA];
end;

procedure TINVENTARIOBusinessProcessorRules.SetCAUSAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCAUSA] := aValue;
end;

function TINVENTARIOBusinessProcessorRules.GetTIPOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOTIPO];
end;

function TINVENTARIOBusinessProcessorRules.GetOldTIPOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOTIPO];
end;

procedure TINVENTARIOBusinessProcessorRules.SetTIPOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOTIPO] := aValue;
end;


{ TDETALLE_RESERVAS_INVBusinessProcessorRules }
constructor TDETALLE_RESERVAS_INVBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
  inherited;
end;

destructor TDETALLE_RESERVAS_INVBusinessProcessorRules.Destroy;
begin
  inherited;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetID_ALBValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldID_ALBValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVID_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetID_ALBValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetID_EMPRESAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_EMPRESA];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldID_EMPRESAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVID_EMPRESA];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetID_EMPRESAValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_EMPRESA] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetREFERENCIA_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldREFERENCIA_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetREFERENCIA_ALBValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetSITUACION_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVSITUACION_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldSITUACION_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVSITUACION_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetSITUACION_ALBValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVSITUACION_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetFECHA_PREVISTA_ENVIO_ALBValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVFECHA_PREVISTA_ENVIO_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldFECHA_PREVISTA_ENVIO_ALBValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVFECHA_PREVISTA_ENVIO_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetFECHA_PREVISTA_ENVIO_ALBValue(const aValue: DateTime);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVFECHA_PREVISTA_ENVIO_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetID_ALMACEN_ALBValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_ALMACEN_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldID_ALMACEN_ALBValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVID_ALMACEN_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetID_ALMACEN_ALBValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_ALMACEN_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetALMACEN_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVALMACEN_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldALMACEN_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVALMACEN_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetALMACEN_ALBValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVALMACEN_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetID_CLIENTE_ALBValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_CLIENTE_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldID_CLIENTE_ALBValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVID_CLIENTE_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetID_CLIENTE_ALBValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_CLIENTE_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetCLIENTE_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVCLIENTE_ALB];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldCLIENTE_ALBValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVCLIENTE_ALB];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetCLIENTE_ALBValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVCLIENTE_ALB] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetID_ARTValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_ART];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldID_ARTValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVID_ART];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetID_ARTValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVID_ART] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetFAMILIA_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVFAMILIA_ART];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldFAMILIA_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVFAMILIA_ART];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetFAMILIA_ARTValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVFAMILIA_ART] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetREFERENCIA_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_ART];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldREFERENCIA_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_ART];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetREFERENCIA_ARTValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_ART] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetREFERENCIA_PROV_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_PROV_ART];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldREFERENCIA_PROV_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_PROV_ART];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetREFERENCIA_PROV_ARTValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVREFERENCIA_PROV_ART] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetDESCRIPCION_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVDESCRIPCION_ART];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldDESCRIPCION_ARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVDESCRIPCION_ART];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetDESCRIPCION_ARTValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVDESCRIPCION_ART] := aValue;
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetCANTIDAD_ARTValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVCANTIDAD_ART];
end;

function TDETALLE_RESERVAS_INVBusinessProcessorRules.GetOldCANTIDAD_ARTValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_DETALLE_RESERVAS_INVCANTIDAD_ART];
end;

procedure TDETALLE_RESERVAS_INVBusinessProcessorRules.SetCANTIDAD_ARTValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_DETALLE_RESERVAS_INVCANTIDAD_ART] := aValue;
end;


initialization
  RegisterBusinessProcessorRules(RID_INVENTARIODelta, TINVENTARIOBusinessProcessorRules);
  RegisterBusinessProcessorRules(RID_DETALLE_RESERVAS_INVDelta, TDETALLE_RESERVAS_INVBusinessProcessorRules);

end.
