Repaso de entradas y salidas del almacen y sus editores
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@53 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
c32a8b9af7
commit
78265fdd3f
Binary file not shown.
Binary file not shown.
@ -3,7 +3,7 @@ unit uIEditorEntradaSalidaArticulos;
|
||||
interface
|
||||
|
||||
uses
|
||||
uEditorDBItem, uBizInventario, uInventarioController;
|
||||
uEditorDBItem, uBizInventario, uInventarioController, uBizPedidosProveedor;
|
||||
|
||||
type
|
||||
IEditorEntradaSalidaArticulos = interface(IEditorDBItem)
|
||||
@ -20,6 +20,10 @@ type
|
||||
procedure SetController (const Value : IInventarioController);
|
||||
property Controller : IInventarioController read GetController write SetController;
|
||||
|
||||
function GetPedidoProveedor: IBizPedidoProveedor;
|
||||
procedure SetPedidoProveedor(const Value: IBizPedidoProveedor);
|
||||
property PedidoProveedor: IBizPedidoProveedor read GetPedidoProveedor write SetPedidoProveedor;
|
||||
|
||||
function getResultadoModalOK: Boolean;
|
||||
property ResultadoModalOK: Boolean read getResultadoModalOK;
|
||||
end;
|
||||
|
||||
@ -16,26 +16,24 @@ type
|
||||
|
||||
function Eliminar(AInventario : IBizInventario; Todos: Boolean; ApplyUpdates: Boolean): Boolean;
|
||||
function Trasladar(AInventario : IBizInventario; Todos: Boolean): Boolean;
|
||||
procedure RecibirArticulos(Const APedido: IBizPedidoProveedor; Const CodigoAlmacenDes: Integer); overload;
|
||||
procedure RecibirPedidos(Const CodigoAlmacenDes: Integer);
|
||||
// procedure RecibirArticulos(Const APedido: IBizPedidoProveedor; Const CodigoAlmacenDes: Integer); overload;
|
||||
// procedure RecibirPedidos(Const CodigoAlmacenDes: Integer);
|
||||
procedure Reservar(AInventario : IBizInventario);
|
||||
function Liberar(AInventario : IBizInventario): Boolean;
|
||||
procedure VerTodos(AInventario: IBizInventario);
|
||||
|
||||
|
||||
|
||||
function BuscarTodos: IBizInventario;
|
||||
function Buscar(const ID_ALMACEN: Integer): IBizInventario;
|
||||
function ExtraerSeleccionados(AArticulos: IBizInventario) : IBizInventario;
|
||||
|
||||
procedure Anadir(AArticulos, AInventario : IBizInventario);
|
||||
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario): Boolean;
|
||||
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||
function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
|
||||
|
||||
procedure EntradaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer);
|
||||
procedure SalidaArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer);
|
||||
procedure TrasladarArticulosLibre(AInventario: IBizInventario; Const CodigoAlmacenOrigen: Integer; Const CodigoAlmacenDestino: Integer);
|
||||
function EntradaPedido(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer; 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 GetAlmacenesController: IAlmacenesController;
|
||||
@ -61,8 +59,7 @@ type
|
||||
function Reservar(AInventario : IBizInventario; Todos: Boolean; Const APedido: IBizPedidoCliente): Boolean; overload;
|
||||
function Liberar(AInventario : IBizInventario; Todos: Boolean): Boolean; overload;
|
||||
|
||||
|
||||
function EntradaSalidaArticulos(AArticulos, AInventario : IBizInventario): Boolean; overload;
|
||||
function EntradaSalidaArticulos(AArticulos, AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; overload;
|
||||
|
||||
procedure Copiar(AArticulos: IBizInventario; ADetalles: IDAStronglyTypedDataTable; AInventario: IBizInventario); overload;
|
||||
function GuardarMovimientos(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
|
||||
@ -94,9 +91,9 @@ type
|
||||
|
||||
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);
|
||||
|
||||
function Buscar(const ID_ALMACEN: Integer): IBizInventario;
|
||||
function BuscarTodos: IBizInventario;
|
||||
@ -109,16 +106,15 @@ 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);
|
||||
function EntradaPedido(AInventario: IBizInventario; Const CodigoAlmacenDestino: Integer; 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 Ver(AArticulos: IBizInventario; AInventario : IBizInventario): Boolean;
|
||||
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||
function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String): Boolean;
|
||||
|
||||
function Liberar(AInventario : IBizInventario): Boolean; overload;
|
||||
procedure Reservar(AInventario : IBizInventario); overload;
|
||||
|
||||
|
||||
procedure VerTodos(AInventario: IBizInventario);
|
||||
|
||||
|
||||
@ -411,7 +407,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TInventarioController.Ver(AArticulos: IBizInventario; AInventario: IBizInventario): Boolean;
|
||||
function TInventarioController.Ver(AArticulos: IBizInventario; AInventario: IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||
var
|
||||
AEditor : IEditorEntradaSalidaArticulos;
|
||||
begin
|
||||
@ -425,6 +421,8 @@ begin
|
||||
Controller := Self; //OJO ORDEN MUY IMPORTANTE
|
||||
Articulos := AArticulos;
|
||||
Inventario := AInventario;
|
||||
if Assigned(APedido) then
|
||||
PedidoProveedor := APedido;
|
||||
end;
|
||||
finally
|
||||
HideHourglassCursor;
|
||||
@ -509,7 +507,7 @@ begin
|
||||
end;
|
||||
}
|
||||
|
||||
function TInventarioController.EntradaSalidaArticulos(AArticulos, AInventario : IBizInventario): Boolean;
|
||||
function TInventarioController.EntradaSalidaArticulos(AArticulos, AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
if not Assigned(AArticulos) then
|
||||
@ -518,15 +516,15 @@ begin
|
||||
if not AArticulos.DataTable.Active then
|
||||
AArticulos.DataTable.Active := True;
|
||||
|
||||
Result := Ver(AArticulos, AInventario);
|
||||
Result := Ver(AArticulos, AInventario, APedido);
|
||||
end;
|
||||
|
||||
procedure TInventarioController.RecibirArticulos(const APedido: IBizPedidoProveedor; const CodigoAlmacenDes: Integer);
|
||||
{procedure TInventarioController.RecibirArticulos(const APedido: IBizPedidoProveedor; const CodigoAlmacenDes: Integer);
|
||||
{var
|
||||
AArticulos: IBizInventario;}
|
||||
AArticulos: IBizInventario;
|
||||
// ADetalles: IBizDetallesPedidoProveedor;
|
||||
begin
|
||||
{
|
||||
|
||||
try
|
||||
if APedido.DataTable.FieldByName(fld_PedidosProveedorID_ALMACEN).IsNull then
|
||||
begin
|
||||
@ -554,7 +552,7 @@ begin
|
||||
AArticulos.ID_ALMACEN := APedido.ID_ALMACEN;
|
||||
if not APedido.DataTable.FieldByName(fld_PedidosProveedorID).IsNull then
|
||||
AArticulos.ID_PEDIDO_PROVEEDOR := APedido.ID;
|
||||
AArticulos.ID_ARTICULO := APedido.Detalles.ID_ARTICULO;
|
||||
AArticulos.ID_ARTICULO := APedido.Detalles.ID_ARTICULO;
|
||||
AArticulos.REFERENCIA_CLIENTE := APedido.Detalles.REFERENCIA;
|
||||
AArticulos.REFERENCIA_PROVEEDOR := APedido.Detalles.REFERENCIA_PROVEEDOR;
|
||||
AArticulos.DESCRIPCION := APedido.Detalles.CONCEPTO;
|
||||
@ -571,8 +569,7 @@ begin
|
||||
finally
|
||||
AArticulos := Nil;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
end;}
|
||||
|
||||
procedure TInventarioController.EntradaArticulosLibre(AInventario: IBizInventario; const CodigoAlmacenDestino: Integer);
|
||||
var
|
||||
@ -591,7 +588,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TInventarioController.EntradaPedido(AInventario: IBizInventario; const CodigoAlmacenDestino: Integer; ADetalles: IDAStronglyTypedDataTable; var ADetallesFinal: IBizInventario): Boolean;
|
||||
function TInventarioController.EntradaPedido(AInventario: IBizInventario; APedido: IBizPedidoProveedor; ADetalles: IDAStronglyTypedDataTable; var ADetallesFinal: IBizInventario): Boolean;
|
||||
var
|
||||
AArticulos: IBizInventario;
|
||||
begin
|
||||
@ -601,13 +598,13 @@ begin
|
||||
//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 := tEntradaPedidoProveedor;
|
||||
AArticulos.IDAlmacenDestino := CodigoAlmacenDestino;
|
||||
AArticulos.IDAlmacenDestino := APedido.ID_ALMACEN;
|
||||
|
||||
//Inicializamos los articulos a hacer salida con los dados por parametro
|
||||
Copiar(AArticulos, ADetalles, AInventario);
|
||||
|
||||
ADetallesFinal:= AArticulos;
|
||||
Result := EntradaSalidaArticulos(AArticulos, AInventario);
|
||||
Result := EntradaSalidaArticulos(AArticulos, AInventario, APedido);
|
||||
end;
|
||||
|
||||
procedure TInventarioController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
|
||||
@ -616,7 +613,7 @@ begin
|
||||
//
|
||||
end;
|
||||
|
||||
procedure TInventarioController.RecibirPedidos(const CodigoAlmacenDes: Integer);
|
||||
{procedure TInventarioController.RecibirPedidos(const CodigoAlmacenDes: Integer);
|
||||
var
|
||||
APedido: IBizPedidoProveedor;
|
||||
begin
|
||||
@ -631,7 +628,7 @@ begin
|
||||
APedido := Nil;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;}
|
||||
|
||||
procedure TInventarioController.Reservar(AInventario : IBizInventario);
|
||||
var
|
||||
|
||||
@ -55,7 +55,7 @@ inherited fEditorElegirArticulosAlmacen: TfEditorElegirArticulosAlmacen
|
||||
inherited tbxMain: TTBXToolbar
|
||||
Align = alLeft
|
||||
DockPos = -6
|
||||
ExplicitWidth = 117
|
||||
ExplicitWidth = 275
|
||||
inherited TBXItem2: TTBXItem
|
||||
Visible = False
|
||||
end
|
||||
@ -70,12 +70,12 @@ inherited fEditorElegirArticulosAlmacen: TfEditorElegirArticulosAlmacen
|
||||
end
|
||||
end
|
||||
inherited tbxFiltro: TTBXToolbar
|
||||
Left = 117
|
||||
Left = 275
|
||||
Top = 23
|
||||
Align = alLeft
|
||||
DockPos = 101
|
||||
DockRow = 1
|
||||
ExplicitLeft = 117
|
||||
ExplicitLeft = 275
|
||||
ExplicitTop = 23
|
||||
inherited TBXItem34: TTBXItem
|
||||
Action = actQuitarFiltro2
|
||||
@ -88,7 +88,6 @@ inherited fEditorElegirArticulosAlmacen: TfEditorElegirArticulosAlmacen
|
||||
inherited StatusBar: TJvStatusBar
|
||||
Width = 656
|
||||
Visible = False
|
||||
ExplicitTop = 527
|
||||
ExplicitWidth = 656
|
||||
end
|
||||
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [4]
|
||||
@ -140,11 +139,18 @@ inherited fEditorElegirArticulosAlmacen: TfEditorElegirArticulosAlmacen
|
||||
ExplicitHeight = 336
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 656
|
||||
Height = 336
|
||||
Height = 208
|
||||
RootLevelOptions.DetailTabsPosition = dtpNone
|
||||
ExplicitWidth = 656
|
||||
ExplicitHeight = 336
|
||||
ExplicitHeight = 208
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
item
|
||||
Format = ',0.00 '#8364';-,0.00 '#8364
|
||||
Kind = skSum
|
||||
Position = spFooter
|
||||
Column = frViewInventario1.cxGridViewCOSTE_UNIDADES
|
||||
end>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Format = '0 art'#237'culos'
|
||||
@ -157,6 +163,56 @@ inherited fEditorElegirArticulosAlmacen: TfEditorElegirArticulosAlmacen
|
||||
end>
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
Width = 656
|
||||
ExplicitWidth = 656
|
||||
inherited TBXDock1: TTBXDock
|
||||
Width = 656
|
||||
ExplicitWidth = 656
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
ExplicitWidth = 656
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 652
|
||||
ExplicitWidth = 652
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
ExplicitWidth = 273
|
||||
Width = 273
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 403
|
||||
ExplicitLeft = 403
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 652
|
||||
ExplicitWidth = 652
|
||||
inherited tbxBotones: TTBXToolbar
|
||||
Width = 642
|
||||
ExplicitWidth = 642
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||
Top = 310
|
||||
ExplicitTop = 310
|
||||
ExplicitWidth = 656
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 656
|
||||
ExplicitWidth = 656
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
Width = 646
|
||||
ExplicitWidth = 646
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
BuiltInReportLink = True
|
||||
@ -170,10 +226,18 @@ inherited fEditorElegirArticulosAlmacen: TfEditorElegirArticulosAlmacen
|
||||
Index = 0
|
||||
end>
|
||||
end
|
||||
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||
BuiltInStyle = True
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited EditorActionList: TActionList [9]
|
||||
Left = 112
|
||||
Top = 192
|
||||
inherited actRecibirPedido: TAction
|
||||
Visible = False
|
||||
end
|
||||
inherited actTrasladar: TAction
|
||||
Visible = False
|
||||
end
|
||||
|
||||
@ -9,9 +9,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Caption = 'Entrada de art'#237'culos en almac'#233'n'
|
||||
ExplicitWidth = 652
|
||||
inherited Image1: TImage
|
||||
Left = 625
|
||||
Picture.Data = {
|
||||
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800
|
||||
0000180806000000E0773DF80000000970485973000017120000171201679FD2
|
||||
@ -33,7 +31,6 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TTBXDock
|
||||
ExplicitWidth = 652
|
||||
inherited tbxMain: TTBXToolbar
|
||||
ExplicitWidth = 271
|
||||
object TBXItem7: TTBXItem [16]
|
||||
@ -53,12 +50,11 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
end
|
||||
end
|
||||
inherited pgPaginas: TPageControl
|
||||
Top = 222
|
||||
Height = 315
|
||||
Top = 254
|
||||
Height = 283
|
||||
MultiLine = True
|
||||
Visible = False
|
||||
ExplicitTop = 222
|
||||
ExplicitWidth = 652
|
||||
ExplicitHeight = 315
|
||||
inherited pagGeneral: TTabSheet
|
||||
ExplicitLeft = 4
|
||||
@ -78,9 +74,9 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
inline frViewListaArticulos: TfrViewEntradaSalidaArticulos [4]
|
||||
AlignWithMargins = True
|
||||
Left = 3
|
||||
Top = 225
|
||||
Top = 257
|
||||
Width = 646
|
||||
Height = 309
|
||||
Height = 277
|
||||
Align = alClient
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
@ -100,13 +96,13 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
ExplicitHeight = 309
|
||||
inherited cxGrid: TcxGrid
|
||||
Left = 5
|
||||
Top = 5
|
||||
Top = 107
|
||||
Width = 636
|
||||
Height = 301
|
||||
Height = 141
|
||||
ExplicitLeft = 5
|
||||
ExplicitTop = 5
|
||||
ExplicitTop = 107
|
||||
ExplicitWidth = 636
|
||||
ExplicitHeight = 301
|
||||
ExplicitHeight = 173
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
OptionsCustomize.ColumnsQuickCustomization = False
|
||||
OptionsData.Editing = True
|
||||
@ -127,6 +123,8 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
Properties.ReadOnly = True
|
||||
end
|
||||
inherited cxGridViewREFERENCIA_PROV: TcxGridDBColumn [4]
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.ReadOnly = True
|
||||
end
|
||||
inherited cxGridViewDESCRIPCION: TcxGridDBColumn [5]
|
||||
Caption = 'Descripci'#243'n'
|
||||
@ -138,9 +136,12 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
Caption = 'Cantidad'
|
||||
PropertiesClassName = 'TcxSpinEditProperties'
|
||||
Properties.CanEdit = True
|
||||
Properties.ExceptionOnInvalidInput = False
|
||||
Properties.SpinButtons.Position = sbpVert
|
||||
Properties.SpinButtons.ShowFastButtons = False
|
||||
Properties.UseCtrlIncrement = False
|
||||
Properties.ValidateOnEnter = True
|
||||
Properties.OnGetValue = nil
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
Styles.Content = frViewListaArticulos.cxStyleFiltered
|
||||
@ -148,6 +149,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
inherited cxGridViewSTOCK: TcxGridDBColumn [7]
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
Properties.ReadOnly = True
|
||||
FooterAlignmentHorz = taRightJustify
|
||||
HeaderAlignmentHorz = taRightJustify
|
||||
end
|
||||
@ -166,8 +168,65 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
Left = 5
|
||||
Top = 5
|
||||
Width = 636
|
||||
ExplicitLeft = 5
|
||||
ExplicitTop = 5
|
||||
ExplicitWidth = 636
|
||||
inherited TBXDock1: TTBXDock
|
||||
Width = 636
|
||||
ExplicitWidth = 636
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
ExplicitWidth = 636
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 632
|
||||
ExplicitWidth = 632
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
ExplicitWidth = 273
|
||||
Width = 273
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 391
|
||||
ExplicitLeft = 391
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 632
|
||||
ExplicitWidth = 632
|
||||
inherited tbxBotones: TTBXToolbar
|
||||
Width = 622
|
||||
ExplicitWidth = 622
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TTBXDockablePanel
|
||||
Left = 5
|
||||
Top = 248
|
||||
ExplicitLeft = 5
|
||||
ExplicitTop = 280
|
||||
ExplicitWidth = 636
|
||||
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
|
||||
Width = 636
|
||||
ExplicitWidth = 636
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
Width = 626
|
||||
ExplicitWidth = 626
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
ReportDocument.CreationDate = 39253.501954571760000000
|
||||
BuiltInReportLink = True
|
||||
end
|
||||
end
|
||||
@ -179,11 +238,16 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
Index = 0
|
||||
end>
|
||||
end
|
||||
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||
BuiltInStyle = True
|
||||
end
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar [5]
|
||||
AlignWithMargins = True
|
||||
Left = 5
|
||||
Top = 192
|
||||
Top = 224
|
||||
Width = 642
|
||||
Height = 30
|
||||
Margins.Left = 5
|
||||
@ -202,6 +266,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
ShowHint = True
|
||||
TabOrder = 5
|
||||
Transparent = True
|
||||
ExplicitTop = 192
|
||||
object ToolButton1: TToolButton
|
||||
Left = 0
|
||||
Top = 2
|
||||
@ -233,10 +298,10 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
Left = 0
|
||||
Top = 76
|
||||
Width = 652
|
||||
Height = 114
|
||||
Height = 146
|
||||
object pnlMovimiento: TTBXDockablePanel
|
||||
Left = 0
|
||||
Top = 57
|
||||
Top = 89
|
||||
Align = alTop
|
||||
Caption = 'Filtrar'
|
||||
CaptionRotation = dpcrAlwaysVert
|
||||
@ -249,6 +314,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
ShowCaptionWhenDocked = False
|
||||
SupportedDocks = [dkStandardDock, dkMultiDock]
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
DesignSize = (
|
||||
648
|
||||
53)
|
||||
@ -299,7 +365,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
StyleHot.LookAndFeel.Kind = lfStandard
|
||||
StyleHot.LookAndFeel.NativeStyle = True
|
||||
TabOrder = 1
|
||||
Width = 850
|
||||
Width = 1837
|
||||
end
|
||||
end
|
||||
object pnlEntradaPedido: TTBXDockablePanel
|
||||
@ -308,7 +374,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
Align = alTop
|
||||
Caption = 'Filtrar'
|
||||
CaptionRotation = dpcrAlwaysVert
|
||||
DockedHeight = 53
|
||||
DockedHeight = 85
|
||||
DockMode = dmCannotFloat
|
||||
DockPos = 88
|
||||
DockRow = 2
|
||||
@ -319,25 +385,97 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
object Label3: TLabel
|
||||
Left = 266
|
||||
Left = 202
|
||||
Top = 17
|
||||
Width = 36
|
||||
Width = 60
|
||||
Height = 13
|
||||
Caption = 'Motivo:'
|
||||
Caption = 'Ref. pedido:'
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 8
|
||||
Top = 17
|
||||
Width = 107
|
||||
Width = 85
|
||||
Height = 13
|
||||
Caption = 'Fecha del movimiento:'
|
||||
Caption = 'Fecha del pedido:'
|
||||
Color = 16054521
|
||||
ParentColor = False
|
||||
end
|
||||
object edtFechaPedido: TLabel
|
||||
Left = 99
|
||||
Top = 17
|
||||
Width = 71
|
||||
Height = 13
|
||||
Caption = 'FechaPedido'
|
||||
Color = 16054521
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object edtReferenciaPedido: TLabel
|
||||
Left = 268
|
||||
Top = 17
|
||||
Width = 99
|
||||
Height = 13
|
||||
Caption = 'ReferenciaPedido'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 8
|
||||
Top = 49
|
||||
Width = 47
|
||||
Height = 13
|
||||
Caption = 'Situaci'#243'n:'
|
||||
Color = 16054521
|
||||
ParentColor = False
|
||||
end
|
||||
object edtSituacion: TLabel
|
||||
Left = 99
|
||||
Top = 49
|
||||
Width = 52
|
||||
Height = 13
|
||||
Caption = 'Situacion'
|
||||
Color = 16054521
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 202
|
||||
Top = 49
|
||||
Width = 54
|
||||
Height = 13
|
||||
Caption = 'Proveedor:'
|
||||
end
|
||||
object edtProveedor: TLabel
|
||||
Left = 268
|
||||
Top = 49
|
||||
Width = 59
|
||||
Height = 13
|
||||
Caption = 'Proveedor'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited EditorActionList: TActionList [7]
|
||||
Top = 80
|
||||
Top = 56
|
||||
inherited actNuevo: TAction
|
||||
Visible = False
|
||||
end
|
||||
@ -1720,7 +1858,7 @@ inherited fEditorEntradaSalidaArticulos: TfEditorEntradaSalidaArticulos
|
||||
end
|
||||
inherited dsDataTable: TDADataSource [11]
|
||||
Left = 56
|
||||
Top = 80
|
||||
Top = 56
|
||||
end
|
||||
inherited JvAppRegistryStorage: TJvAppRegistryStorage [12]
|
||||
end
|
||||
|
||||
@ -13,7 +13,7 @@ uses
|
||||
uIEditorEntradaSalidaArticulos, uInventarioController, JvExComCtrls,
|
||||
JvStatusBar, Grids, DBGrids, cxLabel, cxControls, cxContainer, cxEdit,
|
||||
cxTextEdit, cxMaskEdit, cxDropDownEdit, cxCalendar, cxMemo, ToolWin,
|
||||
dxLayoutControl, cxStyles, StdCtrls, Buttons, TBXDkPanels;
|
||||
dxLayoutControl, cxStyles, StdCtrls, Buttons, TBXDkPanels, uBizPedidosProveedor;
|
||||
|
||||
type
|
||||
TfEditorEntradaSalidaArticulos = class(TfEditorDBItem, IEditorEntradaSalidaArticulos)
|
||||
@ -37,6 +37,12 @@ type
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
TBXDockPaneles: TTBXDock;
|
||||
edtFechaPedido: TLabel;
|
||||
edtReferenciaPedido: TLabel;
|
||||
Label6: TLabel;
|
||||
edtSituacion: TLabel;
|
||||
Label7: TLabel;
|
||||
edtProveedor: TLabel;
|
||||
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure actAnadirInventarioExecute(Sender: TObject);
|
||||
procedure actEliminarInventarioExecute(Sender: TObject);
|
||||
@ -50,10 +56,13 @@ type
|
||||
FController : IInventarioController;
|
||||
FArticulos: IBizInventario; //Los artículos de entrada o salida
|
||||
FInventario: IBizInventario; //Para sacar el stock
|
||||
FPedidoProveedor: IBizPedidoProveedor;
|
||||
function GetArticulos: IBizInventario;
|
||||
procedure SetArticulos(const Value: IBizInventario);
|
||||
function GetInventario: IBizInventario;
|
||||
procedure SetInventario(const Value: IBizInventario);
|
||||
function GetPedidoProveedor: IBizPedidoProveedor;
|
||||
procedure SetPedidoProveedor(const Value: IBizPedidoProveedor);
|
||||
function GetController : IInventarioController;
|
||||
procedure SetController (const Value : IInventarioController);
|
||||
function getResultadoModalOK: Boolean;
|
||||
@ -66,6 +75,7 @@ type
|
||||
property Controller : IInventarioController read GetController write SetController;
|
||||
property Articulos: IBizInventario read GetArticulos write SetArticulos;
|
||||
property Inventario: IBizInventario read GetInventario write SetInventario;
|
||||
property PedidoProveedor: IBizPedidoProveedor read GetPedidoProveedor write SetPedidoProveedor;
|
||||
property ResultadoModalOK: Boolean read getResultadoModalOK;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
procedure PonerTitulos(const ATitulo: string = ''); override;
|
||||
@ -100,6 +110,11 @@ begin
|
||||
Result := FHayCambios;
|
||||
end;
|
||||
|
||||
function TfEditorEntradaSalidaArticulos.GetPedidoProveedor: IBizPedidoProveedor;
|
||||
begin
|
||||
Result := FPedidoProveedor;
|
||||
end;
|
||||
|
||||
function TfEditorEntradaSalidaArticulos.getResultadoModalOK: Boolean;
|
||||
begin
|
||||
Result := FResultadoModalOK;
|
||||
@ -147,6 +162,21 @@ begin
|
||||
FInventario := Value;
|
||||
end;
|
||||
|
||||
procedure TfEditorEntradaSalidaArticulos.SetPedidoProveedor(const Value: IBizPedidoProveedor);
|
||||
begin
|
||||
FPedidoProveedor := Value;
|
||||
if Assigned(FPedidoProveedor) then
|
||||
begin
|
||||
edtFechaPedido.Caption := DateToStr(FPedidoProveedor.FECHA_PEDIDO);
|
||||
edtReferenciaPedido.Caption := FPedidoProveedor.REFERENCIA;
|
||||
edtSituacion.Caption := FPedidoProveedor.SITUACION;
|
||||
edtProveedor.Caption := FPedidoProveedor.NOMBRE;
|
||||
pnlEntradaPedido.Visible := True
|
||||
end
|
||||
else
|
||||
pnlEntradaPedido.Visible := False;
|
||||
end;
|
||||
|
||||
procedure TfEditorEntradaSalidaArticulos.actAnadirInventarioExecute(Sender: TObject);
|
||||
begin
|
||||
//Todos los cambios serán en caché hasta que el usuario decida guardar
|
||||
@ -161,6 +191,7 @@ begin
|
||||
FController := Nil;
|
||||
FArticulos:= Nil;
|
||||
FInventario:= Nil;
|
||||
FPedidoProveedor:= Nil;
|
||||
end;
|
||||
|
||||
procedure TfEditorEntradaSalidaArticulos.FormShow(Sender: TObject);
|
||||
@ -181,11 +212,16 @@ begin
|
||||
AAlmacenDestino.DataTable.Active := True;
|
||||
|
||||
case FArticulos.TipoMovimiento of
|
||||
tEntradaLibre, tEntradaPedidoProveedor :
|
||||
tEntradaLibre :
|
||||
begin
|
||||
FTitulo := 'Entrada de artículos en el almacén "' + AAlmacenDestino.NOMBRE + '"';
|
||||
actGuardarCerrar.Caption := 'Realizar la entrada de los artículos';
|
||||
end;
|
||||
tEntradaPedidoProveedor :
|
||||
begin
|
||||
FTitulo := 'Entrada por pedido de artículos, en el almacén "' + AAlmacenDestino.NOMBRE + '"';
|
||||
actGuardarCerrar.Caption := 'Realizar la entrada de los artículos';
|
||||
end;
|
||||
tSalidaLibre, tSalidaAlbaranCliente :
|
||||
begin
|
||||
FTitulo := 'Salida de artículos en el almacén "' + AAlmacenOrigen.NOMBRE + '"';
|
||||
@ -206,7 +242,6 @@ begin
|
||||
case FArticulos.TipoMovimiento of
|
||||
tEntradaLibre, tSalidaLibre, tTraslado :
|
||||
begin
|
||||
pnlEntradaPedido.Visible := False;
|
||||
pnlMovimiento.Visible := True;
|
||||
eFechaMovimiento.Date := Date;
|
||||
actAnadirInventario.Enabled := True;
|
||||
@ -217,14 +252,8 @@ begin
|
||||
end;
|
||||
tEntradaPedidoProveedor, tSalidaAlbaranCliente :
|
||||
begin
|
||||
pnlMovimiento.Visible := False;
|
||||
|
||||
if (FArticulos.TipoMovimiento = tEntradaPedidoProveedor) then
|
||||
begin
|
||||
//pnlEntradaPedido.Visible := True;}
|
||||
pnlEntradaPedido.Visible := False;
|
||||
ToolBar1.Visible := False;
|
||||
end;
|
||||
ToolBar1.Visible := False;
|
||||
|
||||
actAnadirInventario.Enabled := False;
|
||||
actAnadirInventario.Visible := False;
|
||||
|
||||
@ -52,11 +52,37 @@ inherited frViewEntradaSalidaArticulos: TfrViewEntradaSalidaArticulos
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
inherited TBXDock1: TTBXDock
|
||||
inherited TBXDockablePanel1: TTBXDockablePanel
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
ExplicitWidth = 273
|
||||
Width = 273
|
||||
end
|
||||
inherited edtFechaIniFiltro: TcxDateEdit
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
ExplicitWidth = 121
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited dxComponentPrinter: TdxComponentPrinter
|
||||
inherited dxComponentPrinterLink: TdxGridReportLink
|
||||
ReportDocument.CreationDate = 39253.500748333330000000
|
||||
BuiltInReportLink = True
|
||||
end
|
||||
end
|
||||
inherited dxPrintStyleManager1: TdxPrintStyleManager
|
||||
inherited dxPrintStyleManager1Style1: TdxPSPrintStyle
|
||||
BuiltInStyle = True
|
||||
end
|
||||
end
|
||||
object DADataSourceAlmacenes: TDADataSource
|
||||
Left = 56
|
||||
Top = 16
|
||||
|
||||
@ -13,7 +13,8 @@ uses
|
||||
dxPrnDev, dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, dxPSCore, dxPScxCommon, dxPScxGridLnk,
|
||||
uAlmacenesController, uBizAlmacenes, TB2Item, TBX, TB2Dock, TB2Toolbar,
|
||||
uDataModuleInventario, cxRichEdit, cxTextEdit;
|
||||
uDataModuleInventario, cxRichEdit, cxTextEdit, dxPgsDlg, TBXDkPanels,
|
||||
uViewFiltroBase;
|
||||
|
||||
type
|
||||
IViewViewEntradaSalidaArticulos = interface(IViewGrid)
|
||||
|
||||
@ -297,7 +297,7 @@ begin
|
||||
Exit; // Aunque es un exit, se ejecuta la parte del finally antes de salir.
|
||||
end;
|
||||
|
||||
bGenerarAlbaran := AInventarioController.EntradaPedido(nil, APedido.ID_ALMACEN, AArticulosPendientes, AInventarioRecibido);
|
||||
bGenerarAlbaran := AInventarioController.EntradaPedido(nil, APedido, AArticulosPendientes, AInventarioRecibido);
|
||||
except
|
||||
on E : Exception do
|
||||
ShowMessage(E.Message);
|
||||
|
||||
Reference in New Issue
Block a user