Se añade la funcionalidad del nuevo tipo de presupuestos (arreglos)

git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@36 9a1d36f3-7752-2d40-8ccb-50eb49674c68
This commit is contained in:
roberto 2019-01-08 16:58:04 +00:00
parent 75edf8cc93
commit 18e07918cb
28 changed files with 228 additions and 29 deletions

Binary file not shown.

View File

@ -1,8 +1,8 @@
object dmBase: TdmBase
OldCreateOrder = True
OnCreate = DAClientDataModuleCreate
Left = 997
Top = 222
Left = 733
Top = 187
Height = 368
Width = 494
object SmallImages: TPngImageList

View File

@ -1,6 +1,6 @@
object fEditorBase: TfEditorBase
Left = 666
Top = 271
Left = 312
Top = 82
Width = 670
Height = 512
Caption = 'EditorBase'

View File

@ -1,5 +1,4 @@
inherited fEditorDBBase: TfEditorDBBase
Left = 585
Caption = 'fEditorDBBase'
PixelsPerInch = 96
TextHeight = 13

View File

@ -1,6 +1,6 @@
inherited fEditorGrid: TfEditorGrid
Left = 583
Top = 195
Left = 206
Top = 122
Width = 714
Height = 485
Caption = 'fEditorGrid'

View File

@ -6,7 +6,7 @@ inherited frViewGrid: TfrViewGrid
Left = 0
Top = 102
Width = 443
Height = 168
Height = 142
Align = alClient
TabOrder = 0
LookAndFeel.Kind = lfFlat
@ -67,12 +67,15 @@ inherited frViewGrid: TfrViewGrid
Width = 439
inherited txtFiltroTodo: TcxTextEdit
Left = 87
Width = 273
end
inherited edtFechaIniFiltro: TcxDateEdit
Left = 87
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 275
Width = 121
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@ -84,6 +87,41 @@ inherited frViewGrid: TfrViewGrid
end
end
end
object pnlAgrupaciones: TTBXDockablePanel
Left = 0
Top = 244
MinClientHeight = 8
Align = alBottom
Caption = 'pnlAgrupaciones'
DockedHeight = 26
FloatingWidth = 128
FloatingHeight = 26
SupportedDocks = [dkStandardDock, dkMultiDock]
TabOrder = 2
Visible = False
object TBXAlignmentPanel1: TTBXAlignmentPanel
Left = 0
Top = 0
Width = 443
Height = 26
Align = alTop
Margins.Left = 10
TabOrder = 0
object TBXToolbar1: TTBXToolbar
Left = 10
Top = 0
Width = 433
Height = 26
Align = alTop
AutoResize = False
Caption = 'TBXToolbar1'
TabOrder = 0
object TBXItem1: TTBXItem
Action = actQuitarAgrupaciones
end
end
end
end
object DADataSource: TDADataSource
Left = 368
Top = 96
@ -114,7 +152,7 @@ inherited frViewGrid: TfrViewGrid
PrinterPage.PageSize.Y = 297000
PrinterPage._dxMeasurementUnits_ = 0
PrinterPage._dxLastMU_ = 2
ReportDocument.CreationDate = 42891.704888599540000000
ReportDocument.CreationDate = 43463.336839328700000000
OptionsCharts.Transparent = True
OptionsFormatting.SuppressBackgroundBitmaps = True
OptionsOnEveryPage.Caption = False
@ -148,4 +186,11 @@ inherited frViewGrid: TfrViewGrid
TextColor = clHighlightText
end
end
object ActionList2: TActionList
Left = 400
Top = 360
object actQuitarAgrupaciones: TAction
Caption = 'Quitar agrupaciones'
end
end
end

View File

@ -11,7 +11,8 @@ uses
DBGrids, JvComponent, JvFormAutoSize, dxPSGlbl, dxPSUtl, dxPSEngn,
dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns,
dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGridLnk, dxPrnDlg,
cxIntlPrintSys3, dxPSPrvwAdv, uViewFiltroBase;
cxIntlPrintSys3, dxPSPrvwAdv, uViewFiltroBase, TB2Item, TBX, TB2Toolbar,
TBXDkPanels, TB2Dock;
type
IViewGrid = interface(IViewBase)
@ -59,6 +60,12 @@ type
cxStyleOdd: TcxStyle;
cxStyleSelection: TcxStyle;
frViewFiltroBase1: TfrViewFiltroBase;
pnlAgrupaciones: TTBXDockablePanel;
TBXAlignmentPanel1: TTBXAlignmentPanel;
TBXToolbar1: TTBXToolbar;
TBXItem1: TTBXItem;
ActionList2: TActionList;
actQuitarAgrupaciones: TAction;
procedure cxGridViewDblClick(Sender: TObject);
procedure cxGridViewDataControllerSortingChanged(Sender: TObject);
procedure SelectionChanged(Sender: TcxCustomGridTableView); virtual; abstract;

View File

@ -7,7 +7,7 @@ object srvAlbaranesCliente: TsrvAlbaranesCliente
ServiceSchema = schAlbaranesCliente
ServiceAdapter = DABINAdapter
Left = 681
Top = 308
Top = 296
Height = 463
Width = 347
object schAlbaranesCliente: TDASchema

View File

@ -7,7 +7,7 @@ object srvAlmacenes: TsrvAlmacenes
ServiceSchema = schAlmacenes
ServiceAdapter = DABINAdapter
Left = 332
Top = 246
Top = 237
Height = 300
Width = 300
object schAlmacenes: TDASchema

View File

@ -6,7 +6,7 @@ object srvArticulos: TsrvArticulos
ServiceSchema = schArticulos
ServiceAdapter = DABINAdapter
Left = 740
Top = 275
Top = 265
Height = 300
Width = 300
object schArticulos: TDASchema

View File

@ -7,7 +7,7 @@ object srvAsientos: TsrvAsientos
ServiceSchema = schAsientos
ServiceAdapter = DABINAdapter
Left = 843
Top = 206
Top = 198
Height = 300
Width = 300
object schAsientos: TDASchema

View File

@ -7,7 +7,7 @@ object srvCitas: TsrvCitas
ServiceSchema = schCitas
ServiceAdapter = DABINAdapter
Left = 826
Top = 252
Top = 243
Height = 184
Width = 245
object schCitas: TDASchema

View File

@ -8,7 +8,7 @@ object srvContactos: TsrvContactos
ServiceSchema = schContactos
ServiceAdapter = DABINAdapter
Left = 1016
Top = 381
Top = 366
Height = 354
Width = 450
object schContactos: TDASchema

View File

@ -7,7 +7,7 @@ object srvCuentas: TsrvCuentas
ServiceSchema = schCuentas
ServiceAdapter = DABINAdapter
Left = 912
Top = 219
Top = 211
Height = 300
Width = 300
object schCuentas: TDASchema

View File

@ -7,7 +7,7 @@ object srvFacturasCliente: TsrvFacturasCliente
ServiceSchema = schFacturasCliente
ServiceAdapter = DABINAdapter
Left = 1167
Top = 376
Top = 361
Height = 490
Width = 347
object schFacturasCliente: TDASchema

View File

@ -7,7 +7,7 @@ object srvFacturasProveedor: TsrvFacturasProveedor
ServiceSchema = schFacturasProveedor
ServiceAdapter = DABINAdapter
Left = 785
Top = 464
Top = 446
Height = 392
Width = 369
object schFacturasProveedor: TDASchema

View File

@ -7,7 +7,7 @@ object srvIntervalos: TsrvIntervalos
ServiceSchema = schIntervalos
ServiceAdapter = DABINAdapter
Left = 732
Top = 250
Top = 241
Height = 300
Width = 300
object schIntervalos: TDASchema

View File

@ -6,7 +6,7 @@ object srvMontajes: TsrvMontajes
ServiceSchema = schMontajes
ServiceAdapter = DABINAdapter
Left = 1064
Top = 254
Top = 244
Height = 356
Width = 300
object bpMontajes: TDABusinessProcessor

View File

@ -1,6 +1,4 @@
inherited fEditorPagos: TfEditorPagos
Left = 345
Top = 212
Caption = 'Lista de pagos'
PixelsPerInch = 96
TextHeight = 13

View File

@ -7,7 +7,7 @@ object srvPagos: TsrvPagos
ServiceSchema = schPagos
ServiceAdapter = DABINAdapter
Left = 568
Top = 549
Top = 527
Height = 300
Width = 300
object schPagos: TDASchema

View File

@ -7,7 +7,7 @@ object srvPedidosProveedor: TsrvPedidosProveedor
ServiceSchema = schPedidosProveedor
ServiceAdapter = DABINAdapter
Left = 732
Top = 372
Top = 358
Height = 459
Width = 300
object schPedidosProveedor: TDASchema

View File

@ -52,6 +52,7 @@ begin
Clear;
Add(TIPO_COCINA);
Add(TIPO_BANO);
Add(TIPO_ARREGLOS);
finally
EndUpdate;
end;

View File

@ -1,5 +1,9 @@
inherited frViewPresupuestos: TfrViewPresupuestos
Width = 685
Height = 453
inherited cxGrid: TcxGrid
Width = 685
Height = 325
RootLevelOptions.DetailTabsPosition = dtpTop
OnActiveTabChanged = cxGridActiveTabChanged
inherited cxGridView: TcxGridDBTableView
@ -116,9 +120,12 @@ inherited frViewPresupuestos: TfrViewPresupuestos
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase
Width = 685
inherited TBXDock1: TTBXDock
Width = 685
inherited TBXDockablePanel1: TTBXDockablePanel
inherited dxLayoutControl1: TdxLayoutControl
Width = 681
inherited txtFiltroTodo: TcxTextEdit
Width = 273
end
@ -126,9 +133,41 @@ inherited frViewPresupuestos: TfrViewPresupuestos
Width = 121
end
inherited edtFechaFinFiltro: TcxDateEdit
Left = 420
Width = 121
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 681
inherited tbxBotones: TTBXToolbar
Width = 671
end
end
end
end
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 427
Visible = True
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
Width = 685
inherited TBXToolbar1: TTBXToolbar
Width = 675
object TBXSeparatorItem3: TTBXSeparatorItem
end
object TBXItem4: TTBXItem
Action = actCocinas
end
object TBXSeparatorItem2: TTBXSeparatorItem
end
object TBXItem3: TTBXItem
Action = actBanos
end
object TBXSeparatorItem1: TTBXSeparatorItem
end
object TBXItem2: TTBXItem
Action = actArreglos
end
end
end
end
@ -147,6 +186,28 @@ inherited frViewPresupuestos: TfrViewPresupuestos
object cxStyleAceptado: TcxStyle
end
end
inherited ActionList2: TActionList
inherited actQuitarAgrupaciones: TAction
Caption = 'Todos'
OnExecute = actQuitarAgrupacionesExecute
OnUpdate = actQuitarAgrupacionesUpdate
end
object actCocinas: TAction
Caption = 'Cocinas'
OnExecute = actCocinasExecute
OnUpdate = actCocinasUpdate
end
object actBanos: TAction
Caption = 'Ba'#241'os'
OnExecute = actBanosExecute
OnUpdate = actBanosUpdate
end
object actArreglos: TAction
Caption = 'Arreglos'
OnExecute = actArreglosExecute
OnUpdate = actArreglosUpdate
end
end
object PngImageList: TPngImageList
PngImages = <
item

View File

@ -12,7 +12,8 @@ uses
cxLabel, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev,
dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, cxIntlPrintSys3,
dxPSCore, dxPScxCommon, dxPScxGridLnk, cxImage, cxImageComboBox, ImgList,
PngImageList, cxTextEdit, Grids, DBGrids, cxCurrencyEdit, uViewFiltroBase;
PngImageList, cxTextEdit, Grids, DBGrids, cxCurrencyEdit, uViewFiltroBase,
TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock;
type
IViewPresupuestos = interface(IViewGrid)
@ -42,6 +43,15 @@ type
cxGridViewTIPO: TcxGridDBColumn;
cxGridViewALBARAN: TcxGridDBColumn;
cxGridViewOPCION: TcxGridDBColumn;
TBXItem2: TTBXItem;
TBXItem3: TTBXItem;
TBXItem4: TTBXItem;
actCocinas: TAction;
actBanos: TAction;
actArreglos: TAction;
TBXSeparatorItem1: TTBXSeparatorItem;
TBXSeparatorItem2: TTBXSeparatorItem;
TBXSeparatorItem3: TTBXSeparatorItem;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
procedure cxGridViewCODIGOCustomDrawCell(Sender: TcxCustomGridTableView;
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var
@ -49,10 +59,20 @@ type
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; out
AStyle: TcxStyle);
procedure actCocinasExecute(Sender: TObject);
procedure actBanosExecute(Sender: TObject);
procedure actArreglosExecute(Sender: TObject);
procedure actQuitarAgrupacionesExecute(Sender: TObject);
procedure actQuitarAgrupacionesUpdate(Sender: TObject);
procedure actCocinasUpdate(Sender: TObject);
procedure actBanosUpdate(Sender: TObject);
procedure actArreglosUpdate(Sender: TObject);
private
FTipoPresupuesto: String;
//Filtros relativos a la vista
procedure AnadirFiltroSituaciones;
procedure AnadirFiltroFechas;
procedure AnadirTipoPresupuestos;
protected
FPresupuestos: IBizPresupuestos;
@ -154,6 +174,7 @@ procedure TfrViewPresupuestos.AnadirOtrosFiltros;
begin
inherited;
AnadirTipoPresupuestos;
AnadirFiltroSituaciones;
AnadirFiltroFechas;
@ -166,9 +187,75 @@ end;
procedure TfrViewPresupuestos.SetPresupuestos(const Value: IBizPresupuestos);
begin
FTipoPresupuesto:= '';
FPresupuestos := Value;
if Assigned(FPresupuestos) then
DADataSource.DataTable := FPresupuestos.DataTable;
end;
procedure TfrViewPresupuestos.AnadirTipoPresupuestos;
var
FFiltro : TcxFilterCriteriaItemList;
begin
FFiltro := AddFilterGrid(fboAnd);
if (FTipoPresupuesto <> '') then
if (FTipoPresupuesto = TIPO_COCINA) then FFiltro.AddItem(cxGridViewTIPO, foEqual, TIPO_COCINA, TIPO_COCINA)
else if (FTipoPresupuesto = TIPO_BANO) then FFiltro.AddItem(cxGridViewTIPO, foEqual, TIPO_BANO, TIPO_BANO)
else if (FTipoPresupuesto = TIPO_ARREGLOS) then FFiltro.AddItem(cxGridViewTIPO, foEqual, TIPO_ARREGLOS, TIPO_ARREGLOS);
end;
procedure TfrViewPresupuestos.actCocinasExecute(Sender: TObject);
begin
inherited;
FTipoPresupuesto := TIPO_COCINA;
RefrescarFiltro
end;
procedure TfrViewPresupuestos.actBanosExecute(Sender: TObject);
begin
inherited;
FTipoPresupuesto := TIPO_BANO;
RefrescarFiltro
end;
procedure TfrViewPresupuestos.actArreglosExecute(Sender: TObject);
begin
inherited;
FTipoPresupuesto := TIPO_ARREGLOS;
RefrescarFiltro
end;
procedure TfrViewPresupuestos.actQuitarAgrupacionesExecute(
Sender: TObject);
begin
inherited;
FTipoPresupuesto := '';
RefrescarFiltro
end;
procedure TfrViewPresupuestos.actQuitarAgrupacionesUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (FTipoPresupuesto <> '');
end;
procedure TfrViewPresupuestos.actCocinasUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (FTipoPresupuesto <> TIPO_COCINA);
end;
procedure TfrViewPresupuestos.actBanosUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (FTipoPresupuesto <> TIPO_BANO);
end;
procedure TfrViewPresupuestos.actArreglosUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := (FTipoPresupuesto <> TIPO_ARREGLOS);
end;
end.

View File

@ -18,6 +18,7 @@ const
TIPO_COCINA = 'Cocina';
TIPO_BANO = 'Baño';
TIPO_ARREGLOS = 'Arreglos';
type
IBizDetallesPresupuesto = interface(IDetallesPresupuestos)

View File

@ -7,7 +7,7 @@ object srvPresupuestos: TsrvPresupuestos
ServiceSchema = schPresupuestos
ServiceAdapter = DABINAdapter
Left = 1198
Top = 318
Top = 306
Height = 359
Width = 328
object schPresupuestos: TDASchema

View File

@ -6,7 +6,7 @@ object srvComisiones: TsrvComisiones
ServiceSchema = schComisiones
ServiceAdapter = DABINAdapter
Left = 1113
Top = 238
Top = 229
Height = 300
Width = 300
object schComisiones: TDASchema

View File

@ -7,7 +7,7 @@ object srvConfiguracion: TsrvConfiguracion
ServiceSchema = schConfiguracion
ServiceAdapter = DABINAdapter
Left = 1160
Top = 135
Top = 130
Height = 161
Width = 300
object schConfiguracion: TDASchema