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:
parent
8671f38ec2
commit
e2264229df
@ -18,7 +18,6 @@ type
|
||||
function Trasladar(AInventario : IBizInventario; Todos: Boolean): Boolean;
|
||||
// procedure RecibirArticulos(Const APedido: IBizPedidoProveedor; Const CodigoAlmacenDes: Integer); overload;
|
||||
// procedure RecibirPedidos(Const CodigoAlmacenDes: Integer);
|
||||
procedure Reservar(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
|
||||
function Liberar(AInventario : IBizInventario): Boolean;
|
||||
|
||||
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||
@ -38,6 +37,7 @@ type
|
||||
procedure EntradaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
|
||||
procedure SalidaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: 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 SalidaAlbaran(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; ADetalles: IDAStronglyTypedDataTable): Boolean;
|
||||
|
||||
@ -65,7 +65,7 @@ type
|
||||
function GetPresupuestosClienteController: IPresupuestosClienteController;
|
||||
function GetPedidosProveedorController: IPedidosProveedorController;
|
||||
procedure SetAlmacenesController(const Value: IAlmacenesController);
|
||||
procedure SetObrasController(const Value: IObrasController);
|
||||
procedure SetObrasController(const Value: IObrasController);
|
||||
procedure SetArticulosController(const Value: IArticulosInventarioController);
|
||||
procedure SetPresupuestosClienteController(const Value: IPresupuestosClienteController);
|
||||
procedure SetPedidosProveedorController(const Value: IPedidosProveedorController);
|
||||
@ -73,6 +73,7 @@ type
|
||||
function Liberar(AInventario : IBizInventario; Todos: Boolean): 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;
|
||||
function GuardarMovimientos(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
|
||||
@ -96,7 +97,7 @@ type
|
||||
|
||||
public
|
||||
property AlmacenesController: IAlmacenesController read GetAlmacenesController write SetAlmacenesController;
|
||||
property ObrasController: IObrasController read GetObrasController write SetObrasController;
|
||||
property ObrasController: IObrasController read GetObrasController write SetObrasController;
|
||||
property ArticulosController: IArticulosInventarioController read GetArticulosController write SetArticulosController;
|
||||
property PresupuestosClienteController: IPresupuestosClienteController read GetPresupuestosClienteController write SetPresupuestosClienteController;
|
||||
property PedidosProveedorController: IPedidosProveedorController read GetPedidosProveedorController write SetPedidosProveedorController;
|
||||
@ -124,9 +125,9 @@ type
|
||||
procedure EntradaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
|
||||
procedure SalidaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: 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 SalidaAlbaran(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; ADetalles: IDAStronglyTypedDataTable): Boolean;
|
||||
procedure Reservar(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
|
||||
|
||||
procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String);
|
||||
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||
@ -172,7 +173,7 @@ begin
|
||||
AArticulosSeleccionados := FArticulosController.ElegirArticulos(FArticulosController.BuscarInventariables, '', True);
|
||||
end;
|
||||
|
||||
tSalidaLibre, tTraslado: begin
|
||||
tSalidaLibre, tTraslado, tReserva: begin
|
||||
//IBizInventario
|
||||
AArticulosSeleccionados := ElegirArticulos(Buscar(AArticulos.IDAlmacenOrigen), '', True);
|
||||
end;
|
||||
@ -466,7 +467,7 @@ begin
|
||||
AArticulos.DataTable.Post;
|
||||
|
||||
case AArticulos.TipoMovimiento of
|
||||
tSalidaLibre, tSalidaAlbaranCliente, tTraslado:
|
||||
tSalidaLibre, tSalidaAlbaranCliente, tTraslado, tReserva:
|
||||
begin
|
||||
Result := ValidarCantidades(AArticulos);
|
||||
if not Result then
|
||||
@ -732,20 +733,37 @@ begin
|
||||
//
|
||||
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
|
||||
AArticulos: IBizInventario;
|
||||
begin
|
||||
try
|
||||
AArticulos := Buscar(ID_NULO);
|
||||
if (CodigoAlmacenOrigen <> CodigoAlmacenDestino) then
|
||||
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 agreguen se asigne automáticamente el codigo de almacen destino en OnNewRecord
|
||||
// AArticulos.TipoMovimiento := tEntradaLibre;
|
||||
// AArticulos.IDAlmacenDestino := CodigoAlmacenDestino;
|
||||
EntradaSalidaArticulos(AArticulos, AInventario);
|
||||
finally
|
||||
AArticulos := Nil;
|
||||
//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
|
||||
AArticulos.TipoMovimiento := tReserva;
|
||||
AArticulos.IDAlmacenOrigen := CodigoAlmacenOrigen;
|
||||
AArticulos.IDAlmacenDestino := CodigoAlmacenDestino;
|
||||
ReservarArticulos(AArticulos, AInventario);
|
||||
finally
|
||||
AArticulos := Nil;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -870,17 +888,20 @@ procedure TInventarioController.TrasladarArticulosLibre(AInventario: IBizInventa
|
||||
var
|
||||
AArticulos: IBizInventario;
|
||||
begin
|
||||
try
|
||||
AArticulos := Buscar(ID_NULO);
|
||||
if (CodigoAlmacenOrigen <> CodigoAlmacenDestino) then
|
||||
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 agreguen se asigne automáticamente el codigo de almacen destino en OnNewRecord
|
||||
AArticulos.TipoMovimiento := tTraslado;
|
||||
AArticulos.IDAlmacenOrigen := CodigoAlmacenOrigen;
|
||||
AArticulos.IDAlmacenDestino := CodigoAlmacenDestino;
|
||||
EntradaSalidaArticulos(AArticulos, AInventario);
|
||||
finally
|
||||
AArticulos := Nil;
|
||||
//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
|
||||
AArticulos.TipoMovimiento := tTraslado;
|
||||
AArticulos.IDAlmacenOrigen := CodigoAlmacenOrigen;
|
||||
AArticulos.IDAlmacenDestino := CodigoAlmacenDestino;
|
||||
EntradaSalidaArticulos(AArticulos, AInventario);
|
||||
finally
|
||||
AArticulos := Nil;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1057,7 +1078,7 @@ begin
|
||||
ShowHourglassCursor;
|
||||
try
|
||||
case AArticulos.TipoMovimiento of
|
||||
tEntradaLibre, tSalidaLibre, tTraslado: Result := GuardarMovimientos(AArticulos, FechaMovimiento, CausaMovimiento);
|
||||
tEntradaLibre, tSalidaLibre, tTraslado, tReserva: Result := GuardarMovimientos(AArticulos, FechaMovimiento, CausaMovimiento);
|
||||
tSalidaAlbaranCliente : begin
|
||||
AArticulos.DataTable.CancelUpdates;
|
||||
Result := True;
|
||||
@ -1097,6 +1118,10 @@ begin
|
||||
case AArticulos.TipoMovimiento of
|
||||
tEntradaLibre: AArticulos.TIPO := CTE_TIPO_ENTRADA;
|
||||
tSalidaLibre, tTraslado: AArticulos.TIPO := CTE_TIPO_SALIDA;
|
||||
tReserva: begin
|
||||
AArticulos.TIPO := CTE_TIPO_RESERVA;
|
||||
AArticulos.ID_ALMACEN_RESERVA := AArticulos.IDAlmacenDestino;
|
||||
end;
|
||||
end;
|
||||
|
||||
Post;
|
||||
|
||||
@ -244,6 +244,10 @@ inherited DataModuleInventario: TDataModuleInventario
|
||||
Size = 1
|
||||
DisplayLabel = 'INVENTARIO_TIPO'
|
||||
DictionaryEntry = 'INVENTARIO_TIPO'
|
||||
end
|
||||
item
|
||||
Name = 'ID_ALMACEN_RESERVA'
|
||||
DataType = datInteger
|
||||
end>
|
||||
Params = <>
|
||||
StreamingOptions = [soDisableEventsWhileStreaming]
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
<Projects Include="..\..\Cliente\FactuGES.dproj" />
|
||||
<Projects Include="..\..\GUIBase\GUIBase.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="..\Contactos\Views\Contactos_view.dproj" />
|
||||
<Projects Include="..\Obras\Controller\Obras_controller.dproj" />
|
||||
@ -151,14 +152,23 @@
|
||||
<Target Name="Obras_controller:Make">
|
||||
<MSBuild Projects="..\Obras\Controller\Obras_controller.dproj" Targets="Make" />
|
||||
</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">
|
||||
<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 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 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>
|
||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||
</Project>
|
||||
@ -3,14 +3,14 @@ unit schInventarioClient_Intf;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
||||
Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
||||
|
||||
const
|
||||
{ Data table rules ids
|
||||
Feel free to change them to something more human readable
|
||||
but make sure they are unique in the context of your application }
|
||||
RID_Inventario = '{EF34850B-0D51-4B0C-8CD5-4C9DD0CEA30A}';
|
||||
RID_DetalleReservas = '{B4EFAB5C-C1A7-4932-991F-C6641A5456CD}';
|
||||
RID_Inventario = '{D1DF74C9-3CDA-4909-AE85-3CE5B811364D}';
|
||||
RID_DetalleReservas = '{ECE1496D-C7C9-432E-955D-3034C7D1B03E}';
|
||||
|
||||
{ Data table names }
|
||||
nme_Inventario = 'Inventario';
|
||||
@ -34,6 +34,7 @@ const
|
||||
fld_InventarioFECHA_MOVIMIENTO = 'FECHA_MOVIMIENTO';
|
||||
fld_InventarioCAUSA = 'CAUSA';
|
||||
fld_InventarioTIPO = 'TIPO';
|
||||
fld_InventarioID_ALMACEN_RESERVA = 'ID_ALMACEN_RESERVA';
|
||||
|
||||
{ Inventario field indexes }
|
||||
idx_InventarioID_ALMACEN = 0;
|
||||
@ -53,6 +54,7 @@ const
|
||||
idx_InventarioFECHA_MOVIMIENTO = 14;
|
||||
idx_InventarioCAUSA = 15;
|
||||
idx_InventarioTIPO = 16;
|
||||
idx_InventarioID_ALMACEN_RESERVA = 17;
|
||||
|
||||
{ DetalleReservas fields }
|
||||
fld_DetalleReservasID_ALB = 'ID_ALB';
|
||||
@ -91,7 +93,7 @@ const
|
||||
type
|
||||
{ IInventario }
|
||||
IInventario = interface(IDAStronglyTypedDataTable)
|
||||
['{42DB1B40-71E1-454F-93DC-E35E6FE3EEE1}']
|
||||
['{A64740C9-B495-4BD6-880F-C09A714F35F9}']
|
||||
{ Property getters and setters }
|
||||
function GetID_ALMACENValue: Integer;
|
||||
procedure SetID_ALMACENValue(const aValue: Integer);
|
||||
@ -161,6 +163,10 @@ type
|
||||
procedure SetTIPOValue(const aValue: String);
|
||||
function GetTIPOIsNull: 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 }
|
||||
@ -198,10 +204,12 @@ type
|
||||
property CAUSAIsNull: Boolean read GetCAUSAIsNull write SetCAUSAIsNull;
|
||||
property TIPO: String read GetTIPOValue write SetTIPOValue;
|
||||
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;
|
||||
|
||||
{ TInventarioDataTableRules }
|
||||
TInventarioDataTableRules = class(TIntfObjectDADataTableRules, IInventario)
|
||||
TInventarioDataTableRules = class(TDADataTableRules, IInventario)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -273,6 +281,10 @@ type
|
||||
procedure SetTIPOValue(const aValue: String); virtual;
|
||||
function GetTIPOIsNull: 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 }
|
||||
property ID_ALMACEN: Integer read GetID_ALMACENValue write SetID_ALMACENValue;
|
||||
@ -309,6 +321,8 @@ type
|
||||
property CAUSAIsNull: Boolean read GetCAUSAIsNull write SetCAUSAIsNull;
|
||||
property TIPO: String read GetTIPOValue write SetTIPOValue;
|
||||
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
|
||||
constructor Create(aDataTable: TDADataTable); override;
|
||||
@ -318,7 +332,7 @@ type
|
||||
|
||||
{ IDetalleReservas }
|
||||
IDetalleReservas = interface(IDAStronglyTypedDataTable)
|
||||
['{BFD1131A-A0B0-4AA4-B8A0-84D8F5D873EF}']
|
||||
['{1FB20B44-1A59-409F-A614-17754E6C10A9}']
|
||||
{ Property getters and setters }
|
||||
function GetID_ALBValue: Integer;
|
||||
procedure SetID_ALBValue(const aValue: Integer);
|
||||
@ -416,7 +430,7 @@ type
|
||||
end;
|
||||
|
||||
{ TDetalleReservasDataTableRules }
|
||||
TDetalleReservasDataTableRules = class(TIntfObjectDADataTableRules, IDetalleReservas)
|
||||
TDetalleReservasDataTableRules = class(TDADataTableRules, IDetalleReservas)
|
||||
private
|
||||
protected
|
||||
{ Property getters and setters }
|
||||
@ -891,6 +905,27 @@ begin
|
||||
DataTable.Fields[idx_InventarioTIPO].AsVariant := Null;
|
||||
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 }
|
||||
constructor TDetalleReservasDataTableRules.Create(aDataTable: TDADataTable);
|
||||
|
||||
@ -9,13 +9,13 @@ 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 = '{44A696E0-2F61-4AFE-9226-6DC8AEC03305}';
|
||||
RID_DetalleReservasDelta = '{44070FBD-E2B5-4D2E-AE8F-5AA97849CBA6}';
|
||||
RID_InventarioDelta = '{1E24258E-A81B-4308-BBB0-A5E5B4C6F6E7}';
|
||||
RID_DetalleReservasDelta = '{6BD6D070-EEFF-4BA9-B4AE-9FDEAB2B569C}';
|
||||
|
||||
type
|
||||
{ IInventarioDelta }
|
||||
IInventarioDelta = interface(IInventario)
|
||||
['{44A696E0-2F61-4AFE-9226-6DC8AEC03305}']
|
||||
['{1E24258E-A81B-4308-BBB0-A5E5B4C6F6E7}']
|
||||
{ Property getters and setters }
|
||||
function GetOldID_ALMACENValue : Integer;
|
||||
function GetOldID_ARTICULOValue : Integer;
|
||||
@ -34,6 +34,7 @@ type
|
||||
function GetOldFECHA_MOVIMIENTOValue : DateTime;
|
||||
function GetOldCAUSAValue : String;
|
||||
function GetOldTIPOValue : String;
|
||||
function GetOldID_ALMACEN_RESERVAValue : Integer;
|
||||
|
||||
{ Properties }
|
||||
property OldID_ALMACEN : Integer read GetOldID_ALMACENValue;
|
||||
@ -53,6 +54,7 @@ type
|
||||
property OldFECHA_MOVIMIENTO : DateTime read GetOldFECHA_MOVIMIENTOValue;
|
||||
property OldCAUSA : String read GetOldCAUSAValue;
|
||||
property OldTIPO : String read GetOldTIPOValue;
|
||||
property OldID_ALMACEN_RESERVA : Integer read GetOldID_ALMACEN_RESERVAValue;
|
||||
end;
|
||||
|
||||
{ TInventarioBusinessProcessorRules }
|
||||
@ -162,6 +164,12 @@ type
|
||||
function GetOldTIPOIsNull: Boolean; virtual;
|
||||
procedure SetTIPOValue(const aValue: String); 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 }
|
||||
property ID_ALMACEN : Integer read GetID_ALMACENValue write SetID_ALMACENValue;
|
||||
@ -232,6 +240,10 @@ type
|
||||
property TIPOIsNull : Boolean read GetTIPOIsNull write SetTIPOIsNull;
|
||||
property OldTIPO : String read GetOldTIPOValue;
|
||||
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
|
||||
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
|
||||
@ -241,7 +253,7 @@ type
|
||||
|
||||
{ IDetalleReservasDelta }
|
||||
IDetalleReservasDelta = interface(IDetalleReservas)
|
||||
['{44070FBD-E2B5-4D2E-AE8F-5AA97849CBA6}']
|
||||
['{6BD6D070-EEFF-4BA9-B4AE-9FDEAB2B569C}']
|
||||
{ Property getters and setters }
|
||||
function GetOldID_ALBValue : Integer;
|
||||
function GetOldID_EMPRESAValue : Integer;
|
||||
@ -984,6 +996,37 @@ begin
|
||||
BusinessProcessor.CurrentChange.NewValueByName[fld_InventarioTIPO] := Null;
|
||||
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 }
|
||||
constructor TDetalleReservasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
||||
|
||||
@ -15,11 +15,13 @@ const
|
||||
|
||||
CTE_TIPO_ENTRADA = 'E';
|
||||
CTE_TIPO_SALIDA = 'S';
|
||||
CTE_TIPO_RESERVA = 'R';
|
||||
|
||||
type
|
||||
TEnumTipoMovimiento = (tEntradaLibre,
|
||||
tSalidaLibre,
|
||||
tTraslado,
|
||||
tReserva,
|
||||
tEntradaPedidoProveedor,
|
||||
tSalidaAlbaranCliente);
|
||||
|
||||
@ -143,7 +145,7 @@ begin
|
||||
//En función del tipo de operación vamos a coger el IDAlmacenOrigen o IDAlamcenDetino
|
||||
Case TipoMovimiento of
|
||||
tEntradaLibre, tEntradaPedidoProveedor : ID_ALMACEN := IDAlmacenDestino;
|
||||
tSalidaLibre, tSalidaAlbaranCliente, tTraslado : ID_ALMACEN := IDAlmacenOrigen;
|
||||
tSalidaLibre, tSalidaAlbaranCliente, tTraslado, tReserva : ID_ALMACEN := IDAlmacenOrigen;
|
||||
End;
|
||||
end;
|
||||
|
||||
|
||||
@ -29,8 +29,9 @@ object srvInventario: TsrvInventario
|
||||
'DE MOVIMIENTOS INDEPENDIENTE DEL INVENTARIO PERO POR FALTA'#10' D' +
|
||||
'E TIEMPO Y FIABILIDAD YA QUE AHORA FUNCIONA TODO, CREAMOS ESTOS ' +
|
||||
'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' +
|
||||
'NTARIO'#10'where {where}'#10'ORDER BY ID_ARTICULO'#10
|
||||
'e as FECHA_MOVIMIENTO, NULL as CAUSA, NULL as TIPO,'#10' 0 as ID_' +
|
||||
'ALMACEN_RESERVA'#10#10#10'FROM V_INVENTARIO'#10'where {where}'#10'ORDER BY ID_AR' +
|
||||
'TICULO'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
@ -43,7 +44,8 @@ object srvInventario: TsrvInventario
|
||||
end
|
||||
item
|
||||
DatasetField = 'ALMACEN'
|
||||
TableField = 'ALMACEN'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'ALMACEN'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID_EMPRESA'
|
||||
@ -77,29 +79,39 @@ object srvInventario: TsrvInventario
|
||||
DatasetField = 'PENDIENTE_RECEPCION'
|
||||
TableField = 'PENDIENTE_RECEPCION'
|
||||
end
|
||||
item
|
||||
DatasetField = 'TIPO_ALMACEN'
|
||||
TableField = 'TIPO_ALMACEN'
|
||||
end
|
||||
item
|
||||
DatasetField = 'ID'
|
||||
TableField = 'ID'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'ID'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CANTIDAD'
|
||||
TableField = 'CANTIDAD'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'CANTIDAD'
|
||||
end
|
||||
item
|
||||
DatasetField = 'FECHA_MOVIMIENTO'
|
||||
TableField = 'FECHA_MOVIMIENTO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'FECHA_MOVIMIENTO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'CAUSA'
|
||||
TableField = 'CAUSA'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'CAUSA'
|
||||
end
|
||||
item
|
||||
DatasetField = 'TIPO'
|
||||
TableField = 'TIPO'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'TIPO'
|
||||
end
|
||||
item
|
||||
DatasetField = 'TIPO_ALMACEN'
|
||||
TableField = 'TIPO_ALMACEN'
|
||||
DatasetField = 'ID_ALMACEN_RESERVA'
|
||||
TableField = '<unknown>'
|
||||
SQLOrigin = 'ID_ALMACEN_RESERVA'
|
||||
end>
|
||||
end>
|
||||
Name = 'Inventario'
|
||||
@ -195,6 +207,10 @@ object srvInventario: TsrvInventario
|
||||
DataType = datString
|
||||
Size = 1
|
||||
DictionaryEntry = 'INVENTARIO_TIPO'
|
||||
end
|
||||
item
|
||||
Name = 'ID_ALMACEN_RESERVA'
|
||||
DataType = datInteger
|
||||
end>
|
||||
end
|
||||
item
|
||||
@ -369,45 +385,34 @@ object srvInventario: TsrvInventario
|
||||
DataType = datAutoInc
|
||||
GeneratorName = 'GEN_MOVIMIENTOS_ID'
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end
|
||||
item
|
||||
Name = 'ID_ALMACEN'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end
|
||||
item
|
||||
Name = 'ID_ARTICULO'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end
|
||||
item
|
||||
Name = 'FECHA_MOVIMIENTO'
|
||||
DataType = datDateTime
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end
|
||||
item
|
||||
Name = 'TIPO'
|
||||
DataType = datString
|
||||
Size = 1
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end
|
||||
item
|
||||
Name = 'CANTIDAD'
|
||||
DataType = datInteger
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end
|
||||
item
|
||||
Name = 'CAUSA'
|
||||
DataType = datString
|
||||
Size = 2000
|
||||
Value = ''
|
||||
ParamType = daptInput
|
||||
end
|
||||
item
|
||||
Name = 'ID_ALMACEN_RESERVA'
|
||||
Value = ''
|
||||
end>
|
||||
Statements = <
|
||||
item
|
||||
@ -415,8 +420,9 @@ object srvInventario: TsrvInventario
|
||||
TargetTable = 'MOVIMIENTOS'
|
||||
SQL =
|
||||
'INSERT'#10' INTO MOVIMIENTOS'#10' (ID, ID_ALMACEN, ID_ARTICULO, FECH' +
|
||||
'A_MOVIMIENTO, TIPO, CANTIDAD, CAUSA)'#10' VALUES'#10' (:ID, :ID_ALMA' +
|
||||
'CEN, :ID_ARTICULO, :FECHA_MOVIMIENTO, :TIPO, :CANTIDAD, :CAUSA)'
|
||||
'A_MOVIMIENTO, TIPO, CANTIDAD, CAUSA, ID_ALMACEN_RESERVA)'#10' VALUE' +
|
||||
'S'#10' (:ID, :ID_ALMACEN, :ID_ARTICULO, :FECHA_MOVIMIENTO, :TIPO,' +
|
||||
' :CANTIDAD, :CAUSA, :ID_ALMACEN_RESERVA)'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
@ -468,6 +474,10 @@ object srvInventario: TsrvInventario
|
||||
Name = 'CAUSA'
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'ID_ALMACEN_RESERVA'
|
||||
Value = ''
|
||||
end
|
||||
item
|
||||
Name = 'OLD_ID'
|
||||
Value = ''
|
||||
@ -480,7 +490,8 @@ object srvInventario: TsrvInventario
|
||||
'UPDATE MOVIMIENTOS'#10' SET '#10' ID = :ID,'#10' ID_ALMACEN = :ID_ALM' +
|
||||
'ACEN,'#10' ID_ARTICULO = :ID_ARTICULO,'#10' FECHA_MOVIMIENTO = :FE' +
|
||||
'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
|
||||
ColumnMappings = <>
|
||||
end>
|
||||
|
||||
@ -46,11 +46,11 @@
|
||||
<DelphiCompile Include="Inventario_view.dpk">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\Lib\Articulos_view.dcp" />
|
||||
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Inventario_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Inventario_model.dcp" />
|
||||
<DCCReference Include="..\..\Lib\PedProv_AlbProv_relation.dcp" />
|
||||
<DCCReference Include="..\Articulos_view.dcp" />
|
||||
<DCCReference Include="..\GUIBase.dcp" />
|
||||
<DCCReference Include="..\Inventario_controller.dcp" />
|
||||
<DCCReference Include="..\Inventario_model.dcp" />
|
||||
<DCCReference Include="..\PedProv_AlbProv_relation.dcp" />
|
||||
<DCCReference Include="uEditorDetalleReservas.pas">
|
||||
<Form>fEditorDetalleReservas</Form>
|
||||
<DesignClass>TfEditorDetalleReservas</DesignClass>
|
||||
|
||||
@ -208,7 +208,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 1
|
||||
Height = 21
|
||||
Width = 1086
|
||||
Width = 1727
|
||||
end
|
||||
end
|
||||
object pnlEntradaPedido: TTBXDockablePanel
|
||||
@ -356,10 +356,30 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
Width = 773
|
||||
ExplicitWidth = 773
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 676
|
||||
Width = 676
|
||||
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
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 380
|
||||
Width = 380
|
||||
end
|
||||
|
||||
@ -262,6 +262,20 @@ begin
|
||||
FTitulo := FTitulo + '" hasta "' + AObraDestino.NOMBRE + '"';
|
||||
actGuardarCerrar.Caption := 'Realizar el traslado de los artículos';
|
||||
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;
|
||||
finally
|
||||
AAlmacenOrigen := Nil;
|
||||
@ -272,7 +286,7 @@ begin
|
||||
|
||||
//Botones de añadir y eliminar
|
||||
case FArticulos.TipoMovimiento of
|
||||
tEntradaLibre, tSalidaLibre, tTraslado :
|
||||
tEntradaLibre, tSalidaLibre, tTraslado, tReserva :
|
||||
begin
|
||||
pnlMovimiento.Visible := True;
|
||||
eFechaMovimiento.Date := Date;
|
||||
|
||||
@ -50,7 +50,7 @@ inherited fEditorInventario: TfEditorInventario
|
||||
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
|
||||
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
|
||||
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
|
||||
17110000171101CA26F33F000002E249444154484BB596EF4B535118C7E7BBDE
|
||||
17100000171001186111DB000002E249444154484BB596EF4B535118C7E7BBDE
|
||||
F43F44D12B0982FE808892B437BDCB428B2CB04C4C1B16A312417AE10FCA5F69
|
||||
12A5D39A59B417196413CD10225743A7A9ED8777FEDAD4E9DDA64DC7FCD5B73D
|
||||
C78ECD7BEE9C825D78B8EC9EBBCFE73CCF79CEBD370180E6BF1E4C706BE05024
|
||||
@ -210,21 +210,37 @@ inherited fEditorInventario: TfEditorInventario
|
||||
Width = 669
|
||||
ExplicitWidth = 669
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 572
|
||||
Width = 572
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitWidth = 246
|
||||
Width = 246
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 350
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 350
|
||||
ExplicitWidth = 205
|
||||
Width = 205
|
||||
end
|
||||
inherited eLista: TcxComboBox
|
||||
Left = 592
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 592
|
||||
ExplicitWidth = 67
|
||||
Width = 67
|
||||
@ -311,7 +327,6 @@ inherited fEditorInventario: TfEditorInventario
|
||||
object actReservar: TAction
|
||||
Category = 'Logistica'
|
||||
Caption = 'Reservar'
|
||||
Enabled = False
|
||||
ImageIndex = 25
|
||||
OnExecute = actReservarExecute
|
||||
end
|
||||
|
||||
@ -382,13 +382,22 @@ end;
|
||||
|
||||
procedure TfEditorInventario.actReservarExecute(Sender: TObject);
|
||||
var
|
||||
IDAlmacenDestino: Integer;
|
||||
IDAlmacenOrigen, IDAlmacenDestino: Integer;
|
||||
|
||||
begin
|
||||
IDAlmacenDestino := darIDAlmacenSeleccionado('Elija el almacén donde desea reservar el material');
|
||||
if IDAlmacenDestino <> -1 then
|
||||
if (TipoInventario = CTE_INV_ALMACEN) 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
|
||||
FController.EntradaArticulosLibre(FInventario, IDAlmacenDestino);
|
||||
RefrescarInterno;
|
||||
IDAlmacenDestino := Seleccionar('Elija el almacén/obra para el que desea reservar el material (donde irán los materiales)', tAlmacenObra);
|
||||
if IDAlmacenDestino <> -1 then
|
||||
begin
|
||||
FController.ReservarArticulosLibre(FInventario, IDAlmacenOrigen, IDAlmacenDestino);
|
||||
RefrescarInterno;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -112,8 +112,6 @@ uses
|
||||
schFacturasClienteServer_Intf in '..\Modulos\Facturas de cliente\Model\schFacturasClienteServer_Intf.pas',
|
||||
schAlmacenesClient_Intf in '..\Modulos\Almacenes\Model\schAlmacenesClient_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',
|
||||
schAlbaranesProveedorServer_Intf in '..\Modulos\Albaranes de proveedor\Model\schAlbaranesProveedorServer_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',
|
||||
srvGestorDocumentos_Impl in '..\Modulos\Gestion de documentos\Servidor\srvGestorDocumentos_Impl.pas' {srvGestorDocumentos: TDataAbstractService},
|
||||
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 ..\Servicios\RODLFile.res}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user