Se repasa y arregla el orden de las listas de informecion de toda la aplicacion, además de la vista de inventario para que no salgan articulos que no tengan unidades en almacen, ni reservas ni pendientes de recibir

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@773 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
roberto 2008-11-13 16:33:20 +00:00
parent 811bafd58b
commit 262f503bd4
12 changed files with 133 additions and 18 deletions

View File

@ -2833,6 +2833,9 @@ GROUP BY ID_ALMACEN,
ARTICULOS.REFERENCIA_FABR,
ARTICULOS.UNIDAD_MEDIDA
/* ARTICULOS.PRECIO_NETO*/
/*QUITAMOS AQUELLAS TUPLAS DE LAS QUE NO TENEMOS UNIDADES EN EL ALAMCEN, NO HAY RESERVAS NI PEDIDOS PENDIENTES DE RECIBIR*/
HAVING ((SUM(STOCK) <> 0 ) OR (SUM(RESERVA) <> 0) OR (SUM(PENDIENTE_RECEPCION) <> 0))
;

View File

@ -33,7 +33,7 @@ inherited fEditorArticulos: TfEditorArticulos
Width = 657
ExplicitWidth = 657
inherited tbxMain: TTBXToolbar
ExplicitWidth = 632
ExplicitWidth = 657
end
inherited tbxFiltro: TTBXToolbar
inherited tbxEditFiltro: TTBXEditItem
@ -56,7 +56,7 @@ inherited fEditorArticulos: TfEditorArticulos
Left = 3
Top = 105
Width = 651
Height = 317
Height = 377
ActivePage = pagArticulos
Align = alClient
TabOrder = 3
@ -67,7 +67,7 @@ inherited fEditorArticulos: TfEditorArticulos
Left = 0
Top = 0
Width = 643
Height = 289
Height = 349
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -78,12 +78,12 @@ inherited fEditorArticulos: TfEditorArticulos
TabOrder = 0
ReadOnly = False
ExplicitWidth = 643
ExplicitHeight = 289
ExplicitHeight = 349
inherited cxGrid: TcxGrid
Width = 643
Height = 161
Height = 221
ExplicitWidth = 643
ExplicitHeight = 161
ExplicitHeight = 221
inherited cxGridView: TcxGridDBTableView
DataController.Summary.FooterSummaryItems = <
item
@ -102,10 +102,30 @@ inherited fEditorArticulos: TfEditorArticulos
Width = 643
ExplicitWidth = 643
inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 567
Width = 567
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 = 20
Width = 20
end
@ -121,8 +141,8 @@ inherited fEditorArticulos: TfEditorArticulos
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 263
ExplicitTop = 263
Top = 323
ExplicitTop = 323
ExplicitWidth = 643
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 643
@ -156,7 +176,7 @@ inherited fEditorArticulos: TfEditorArticulos
Left = 0
Top = 0
Width = 643
Height = 289
Height = 349
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@ -167,10 +187,10 @@ inherited fEditorArticulos: TfEditorArticulos
TabOrder = 0
ReadOnly = False
ExplicitWidth = 643
ExplicitHeight = 289
ExplicitHeight = 349
inherited cxGrid: TcxGrid
Width = 643
Height = 161
Height = 221
ExplicitWidth = 643
ExplicitHeight = 161
inherited cxGridView: TcxGridDBTableView
@ -191,10 +211,30 @@ inherited fEditorArticulos: TfEditorArticulos
Width = 643
ExplicitWidth = 643
inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 567
Width = 567
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 = 20
Width = 20
end
@ -210,7 +250,7 @@ inherited fEditorArticulos: TfEditorArticulos
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 263
Top = 323
ExplicitTop = 263
ExplicitWidth = 643
inherited TBXAlignmentPanel1: TTBXAlignmentPanel

View File

@ -208,12 +208,20 @@ begin
end;
procedure TfEditorArticulos.SetViewGrid(const Value: IViewGridBase);
var
APosicionarAlprincipio: Boolean;
begin
inherited;
APosicionarAlprincipio := False;
case pgPaginas.ActivePage.TabIndex of
0: begin
if not Assigned(Articulos) then
begin
APosicionarAlprincipio := True;
Articulos := FController.BuscarTodos;
end;
Articulos.DataTable.Active := True;
if actFiltrar.Checked then
@ -237,7 +245,10 @@ begin
end;
1: begin
if not Assigned(ArticulosPorProveedor) then
begin
APosicionarAlprincipio := True;
ArticulosPorProveedor := FController.BuscarTodosPorProveedor;
end;
ArticulosPorProveedor.DataTable.Active := True;
if actFiltrar.Checked then
@ -258,6 +269,9 @@ begin
end;
end;
end;
if APosicionarAlprincipio then
ViewGrid._FocusedView.DataController.GotoFirst;
end;
destructor TfEditorArticulos.Destroy;

View File

@ -38,6 +38,8 @@ inherited frViewArticulos: TfrViewArticulos
end
object cxGridViewREFERENCIA: TcxGridDBColumn
DataBinding.FieldName = 'REFERENCIA'
SortIndex = 0
SortOrder = soAscending
end
object cxGridViewDESCRIPCION: TcxGridDBColumn
DataBinding.FieldName = 'DESCRIPCION'
@ -74,12 +76,32 @@ inherited frViewArticulos: TfrViewArticulos
Width = 715
ExplicitWidth = 715
inherited txtFiltroTodo: TcxTextEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 618
Width = 618
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
Properties.DropDownRows = 20
Properties.OnChange = frViewFiltroBase1eListaPropertiesChange
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 71
Width = 71
end

View File

@ -81,6 +81,8 @@ inherited frViewArticulosPorProveedor: TfrViewArticulosPorProveedor
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
BestFitMaxWidth = 60
SortIndex = 0
SortOrder = soAscending
Width = 60
end
object cxGridViewFABRICANTE: TcxGridDBColumn

View File

@ -1,6 +1,5 @@
inherited frViewHistoricoMovimientos: TfrViewHistoricoMovimientos
inherited cxGrid: TcxGrid
RootLevelOptions.DetailTabsPosition = dtpTop
OnActiveTabChanged = cxGridActiveTabChanged
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'RecID'
@ -32,6 +31,8 @@ inherited frViewHistoricoMovimientos: TfrViewHistoricoMovimientos
end
object cxGridViewFECHA: TcxGridDBColumn
DataBinding.FieldName = 'FECHA'
SortIndex = 0
SortOrder = soDescending
Width = 60
end
object cxGridViewTIPO_MOVIMIENTO: TcxGridDBColumn
@ -86,6 +87,7 @@ inherited frViewHistoricoMovimientos: TfrViewHistoricoMovimientos
Width = 41
end
object cxGridViewNOMBRE_ALMACEN: TcxGridDBColumn
Caption = 'Almac'#233'n/Obra'
DataBinding.FieldName = 'NOMBRE_ALMACEN'
Width = 42
end

View File

@ -149,7 +149,7 @@ var
Nivel: TcxGridLevel;
begin
FAlmacenes := Value;
{
if Assigned(FAlmacenes) then
begin
if not FAlmacenes.DataTable.Active then
@ -164,6 +164,7 @@ begin
FAlmacenes.Next;
end;
end;
}
end;
procedure TfrViewHistoricoMovimientos.SetHistoricoMovimientos(const Value: IBizHistoricoMovimientos);

View File

@ -3,6 +3,8 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
inherited cxGrid: TcxGrid
Top = 143
Height = 272
ExplicitTop = 143
ExplicitHeight = 272
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'RecID'
DataController.Summary.DefaultGroupSummaryItems = <
@ -77,6 +79,8 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
SortIndex = 0
SortOrder = soAscending
end
object cxGridViewDESCRIPCION: TcxGridDBColumn
Caption = 'Descripci'#243'n'
@ -164,6 +168,8 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 383
ExplicitWidth = 215
Width = 215
end
end
end
@ -175,8 +181,6 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
Height = 41
Align = alTop
TabOrder = 3
ExplicitLeft = -71
ExplicitWidth = 678
DesignSize = (
607
41)
@ -204,7 +208,6 @@ inherited frViewDetalleReservas: TfrViewDetalleReservas
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
ExplicitWidth = 581
Width = 510
end
end

View File

@ -54,6 +54,7 @@ inherited frViewInventario: TfrViewInventario
Kind = skSum
Column = cxGridViewPENDIENTE_RECEPCION
end>
DataController.OnCompare = cxGridViewDataControllerCompare
object cxGridViewID: TcxGridDBColumn
DataBinding.FieldName = 'ID'
Visible = False
@ -78,6 +79,8 @@ inherited frViewInventario: TfrViewInventario
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
MinWidth = 30
SortIndex = 0
SortOrder = soAscending
end
object cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn
Caption = 'Ref. proveedor'
@ -179,6 +182,8 @@ inherited frViewInventario: TfrViewInventario
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 510
Width = 510
end
inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
@ -197,6 +202,8 @@ inherited frViewInventario: TfrViewInventario
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitWidth = 215
Width = 215
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel

View File

@ -60,6 +60,9 @@ type
AStyle: TcxStyle);
procedure cxListaObrasPropertiesEditValueChanged(Sender: TObject);
procedure CustomViewShow(Sender: TObject);
procedure cxGridViewDataControllerCompare(
ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
private
//Filtros relativos a la vista
@ -86,7 +89,7 @@ type
implementation
{$R *.dfm}
uses uDataModuleInventario, schInventarioClient_Intf;
uses uDataModuleInventario, schInventarioClient_Intf, uReferenciasUtils, cxVariants;
procedure TfrViewInventario.AnadirFiltroAlmacenesObras;
var
@ -129,6 +132,18 @@ begin
pnlAlmacenes.Visible:= False;
end;
procedure TfrViewInventario.cxGridViewDataControllerCompare(
ADataController: TcxCustomDataController; ARecordIndex1, ARecordIndex2,
AItemIndex: Integer; const V1, V2: Variant; var Compare: Integer);
begin
inherited;
if (AItemIndex = cxGridViewREFERENCIA.Index) and
(VarType(V1) = VarType(V2)) and (VarType(V1) = varString) then
Compare := CompararReferencias(V1, V2)
else
Compare := VarCompare(V1, V2);
end;
procedure TfrViewInventario.cxGridViewStylesGetContentStyle(Sender:
TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem:
TcxCustomGridTableItem; out AStyle: TcxStyle);

View File

@ -47,6 +47,8 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
SortIndex = 0
SortOrder = soDescending
Width = 64
end
object cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn
@ -188,10 +190,12 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
Width = 222
end
inherited eLista: TcxComboBox
Left = 558
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
ExplicitLeft = 558
ExplicitWidth = 215
Width = 215
end

View File

@ -47,6 +47,8 @@ inherited frViewRecibosProveedor: TfrViewRecibosProveedor
object cxGridViewREFERENCIA: TcxGridDBColumn
Caption = 'Referencia'
DataBinding.FieldName = 'REFERENCIA'
SortIndex = 0
SortOrder = soDescending
Width = 71
end
object cxGridViewID_RECIBO_COMPENSADO: TcxGridDBColumn