Informes: poder elegir cualquier rango de fechas en los parámetros.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@874 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
ae87e09b5b
commit
946b78e958
@ -286,6 +286,7 @@ inherited frViewPeriodoFechas: TfrViewPeriodoFechas
|
|||||||
Properties.ImmediatePost = True
|
Properties.ImmediatePost = True
|
||||||
Properties.ImmediateUpdateText = True
|
Properties.ImmediateUpdateText = True
|
||||||
Properties.Items.Strings = (
|
Properties.Items.Strings = (
|
||||||
|
'Todas las fechas'
|
||||||
'Hoy'
|
'Hoy'
|
||||||
'Ayer'
|
'Ayer'
|
||||||
'Esta semana'
|
'Esta semana'
|
||||||
|
|||||||
@ -58,6 +58,7 @@ type
|
|||||||
procedure SetFechaVenInicial(const Value: Variant);
|
procedure SetFechaVenInicial(const Value: Variant);
|
||||||
|
|
||||||
public
|
public
|
||||||
|
procedure CualquierFecha(const ATipoFecha: TTipoFecha);
|
||||||
procedure Hoy(const ATipoFecha: TTipoFecha);
|
procedure Hoy(const ATipoFecha: TTipoFecha);
|
||||||
procedure Ayer(const ATipoFecha: TTipoFecha);
|
procedure Ayer(const ATipoFecha: TTipoFecha);
|
||||||
procedure EstaSemana(const ATipoFecha: TTipoFecha);
|
procedure EstaSemana(const ATipoFecha: TTipoFecha);
|
||||||
@ -277,16 +278,17 @@ end;
|
|||||||
procedure TfrViewPeriodoFechas.cbPeriodo2PropertiesChange(Sender: TObject);
|
procedure TfrViewPeriodoFechas.cbPeriodo2PropertiesChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
case (Sender as TcxComboBox).ItemIndex of
|
case (Sender as TcxComboBox).ItemIndex of
|
||||||
0 : Hoy(TFechaVencimiento);
|
0 : CualquierFecha(TFechaVencimiento);
|
||||||
1 : Ayer(TFechaVencimiento);
|
1 : Hoy(TFechaVencimiento);
|
||||||
2 : EstaSemana(TFechaVencimiento);
|
2 : Ayer(TFechaVencimiento);
|
||||||
3 : EsteMes(TFechaVencimiento);
|
3 : EstaSemana(TFechaVencimiento);
|
||||||
4 : EsteAno(TFechaVencimiento);
|
4 : EsteMes(TFechaVencimiento);
|
||||||
5 : Ultimos7dias(TFechaVencimiento);
|
5 : EsteAno(TFechaVencimiento);
|
||||||
6 : Ultimos30dias(TFechaVencimiento);
|
6 : Ultimos7dias(TFechaVencimiento);
|
||||||
7 : Ultimos3meses(TFechaVencimiento);
|
7 : Ultimos30dias(TFechaVencimiento);
|
||||||
8 : MesAnterior(TFechaVencimiento);
|
8 : Ultimos3meses(TFechaVencimiento);
|
||||||
9 : AnoAnterior(TFechaVencimiento);
|
9 : MesAnterior(TFechaVencimiento);
|
||||||
|
10 : AnoAnterior(TFechaVencimiento);
|
||||||
else
|
else
|
||||||
Personalizado(TFechaVencimiento);
|
Personalizado(TFechaVencimiento);
|
||||||
end;
|
end;
|
||||||
@ -295,16 +297,17 @@ end;
|
|||||||
procedure TfrViewPeriodoFechas.cbPeriodoPropertiesChange(Sender: TObject);
|
procedure TfrViewPeriodoFechas.cbPeriodoPropertiesChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
case (Sender as TcxComboBox).ItemIndex of
|
case (Sender as TcxComboBox).ItemIndex of
|
||||||
0 : Hoy(TFecha);
|
0 : CualquierFecha(TFecha);
|
||||||
1 : Ayer(TFecha);
|
1 : Hoy(TFecha);
|
||||||
2 : EstaSemana(TFecha);
|
2 : Ayer(TFecha);
|
||||||
3 : EsteMes(TFecha);
|
3 : EstaSemana(TFecha);
|
||||||
4 : EsteAno(TFecha);
|
4 : EsteMes(TFecha);
|
||||||
5 : Ultimos7dias(TFecha);
|
5 : EsteAno(TFecha);
|
||||||
6 : Ultimos30dias(TFecha);
|
6 : Ultimos7dias(TFecha);
|
||||||
7 : Ultimos3meses(TFecha);
|
7 : Ultimos30dias(TFecha);
|
||||||
8 : MesAnterior(TFecha);
|
8 : Ultimos3meses(TFecha);
|
||||||
9 : AnoAnterior(TFecha);
|
9 : MesAnterior(TFecha);
|
||||||
|
10 : AnoAnterior(TFecha);
|
||||||
else
|
else
|
||||||
Personalizado(TFecha);
|
Personalizado(TFecha);
|
||||||
end;
|
end;
|
||||||
@ -313,11 +316,25 @@ end;
|
|||||||
constructor TfrViewPeriodoFechas.Create(AOwner: TComponent);
|
constructor TfrViewPeriodoFechas.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
cbPeriodo.ItemIndex := -1;
|
cbPeriodo.ItemIndex := 0;
|
||||||
cbPeriodo2.ItemIndex := -1;
|
cbPeriodo2.ItemIndex := 0;
|
||||||
// EsteMes(TFecha);
|
// EsteMes(TFecha);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewPeriodoFechas.CualquierFecha(const ATipoFecha: TTipoFecha);
|
||||||
|
begin
|
||||||
|
case ATipoFecha of
|
||||||
|
TFecha: begin
|
||||||
|
edtFechaIni.Clear;
|
||||||
|
edtFechaFin.Clear;
|
||||||
|
end;
|
||||||
|
TFechaVencimiento: begin
|
||||||
|
edtFechaVenIni.Clear;
|
||||||
|
edtFechaVenFin.Clear;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewPeriodoFechas.edtFechaIni2PropertiesValidate(
|
procedure TfrViewPeriodoFechas.edtFechaIni2PropertiesValidate(
|
||||||
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption;
|
||||||
var Error: Boolean);
|
var Error: Boolean);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user