Primera subida de reservas de articulos

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@564 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-09-04 11:46:32 +00:00
parent 8671f38ec2
commit e2264229df
13 changed files with 275 additions and 87 deletions

View File

@ -18,7 +18,6 @@ type
function Trasladar(AInventario : IBizInventario; Todos: Boolean): Boolean; function Trasladar(AInventario : IBizInventario; Todos: Boolean): Boolean;
// procedure RecibirArticulos(Const APedido: IBizPedidoProveedor; Const CodigoAlmacenDes: Integer); overload; // procedure RecibirArticulos(Const APedido: IBizPedidoProveedor; Const CodigoAlmacenDes: Integer); overload;
// procedure RecibirPedidos(Const CodigoAlmacenDes: Integer); // procedure RecibirPedidos(Const CodigoAlmacenDes: Integer);
procedure Reservar(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
function Liberar(AInventario : IBizInventario): Boolean; function Liberar(AInventario : IBizInventario): Boolean;
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
@ -38,6 +37,7 @@ type
procedure EntradaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer); procedure EntradaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
procedure SalidaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer); procedure SalidaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer);
procedure TrasladarArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; Const CodigoAlmacenDestino: Integer); procedure TrasladarArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; Const CodigoAlmacenDestino: Integer);
procedure ReservarArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; Const CodigoAlmacenDestino: Integer);
function EntradaPedido(AInventario: IBizInventario; APedido: IBizPedidoProveedor; ADetalles: IDAStronglyTypedDataTable; var ADetallesFinal: IBizInventario): Boolean; function EntradaPedido(AInventario: IBizInventario; APedido: IBizPedidoProveedor; ADetalles: IDAStronglyTypedDataTable; var ADetallesFinal: IBizInventario): Boolean;
function SalidaAlbaran(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; ADetalles: IDAStronglyTypedDataTable): Boolean; function SalidaAlbaran(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; ADetalles: IDAStronglyTypedDataTable): Boolean;
@ -73,6 +73,7 @@ type
function Liberar(AInventario : IBizInventario; Todos: Boolean): Boolean; overload; function Liberar(AInventario : IBizInventario; Todos: Boolean): Boolean; overload;
function EntradaSalidaArticulos(AArticulos, AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; overload; function EntradaSalidaArticulos(AArticulos, AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; overload;
function ReservarArticulos(AArticulos, AInventario : IBizInventario): Boolean;
procedure Copiar(AArticulos: IBizInventario; ADetalles: IDAStronglyTypedDataTable; AInventario: IBizInventario); overload; procedure Copiar(AArticulos: IBizInventario; ADetalles: IDAStronglyTypedDataTable; AInventario: IBizInventario); overload;
function GuardarMovimientos(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean; function GuardarMovimientos(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
@ -124,9 +125,9 @@ type
procedure EntradaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer); procedure EntradaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
procedure SalidaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer); procedure SalidaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer);
procedure TrasladarArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; Const CodigoAlmacenDestino: Integer); procedure TrasladarArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; Const CodigoAlmacenDestino: Integer);
procedure ReservarArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; Const CodigoAlmacenDestino: Integer);
function EntradaPedido(AInventario: IBizInventario; APedido: IBizPedidoProveedor; ADetalles: IDAStronglyTypedDataTable; var ADetallesFinal: IBizInventario): Boolean; function EntradaPedido(AInventario: IBizInventario; APedido: IBizPedidoProveedor; ADetalles: IDAStronglyTypedDataTable; var ADetallesFinal: IBizInventario): Boolean;
function SalidaAlbaran(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; ADetalles: IDAStronglyTypedDataTable): Boolean; function SalidaAlbaran(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; ADetalles: IDAStronglyTypedDataTable): Boolean;
procedure Reservar(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String); procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String);
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
@ -172,7 +173,7 @@ begin
AArticulosSeleccionados := FArticulosController.ElegirArticulos(FArticulosController.BuscarInventariables, '', True); AArticulosSeleccionados := FArticulosController.ElegirArticulos(FArticulosController.BuscarInventariables, '', True);
end; end;
tSalidaLibre, tTraslado: begin tSalidaLibre, tTraslado, tReserva: begin
//IBizInventario //IBizInventario
AArticulosSeleccionados := ElegirArticulos(Buscar(AArticulos.IDAlmacenOrigen), '', True); AArticulosSeleccionados := ElegirArticulos(Buscar(AArticulos.IDAlmacenOrigen), '', True);
end; end;
@ -466,7 +467,7 @@ begin
AArticulos.DataTable.Post; AArticulos.DataTable.Post;
case AArticulos.TipoMovimiento of case AArticulos.TipoMovimiento of
tSalidaLibre, tSalidaAlbaranCliente, tTraslado: tSalidaLibre, tSalidaAlbaranCliente, tTraslado, tReserva:
begin begin
Result := ValidarCantidades(AArticulos); Result := ValidarCantidades(AArticulos);
if not Result then if not Result then
@ -732,20 +733,37 @@ begin
// //
end; end;
procedure TInventarioController.Reservar(AInventario: IBizInventario; const CodigoAlmacenDestino: Integer); function TInventarioController.ReservarArticulos(AArticulos, AInventario: IBizInventario): Boolean;
begin
Result := False;
if not Assigned(AArticulos) then
Exit;
if not AArticulos.DataTable.Active then
AArticulos.DataTable.Active := True;
Result := Ver(AArticulos, AInventario);
end;
procedure TInventarioController.ReservarArticulosLibre(AInventario: IBizInventario; const CodigoAlmacenOrigen,
CodigoAlmacenDestino: Integer);
var var
AArticulos: IBizInventario; AArticulos: IBizInventario;
begin begin
try if (CodigoAlmacenOrigen <> CodigoAlmacenDestino) then
AArticulos := Buscar(ID_NULO); begin
try
AArticulos := Buscar(ID_NULO);
//Se queda en la clase de negocio para así todos y cada uno de los artículos que //Se queda en la clase de negocio para así todos y cada uno de los artículos que
//se agreguen se asigne automáticamente el codigo de almacen destino en OnNewRecord //se agreguen se asigne automáticamente el codigo de almacen destino en OnNewRecord
// AArticulos.TipoMovimiento := tEntradaLibre; AArticulos.TipoMovimiento := tReserva;
// AArticulos.IDAlmacenDestino := CodigoAlmacenDestino; AArticulos.IDAlmacenOrigen := CodigoAlmacenOrigen;
EntradaSalidaArticulos(AArticulos, AInventario); AArticulos.IDAlmacenDestino := CodigoAlmacenDestino;
finally ReservarArticulos(AArticulos, AInventario);
AArticulos := Nil; finally
AArticulos := Nil;
end;
end; end;
end; end;
@ -870,17 +888,20 @@ procedure TInventarioController.TrasladarArticulosLibre(AInventario: IBizInventa
var var
AArticulos: IBizInventario; AArticulos: IBizInventario;
begin begin
try if (CodigoAlmacenOrigen <> CodigoAlmacenDestino) then
AArticulos := Buscar(ID_NULO); begin
try
AArticulos := Buscar(ID_NULO);
//Se queda en la clase de negocio para así todos y cada uno de los artículos que //Se queda en la clase de negocio para así todos y cada uno de los artículos que
//se agreguen se asigne automáticamente el codigo de almacen destino en OnNewRecord //se agreguen se asigne automáticamente el codigo de almacen destino en OnNewRecord
AArticulos.TipoMovimiento := tTraslado; AArticulos.TipoMovimiento := tTraslado;
AArticulos.IDAlmacenOrigen := CodigoAlmacenOrigen; AArticulos.IDAlmacenOrigen := CodigoAlmacenOrigen;
AArticulos.IDAlmacenDestino := CodigoAlmacenDestino; AArticulos.IDAlmacenDestino := CodigoAlmacenDestino;
EntradaSalidaArticulos(AArticulos, AInventario); EntradaSalidaArticulos(AArticulos, AInventario);
finally finally
AArticulos := Nil; AArticulos := Nil;
end;
end; end;
end; end;
@ -1057,7 +1078,7 @@ begin
ShowHourglassCursor; ShowHourglassCursor;
try try
case AArticulos.TipoMovimiento of case AArticulos.TipoMovimiento of
tEntradaLibre, tSalidaLibre, tTraslado: Result := GuardarMovimientos(AArticulos, FechaMovimiento, CausaMovimiento); tEntradaLibre, tSalidaLibre, tTraslado, tReserva: Result := GuardarMovimientos(AArticulos, FechaMovimiento, CausaMovimiento);
tSalidaAlbaranCliente : begin tSalidaAlbaranCliente : begin
AArticulos.DataTable.CancelUpdates; AArticulos.DataTable.CancelUpdates;
Result := True; Result := True;
@ -1097,6 +1118,10 @@ begin
case AArticulos.TipoMovimiento of case AArticulos.TipoMovimiento of
tEntradaLibre: AArticulos.TIPO := CTE_TIPO_ENTRADA; tEntradaLibre: AArticulos.TIPO := CTE_TIPO_ENTRADA;
tSalidaLibre, tTraslado: AArticulos.TIPO := CTE_TIPO_SALIDA; tSalidaLibre, tTraslado: AArticulos.TIPO := CTE_TIPO_SALIDA;
tReserva: begin
AArticulos.TIPO := CTE_TIPO_RESERVA;
AArticulos.ID_ALMACEN_RESERVA := AArticulos.IDAlmacenDestino;
end;
end; end;
Post; Post;

View File

@ -244,6 +244,10 @@ inherited DataModuleInventario: TDataModuleInventario
Size = 1 Size = 1
DisplayLabel = 'INVENTARIO_TIPO' DisplayLabel = 'INVENTARIO_TIPO'
DictionaryEntry = 'INVENTARIO_TIPO' DictionaryEntry = 'INVENTARIO_TIPO'
end
item
Name = 'ID_ALMACEN_RESERVA'
DataType = datInteger
end> end>
Params = <> Params = <>
StreamingOptions = [soDisableEventsWhileStreaming] StreamingOptions = [soDisableEventsWhileStreaming]

View File

@ -9,6 +9,7 @@
<Projects Include="..\..\Cliente\FactuGES.dproj" /> <Projects Include="..\..\Cliente\FactuGES.dproj" />
<Projects Include="..\..\GUIBase\GUIBase.dproj" /> <Projects Include="..\..\GUIBase\GUIBase.dproj" />
<Projects Include="..\..\Servidor\FactuGES_Server.dproj" /> <Projects Include="..\..\Servidor\FactuGES_Server.dproj" />
<Projects Include="..\Albaranes de proveedor\Controller\AlbaranesProveedor_controller.dproj" />
<Projects Include="..\Articulos\Views\Articulos_view.dproj" /> <Projects Include="..\Articulos\Views\Articulos_view.dproj" />
<Projects Include="..\Contactos\Views\Contactos_view.dproj" /> <Projects Include="..\Contactos\Views\Contactos_view.dproj" />
<Projects Include="..\Obras\Controller\Obras_controller.dproj" /> <Projects Include="..\Obras\Controller\Obras_controller.dproj" />
@ -151,14 +152,23 @@
<Target Name="Obras_controller:Make"> <Target Name="Obras_controller:Make">
<MSBuild Projects="..\Obras\Controller\Obras_controller.dproj" Targets="Make" /> <MSBuild Projects="..\Obras\Controller\Obras_controller.dproj" Targets="Make" />
</Target> </Target>
<Target Name="AlbaranesProveedor_controller">
<MSBuild Projects="..\Albaranes de proveedor\Controller\AlbaranesProveedor_controller.dproj" Targets="" />
</Target>
<Target Name="AlbaranesProveedor_controller:Clean">
<MSBuild Projects="..\Albaranes de proveedor\Controller\AlbaranesProveedor_controller.dproj" Targets="Clean" />
</Target>
<Target Name="AlbaranesProveedor_controller:Make">
<MSBuild Projects="..\Albaranes de proveedor\Controller\AlbaranesProveedor_controller.dproj" Targets="Make" />
</Target>
<Target Name="Build"> <Target Name="Build">
<CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_view;Inventario_model;Inventario_data;Inventario_controller;PedProv_AlbProv_relation;Inventario_view;Inventario_plugin;FactuGES;FactuGES_Server;Obras_controller" /> <CallTarget Targets="Base;GUIBase;ApplicationBase;Contactos_view;Articulos_view;Inventario_model;Inventario_data;Inventario_controller;PedProv_AlbProv_relation;Inventario_view;Inventario_plugin;FactuGES;FactuGES_Server;Obras_controller;AlbaranesProveedor_controller" />
</Target> </Target>
<Target Name="Clean"> <Target Name="Clean">
<CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_view:Clean;Inventario_model:Clean;Inventario_data:Clean;Inventario_controller:Clean;PedProv_AlbProv_relation:Clean;Inventario_view:Clean;Inventario_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;Obras_controller:Clean" /> <CallTarget Targets="Base:Clean;GUIBase:Clean;ApplicationBase:Clean;Contactos_view:Clean;Articulos_view:Clean;Inventario_model:Clean;Inventario_data:Clean;Inventario_controller:Clean;PedProv_AlbProv_relation:Clean;Inventario_view:Clean;Inventario_plugin:Clean;FactuGES:Clean;FactuGES_Server:Clean;Obras_controller:Clean;AlbaranesProveedor_controller:Clean" />
</Target> </Target>
<Target Name="Make"> <Target Name="Make">
<CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_view:Make;Inventario_model:Make;Inventario_data:Make;Inventario_controller:Make;PedProv_AlbProv_relation:Make;Inventario_view:Make;Inventario_plugin:Make;FactuGES:Make;FactuGES_Server:Make;Obras_controller:Make" /> <CallTarget Targets="Base:Make;GUIBase:Make;ApplicationBase:Make;Contactos_view:Make;Articulos_view:Make;Inventario_model:Make;Inventario_data:Make;Inventario_controller:Make;PedProv_AlbProv_relation:Make;Inventario_view:Make;Inventario_plugin:Make;FactuGES:Make;FactuGES_Server:Make;Obras_controller:Make;AlbaranesProveedor_controller:Make" />
</Target> </Target>
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" /> <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project> </Project>

View File

@ -3,14 +3,14 @@ unit schInventarioClient_Intf;
interface interface
uses uses
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
const const
{ Data table rules ids { Data table rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_Inventario = '{EF34850B-0D51-4B0C-8CD5-4C9DD0CEA30A}'; RID_Inventario = '{D1DF74C9-3CDA-4909-AE85-3CE5B811364D}';
RID_DetalleReservas = '{B4EFAB5C-C1A7-4932-991F-C6641A5456CD}'; RID_DetalleReservas = '{ECE1496D-C7C9-432E-955D-3034C7D1B03E}';
{ Data table names } { Data table names }
nme_Inventario = 'Inventario'; nme_Inventario = 'Inventario';
@ -34,6 +34,7 @@ const
fld_InventarioFECHA_MOVIMIENTO = 'FECHA_MOVIMIENTO'; fld_InventarioFECHA_MOVIMIENTO = 'FECHA_MOVIMIENTO';
fld_InventarioCAUSA = 'CAUSA'; fld_InventarioCAUSA = 'CAUSA';
fld_InventarioTIPO = 'TIPO'; fld_InventarioTIPO = 'TIPO';
fld_InventarioID_ALMACEN_RESERVA = 'ID_ALMACEN_RESERVA';
{ Inventario field indexes } { Inventario field indexes }
idx_InventarioID_ALMACEN = 0; idx_InventarioID_ALMACEN = 0;
@ -53,6 +54,7 @@ const
idx_InventarioFECHA_MOVIMIENTO = 14; idx_InventarioFECHA_MOVIMIENTO = 14;
idx_InventarioCAUSA = 15; idx_InventarioCAUSA = 15;
idx_InventarioTIPO = 16; idx_InventarioTIPO = 16;
idx_InventarioID_ALMACEN_RESERVA = 17;
{ DetalleReservas fields } { DetalleReservas fields }
fld_DetalleReservasID_ALB = 'ID_ALB'; fld_DetalleReservasID_ALB = 'ID_ALB';
@ -91,7 +93,7 @@ const
type type
{ IInventario } { IInventario }
IInventario = interface(IDAStronglyTypedDataTable) IInventario = interface(IDAStronglyTypedDataTable)
['{42DB1B40-71E1-454F-93DC-E35E6FE3EEE1}'] ['{A64740C9-B495-4BD6-880F-C09A714F35F9}']
{ Property getters and setters } { Property getters and setters }
function GetID_ALMACENValue: Integer; function GetID_ALMACENValue: Integer;
procedure SetID_ALMACENValue(const aValue: Integer); procedure SetID_ALMACENValue(const aValue: Integer);
@ -161,6 +163,10 @@ type
procedure SetTIPOValue(const aValue: String); procedure SetTIPOValue(const aValue: String);
function GetTIPOIsNull: Boolean; function GetTIPOIsNull: Boolean;
procedure SetTIPOIsNull(const aValue: Boolean); procedure SetTIPOIsNull(const aValue: Boolean);
function GetID_ALMACEN_RESERVAValue: Integer;
procedure SetID_ALMACEN_RESERVAValue(const aValue: Integer);
function GetID_ALMACEN_RESERVAIsNull: Boolean;
procedure SetID_ALMACEN_RESERVAIsNull(const aValue: Boolean);
{ Properties } { Properties }
@ -198,10 +204,12 @@ type
property CAUSAIsNull: Boolean read GetCAUSAIsNull write SetCAUSAIsNull; property CAUSAIsNull: Boolean read GetCAUSAIsNull write SetCAUSAIsNull;
property TIPO: String read GetTIPOValue write SetTIPOValue; property TIPO: String read GetTIPOValue write SetTIPOValue;
property TIPOIsNull: Boolean read GetTIPOIsNull write SetTIPOIsNull; property TIPOIsNull: Boolean read GetTIPOIsNull write SetTIPOIsNull;
property ID_ALMACEN_RESERVA: Integer read GetID_ALMACEN_RESERVAValue write SetID_ALMACEN_RESERVAValue;
property ID_ALMACEN_RESERVAIsNull: Boolean read GetID_ALMACEN_RESERVAIsNull write SetID_ALMACEN_RESERVAIsNull;
end; end;
{ TInventarioDataTableRules } { TInventarioDataTableRules }
TInventarioDataTableRules = class(TIntfObjectDADataTableRules, IInventario) TInventarioDataTableRules = class(TDADataTableRules, IInventario)
private private
protected protected
{ Property getters and setters } { Property getters and setters }
@ -273,6 +281,10 @@ type
procedure SetTIPOValue(const aValue: String); virtual; procedure SetTIPOValue(const aValue: String); virtual;
function GetTIPOIsNull: Boolean; virtual; function GetTIPOIsNull: Boolean; virtual;
procedure SetTIPOIsNull(const aValue: Boolean); virtual; procedure SetTIPOIsNull(const aValue: Boolean); virtual;
function GetID_ALMACEN_RESERVAValue: Integer; virtual;
procedure SetID_ALMACEN_RESERVAValue(const aValue: Integer); virtual;
function GetID_ALMACEN_RESERVAIsNull: Boolean; virtual;
procedure SetID_ALMACEN_RESERVAIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID_ALMACEN: Integer read GetID_ALMACENValue write SetID_ALMACENValue; property ID_ALMACEN: Integer read GetID_ALMACENValue write SetID_ALMACENValue;
@ -309,6 +321,8 @@ type
property CAUSAIsNull: Boolean read GetCAUSAIsNull write SetCAUSAIsNull; property CAUSAIsNull: Boolean read GetCAUSAIsNull write SetCAUSAIsNull;
property TIPO: String read GetTIPOValue write SetTIPOValue; property TIPO: String read GetTIPOValue write SetTIPOValue;
property TIPOIsNull: Boolean read GetTIPOIsNull write SetTIPOIsNull; property TIPOIsNull: Boolean read GetTIPOIsNull write SetTIPOIsNull;
property ID_ALMACEN_RESERVA: Integer read GetID_ALMACEN_RESERVAValue write SetID_ALMACEN_RESERVAValue;
property ID_ALMACEN_RESERVAIsNull: Boolean read GetID_ALMACEN_RESERVAIsNull write SetID_ALMACEN_RESERVAIsNull;
public public
constructor Create(aDataTable: TDADataTable); override; constructor Create(aDataTable: TDADataTable); override;
@ -318,7 +332,7 @@ type
{ IDetalleReservas } { IDetalleReservas }
IDetalleReservas = interface(IDAStronglyTypedDataTable) IDetalleReservas = interface(IDAStronglyTypedDataTable)
['{BFD1131A-A0B0-4AA4-B8A0-84D8F5D873EF}'] ['{1FB20B44-1A59-409F-A614-17754E6C10A9}']
{ Property getters and setters } { Property getters and setters }
function GetID_ALBValue: Integer; function GetID_ALBValue: Integer;
procedure SetID_ALBValue(const aValue: Integer); procedure SetID_ALBValue(const aValue: Integer);
@ -416,7 +430,7 @@ type
end; end;
{ TDetalleReservasDataTableRules } { TDetalleReservasDataTableRules }
TDetalleReservasDataTableRules = class(TIntfObjectDADataTableRules, IDetalleReservas) TDetalleReservasDataTableRules = class(TDADataTableRules, IDetalleReservas)
private private
protected protected
{ Property getters and setters } { Property getters and setters }
@ -891,6 +905,27 @@ begin
DataTable.Fields[idx_InventarioTIPO].AsVariant := Null; DataTable.Fields[idx_InventarioTIPO].AsVariant := Null;
end; end;
function TInventarioDataTableRules.GetID_ALMACEN_RESERVAValue: Integer;
begin
result := DataTable.Fields[idx_InventarioID_ALMACEN_RESERVA].AsInteger;
end;
procedure TInventarioDataTableRules.SetID_ALMACEN_RESERVAValue(const aValue: Integer);
begin
DataTable.Fields[idx_InventarioID_ALMACEN_RESERVA].AsInteger := aValue;
end;
function TInventarioDataTableRules.GetID_ALMACEN_RESERVAIsNull: boolean;
begin
result := DataTable.Fields[idx_InventarioID_ALMACEN_RESERVA].IsNull;
end;
procedure TInventarioDataTableRules.SetID_ALMACEN_RESERVAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_InventarioID_ALMACEN_RESERVA].AsVariant := Null;
end;
{ TDetalleReservasDataTableRules } { TDetalleReservasDataTableRules }
constructor TDetalleReservasDataTableRules.Create(aDataTable: TDADataTable); constructor TDetalleReservasDataTableRules.Create(aDataTable: TDADataTable);

View File

@ -9,13 +9,13 @@ const
{ Delta rules ids { Delta rules ids
Feel free to change them to something more human readable Feel free to change them to something more human readable
but make sure they are unique in the context of your application } but make sure they are unique in the context of your application }
RID_InventarioDelta = '{44A696E0-2F61-4AFE-9226-6DC8AEC03305}'; RID_InventarioDelta = '{1E24258E-A81B-4308-BBB0-A5E5B4C6F6E7}';
RID_DetalleReservasDelta = '{44070FBD-E2B5-4D2E-AE8F-5AA97849CBA6}'; RID_DetalleReservasDelta = '{6BD6D070-EEFF-4BA9-B4AE-9FDEAB2B569C}';
type type
{ IInventarioDelta } { IInventarioDelta }
IInventarioDelta = interface(IInventario) IInventarioDelta = interface(IInventario)
['{44A696E0-2F61-4AFE-9226-6DC8AEC03305}'] ['{1E24258E-A81B-4308-BBB0-A5E5B4C6F6E7}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_ALMACENValue : Integer; function GetOldID_ALMACENValue : Integer;
function GetOldID_ARTICULOValue : Integer; function GetOldID_ARTICULOValue : Integer;
@ -34,6 +34,7 @@ type
function GetOldFECHA_MOVIMIENTOValue : DateTime; function GetOldFECHA_MOVIMIENTOValue : DateTime;
function GetOldCAUSAValue : String; function GetOldCAUSAValue : String;
function GetOldTIPOValue : String; function GetOldTIPOValue : String;
function GetOldID_ALMACEN_RESERVAValue : Integer;
{ Properties } { Properties }
property OldID_ALMACEN : Integer read GetOldID_ALMACENValue; property OldID_ALMACEN : Integer read GetOldID_ALMACENValue;
@ -53,6 +54,7 @@ type
property OldFECHA_MOVIMIENTO : DateTime read GetOldFECHA_MOVIMIENTOValue; property OldFECHA_MOVIMIENTO : DateTime read GetOldFECHA_MOVIMIENTOValue;
property OldCAUSA : String read GetOldCAUSAValue; property OldCAUSA : String read GetOldCAUSAValue;
property OldTIPO : String read GetOldTIPOValue; property OldTIPO : String read GetOldTIPOValue;
property OldID_ALMACEN_RESERVA : Integer read GetOldID_ALMACEN_RESERVAValue;
end; end;
{ TInventarioBusinessProcessorRules } { TInventarioBusinessProcessorRules }
@ -162,6 +164,12 @@ type
function GetOldTIPOIsNull: Boolean; virtual; function GetOldTIPOIsNull: Boolean; virtual;
procedure SetTIPOValue(const aValue: String); virtual; procedure SetTIPOValue(const aValue: String); virtual;
procedure SetTIPOIsNull(const aValue: Boolean); virtual; procedure SetTIPOIsNull(const aValue: Boolean); virtual;
function GetID_ALMACEN_RESERVAValue: Integer; virtual;
function GetID_ALMACEN_RESERVAIsNull: Boolean; virtual;
function GetOldID_ALMACEN_RESERVAValue: Integer; virtual;
function GetOldID_ALMACEN_RESERVAIsNull: Boolean; virtual;
procedure SetID_ALMACEN_RESERVAValue(const aValue: Integer); virtual;
procedure SetID_ALMACEN_RESERVAIsNull(const aValue: Boolean); virtual;
{ Properties } { Properties }
property ID_ALMACEN : Integer read GetID_ALMACENValue write SetID_ALMACENValue; property ID_ALMACEN : Integer read GetID_ALMACENValue write SetID_ALMACENValue;
@ -232,6 +240,10 @@ type
property TIPOIsNull : Boolean read GetTIPOIsNull write SetTIPOIsNull; property TIPOIsNull : Boolean read GetTIPOIsNull write SetTIPOIsNull;
property OldTIPO : String read GetOldTIPOValue; property OldTIPO : String read GetOldTIPOValue;
property OldTIPOIsNull : Boolean read GetOldTIPOIsNull; property OldTIPOIsNull : Boolean read GetOldTIPOIsNull;
property ID_ALMACEN_RESERVA : Integer read GetID_ALMACEN_RESERVAValue write SetID_ALMACEN_RESERVAValue;
property ID_ALMACEN_RESERVAIsNull : Boolean read GetID_ALMACEN_RESERVAIsNull write SetID_ALMACEN_RESERVAIsNull;
property OldID_ALMACEN_RESERVA : Integer read GetOldID_ALMACEN_RESERVAValue;
property OldID_ALMACEN_RESERVAIsNull : Boolean read GetOldID_ALMACEN_RESERVAIsNull;
public public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override; constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -241,7 +253,7 @@ type
{ IDetalleReservasDelta } { IDetalleReservasDelta }
IDetalleReservasDelta = interface(IDetalleReservas) IDetalleReservasDelta = interface(IDetalleReservas)
['{44070FBD-E2B5-4D2E-AE8F-5AA97849CBA6}'] ['{6BD6D070-EEFF-4BA9-B4AE-9FDEAB2B569C}']
{ Property getters and setters } { Property getters and setters }
function GetOldID_ALBValue : Integer; function GetOldID_ALBValue : Integer;
function GetOldID_EMPRESAValue : Integer; function GetOldID_EMPRESAValue : Integer;
@ -984,6 +996,37 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioTIPO] := Null; BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioTIPO] := Null;
end; end;
function TInventarioBusinessProcessorRules.GetID_ALMACEN_RESERVAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioID_ALMACEN_RESERVA];
end;
function TInventarioBusinessProcessorRules.GetID_ALMACEN_RESERVAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioID_ALMACEN_RESERVA]);
end;
function TInventarioBusinessProcessorRules.GetOldID_ALMACEN_RESERVAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioID_ALMACEN_RESERVA];
end;
function TInventarioBusinessProcessorRules.GetOldID_ALMACEN_RESERVAIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InventarioID_ALMACEN_RESERVA]);
end;
procedure TInventarioBusinessProcessorRules.SetID_ALMACEN_RESERVAValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioID_ALMACEN_RESERVA] := aValue;
end;
procedure TInventarioBusinessProcessorRules.SetID_ALMACEN_RESERVAIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioID_ALMACEN_RESERVA] := Null;
end;
{ TDetalleReservasBusinessProcessorRules } { TDetalleReservasBusinessProcessorRules }
constructor TDetalleReservasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); constructor TDetalleReservasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);

View File

@ -15,11 +15,13 @@ const
CTE_TIPO_ENTRADA = 'E'; CTE_TIPO_ENTRADA = 'E';
CTE_TIPO_SALIDA = 'S'; CTE_TIPO_SALIDA = 'S';
CTE_TIPO_RESERVA = 'R';
type type
TEnumTipoMovimiento = (tEntradaLibre, TEnumTipoMovimiento = (tEntradaLibre,
tSalidaLibre, tSalidaLibre,
tTraslado, tTraslado,
tReserva,
tEntradaPedidoProveedor, tEntradaPedidoProveedor,
tSalidaAlbaranCliente); tSalidaAlbaranCliente);
@ -143,7 +145,7 @@ begin
//En función del tipo de operación vamos a coger el IDAlmacenOrigen o IDAlamcenDetino //En función del tipo de operación vamos a coger el IDAlmacenOrigen o IDAlamcenDetino
Case TipoMovimiento of Case TipoMovimiento of
tEntradaLibre, tEntradaPedidoProveedor : ID_ALMACEN := IDAlmacenDestino; tEntradaLibre, tEntradaPedidoProveedor : ID_ALMACEN := IDAlmacenDestino;
tSalidaLibre, tSalidaAlbaranCliente, tTraslado : ID_ALMACEN := IDAlmacenOrigen; tSalidaLibre, tSalidaAlbaranCliente, tTraslado, tReserva : ID_ALMACEN := IDAlmacenOrigen;
End; End;
end; end;

View File

@ -29,8 +29,9 @@ object srvInventario: TsrvInventario
'DE MOVIMIENTOS INDEPENDIENTE DEL INVENTARIO PERO POR FALTA'#10' D' + 'DE MOVIMIENTOS INDEPENDIENTE DEL INVENTARIO PERO POR FALTA'#10' D' +
'E TIEMPO Y FIABILIDAD YA QUE AHORA FUNCIONA TODO, CREAMOS ESTOS ' + 'E TIEMPO Y FIABILIDAD YA QUE AHORA FUNCIONA TODO, CREAMOS ESTOS ' +
'CAMPOS FICTICIOS'#10' */'#10#10' 0 as ID, 0 as CANTIDAD, current_dat' + 'CAMPOS FICTICIOS'#10' */'#10#10' 0 as ID, 0 as CANTIDAD, current_dat' +
'e as FECHA_MOVIMIENTO, NULL as CAUSA, NULL as TIPO'#10#10#10'FROM V_INVE' + 'e as FECHA_MOVIMIENTO, NULL as CAUSA, NULL as TIPO,'#10' 0 as ID_' +
'NTARIO'#10'where {where}'#10'ORDER BY ID_ARTICULO'#10 'ALMACEN_RESERVA'#10#10#10'FROM V_INVENTARIO'#10'where {where}'#10'ORDER BY ID_AR' +
'TICULO'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = < ColumnMappings = <
item item
@ -43,7 +44,8 @@ object srvInventario: TsrvInventario
end end
item item
DatasetField = 'ALMACEN' DatasetField = 'ALMACEN'
TableField = 'ALMACEN' TableField = '<unknown>'
SQLOrigin = 'ALMACEN'
end end
item item
DatasetField = 'ID_EMPRESA' DatasetField = 'ID_EMPRESA'
@ -77,29 +79,39 @@ object srvInventario: TsrvInventario
DatasetField = 'PENDIENTE_RECEPCION' DatasetField = 'PENDIENTE_RECEPCION'
TableField = 'PENDIENTE_RECEPCION' TableField = 'PENDIENTE_RECEPCION'
end end
item
DatasetField = 'TIPO_ALMACEN'
TableField = 'TIPO_ALMACEN'
end
item item
DatasetField = 'ID' DatasetField = 'ID'
TableField = 'ID' TableField = '<unknown>'
SQLOrigin = 'ID'
end end
item item
DatasetField = 'CANTIDAD' DatasetField = 'CANTIDAD'
TableField = 'CANTIDAD' TableField = '<unknown>'
SQLOrigin = 'CANTIDAD'
end end
item item
DatasetField = 'FECHA_MOVIMIENTO' DatasetField = 'FECHA_MOVIMIENTO'
TableField = 'FECHA_MOVIMIENTO' TableField = '<unknown>'
SQLOrigin = 'FECHA_MOVIMIENTO'
end end
item item
DatasetField = 'CAUSA' DatasetField = 'CAUSA'
TableField = 'CAUSA' TableField = '<unknown>'
SQLOrigin = 'CAUSA'
end end
item item
DatasetField = 'TIPO' DatasetField = 'TIPO'
TableField = 'TIPO' TableField = '<unknown>'
SQLOrigin = 'TIPO'
end end
item item
DatasetField = 'TIPO_ALMACEN' DatasetField = 'ID_ALMACEN_RESERVA'
TableField = 'TIPO_ALMACEN' TableField = '<unknown>'
SQLOrigin = 'ID_ALMACEN_RESERVA'
end> end>
end> end>
Name = 'Inventario' Name = 'Inventario'
@ -195,6 +207,10 @@ object srvInventario: TsrvInventario
DataType = datString DataType = datString
Size = 1 Size = 1
DictionaryEntry = 'INVENTARIO_TIPO' DictionaryEntry = 'INVENTARIO_TIPO'
end
item
Name = 'ID_ALMACEN_RESERVA'
DataType = datInteger
end> end>
end end
item item
@ -369,45 +385,34 @@ object srvInventario: TsrvInventario
DataType = datAutoInc DataType = datAutoInc
GeneratorName = 'GEN_MOVIMIENTOS_ID' GeneratorName = 'GEN_MOVIMIENTOS_ID'
Value = '' Value = ''
ParamType = daptInput
end end
item item
Name = 'ID_ALMACEN' Name = 'ID_ALMACEN'
DataType = datInteger
Value = '' Value = ''
ParamType = daptInput
end end
item item
Name = 'ID_ARTICULO' Name = 'ID_ARTICULO'
DataType = datInteger
Value = '' Value = ''
ParamType = daptInput
end end
item item
Name = 'FECHA_MOVIMIENTO' Name = 'FECHA_MOVIMIENTO'
DataType = datDateTime
Value = '' Value = ''
ParamType = daptInput
end end
item item
Name = 'TIPO' Name = 'TIPO'
DataType = datString
Size = 1
Value = '' Value = ''
ParamType = daptInput
end end
item item
Name = 'CANTIDAD' Name = 'CANTIDAD'
DataType = datInteger
Value = '' Value = ''
ParamType = daptInput
end end
item item
Name = 'CAUSA' Name = 'CAUSA'
DataType = datString
Size = 2000
Value = '' Value = ''
ParamType = daptInput end
item
Name = 'ID_ALMACEN_RESERVA'
Value = ''
end> end>
Statements = < Statements = <
item item
@ -415,8 +420,9 @@ object srvInventario: TsrvInventario
TargetTable = 'MOVIMIENTOS' TargetTable = 'MOVIMIENTOS'
SQL = SQL =
'INSERT'#10' INTO MOVIMIENTOS'#10' (ID, ID_ALMACEN, ID_ARTICULO, FECH' + 'INSERT'#10' INTO MOVIMIENTOS'#10' (ID, ID_ALMACEN, ID_ARTICULO, FECH' +
'A_MOVIMIENTO, TIPO, CANTIDAD, CAUSA)'#10' VALUES'#10' (:ID, :ID_ALMA' + 'A_MOVIMIENTO, TIPO, CANTIDAD, CAUSA, ID_ALMACEN_RESERVA)'#10' VALUE' +
'CEN, :ID_ARTICULO, :FECHA_MOVIMIENTO, :TIPO, :CANTIDAD, :CAUSA)' 'S'#10' (:ID, :ID_ALMACEN, :ID_ARTICULO, :FECHA_MOVIMIENTO, :TIPO,' +
' :CANTIDAD, :CAUSA, :ID_ALMACEN_RESERVA)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>
@ -468,6 +474,10 @@ object srvInventario: TsrvInventario
Name = 'CAUSA' Name = 'CAUSA'
Value = '' Value = ''
end end
item
Name = 'ID_ALMACEN_RESERVA'
Value = ''
end
item item
Name = 'OLD_ID' Name = 'OLD_ID'
Value = '' Value = ''
@ -480,7 +490,8 @@ object srvInventario: TsrvInventario
'UPDATE MOVIMIENTOS'#10' SET '#10' ID = :ID,'#10' ID_ALMACEN = :ID_ALM' + 'UPDATE MOVIMIENTOS'#10' SET '#10' ID = :ID,'#10' ID_ALMACEN = :ID_ALM' +
'ACEN,'#10' ID_ARTICULO = :ID_ARTICULO,'#10' FECHA_MOVIMIENTO = :FE' + 'ACEN,'#10' ID_ARTICULO = :ID_ARTICULO,'#10' FECHA_MOVIMIENTO = :FE' +
'CHA_MOVIMIENTO,'#10' TIPO = :TIPO,'#10' CANTIDAD = :CANTIDAD,'#10' ' + 'CHA_MOVIMIENTO,'#10' TIPO = :TIPO,'#10' CANTIDAD = :CANTIDAD,'#10' ' +
'CAUSA = :CAUSA'#10' WHERE'#10' (ID = :OLD_ID)'#10 'CAUSA = :CAUSA,'#10' ID_ALMACEN_RESERVA = :ID_ALMACEN_RESERVA'#10' W' +
'HERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = <> ColumnMappings = <>
end> end>

View File

@ -46,11 +46,11 @@
<DelphiCompile Include="Inventario_view.dpk"> <DelphiCompile Include="Inventario_view.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\..\Lib\Articulos_view.dcp" /> <DCCReference Include="..\Articulos_view.dcp" />
<DCCReference Include="..\..\Lib\GUIBase.dcp" /> <DCCReference Include="..\GUIBase.dcp" />
<DCCReference Include="..\..\Lib\Inventario_controller.dcp" /> <DCCReference Include="..\Inventario_controller.dcp" />
<DCCReference Include="..\..\Lib\Inventario_model.dcp" /> <DCCReference Include="..\Inventario_model.dcp" />
<DCCReference Include="..\..\Lib\PedProv_AlbProv_relation.dcp" /> <DCCReference Include="..\PedProv_AlbProv_relation.dcp" />
<DCCReference Include="uEditorDetalleReservas.pas"> <DCCReference Include="uEditorDetalleReservas.pas">
<Form>fEditorDetalleReservas</Form> <Form>fEditorDetalleReservas</Form>
<DesignClass>TfEditorDetalleReservas</DesignClass> <DesignClass>TfEditorDetalleReservas</DesignClass>

View File

@ -208,7 +208,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 1 TabOrder = 1
Height = 21 Height = 21
Width = 1086 Width = 1727
end end
end end
object pnlEntradaPedido: TTBXDockablePanel object pnlEntradaPedido: TTBXDockablePanel
@ -356,10 +356,30 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
Width = 773 Width = 773
ExplicitWidth = 773 ExplicitWidth = 773
inherited txtFiltroTodo: TcxTextEdit inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 676 ExplicitWidth = 676
Width = 676 Width = 676
end end
inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited edtFechaFinFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
end
inherited eLista: TcxComboBox inherited eLista: TcxComboBox
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 380 ExplicitWidth = 380
Width = 380 Width = 380
end end

View File

@ -262,6 +262,20 @@ begin
FTitulo := FTitulo + '" hasta "' + AObraDestino.NOMBRE + '"'; FTitulo := FTitulo + '" hasta "' + AObraDestino.NOMBRE + '"';
actGuardarCerrar.Caption := 'Realizar el traslado de los artículos'; actGuardarCerrar.Caption := 'Realizar el traslado de los artículos';
end; end;
tReserva:
begin
if AAlmacenOrigen.RecordCount > 0 then
FTitulo := 'Reserva de artículos de "' + AAlmacenOrigen.NOMBRE
else
FTitulo := 'Reserva de artículos de "' + AObraOrigen.NOMBRE;
if AAlmacenDestino.RecordCount > 0 then
FTitulo := FTitulo + '" para "' + AAlmacenDestino.NOMBRE + '"'
else
FTitulo := FTitulo + '" para "' + AObraDestino.NOMBRE + '"';
actGuardarCerrar.Caption := 'Realizar la reserva de los artículos';
Label2.Caption := 'Fecha de la reserva:';
end;
end; end;
finally finally
AAlmacenOrigen := Nil; AAlmacenOrigen := Nil;
@ -272,7 +286,7 @@ begin
//Botones de añadir y eliminar //Botones de añadir y eliminar
case FArticulos.TipoMovimiento of case FArticulos.TipoMovimiento of
tEntradaLibre, tSalidaLibre, tTraslado : tEntradaLibre, tSalidaLibre, tTraslado, tReserva :
begin begin
pnlMovimiento.Visible := True; pnlMovimiento.Visible := True;
eFechaMovimiento.Date := Date; eFechaMovimiento.Date := Date;

View File

@ -50,7 +50,7 @@ inherited fEditorInventario: TfEditorInventario
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741 000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000 4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000 80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
17110000171101CA26F33F000002E249444154484BB596EF4B535118C7E7BBDE 17100000171001186111DB000002E249444154484BB596EF4B535118C7E7BBDE
F43F44D12B0982FE808892B437BDCB428B2CB04C4C1B16A312417AE10FCA5F69 F43F44D12B0982FE808892B437BDCB428B2CB04C4C1B16A312417AE10FCA5F69
12A5D39A59B417196413CD10225743A7A9ED8777FEDAD4E9DDA64DC7FCD5B73D 12A5D39A59B417196413CD10225743A7A9ED8777FEDAD4E9DDA64DC7FCD5B73D
C78ECD7BEE9C825D78B8EC9EBBCFE73CCF79CEBD370180E6BF1E4C706BE05024 C78ECD7BEE9C825D78B8EC9EBBCFE73CCF79CEBD370180E6BF1E4C706BE05024
@ -210,21 +210,37 @@ inherited fEditorInventario: TfEditorInventario
Width = 669 Width = 669
ExplicitWidth = 669 ExplicitWidth = 669
inherited txtFiltroTodo: TcxTextEdit inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 572 ExplicitWidth = 572
Width = 572 Width = 572
end end
inherited edtFechaIniFiltro: TcxDateEdit inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 246 ExplicitWidth = 246
Width = 246 Width = 246
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 350 Left = 350
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 350 ExplicitLeft = 350
ExplicitWidth = 205 ExplicitWidth = 205
Width = 205 Width = 205
end end
inherited eLista: TcxComboBox inherited eLista: TcxComboBox
Left = 592 Left = 592
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 592 ExplicitLeft = 592
ExplicitWidth = 67 ExplicitWidth = 67
Width = 67 Width = 67
@ -311,7 +327,6 @@ inherited fEditorInventario: TfEditorInventario
object actReservar: TAction object actReservar: TAction
Category = 'Logistica' Category = 'Logistica'
Caption = 'Reservar' Caption = 'Reservar'
Enabled = False
ImageIndex = 25 ImageIndex = 25
OnExecute = actReservarExecute OnExecute = actReservarExecute
end end

View File

@ -382,13 +382,22 @@ end;
procedure TfEditorInventario.actReservarExecute(Sender: TObject); procedure TfEditorInventario.actReservarExecute(Sender: TObject);
var var
IDAlmacenDestino: Integer; IDAlmacenOrigen, IDAlmacenDestino: Integer;
begin begin
IDAlmacenDestino := darIDAlmacenSeleccionado('Elija el almacén donde desea reservar el material'); if (TipoInventario = CTE_INV_ALMACEN) then
if IDAlmacenDestino <> -1 then IDAlmacenOrigen := DarIDAlmacenSeleccionado('Elija el almacén donde desea reservar el material')
else
IDAlmacenOrigen := DarIDObraSeleccionada('Elija la obra donde desea reservar el material');
if IDAlmacenOrigen <> -1 then
begin begin
FController.EntradaArticulosLibre(FInventario, IDAlmacenDestino); IDAlmacenDestino := Seleccionar('Elija el almacén/obra para el que desea reservar el material (donde irán los materiales)', tAlmacenObra);
RefrescarInterno; if IDAlmacenDestino <> -1 then
begin
FController.ReservarArticulosLibre(FInventario, IDAlmacenOrigen, IDAlmacenDestino);
RefrescarInterno;
end;
end; end;
end; end;

View File

@ -112,8 +112,6 @@ uses
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas', schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas', schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_Intf.pas',
schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas', schAlmacenesServer_Intf in '..\Modulos\Almacenes\Model\schAlmacenesServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas', schAlbaranesProveedorClient_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorClient_Intf.pas',
schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas', schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_Intf.pas',
schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas', schArticulosClient_Intf in '..\Modulos\Articulos\Model\schArticulosClient_Intf.pas',
@ -129,7 +127,9 @@ uses
schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas', schUsuariosClient_Intf in '..\ApplicationBase\Usuarios\Model\schUsuariosClient_Intf.pas',
srvGestorDocumentos_Impl in '..\Modulos\Gestion de documentos\Servidor\srvGestorDocumentos_Impl.pas' {srvGestorDocumentos: TDataAbstractService}, srvGestorDocumentos_Impl in '..\Modulos\Gestion de documentos\Servidor\srvGestorDocumentos_Impl.pas' {srvGestorDocumentos: TDataAbstractService},
schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas', schPresupuestosClienteClient_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteClient_Intf.pas',
schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas'; schPresupuestosClienteServer_Intf in '..\Modulos\Presupuestos de cliente\Model\schPresupuestosClienteServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas';
{$R *.res} {$R *.res}
{$R ..\Servicios\RODLFile.res} {$R ..\Servicios\RODLFile.res}