Se arreglan cabeceras de informes solicitado por Maribel, se arreglan varias trareas abiertas.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@939 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2009-04-16 15:31:51 +00:00
parent bcfed0d231
commit 1b5e4c6761
17 changed files with 385 additions and 337 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -72,6 +72,8 @@ begin
finally finally
AController := NIL; AController := NIL;
end; end;
cbCuentaBancaria.ItemIndex := 0;
end; end;
function TfEditorElegirDomiciliacion.GetCuentaBancaria: String; function TfEditorElegirDomiciliacion.GetCuentaBancaria: String;

View File

@ -23,6 +23,10 @@ type
function GetArticulo: IBizInventario; function GetArticulo: IBizInventario;
procedure SetArticulo(const Value: IBizInventario); procedure SetArticulo(const Value: IBizInventario);
property Articulo: IBizInventario read GetArticulo write SetArticulo; property Articulo: IBizInventario read GetArticulo write SetArticulo;
function GetIdAlmacenObra: Integer;
procedure SetIdAlmacenObra(const Value: Integer);
property IdAlmacenObra: Integer read GetIdAlmacenObra write SetIdAlmacenObra;
end; end;

View File

@ -22,7 +22,7 @@ type
function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean; function Ver(AArticulos: IBizInventario; AInventario : IBizInventario; APedido: IBizPedidoProveedor = Nil): Boolean;
procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String); procedure VerTodos(AInventario: IBizInventario; const pTipoInventario: String);
procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String); procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer);
function BuscarTodos: IBizInventario; function BuscarTodos: IBizInventario;
function BuscarTodosAlmacenes: IBizInventario; function BuscarTodosAlmacenes: IBizInventario;
@ -138,7 +138,7 @@ type
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;
procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String); procedure VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer);
function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String; AValidar:Boolean = True): Boolean; function Guardar(AArticulos : IBizInventario; const FechaMovimiento: TDateTime; const CausaMovimiento: String; AValidar:Boolean = True): Boolean;
@ -549,7 +549,7 @@ begin
end; end;
end; end;
procedure TInventarioController.VerReservas(AArticulo: IBizInventario; const ATipoReservas: String); procedure TInventarioController.VerReservas(AArticulo: IBizInventario; const ATipoReservas: String; Const IdAlmacenObra: Integer);
var var
AEditor : IEditorDetalleReservas; AEditor : IEditorDetalleReservas;
begin begin
@ -560,6 +560,7 @@ begin
try try
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.TipoReservas := ATipoReservas; AEditor.TipoReservas := ATipoReservas;
AEditor.IdAlmacenObra := IdAlmacenObra;
AEditor.DetalleReservas := FDataModule.GetDetalleReservas; AEditor.DetalleReservas := FDataModule.GetDetalleReservas;
AEditor.Articulo := AArticulo; AEditor.Articulo := AArticulo;
AEditor.MultiSelect := True; AEditor.MultiSelect := True;
@ -1159,16 +1160,12 @@ begin
if Assigned(AArticulos) then if Assigned(AArticulos) then
begin begin
{ DesconectarTabla(AArticulos.DataTable); //Eliminamos todos los articulos que no esten en el catalogo ya que estos no se podrán reservar
repeat repeat
if (AArticulos.ID_ARTICULO < 1) then if (AArticulos.ID_ARTICULO < 1) then
AArticulos.Delete; AArticulos.Delete;
AArticulos.First; AArticulos.First;
until (AArticulos.DataTable.Locate('ID_ARTICULO', '0', []) = false); until (AArticulos.DataTable.Locate('ID_ARTICULO', '0', []) = false);
ConectarTabla(AArticulos.DataTable);
}
//Deshabilitamos el calculo de ID (RECID) para poderlo usar para la inserción de movimientos //Deshabilitamos el calculo de ID (RECID) para poderlo usar para la inserción de movimientos
AArticulos.DataTable.OnCalcFields := DeshabilitarOnCalcFields; AArticulos.DataTable.OnCalcFields := DeshabilitarOnCalcFields;

View File

@ -42,7 +42,7 @@ inherited fEditorDetalleReservas: TfEditorDetalleReservas
Width = 669 Width = 669
ExplicitWidth = 669 ExplicitWidth = 669
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
ExplicitWidth = 606 ExplicitWidth = 501
object TBXSeparatorItem84: TTBXSeparatorItem [6] object TBXSeparatorItem84: TTBXSeparatorItem [6]
end end
object TBXItem54: TTBXItem [7] object TBXItem54: TTBXItem [7]
@ -174,8 +174,8 @@ inherited fEditorDetalleReservas: TfEditorDetalleReservas
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 273 ExplicitWidth = 510
Width = 273 Width = 510
end end
inherited edtFechaIniFiltro: TcxDateEdit inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''

View File

@ -32,9 +32,12 @@ type
function Seleccionar(Descripcion: String; TipoSeleccion: TEnumSeleccion): Variant; function Seleccionar(Descripcion: String; TipoSeleccion: TEnumSeleccion): Variant;
function DarIDAlmacenSeleccionado(Descripcion: String): Integer; function DarIDAlmacenSeleccionado(Descripcion: String): Integer;
function DarIDObraSeleccionada(Descripcion: String): Integer; function DarIDObraSeleccionada(Descripcion: String): Integer;
function GetIdAlmacenObra: Integer;
procedure SetIdAlmacenObra(const Value: Integer);
protected protected
FTipoReservas: String; FTipoReservas: String;
FIdAlmacenObra: Integer;
FArticulo: IBizInventario; FArticulo: IBizInventario;
FDetalleReservas: IBizDetalleReservas; FDetalleReservas: IBizDetalleReservas;
FController : IInventarioController; FController : IInventarioController;
@ -60,6 +63,7 @@ type
property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas; property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas;
property Controller : IInventarioController read GetController write SetController; property Controller : IInventarioController read GetController write SetController;
property TipoReservas: String read GetTipoReservas write SetTipoReservas; property TipoReservas: String read GetTipoReservas write SetTipoReservas;
property IdAlmacenObra: Integer read GetIdAlmacenObra write SetIdAlmacenObra;
// property ArticulosSeleccionados: IBizDetalleReservas read GetArticulosSeleccionados; // property ArticulosSeleccionados: IBizDetalleReservas read GetArticulosSeleccionados;
// property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect; // property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
@ -210,6 +214,11 @@ function TfEditorDetalleReservas.GetDetalleReservas: IBizDetalleReservas;
begin begin
Result := FDetalleReservas; Result := FDetalleReservas;
end; end;
function TfEditorDetalleReservas.GetIdAlmacenObra: Integer;
begin
Result := FIdAlmacenObra;
end;
function TfEditorDetalleReservas.GetTipoReservas: String; function TfEditorDetalleReservas.GetTipoReservas: String;
begin begin
Result := FTipoReservas; Result := FTipoReservas;
@ -362,6 +371,13 @@ begin
if Assigned(ViewGrid) then if Assigned(ViewGrid) then
(ViewGrid as IViewDetalleReservas).DetalleReservas := FDetalleReservas; (ViewGrid as IViewDetalleReservas).DetalleReservas := FDetalleReservas;
end; end;
procedure TfEditorDetalleReservas.SetIdAlmacenObra(const Value: Integer);
begin
FIdAlmacenObra := Value;
if assigned (ViewGrid) then
(ViewGrid as IViewDetalleReservas).IdAlmacenObra := IdAlmacenObra;
end;
procedure TfEditorDetalleReservas.SetTipoReservas(const Value: String); procedure TfEditorDetalleReservas.SetTipoReservas(const Value: String);
begin begin
FTipoReservas := Value; FTipoReservas := Value;
@ -389,4 +405,3 @@ end;
} }
end. end.

View File

@ -185,7 +185,7 @@ end;
procedure TfEditorInventario.actReservadosExecute(Sender: TObject); procedure TfEditorInventario.actReservadosExecute(Sender: TObject);
begin begin
inherited; inherited;
FController.VerReservas(Inventario, TipoInventario); FController.VerReservas(Inventario, TipoInventario, (ViewGrid as IViewInventario).DarIDAlmacenObraSeleccionada);
RefrescarInterno; RefrescarInterno;
end; end;

View File

@ -16,7 +16,7 @@ uses
uBizInventario, uBizAlmacenes, cxSpinEdit, uViewFiltroBase, TB2Item, TBX, uBizInventario, uBizAlmacenes, cxSpinEdit, uViewFiltroBase, TB2Item, TBX,
TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, cxCurrencyEdit, uAlmacenesController, TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, cxCurrencyEdit, uAlmacenesController,
uDAInterfaces, cxContainer, cxMaskEdit, cxDropDownEdit; uDAInterfaces, cxContainer, cxMaskEdit, cxDropDownEdit;
type type
IViewDetalleReservas = interface(IViewGrid) IViewDetalleReservas = interface(IViewGrid)
['{4417F53A-5BB1-4B99-8760-4C0E1D449582}'] ['{4417F53A-5BB1-4B99-8760-4C0E1D449582}']
@ -31,6 +31,9 @@ type
property Obras: TStringList read GetObras write SetObras; property Obras: TStringList read GetObras write SetObras;
function DarIDAlmacenObraSeleccionada: Variant; function DarIDAlmacenObraSeleccionada: Variant;
function ListaAlmacenesObrasVacia: Boolean; function ListaAlmacenesObrasVacia: Boolean;
function GetIdAlmacenObra: Integer;
procedure SetAlmacenObra(const Value: Integer);
property IdAlmacenObra: Integer read GetIdAlmacenObra write SetAlmacenObra;
end; end;
TfrViewDetalleReservas = class(TfrViewGrid, IViewDetalleReservas) TfrViewDetalleReservas = class(TfrViewGrid, IViewDetalleReservas)
@ -66,10 +69,13 @@ type
procedure AnadirFiltroAlmacenesObras; procedure AnadirFiltroAlmacenesObras;
protected protected
FIdAlmacenObra: Integer;
FAlmacenes: TStringList; FAlmacenes: TStringList;
FObras: TStringList; FObras: TStringList;
FDetalleReservas: IBizDetalleReservas; FDetalleReservas: IBizDetalleReservas;
function GetIdAlmacenObra: Integer;
procedure SetAlmacenObra(const Value: Integer);
function GetAlmacenes: TStringList; function GetAlmacenes: TStringList;
procedure SetAlmacenes(const Value: TStringList); procedure SetAlmacenes(const Value: TStringList);
function GetObras: TStringList; function GetObras: TStringList;
@ -84,6 +90,7 @@ type
public public
property IdAlmacenObra: Integer read GetIdAlmacenObra write SetAlmacenObra;
property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas; property DetalleReservas: IBizDetalleReservas read GetDetalleReservas write SetDetalleReservas;
procedure AnadirOtrosFiltros; override; procedure AnadirOtrosFiltros; override;
@ -91,10 +98,6 @@ type
destructor Destroy; override; destructor Destroy; override;
function DarIDAlmacenObraSeleccionada: Variant; function DarIDAlmacenObraSeleccionada: Variant;
function ListaAlmacenesObrasVacia: Boolean; function ListaAlmacenesObrasVacia: Boolean;
@ -137,13 +140,33 @@ begin
end; end;
procedure TfrViewDetalleReservas.CustomViewShow(Sender: TObject); procedure TfrViewDetalleReservas.CustomViewShow(Sender: TObject);
var
i: Integer;
begin begin
inherited; inherited;
if Assigned(FAlmacenes) or Assigned(FObras) then
cxListaAlmacenesObras.ItemIndex := 0 //INV_ALMACENES
//En el caso de ser la vista para la selección de articulos de un determinado almacén if Assigned(FAlmacenes) then
begin
i := 0;
while (i < FAlmacenes.Count) and (FAlmacenes.ValueFromIndex[i] <> IntToStr(IdAlmacenObra)) do
Inc(i);
if (FAlmacenes.ValueFromIndex[i] = IntToStr(IdAlmacenObra)) then
cxListaAlmacenesObras.ItemIndex := i
end
//INV_OBRAS
else if Assigned(FObras) then
begin
i := 0;
while (i < FObras.Count) and (FObras.ValueFromIndex[i] <> IntToStr(IdAlmacenObra)) do
Inc(i);
if (FObras.ValueFromIndex[i] = IntToStr(IdAlmacenObra)) then
cxListaAlmacenesObras.ItemIndex := i
end
else else
pnlAlmacenes.Visible:= False; //En el caso de ser la vista para la selección de articulos de un determinado almacén
pnlAlmacenes.Visible:= False;
end; end;
procedure TfrViewDetalleReservas.cxGridViewStylesGetContentStyle(Sender: procedure TfrViewDetalleReservas.cxGridViewStylesGetContentStyle(Sender:
@ -206,6 +229,11 @@ begin
Result := FDetalleReservas; Result := FDetalleReservas;
end; end;
function TfrViewDetalleReservas.GetIdAlmacenObra: Integer;
begin
Result := FIDAlmacenObra;
end;
function TfrViewDetalleReservas.GetObras: TStringList; function TfrViewDetalleReservas.GetObras: TStringList;
begin begin
Result := FObras; Result := FObras;
@ -246,6 +274,11 @@ begin
end; end;
end; end;
procedure TfrViewDetalleReservas.SetAlmacenObra(const Value: Integer);
begin
FIDAlmacenObra := Value;
end;
procedure TfrViewDetalleReservas.SetDetalleReservas(const Value: IBizDetalleReservas); procedure TfrViewDetalleReservas.SetDetalleReservas(const Value: IBizDetalleReservas);
begin begin
FDetalleReservas := Value; FDetalleReservas := Value;

View File

@ -170,33 +170,30 @@ inherited frViewPresupuestosCliente: TfrViewPresupuestosCliente
Width = 285 Width = 285
end end
inherited edtFechaFinFiltro: TcxDateEdit inherited edtFechaFinFiltro: TcxDateEdit
Left = 308 Left = 295
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 308 ExplicitLeft = 295
ExplicitWidth = 504 ExplicitWidth = 504
Width = 504 Width = 504
end end
inherited eLista: TcxComboBox inherited eLista: TcxComboBox
Left = 733 Left = 757
Properties.OnChange = nil Properties.OnChange = nil
Style.LookAndFeel.SkinName = '' Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 733 ExplicitLeft = 757
ExplicitWidth = 215
Width = 215
end end
inherited dxLayoutControl1Group_Root: TdxLayoutGroup inherited dxLayoutControl1Group_Root: TdxLayoutGroup
inherited dxLayoutControl1Group1: TdxLayoutGroup inherited dxLayoutControl1Group1: TdxLayoutGroup
inherited dxLayoutControl1Item2: TdxLayoutItem
AlignHorz = ahClient
end
inherited dxLayoutControl1Item3: TdxLayoutItem
AlignHorz = ahClient
end
inherited dxLayoutControl1Item4: TdxLayoutItem inherited dxLayoutControl1Item4: TdxLayoutItem
Caption = 'Con/Sin Factura:'
Visible = True Visible = True
end end
end end

View File

@ -324,7 +324,7 @@ begin
AAlbaranesProveedorController.Guardar(AAlbaran); AAlbaranesProveedorController.Guardar(AAlbaran);
AAlbaranesProveedorController.Ver(AAlbaran); AAlbaranesProveedorController.Ver(AAlbaran);
//Si el pedido tiene obra de relacionada y el destino del pedido no es esa obra, preguntamos si quiere reservar de los materiales para esa obra //Si el pedido tiene obra relacionada y el destino del pedido no es esa obra, preguntamos si quiere reservar de los materiales para esa obra
if (APedido.ID_OBRA > 0) if (APedido.ID_OBRA > 0)
and (APedido.ID_OBRA <> APedido.ID_ALMACEN) then and (APedido.ID_OBRA <> APedido.ID_ALMACEN) then
begin begin