unit schEDIInventaryServer_Intf;

interface

uses
  Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, schEDIInventaryClient_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_RDX_CANTINVDelta = '{C803322D-5148-44E9-A06D-99D8B2E2781E}';
  RID_RDX_LININVDelta = '{59D21195-BB34-4A91-BD02-D48649A8F4B9}';
  RID_RDX_CABINVDelta = '{9A135F09-4540-4DAE-B701-2CDA92E0519B}';

type
  { IRDX_CANTINVDelta }
  IRDX_CANTINVDelta = interface(IRDX_CANTINV)
  ['{C803322D-5148-44E9-A06D-99D8B2E2781E}']
    { Property getters and setters }
    function GetOldNUMDOCValue : String;
    function GetOldNUMLINValue : Float;
    function GetOldNUMCANTValue : Float;
    function GetOldTIPOCANTValue : String;
    function GetOldCANTIDADValue : Float;
    function GetOldCENTROValue : String;
    function GetOldTMOVValue : String;
    function GetOldFACTValue : String;
    function GetOldDEPTOValue : String;
    function GetOldIDVENValue : String;

    { Properties }
    property OldNUMDOC : String read GetOldNUMDOCValue;
    property OldNUMLIN : Float read GetOldNUMLINValue;
    property OldNUMCANT : Float read GetOldNUMCANTValue;
    property OldTIPOCANT : String read GetOldTIPOCANTValue;
    property OldCANTIDAD : Float read GetOldCANTIDADValue;
    property OldCENTRO : String read GetOldCENTROValue;
    property OldTMOV : String read GetOldTMOVValue;
    property OldFACT : String read GetOldFACTValue;
    property OldDEPTO : String read GetOldDEPTOValue;
    property OldIDVEN : String read GetOldIDVENValue;
  end;

  { TRDX_CANTINVBusinessProcessorRules }
  TRDX_CANTINVBusinessProcessorRules = class(TDABusinessProcessorRules, IRDX_CANTINV, IRDX_CANTINVDelta)
  private
  protected
    { Property getters and setters }
    function GetNUMDOCValue: String; virtual;
    function GetOldNUMDOCValue: String; virtual;
    procedure SetNUMDOCValue(const aValue: String); virtual;
    function GetNUMLINValue: Float; virtual;
    function GetOldNUMLINValue: Float; virtual;
    procedure SetNUMLINValue(const aValue: Float); virtual;
    function GetNUMCANTValue: Float; virtual;
    function GetOldNUMCANTValue: Float; virtual;
    procedure SetNUMCANTValue(const aValue: Float); virtual;
    function GetTIPOCANTValue: String; virtual;
    function GetOldTIPOCANTValue: String; virtual;
    procedure SetTIPOCANTValue(const aValue: String); virtual;
    function GetCANTIDADValue: Float; virtual;
    function GetOldCANTIDADValue: Float; virtual;
    procedure SetCANTIDADValue(const aValue: Float); virtual;
    function GetCENTROValue: String; virtual;
    function GetOldCENTROValue: String; virtual;
    procedure SetCENTROValue(const aValue: String); virtual;
    function GetTMOVValue: String; virtual;
    function GetOldTMOVValue: String; virtual;
    procedure SetTMOVValue(const aValue: String); virtual;
    function GetFACTValue: String; virtual;
    function GetOldFACTValue: String; virtual;
    procedure SetFACTValue(const aValue: String); virtual;
    function GetDEPTOValue: String; virtual;
    function GetOldDEPTOValue: String; virtual;
    procedure SetDEPTOValue(const aValue: String); virtual;
    function GetIDVENValue: String; virtual;
    function GetOldIDVENValue: String; virtual;
    procedure SetIDVENValue(const aValue: String); virtual;

    { Properties }
    property NUMDOC : String read GetNUMDOCValue write SetNUMDOCValue;
    property OldNUMDOC : String read GetOldNUMDOCValue;
    property NUMLIN : Float read GetNUMLINValue write SetNUMLINValue;
    property OldNUMLIN : Float read GetOldNUMLINValue;
    property NUMCANT : Float read GetNUMCANTValue write SetNUMCANTValue;
    property OldNUMCANT : Float read GetOldNUMCANTValue;
    property TIPOCANT : String read GetTIPOCANTValue write SetTIPOCANTValue;
    property OldTIPOCANT : String read GetOldTIPOCANTValue;
    property CANTIDAD : Float read GetCANTIDADValue write SetCANTIDADValue;
    property OldCANTIDAD : Float read GetOldCANTIDADValue;
    property CENTRO : String read GetCENTROValue write SetCENTROValue;
    property OldCENTRO : String read GetOldCENTROValue;
    property TMOV : String read GetTMOVValue write SetTMOVValue;
    property OldTMOV : String read GetOldTMOVValue;
    property FACT : String read GetFACTValue write SetFACTValue;
    property OldFACT : String read GetOldFACTValue;
    property DEPTO : String read GetDEPTOValue write SetDEPTOValue;
    property OldDEPTO : String read GetOldDEPTOValue;
    property IDVEN : String read GetIDVENValue write SetIDVENValue;
    property OldIDVEN : String read GetOldIDVENValue;

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

  end;

  { IRDX_LININVDelta }
  IRDX_LININVDelta = interface(IRDX_LININV)
  ['{59D21195-BB34-4A91-BD02-D48649A8F4B9}']
    { Property getters and setters }
    function GetOldNUMDOCValue : String;
    function GetOldNUMLINValue : Float;
    function GetOldCODARTValue : String;
    function GetOldFAMILIAValue : String;
    function GetOldBARRAValue : String;
    function GetOldTALLAValue : String;
    function GetOldMARCAValue : String;
    function GetOldTAMANOValue : String;
    function GetOldSERIEValue : String;
    function GetOldCOLORValue : String;
    function GetOldMODELOValue : String;
    function GetOldDIBUJOValue : String;
    function GetOldDESCRIPValue : String;

    { Properties }
    property OldNUMDOC : String read GetOldNUMDOCValue;
    property OldNUMLIN : Float read GetOldNUMLINValue;
    property OldCODART : String read GetOldCODARTValue;
    property OldFAMILIA : String read GetOldFAMILIAValue;
    property OldBARRA : String read GetOldBARRAValue;
    property OldTALLA : String read GetOldTALLAValue;
    property OldMARCA : String read GetOldMARCAValue;
    property OldTAMANO : String read GetOldTAMANOValue;
    property OldSERIE : String read GetOldSERIEValue;
    property OldCOLOR : String read GetOldCOLORValue;
    property OldMODELO : String read GetOldMODELOValue;
    property OldDIBUJO : String read GetOldDIBUJOValue;
    property OldDESCRIP : String read GetOldDESCRIPValue;
  end;

  { TRDX_LININVBusinessProcessorRules }
  TRDX_LININVBusinessProcessorRules = class(TDABusinessProcessorRules, IRDX_LININV, IRDX_LININVDelta)
  private
  protected
    { Property getters and setters }
    function GetNUMDOCValue: String; virtual;
    function GetOldNUMDOCValue: String; virtual;
    procedure SetNUMDOCValue(const aValue: String); virtual;
    function GetNUMLINValue: Float; virtual;
    function GetOldNUMLINValue: Float; virtual;
    procedure SetNUMLINValue(const aValue: Float); virtual;
    function GetCODARTValue: String; virtual;
    function GetOldCODARTValue: String; virtual;
    procedure SetCODARTValue(const aValue: String); virtual;
    function GetFAMILIAValue: String; virtual;
    function GetOldFAMILIAValue: String; virtual;
    procedure SetFAMILIAValue(const aValue: String); virtual;
    function GetBARRAValue: String; virtual;
    function GetOldBARRAValue: String; virtual;
    procedure SetBARRAValue(const aValue: String); virtual;
    function GetTALLAValue: String; virtual;
    function GetOldTALLAValue: String; virtual;
    procedure SetTALLAValue(const aValue: String); virtual;
    function GetMARCAValue: String; virtual;
    function GetOldMARCAValue: String; virtual;
    procedure SetMARCAValue(const aValue: String); virtual;
    function GetTAMANOValue: String; virtual;
    function GetOldTAMANOValue: String; virtual;
    procedure SetTAMANOValue(const aValue: String); virtual;
    function GetSERIEValue: String; virtual;
    function GetOldSERIEValue: String; virtual;
    procedure SetSERIEValue(const aValue: String); virtual;
    function GetCOLORValue: String; virtual;
    function GetOldCOLORValue: String; virtual;
    procedure SetCOLORValue(const aValue: String); virtual;
    function GetMODELOValue: String; virtual;
    function GetOldMODELOValue: String; virtual;
    procedure SetMODELOValue(const aValue: String); virtual;
    function GetDIBUJOValue: String; virtual;
    function GetOldDIBUJOValue: String; virtual;
    procedure SetDIBUJOValue(const aValue: String); virtual;
    function GetDESCRIPValue: String; virtual;
    function GetOldDESCRIPValue: String; virtual;
    procedure SetDESCRIPValue(const aValue: String); virtual;

    { Properties }
    property NUMDOC : String read GetNUMDOCValue write SetNUMDOCValue;
    property OldNUMDOC : String read GetOldNUMDOCValue;
    property NUMLIN : Float read GetNUMLINValue write SetNUMLINValue;
    property OldNUMLIN : Float read GetOldNUMLINValue;
    property CODART : String read GetCODARTValue write SetCODARTValue;
    property OldCODART : String read GetOldCODARTValue;
    property FAMILIA : String read GetFAMILIAValue write SetFAMILIAValue;
    property OldFAMILIA : String read GetOldFAMILIAValue;
    property BARRA : String read GetBARRAValue write SetBARRAValue;
    property OldBARRA : String read GetOldBARRAValue;
    property TALLA : String read GetTALLAValue write SetTALLAValue;
    property OldTALLA : String read GetOldTALLAValue;
    property MARCA : String read GetMARCAValue write SetMARCAValue;
    property OldMARCA : String read GetOldMARCAValue;
    property TAMANO : String read GetTAMANOValue write SetTAMANOValue;
    property OldTAMANO : String read GetOldTAMANOValue;
    property SERIE : String read GetSERIEValue write SetSERIEValue;
    property OldSERIE : String read GetOldSERIEValue;
    property COLOR : String read GetCOLORValue write SetCOLORValue;
    property OldCOLOR : String read GetOldCOLORValue;
    property MODELO : String read GetMODELOValue write SetMODELOValue;
    property OldMODELO : String read GetOldMODELOValue;
    property DIBUJO : String read GetDIBUJOValue write SetDIBUJOValue;
    property OldDIBUJO : String read GetOldDIBUJOValue;
    property DESCRIP : String read GetDESCRIPValue write SetDESCRIPValue;
    property OldDESCRIP : String read GetOldDESCRIPValue;

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

  end;

  { IRDX_CABINVDelta }
  IRDX_CABINVDelta = interface(IRDX_CABINV)
  ['{9A135F09-4540-4DAE-B701-2CDA92E0519B}']
    { Property getters and setters }
    function GetOldNUMDOCValue : String;
    function GetOldTIPODOCValue : String;
    function GetOldTIPOLIQValue : String;
    function GetOldFECHAValue : DateTime;
    function GetOldFECHALIQValue : DateTime;
    function GetOldEMISORValue : String;
    function GetOldRECEPTORValue : String;
    function GetOldDPTOValue : String;
    function GetOldCENTROValue : String;
    function GetOldFECHA_CARGAValue : DateTime;

    { Properties }
    property OldNUMDOC : String read GetOldNUMDOCValue;
    property OldTIPODOC : String read GetOldTIPODOCValue;
    property OldTIPOLIQ : String read GetOldTIPOLIQValue;
    property OldFECHA : DateTime read GetOldFECHAValue;
    property OldFECHALIQ : DateTime read GetOldFECHALIQValue;
    property OldEMISOR : String read GetOldEMISORValue;
    property OldRECEPTOR : String read GetOldRECEPTORValue;
    property OldDPTO : String read GetOldDPTOValue;
    property OldCENTRO : String read GetOldCENTROValue;
    property OldFECHA_CARGA : DateTime read GetOldFECHA_CARGAValue;
  end;

  { TRDX_CABINVBusinessProcessorRules }
  TRDX_CABINVBusinessProcessorRules = class(TDABusinessProcessorRules, IRDX_CABINV, IRDX_CABINVDelta)
  private
  protected
    { Property getters and setters }
    function GetNUMDOCValue: String; virtual;
    function GetOldNUMDOCValue: String; virtual;
    procedure SetNUMDOCValue(const aValue: String); virtual;
    function GetTIPODOCValue: String; virtual;
    function GetOldTIPODOCValue: String; virtual;
    procedure SetTIPODOCValue(const aValue: String); virtual;
    function GetTIPOLIQValue: String; virtual;
    function GetOldTIPOLIQValue: String; virtual;
    procedure SetTIPOLIQValue(const aValue: String); virtual;
    function GetFECHAValue: DateTime; virtual;
    function GetOldFECHAValue: DateTime; virtual;
    procedure SetFECHAValue(const aValue: DateTime); virtual;
    function GetFECHALIQValue: DateTime; virtual;
    function GetOldFECHALIQValue: DateTime; virtual;
    procedure SetFECHALIQValue(const aValue: DateTime); virtual;
    function GetEMISORValue: String; virtual;
    function GetOldEMISORValue: String; virtual;
    procedure SetEMISORValue(const aValue: String); virtual;
    function GetRECEPTORValue: String; virtual;
    function GetOldRECEPTORValue: String; virtual;
    procedure SetRECEPTORValue(const aValue: String); virtual;
    function GetDPTOValue: String; virtual;
    function GetOldDPTOValue: String; virtual;
    procedure SetDPTOValue(const aValue: String); virtual;
    function GetCENTROValue: String; virtual;
    function GetOldCENTROValue: String; virtual;
    procedure SetCENTROValue(const aValue: String); virtual;
    function GetFECHA_CARGAValue: DateTime; virtual;
    function GetOldFECHA_CARGAValue: DateTime; virtual;
    procedure SetFECHA_CARGAValue(const aValue: DateTime); virtual;

    { Properties }
    property NUMDOC : String read GetNUMDOCValue write SetNUMDOCValue;
    property OldNUMDOC : String read GetOldNUMDOCValue;
    property TIPODOC : String read GetTIPODOCValue write SetTIPODOCValue;
    property OldTIPODOC : String read GetOldTIPODOCValue;
    property TIPOLIQ : String read GetTIPOLIQValue write SetTIPOLIQValue;
    property OldTIPOLIQ : String read GetOldTIPOLIQValue;
    property FECHA : DateTime read GetFECHAValue write SetFECHAValue;
    property OldFECHA : DateTime read GetOldFECHAValue;
    property FECHALIQ : DateTime read GetFECHALIQValue write SetFECHALIQValue;
    property OldFECHALIQ : DateTime read GetOldFECHALIQValue;
    property EMISOR : String read GetEMISORValue write SetEMISORValue;
    property OldEMISOR : String read GetOldEMISORValue;
    property RECEPTOR : String read GetRECEPTORValue write SetRECEPTORValue;
    property OldRECEPTOR : String read GetOldRECEPTORValue;
    property DPTO : String read GetDPTOValue write SetDPTOValue;
    property OldDPTO : String read GetOldDPTOValue;
    property CENTRO : String read GetCENTROValue write SetCENTROValue;
    property OldCENTRO : String read GetOldCENTROValue;
    property FECHA_CARGA : DateTime read GetFECHA_CARGAValue write SetFECHA_CARGAValue;
    property OldFECHA_CARGA : DateTime read GetOldFECHA_CARGAValue;

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

  end;

implementation

uses
  Variants, uROBinaryHelpers;

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

destructor TRDX_CANTINVBusinessProcessorRules.Destroy;
begin
  inherited;
end;

function TRDX_CANTINVBusinessProcessorRules.GetNUMDOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVNUMDOC];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldNUMDOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVNUMDOC];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetNUMDOCValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVNUMDOC] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetNUMLINValue: Float;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVNUMLIN];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldNUMLINValue: Float;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVNUMLIN];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetNUMLINValue(const aValue: Float);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVNUMLIN] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetNUMCANTValue: Float;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVNUMCANT];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldNUMCANTValue: Float;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVNUMCANT];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetNUMCANTValue(const aValue: Float);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVNUMCANT] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetTIPOCANTValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVTIPOCANT];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldTIPOCANTValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVTIPOCANT];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetTIPOCANTValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVTIPOCANT] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetCANTIDADValue: Float;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVCANTIDAD];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldCANTIDADValue: Float;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVCANTIDAD];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetCANTIDADValue(const aValue: Float);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVCANTIDAD] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetCENTROValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVCENTRO];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldCENTROValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVCENTRO];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetCENTROValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVCENTRO] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetTMOVValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVTMOV];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldTMOVValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVTMOV];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetTMOVValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVTMOV] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetFACTValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVFACT];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldFACTValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVFACT];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetFACTValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVFACT] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetDEPTOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVDEPTO];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldDEPTOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVDEPTO];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetDEPTOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVDEPTO] := aValue;
end;

function TRDX_CANTINVBusinessProcessorRules.GetIDVENValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVIDVEN];
end;

function TRDX_CANTINVBusinessProcessorRules.GetOldIDVENValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CANTINVIDVEN];
end;

procedure TRDX_CANTINVBusinessProcessorRules.SetIDVENValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CANTINVIDVEN] := aValue;
end;


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

destructor TRDX_LININVBusinessProcessorRules.Destroy;
begin
  inherited;
end;

function TRDX_LININVBusinessProcessorRules.GetNUMDOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVNUMDOC];
end;

function TRDX_LININVBusinessProcessorRules.GetOldNUMDOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVNUMDOC];
end;

procedure TRDX_LININVBusinessProcessorRules.SetNUMDOCValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVNUMDOC] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetNUMLINValue: Float;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVNUMLIN];
end;

function TRDX_LININVBusinessProcessorRules.GetOldNUMLINValue: Float;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVNUMLIN];
end;

procedure TRDX_LININVBusinessProcessorRules.SetNUMLINValue(const aValue: Float);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVNUMLIN] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetCODARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVCODART];
end;

function TRDX_LININVBusinessProcessorRules.GetOldCODARTValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVCODART];
end;

procedure TRDX_LININVBusinessProcessorRules.SetCODARTValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVCODART] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetFAMILIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVFAMILIA];
end;

function TRDX_LININVBusinessProcessorRules.GetOldFAMILIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVFAMILIA];
end;

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

function TRDX_LININVBusinessProcessorRules.GetBARRAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVBARRA];
end;

function TRDX_LININVBusinessProcessorRules.GetOldBARRAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVBARRA];
end;

procedure TRDX_LININVBusinessProcessorRules.SetBARRAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVBARRA] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetTALLAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVTALLA];
end;

function TRDX_LININVBusinessProcessorRules.GetOldTALLAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVTALLA];
end;

procedure TRDX_LININVBusinessProcessorRules.SetTALLAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVTALLA] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetMARCAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVMARCA];
end;

function TRDX_LININVBusinessProcessorRules.GetOldMARCAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVMARCA];
end;

procedure TRDX_LININVBusinessProcessorRules.SetMARCAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVMARCA] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetTAMANOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVTAMANO];
end;

function TRDX_LININVBusinessProcessorRules.GetOldTAMANOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVTAMANO];
end;

procedure TRDX_LININVBusinessProcessorRules.SetTAMANOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVTAMANO] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetSERIEValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVSERIE];
end;

function TRDX_LININVBusinessProcessorRules.GetOldSERIEValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVSERIE];
end;

procedure TRDX_LININVBusinessProcessorRules.SetSERIEValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVSERIE] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetCOLORValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVCOLOR];
end;

function TRDX_LININVBusinessProcessorRules.GetOldCOLORValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVCOLOR];
end;

procedure TRDX_LININVBusinessProcessorRules.SetCOLORValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVCOLOR] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetMODELOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVMODELO];
end;

function TRDX_LININVBusinessProcessorRules.GetOldMODELOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVMODELO];
end;

procedure TRDX_LININVBusinessProcessorRules.SetMODELOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVMODELO] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetDIBUJOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVDIBUJO];
end;

function TRDX_LININVBusinessProcessorRules.GetOldDIBUJOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVDIBUJO];
end;

procedure TRDX_LININVBusinessProcessorRules.SetDIBUJOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVDIBUJO] := aValue;
end;

function TRDX_LININVBusinessProcessorRules.GetDESCRIPValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVDESCRIP];
end;

function TRDX_LININVBusinessProcessorRules.GetOldDESCRIPValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_LININVDESCRIP];
end;

procedure TRDX_LININVBusinessProcessorRules.SetDESCRIPValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_LININVDESCRIP] := aValue;
end;


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

destructor TRDX_CABINVBusinessProcessorRules.Destroy;
begin
  inherited;
end;

function TRDX_CABINVBusinessProcessorRules.GetNUMDOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVNUMDOC];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldNUMDOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVNUMDOC];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetNUMDOCValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVNUMDOC] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetTIPODOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVTIPODOC];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldTIPODOCValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVTIPODOC];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetTIPODOCValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVTIPODOC] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetTIPOLIQValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVTIPOLIQ];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldTIPOLIQValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVTIPOLIQ];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetTIPOLIQValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVTIPOLIQ] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetFECHAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVFECHA];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldFECHAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVFECHA];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetFECHAValue(const aValue: DateTime);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVFECHA] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetFECHALIQValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVFECHALIQ];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldFECHALIQValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVFECHALIQ];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetFECHALIQValue(const aValue: DateTime);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVFECHALIQ] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetEMISORValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVEMISOR];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldEMISORValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVEMISOR];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetEMISORValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVEMISOR] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetRECEPTORValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVRECEPTOR];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldRECEPTORValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVRECEPTOR];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetRECEPTORValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVRECEPTOR] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetDPTOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVDPTO];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldDPTOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVDPTO];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetDPTOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVDPTO] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetCENTROValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVCENTRO];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldCENTROValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVCENTRO];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetCENTROValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVCENTRO] := aValue;
end;

function TRDX_CABINVBusinessProcessorRules.GetFECHA_CARGAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVFECHA_CARGA];
end;

function TRDX_CABINVBusinessProcessorRules.GetOldFECHA_CARGAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_RDX_CABINVFECHA_CARGA];
end;

procedure TRDX_CABINVBusinessProcessorRules.SetFECHA_CARGAValue(const aValue: DateTime);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_RDX_CABINVFECHA_CARGA] := aValue;
end;


initialization
  RegisterBusinessProcessorRules(RID_RDX_CANTINVDelta, TRDX_CANTINVBusinessProcessorRules);
  RegisterBusinessProcessorRules(RID_RDX_LININVDelta, TRDX_LININVBusinessProcessorRules);
  RegisterBusinessProcessorRules(RID_RDX_CABINVDelta, TRDX_CABINVBusinessProcessorRules);

end.
