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
AController := NIL;
end;
cbCuentaBancaria.ItemIndex := 0;
end;
function TfEditorElegirDomiciliacion.GetCuentaBancaria: String;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -324,7 +324,7 @@ begin
AAlbaranesProveedorController.Guardar(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)
and (APedido.ID_OBRA <> APedido.ID_ALMACEN) then
begin