Se adaptan las remesas de cliente para poder filtrar por importes ademas de por fechas y descripcion
git-svn-id: https://192.168.0.254/svn/Proyectos.Noviseda_FactuGES2/trunk@100 f33bb606-9f5c-448d-9c99-757f00063c96
This commit is contained in:
parent
9f6ee5623c
commit
ea8c47f31c
@ -1,23 +1,25 @@
|
||||
inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
Caption = 'Seleccionar recibos de cliente'
|
||||
ClientWidth = 670
|
||||
ExplicitWidth = 678
|
||||
ClientHeight = 626
|
||||
ClientWidth = 898
|
||||
ExplicitWidth = 906
|
||||
ExplicitHeight = 660
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||
Top = 264
|
||||
Width = 670
|
||||
Width = 898
|
||||
Visible = False
|
||||
ExplicitTop = 264
|
||||
ExplicitWidth = 670
|
||||
inherited Image1: TImage
|
||||
Left = 643
|
||||
Left = 871
|
||||
ExplicitLeft = 629
|
||||
end
|
||||
end
|
||||
inherited TBXDock: TSpTBXDock
|
||||
Top = 192
|
||||
Width = 670
|
||||
Width = 898
|
||||
Height = 72
|
||||
ExplicitTop = 192
|
||||
ExplicitWidth = 670
|
||||
@ -59,7 +61,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
end
|
||||
end
|
||||
inherited tbxMenu: TSpTBXToolbar
|
||||
ExplicitWidth = 670
|
||||
ExplicitWidth = 898
|
||||
end
|
||||
inherited TBXTMain2: TSpTBXToolbar
|
||||
Left = 330
|
||||
@ -69,15 +71,15 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
end
|
||||
end
|
||||
inherited StatusBar: TJvStatusBar
|
||||
Top = 506
|
||||
Width = 670
|
||||
Top = 571
|
||||
Width = 898
|
||||
ExplicitTop = 506
|
||||
ExplicitWidth = 670
|
||||
end
|
||||
inline frViewBarraSeleccion1: TfrViewBarraSeleccion [3]
|
||||
Left = 0
|
||||
Top = 525
|
||||
Width = 670
|
||||
Top = 590
|
||||
Width = 898
|
||||
Height = 36
|
||||
Align = alBottom
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
@ -92,20 +94,20 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
ExplicitWidth = 670
|
||||
ExplicitHeight = 36
|
||||
inherited JvFooter1: TJvFooter
|
||||
Width = 670
|
||||
Width = 898
|
||||
Height = 36
|
||||
ExplicitWidth = 670
|
||||
ExplicitHeight = 36
|
||||
inherited bSeleccionar: TJvFooterBtn
|
||||
Left = 458
|
||||
Left = 686
|
||||
Top = 3
|
||||
ExplicitLeft = 444
|
||||
ExplicitTop = 3
|
||||
end
|
||||
inherited bCancelar: TJvFooterBtn
|
||||
Left = 562
|
||||
Left = 790
|
||||
Top = 4
|
||||
ExplicitLeft = 562
|
||||
ExplicitLeft = 790
|
||||
ExplicitTop = 4
|
||||
end
|
||||
end
|
||||
@ -122,7 +124,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
object pnlHeader: TPanel [4]
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 670
|
||||
Width = 898
|
||||
Height = 64
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
@ -133,11 +135,12 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
Padding.Bottom = 8
|
||||
ParentBackground = False
|
||||
TabOrder = 6
|
||||
ExplicitWidth = 670
|
||||
object lblTitle: TLabel
|
||||
AlignWithMargins = True
|
||||
Left = 25
|
||||
Top = 8
|
||||
Width = 620
|
||||
Width = 848
|
||||
Height = 13
|
||||
Margins.Left = 0
|
||||
Margins.Top = 0
|
||||
@ -157,7 +160,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
AlignWithMargins = True
|
||||
Left = 50
|
||||
Top = 29
|
||||
Width = 595
|
||||
Width = 823
|
||||
Height = 24
|
||||
Margins.Left = 25
|
||||
Margins.Top = 0
|
||||
@ -169,14 +172,14 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
end
|
||||
inherited frViewRecibosCliente1: TfrViewRecibosCliente [5]
|
||||
Top = 291
|
||||
Width = 670
|
||||
Height = 215
|
||||
Width = 898
|
||||
Height = 280
|
||||
ExplicitTop = 291
|
||||
ExplicitWidth = 670
|
||||
ExplicitHeight = 215
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 670
|
||||
Height = 87
|
||||
Width = 898
|
||||
Height = 152
|
||||
RootLevelOptions.DetailTabsPosition = dtpNone
|
||||
ExplicitWidth = 670
|
||||
ExplicitHeight = 87
|
||||
@ -201,13 +204,13 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
end
|
||||
end
|
||||
inherited frViewFiltroBase1: TfrViewFiltroBase
|
||||
Width = 670
|
||||
Width = 898
|
||||
ExplicitWidth = 670
|
||||
inherited TBXDockablePanel1: TSpTBXDockablePanel
|
||||
Width = 670
|
||||
Width = 898
|
||||
ExplicitWidth = 670
|
||||
inherited dxLayoutControl1: TdxLayoutControl
|
||||
Width = 670
|
||||
Width = 898
|
||||
ExplicitWidth = 670
|
||||
inherited txtFiltroTodo: TcxTextEdit
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
@ -226,46 +229,46 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
Width = 205
|
||||
end
|
||||
inherited edtFechaFinFiltro: TcxDateEdit
|
||||
Left = 263
|
||||
Left = 347
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 263
|
||||
ExplicitLeft = 347
|
||||
ExplicitWidth = 351
|
||||
Width = 351
|
||||
end
|
||||
inherited eLista: TcxComboBox
|
||||
Left = 528
|
||||
Left = 698
|
||||
Style.LookAndFeel.SkinName = ''
|
||||
StyleDisabled.LookAndFeel.SkinName = ''
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 528
|
||||
ExplicitLeft = 698
|
||||
ExplicitWidth = 215
|
||||
Width = 215
|
||||
end
|
||||
end
|
||||
inherited TBXAlignmentPanel1: TSpTBXDockablePanel
|
||||
Width = 660
|
||||
Width = 888
|
||||
ExplicitWidth = 660
|
||||
inherited tbxBotones: TSpTBXToolbar
|
||||
Width = 660
|
||||
Width = 888
|
||||
ExplicitWidth = 660
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited pnlAgrupaciones: TSpTBXDockablePanel
|
||||
Top = 189
|
||||
Width = 670
|
||||
Top = 254
|
||||
Width = 898
|
||||
ExplicitTop = 189
|
||||
ExplicitWidth = 670
|
||||
inherited TBXAlignmentPanel1: TSpTBXDockablePanel
|
||||
Width = 670
|
||||
Width = 898
|
||||
ExplicitWidth = 670
|
||||
inherited TBXToolbar1: TSpTBXToolbar
|
||||
Width = 670
|
||||
Width = 898
|
||||
ExplicitWidth = 670
|
||||
end
|
||||
end
|
||||
@ -290,22 +293,51 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
object pnlFiltrar: TPanel [6]
|
||||
Left = 0
|
||||
Top = 64
|
||||
Width = 670
|
||||
Width = 898
|
||||
Height = 128
|
||||
Align = alTop
|
||||
Caption = 'Filtrar'
|
||||
TabOrder = 5
|
||||
ExplicitTop = 59
|
||||
ExplicitWidth = 670
|
||||
object Label1: TLabel
|
||||
Left = 329
|
||||
Top = 50
|
||||
Width = 18
|
||||
Height = 15
|
||||
Top = 48
|
||||
Width = 17
|
||||
Height = 13
|
||||
Caption = 'y el'
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 33
|
||||
Top = 22
|
||||
Width = 116
|
||||
Height = 13
|
||||
Caption = 'Recibos que contengan:'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 33
|
||||
Top = 48
|
||||
Width = 150
|
||||
Height = 13
|
||||
Caption = 'Recibos con vencimiento entre:'
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 33
|
||||
Top = 76
|
||||
Width = 129
|
||||
Height = 13
|
||||
Caption = 'Recibos con importe entre:'
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 329
|
||||
Top = 76
|
||||
Width = 6
|
||||
Height = 13
|
||||
Caption = 'y'
|
||||
end
|
||||
object txtFiltroTodo: TcxTextEdit
|
||||
Left = 202
|
||||
Top = 16
|
||||
Properties.OnChange = txtFiltroTodoPropertiesChange
|
||||
Top = 19
|
||||
Properties.OnChange = OnParametrosFiltroChange
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
@ -320,8 +352,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
object edtFechaFiltro1: TcxDateEdit
|
||||
Left = 202
|
||||
Top = 46
|
||||
Enabled = False
|
||||
Properties.OnEditValueChanged = edtFechaFiltro1PropertiesEditValueChanged
|
||||
Properties.OnEditValueChanged = OnParametrosFiltroChange
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
@ -336,8 +367,7 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
object edtFechaFiltro2: TcxDateEdit
|
||||
Left = 354
|
||||
Top = 46
|
||||
Enabled = False
|
||||
Properties.OnEditValueChanged = edtFechaFiltro1PropertiesEditValueChanged
|
||||
Properties.OnEditValueChanged = OnParametrosFiltroChange
|
||||
Style.LookAndFeel.Kind = lfStandard
|
||||
Style.LookAndFeel.NativeStyle = True
|
||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||
@ -349,38 +379,14 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
TabOrder = 2
|
||||
Width = 121
|
||||
end
|
||||
object rbTodo: TcxRadioButton
|
||||
Left = 16
|
||||
Top = 18
|
||||
Width = 145
|
||||
Height = 17
|
||||
Caption = 'Recibos que contengan:'
|
||||
Checked = True
|
||||
TabOrder = 3
|
||||
TabStop = True
|
||||
OnClick = rbTodoClick
|
||||
LookAndFeel.Kind = lfStandard
|
||||
LookAndFeel.NativeStyle = True
|
||||
end
|
||||
object rbFechas: TcxRadioButton
|
||||
Left = 16
|
||||
Top = 48
|
||||
Width = 174
|
||||
Height = 17
|
||||
Caption = 'Recibos con vencimiento entre:'
|
||||
TabOrder = 4
|
||||
OnClick = rbTodoClick
|
||||
LookAndFeel.Kind = lfStandard
|
||||
LookAndFeel.NativeStyle = True
|
||||
end
|
||||
object Button1: TBitBtn
|
||||
Left = 504
|
||||
Top = 43
|
||||
Left = 481
|
||||
Top = 17
|
||||
Width = 163
|
||||
Height = 25
|
||||
Action = actQuitarFiltro2
|
||||
Caption = 'Quitar filtro y ver todo'
|
||||
TabOrder = 5
|
||||
TabOrder = 3
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000000000000000000000000000000000000FF00FF00FF00
|
||||
@ -417,6 +423,32 @@ inherited fEditorElegirRecibosCliente: TfEditorElegirRecibosCliente
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
|
||||
end
|
||||
object edtImporteFiltro1: TcxSpinEdit
|
||||
Left = 202
|
||||
Top = 73
|
||||
Properties.AssignedValues.EditFormat = True
|
||||
Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364
|
||||
Properties.ImmediatePost = True
|
||||
Properties.Increment = 100.000000000000000000
|
||||
Properties.LargeIncrement = 1000.000000000000000000
|
||||
Properties.OnChange = OnParametrosFiltroChange
|
||||
Properties.OnEditValueChanged = OnParametrosFiltroChange
|
||||
TabOrder = 4
|
||||
Width = 121
|
||||
end
|
||||
object edtImporteFiltro2: TcxSpinEdit
|
||||
Left = 354
|
||||
Top = 73
|
||||
Properties.AssignedValues.EditFormat = True
|
||||
Properties.DisplayFormat = ',0.00 '#8364';-,0.00 '#8364
|
||||
Properties.ImmediatePost = True
|
||||
Properties.Increment = 100.000000000000000000
|
||||
Properties.LargeIncrement = 1000.000000000000000000
|
||||
Properties.OnChange = OnParametrosFiltroChange
|
||||
Properties.OnEditValueChanged = OnParametrosFiltroChange
|
||||
TabOrder = 5
|
||||
Width = 121
|
||||
end
|
||||
end
|
||||
inherited EditorActionList: TActionList [9]
|
||||
Left = 112
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
-----------------------------------------------------------------------------
|
||||
Web: www.rodax-software.com
|
||||
===============================================================================
|
||||
Fecha primera versión:
|
||||
Fecha primera versión:
|
||||
Versión actual: 1.0.0
|
||||
Fecha versión actual:
|
||||
Fecha versión actual:
|
||||
===============================================================================
|
||||
Modificaciones:
|
||||
|
||||
@ -37,10 +37,10 @@ uses
|
||||
|
||||
uViewRecibosCliente, uEditorRecibosCliente, uBizRecibosCliente, uIEditorElegirRecibosCliente,
|
||||
Buttons, cxRadioGroup, cxMaskEdit, cxDropDownEdit, cxCalendar, cxControls,
|
||||
cxContainer, cxEdit, cxTextEdit, SpTBXDkPanels, JSDialog,
|
||||
cxContainer, cxEdit, cxTextEdit, SpTBXDkPanels, JSDialog,
|
||||
uDAInterfaces, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, TntStdCtrls,
|
||||
SpTBXEditors;
|
||||
|
||||
SpTBXEditors, cxSpinEdit;
|
||||
|
||||
|
||||
type
|
||||
TfEditorElegirRecibosCliente = class(TfEditorRecibosCliente, IEditorElegirRecibosCliente)
|
||||
@ -56,19 +56,21 @@ type
|
||||
txtFiltroTodo: TcxTextEdit;
|
||||
edtFechaFiltro1: TcxDateEdit;
|
||||
edtFechaFiltro2: TcxDateEdit;
|
||||
rbTodo: TcxRadioButton;
|
||||
rbFechas: TcxRadioButton;
|
||||
Button1: TBitBtn;
|
||||
pnlHeader: TPanel;
|
||||
edtImporteFiltro1: TcxSpinEdit;
|
||||
edtImporteFiltro2: TcxSpinEdit;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
procedure frViewBarraSeleccion1actSeleccionarUpdate(Sender: TObject);
|
||||
procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject);
|
||||
procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure actAnchoAuto2Execute(Sender: TObject);
|
||||
procedure actQuitarFiltro2Execute(Sender: TObject);
|
||||
procedure txtFiltroTodoPropertiesChange(Sender: TObject);
|
||||
procedure edtFechaFiltro1PropertiesEditValueChanged(Sender: TObject);
|
||||
procedure rbTodoClick(Sender: TObject);
|
||||
procedure OnParametrosFiltroChange(Sender: TObject);
|
||||
protected
|
||||
procedure SetMultiSelect (AValue : Boolean);
|
||||
function GetMultiSelect : Boolean;
|
||||
@ -107,27 +109,15 @@ begin
|
||||
txtFiltroTodo.Clear;
|
||||
edtFechaFiltro1.Clear;
|
||||
edtFechaFiltro2.Clear;
|
||||
(ViewGrid as IViewRecibosCliente).FiltrarPorFechas(null, null);
|
||||
edtImporteFiltro1.Clear;
|
||||
edtImporteFiltro2.Clear;
|
||||
// (ViewGrid as IViewRecibosCliente).FiltrarPorFechas(null, null);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
// actQuitarFiltro.Execute;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirRecibosCliente.edtFechaFiltro1PropertiesEditValueChanged(Sender: TObject);
|
||||
begin
|
||||
if not VarIsNull(edtFechaFiltro1.EditValue) and not VarIsNull(edtFechaFiltro2.EditValue) then
|
||||
begin
|
||||
if (edtFechaFiltro1.EditValue > edtFechaFiltro2.EditValue) then
|
||||
begin
|
||||
ShowWarningMessage('La fecha de inicio debe ser anterior a la fecha final');
|
||||
edtFechaFiltro1.SetFocus;
|
||||
end
|
||||
else
|
||||
(ViewGrid as IViewRecibosCliente).FiltrarPorFechas(edtFechaFiltro1.EditValue, edtFechaFiltro2.EditValue);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirRecibosCliente.FormShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
@ -163,23 +153,6 @@ begin
|
||||
Result := (Controller as IRecibosClienteController).ExtraerSeleccionados(RecibosCliente) as IBizRecibosCliente;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirRecibosCliente.rbTodoClick(Sender: TObject);
|
||||
begin
|
||||
actQuitarFiltro.Execute;
|
||||
|
||||
if rbTodo.Checked then
|
||||
begin
|
||||
edtFechaFiltro1.Enabled := False;
|
||||
edtFechaFiltro2.Enabled := False;
|
||||
txtFiltroTodo.Enabled := True;
|
||||
end
|
||||
else begin
|
||||
edtFechaFiltro1.Enabled := True;
|
||||
edtFechaFiltro2.Enabled := True;
|
||||
txtFiltroTodo.Enabled := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfEditorElegirRecibosCliente.GetMensaje: String;
|
||||
begin
|
||||
Result := lblComments.Caption;
|
||||
@ -206,10 +179,32 @@ begin
|
||||
ViewGrid.OnDblClick := frViewBarraSeleccion1.actSeleccionar.OnExecute;
|
||||
end;
|
||||
|
||||
procedure TfEditorElegirRecibosCliente.txtFiltroTodoPropertiesChange(Sender: TObject);
|
||||
procedure TfEditorElegirRecibosCliente.OnParametrosFiltroChange(Sender: TObject);
|
||||
begin
|
||||
if Assigned(ViewGrid) then
|
||||
ViewGrid.Filter := txtFiltroTodo.Text;
|
||||
|
||||
if not VarIsNull(edtFechaFiltro1.EditValue) and not VarIsNull(edtFechaFiltro2.EditValue) then
|
||||
begin
|
||||
if (edtFechaFiltro1.EditValue > edtFechaFiltro2.EditValue) then
|
||||
begin
|
||||
ShowWarningMessage('La fecha de inicio debe ser anterior a la fecha final');
|
||||
edtFechaFiltro1.SetFocus;
|
||||
end
|
||||
else
|
||||
(ViewGrid as IViewRecibosCliente).FiltrarPorFechas(edtFechaFiltro1.EditValue, edtFechaFiltro2.EditValue);
|
||||
end;
|
||||
|
||||
if (edtImporteFiltro1.EditValue <> 0) and (edtImporteFiltro2.EditValue <> 0) then
|
||||
begin
|
||||
if (edtImporteFiltro1.EditValue > edtImporteFiltro2.EditValue) then
|
||||
begin
|
||||
ShowWarningMessage('El importe de inicial debe ser menor que el importe final');
|
||||
edtImporteFiltro1.SetFocus;
|
||||
end
|
||||
else
|
||||
(ViewGrid as IViewRecibosCliente).FiltrarPorImportes(edtImporteFiltro1.EditValue, edtImporteFiltro2.EditValue);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -213,8 +213,6 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
|
||||
StyleFocused.LookAndFeel.SkinName = ''
|
||||
StyleHot.LookAndFeel.SkinName = ''
|
||||
ExplicitLeft = 403
|
||||
ExplicitWidth = 215
|
||||
Width = 215
|
||||
end
|
||||
inherited dxLayoutControl1Group_Root: TdxLayoutGroup
|
||||
inherited dxLayoutControl1Group1: TdxLayoutGroup
|
||||
@ -262,7 +260,6 @@ inherited frViewRecibosCliente: TfrViewRecibosCliente
|
||||
end
|
||||
end
|
||||
inherited dxPSEngineController1: TdxPSEngineController
|
||||
Active = True
|
||||
Top = 152
|
||||
end
|
||||
inherited cxStyleRepository1: TcxStyleRepository
|
||||
|
||||
@ -26,6 +26,7 @@ type
|
||||
property Recibos: IBizRecibosCliente read GetRecibos write SetRecibos;
|
||||
|
||||
procedure FiltrarPorFechas(const Fecha1, Fecha2: Variant);
|
||||
procedure FiltrarPorImportes(const Importe1, Importe2: Variant);
|
||||
end;
|
||||
|
||||
TfrViewRecibosCliente = class(TfrViewGrid, IViewRecibosCliente)
|
||||
@ -84,8 +85,9 @@ type
|
||||
public
|
||||
property Recibos: IBizRecibosCliente read GetRecibos write SetRecibos;
|
||||
procedure FiltrarPorFechas(const Fecha1, Fecha2: Variant);
|
||||
procedure FiltrarPorImportes(const Importe1, Importe2: Variant);
|
||||
procedure AnadirOtrosFiltros; override;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
|
||||
@ -277,7 +279,7 @@ begin
|
||||
BeginUpdate;
|
||||
try
|
||||
Options := [fcoCaseInsensitive, fcoSoftCompare];
|
||||
Root.Clear;
|
||||
// Root.Clear;
|
||||
if not VarIsNull(Fecha1)
|
||||
and not VarIsNull(Fecha2) then
|
||||
begin
|
||||
@ -293,6 +295,32 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrViewRecibosCliente.FiltrarPorImportes(const Importe1,
|
||||
Importe2: Variant);
|
||||
var
|
||||
Columna: TcxGridDBColumn;
|
||||
begin
|
||||
with cxGridView.DataController.Filter do
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
Options := [fcoCaseInsensitive, fcoSoftCompare];
|
||||
// Root.Clear;
|
||||
if not VarIsNull(Importe1)
|
||||
and not VarIsNull(Importe2) then
|
||||
begin
|
||||
Columna := (cxGridView as TcxGridDBTableView).GetColumnByFieldName(fld_RecibosClienteIMPORTE_TOTAL);
|
||||
Root.AddItem(Columna, foBetween, varArrayOf([Importe1, Importe2]), VarToStr(Importe1) + ' and ' + VarToStr(Importe2));
|
||||
Active := True;
|
||||
end
|
||||
else
|
||||
Active := False;
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrViewRecibosCliente.GetRecibos: IBizRecibosCliente;
|
||||
begin
|
||||
Result := FRecibos;
|
||||
|
||||
@ -7,8 +7,8 @@ inherited frViewRecibosRemesaCliente: TfrViewRecibosRemesaCliente
|
||||
inherited cxGrid: TcxGrid
|
||||
Width = 570
|
||||
Height = 168
|
||||
ExplicitWidth = 549
|
||||
ExplicitHeight = 351
|
||||
ExplicitWidth = 570
|
||||
ExplicitHeight = 168
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
OptionsCustomize.ColumnSorting = True
|
||||
OptionsData.Appending = False
|
||||
@ -44,15 +44,22 @@ inherited frViewRecibosRemesaCliente: TfrViewRecibosRemesaCliente
|
||||
end>
|
||||
Width = 65
|
||||
end
|
||||
object cxGridViewID_FACTURA: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_FACTURA'
|
||||
Visible = False
|
||||
object cxGridViewFECHA_EMISION: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'FECHA_EMISION'
|
||||
end
|
||||
object cxGridViewFECHA_VENCIMIENTO: TcxGridDBColumn
|
||||
Caption = 'Fecha vencimiento'
|
||||
DataBinding.FieldName = 'FECHA_VENCIMIENTO'
|
||||
Width = 78
|
||||
end
|
||||
object cxGridViewFORMA_PAGO_FACTURA: TcxGridDBColumn
|
||||
Caption = 'Forma pago'
|
||||
DataBinding.FieldName = 'FORMA_PAGO_FACTURA'
|
||||
end
|
||||
object cxGridViewID_FACTURA: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ID_FACTURA'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewDESCRIPCION: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'DESCRIPCION'
|
||||
Visible = False
|
||||
@ -79,19 +86,13 @@ inherited frViewRecibosRemesaCliente: TfrViewRecibosRemesaCliente
|
||||
DataBinding.FieldName = 'OTROS_GASTOS'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewIMPORTE_TOTAL: TcxGridDBColumn
|
||||
Caption = 'Importe total'
|
||||
DataBinding.FieldName = 'IMPORTE_TOTAL'
|
||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||
Properties.Alignment.Horz = taRightJustify
|
||||
end
|
||||
object cxGridViewFECHA_FACTURA: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'FECHA_FACTURA'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewFORMA_PAGO_FACTURA: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'FORMA_PAGO_FACTURA'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewIMPORTE_FACTURA: TcxGridDBColumn
|
||||
@ -102,9 +103,9 @@ inherited frViewRecibosRemesaCliente: TfrViewRecibosRemesaCliente
|
||||
DataBinding.FieldName = 'NIF_CIF_CLIENTE'
|
||||
Visible = False
|
||||
end
|
||||
object cxGridViewENTIDAD_CLIENTE: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'ENTIDAD_CLIENTE'
|
||||
Visible = False
|
||||
object cxGridViewDATOS_BANCARIOS: TcxGridDBColumn
|
||||
Caption = 'Banco'
|
||||
DataBinding.FieldName = 'DATOS_BANCARIOS'
|
||||
end
|
||||
object cxGridViewSUCURSAL_CLIENTE: TcxGridDBColumn
|
||||
DataBinding.FieldName = 'SUCURSAL_CLIENTE'
|
||||
@ -138,7 +139,7 @@ inherited frViewRecibosRemesaCliente: TfrViewRecibosRemesaCliente
|
||||
end
|
||||
inherited ToolBar1: TToolBar
|
||||
Width = 570
|
||||
ExplicitWidth = 549
|
||||
ExplicitWidth = 570
|
||||
inherited ToolButton1: TToolButton
|
||||
ExplicitWidth = 62
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user