diff --git a/Build/Build.fbl6 b/Build/Build.fbl6
index 4baa6d6..648988e 100644
Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ
diff --git a/Build/Build.fbpInf b/Build/Build.fbpInf
index e832e0e..e33f5ec 100644
--- a/Build/Build.fbpInf
+++ b/Build/Build.fbpInf
@@ -14,8 +14,8 @@
- 00:01:15
- 19/01/2021 17:01:29
+ 00:00:07
+ 04/04/2022 10:55:43
True
diff --git a/Build/Build.fbz6 b/Build/Build.fbz6
index 58036e7..6fb1c19 100644
Binary files a/Build/Build.fbz6 and b/Build/Build.fbz6 differ
diff --git a/Resources/Iconos/SELLOS.jpg b/Resources/Iconos/SELLOS.jpg
new file mode 100644
index 0000000..7bf3274
Binary files /dev/null and b/Resources/Iconos/SELLOS.jpg differ
diff --git a/Resources/Iconos/UECKO-ARMARIO-DEL-ANO.jpg b/Resources/Iconos/UECKO-ARMARIO-DEL-ANO.jpg
new file mode 100644
index 0000000..ab9275e
Binary files /dev/null and b/Resources/Iconos/UECKO-ARMARIO-DEL-ANO.jpg differ
diff --git a/Resources/Iconos/UECKO-LAS-ROZAS-PREMIO.jpg b/Resources/Iconos/UECKO-LAS-ROZAS-PREMIO.jpg
new file mode 100644
index 0000000..79065cf
Binary files /dev/null and b/Resources/Iconos/UECKO-LAS-ROZAS-PREMIO.jpg differ
diff --git a/Resources/UECKO-LAS-ROZAS-tratado.jpg b/Resources/UECKO-LAS-ROZAS-tratado.jpg
new file mode 100644
index 0000000..ffc2fce
Binary files /dev/null and b/Resources/UECKO-LAS-ROZAS-tratado.jpg differ
diff --git a/Resources/armario-del-ano-definitivo.jpg b/Resources/armario-del-ano-definitivo.jpg
new file mode 100644
index 0000000..e16b442
Binary files /dev/null and b/Resources/armario-del-ano-definitivo.jpg differ
diff --git a/Resources/sellos-nuevos.jpg b/Resources/sellos-nuevos.jpg
new file mode 100644
index 0000000..7333a6f
Binary files /dev/null and b/Resources/sellos-nuevos.jpg differ
diff --git a/Resources/sellos-nuevos.png b/Resources/sellos-nuevos.png
new file mode 100644
index 0000000..6ba7f43
Binary files /dev/null and b/Resources/sellos-nuevos.png differ
diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas
index e163a62..67c47b1 100644
--- a/Source/ApplicationBase/uFactuGES_App.pas
+++ b/Source/ApplicationBase/uFactuGES_App.pas
@@ -281,9 +281,9 @@ begin
//Nos devuelve el id de la tienda a la que pertenece el vendedor que tiene asignado
//el usuario con el que ha accedido a la aplicación.
//Esto funciona mientras la relación sea 1 a 1, cuando sea 1 a n (un usuario pertenece a varios vendedores deja de funcionar)
-// FTiendaActiva := EmpresasController.DarTiendaUsuario(EmpresaActiva, UsuarioActivo.ID);
+ FTiendaActiva := EmpresasController.DarTiendaUsuario(EmpresaActiva, UsuarioActivo.ID);
- FTiendaActiva := EmpresasController.DarTiendaEmpresa(EmpresaActiva, 0);
+// FTiendaActiva := EmpresasController.DarTiendaEmpresa(EmpresaActiva, 0);
Assert(Assigned(FTiendaActiva));
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 30cceca..e7a23a9 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -44,13 +44,6 @@
Package
FalseTrueFalseLibreria base de FactuGESFalseFalseFalseTrueFalse1000FalseFalseFalseFalseFalse308212521.0.0.01.0.0.0
-
-
-
-
-
-
-
VCL for the Web Design Package for CodeGear RAD Studio
CodeGear WebSnap Components
CodeGear SOAP Components
@@ -65,55 +58,55 @@
MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
TForm
diff --git a/Source/Base/Utiles/uCalculosUtils.pas b/Source/Base/Utiles/uCalculosUtils.pas
index 7a62af8..c58396f 100644
--- a/Source/Base/Utiles/uCalculosUtils.pas
+++ b/Source/Base/Utiles/uCalculosUtils.pas
@@ -16,25 +16,25 @@ const
CAMPO_IMPORTE_TOTAL = 'IMPORTE_TOTAL';
CAMPO_DESCUENTO = 'DESCUENTO';
CAMPO_INCREMENTO = 'INCREMENTO';
- CAMPO_DECREMENTO = 'DECREMENTO';
+ CAMPO_DECREMENTO = 'DECREMENTO';
CAMPO_IMPORTE_PORTE = 'IMPORTE_PORTE';
- CAMPO_VISIBLE = 'VISIBLE';
- CAMPO_VALORADO = 'VALORADO';
+ CAMPO_VISIBLE = 'VISIBLE';
+ CAMPO_VALORADO = 'VALORADO';
- function CalcularLineaConcepto (const ADataTable : TDADataTable): Double;
+ function CalcularLineaConcepto (const ADataTable : TDADataTable; const NumDecimales: Smallint = 2): Double;
procedure ValidarCamposLineaConcepto(DataTable: TDADataTable);
procedure DesglosarPorte(ImportePorte: Currency; ADetalles: IDAStronglyTypedDataTable);
function DarTotalPorte(ADetalles: IDAStronglyTypedDataTable): Double;
- function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0): Double;
+ function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0; const NumDecimales: Smallint = 2): Double;
implementation
uses
SysUtils, DB, Variants, cxControls, uNumUtils;
-function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0): Double;
+function CalcularImporteNeto (const ImporteUnidad: Double = 0; const Incremento: Double = 0; const Decremento: Double = 0; const NumDecimales: Smallint = 2): Double;
var
ValorAIncrementar: Double;
ImporteNeto1: Double;
@@ -48,10 +48,11 @@ begin
ValorAIncrementar := ImporteUnidad * (Incremento/100);
ImporteNeto1 := ImporteUnidad + ValorAIncrementar;
ValorADecrementar := ImporteNeto1 * (Decremento/100);
- Result := RoundCurrency((ImporteNeto1 - ValorADecrementar));
+
+ Result := RoundCurrency((ImporteNeto1 - ValorADecrementar), NumDecimales)
end;
-function CalcularLineaConcepto (const ADataTable : TDADataTable): Double;
+function CalcularLineaConcepto (const ADataTable : TDADataTable; const NumDecimales: Smallint = 2): Double;
var
AField: TDAField;
ImporteTotal, ImporteNeto, Incremento, Decremento, Descuento, ImportePorte : Double;
@@ -77,7 +78,7 @@ begin
if (not VarIsNull(AField.AsVariant)) then
Decremento := AField.AsFloat;
- ImporteNeto := CalcularImporteNeto(ImporteNeto, Incremento, Decremento);
+ ImporteNeto := CalcularImporteNeto(ImporteNeto, Incremento, Decremento, NumDecimales);
if (not VarIsNull(FieldByName(CAMPO_DESCUENTO).AsVariant)) then
Descuento := ImporteNeto * (FieldByName(CAMPO_DESCUENTO).AsFloat/100);
@@ -85,7 +86,7 @@ begin
if (not VarIsNull(FieldByName(CAMPO_IMPORTE_PORTE).AsVariant)) then
ImportePorte := FieldByName(CAMPO_CANTIDAD).asFloat * FieldByName(CAMPO_IMPORTE_PORTE).AsFloat;
- ImporteTotal := (RoundCurrency(ImporteNeto - Descuento) * FieldByName(CAMPO_CANTIDAD).asFloat) + ImportePorte;
+ ImporteTotal := (RoundCurrency((ImporteNeto - Descuento), NumDecimales) * FieldByName(CAMPO_CANTIDAD).asFloat) + ImportePorte;
end;
Result := ImporteTotal;
diff --git a/Source/Base/Utiles/uNumUtils.pas b/Source/Base/Utiles/uNumUtils.pas
index ff91cc7..3cd6617 100644
--- a/Source/Base/Utiles/uNumUtils.pas
+++ b/Source/Base/Utiles/uNumUtils.pas
@@ -28,28 +28,68 @@ interface
Function IntToLetras(Numero:LongInt):String;
Function xxIntToLetras(Valor:LongInt):String;
Function CifraToLetras(Cifra: Double): String;
-function RoundCurrency(const Value: Currency): Currency;
-
+function RoundCurrency(const Value: Currency; const NumDecimales: Smallint = 2): Currency;
implementation
uses SysUtils, Dialogs;
// SysUtils, Windows, Dialogs, Messages, Classes, Graphics, Controls, Forms, StdCtrls;
-function RoundCurrency(const Value: Currency): Currency;
+//Funcion importantisima, nos redondea por defecto el valor double-hasta 14 decimales- pasado por parametro a currency-solo 4 decimales-
+//tiene un parametro de redondeo a numero de decimales menor, por defecto a 2 decimales, si no
+function RoundCurrency(const Value: Currency; const NumDecimales: Smallint = 2): Currency;
var
V64: Int64 absolute Result;
Decimals: Integer;
begin
- Result := Value;
- Decimals := V64 mod 100;
- Dec(V64, Decimals);
- case Decimals of
- -99 .. -50 : Dec(V64, 100);
- 50 .. 99 : Inc(V64, 100);
- end;
+ if (NumDecimales = 2) then
+ begin
+ Result := Value;
+ Decimals := V64 mod 100;
+ Dec(V64, Decimals);
+ case Decimals of
+ -99 .. -50 : Dec(V64, 100);
+ 50 .. 99 : Inc(V64, 100);
+ end;
+ end
+ else if (NumDecimales = 3) then
+ begin
+ Result := Value;
+ Decimals := V64 mod 10;
+ Dec(V64, Decimals);
+ case Decimals of
+ -9 .. -5 : Dec(V64, 10);
+ 5 .. 9 : Inc(V64, 10);
+ end;
+ end
+ else
+ Result := Value;
end;
+
+{function RoundCurrency(const Value: Currency; const NumDecimales: Smallint = 2): Currency;
+const
+ factors: array [-4..-1] of Int64 = (10000, 1000, 100, 10);
+var
+ factor: Integer;
+ ValueAsInt64: Int64 absolute Value;
+ Scale: Integer;
+begin
+ Scale := -1*NumDecimales;
+ if Scale = -4 then
+ Result := ValueAsInt64
+ else if Scale < -4 then
+ Result := ValueAsInt64 * factors[4 + Scale]
+ else begin
+ factor := factors[-(4 + Scale)];
+ Result := ValueAsInt64 div factor;
+ if (ValueAsInt64 mod factor) >= (factor div 2) then
+ Result := Inc(Result);
+ end;
+end;}
+
+
+
Function xxIntToLetras(Valor:LongInt):String;
const
aUnitat : array[1..15] of String = ('UNO','DOS','TRES','CUATRO','CINCO','SEIS',
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index db0aa4c..e94c1e4 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -51,7 +51,7 @@
Delphi.Personality
VCLApplication
-FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3800FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.8.0.0FactuGESFactuGES3.8.0.0
+FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse3900FalseFalseFalseFalseFalse30821252Rodax Software S.L.3.9.0.0FactuGESFactuGES3.9.0.0
File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
FactuGES.dprFalse
diff --git a/Source/Cliente/FactuGES.res b/Source/Cliente/FactuGES.res
index 4bab0c1..862b3c2 100644
Binary files a/Source/Cliente/FactuGES.res and b/Source/Cliente/FactuGES.res differ
diff --git a/Source/GUIBase/GUIBase.dproj b/Source/GUIBase/GUIBase.dproj
index f44e3be..eba705d 100644
--- a/Source/GUIBase/GUIBase.dproj
+++ b/Source/GUIBase/GUIBase.dproj
@@ -58,34 +58,34 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/GUIBase/uEditorDBBase.dfm b/Source/GUIBase/uEditorDBBase.dfm
index ac98e86..f8a8aba 100644
--- a/Source/GUIBase/uEditorDBBase.dfm
+++ b/Source/GUIBase/uEditorDBBase.dfm
@@ -5,7 +5,7 @@ inherited fEditorDBBase: TfEditorDBBase
ClientHeight = 454
ClientWidth = 646
ExplicitWidth = 654
- ExplicitHeight = 488
+ ExplicitHeight = 492
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
diff --git a/Source/GUIBase/uEditorGridBase.dfm b/Source/GUIBase/uEditorGridBase.dfm
index efb1165..4f9a5da 100644
--- a/Source/GUIBase/uEditorGridBase.dfm
+++ b/Source/GUIBase/uEditorGridBase.dfm
@@ -6,7 +6,7 @@ inherited fEditorGridBase: TfEditorGridBase
ClientWidth = 543
OnDestroy = CustomEditorDestroy
ExplicitWidth = 551
- ExplicitHeight = 478
+ ExplicitHeight = 482
PixelsPerInch = 96
TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader
@@ -22,15 +22,15 @@ inherited fEditorGridBase: TfEditorGridBase
inherited TBXDock: TTBXDock
Top = 27
Width = 543
- Height = 75
+ Height = 79
ExplicitTop = 27
ExplicitWidth = 543
- ExplicitHeight = 75
+ ExplicitHeight = 79
inherited tbxMain: TTBXToolbar
DockPos = 0
DragHandleStyle = dhDouble
TabOrder = 1
- ExplicitWidth = 457
+ ExplicitWidth = 513
inherited TBXItem29: TTBXItem
Visible = False
end
@@ -76,7 +76,7 @@ inherited fEditorGridBase: TfEditorGridBase
end
object tbxFiltro: TTBXToolbar [1]
Left = 0
- Top = 49
+ Top = 52
Align = alRight
CloseButton = False
DefaultDock = TBXDock
@@ -104,7 +104,7 @@ inherited fEditorGridBase: TfEditorGridBase
Caption = 'Filtrar:'
end
object tbxEditFiltro: TTBXEditItem
- EditWidth = 200
+ EditWidth = 125
ImageIndex = 10
EditorFontSettings.Italic = tsTrue
ExtendedAccept = True
@@ -112,6 +112,17 @@ inherited fEditorGridBase: TfEditorGridBase
ShowImage = True
OnChange = tbxEditFiltroChange
end
+ object tbxEditFiltro2: TTBXEditItem
+ EditWidth = 125
+ Enabled = False
+ ImageIndex = 10
+ Visible = False
+ EditorFontSettings.Italic = tsTrue
+ ExtendedAccept = True
+ Images = SmallImages
+ ShowImage = True
+ OnChange = tbxEditFiltro2Change
+ end
object TBXItem34: TTBXItem
Action = actQuitarFiltro
end
@@ -168,8 +179,8 @@ inherited fEditorGridBase: TfEditorGridBase
end
end
object TBXTMain2: TTBXToolbar
- Left = 337
- Top = 49
+ Left = 334
+ Top = 52
Caption = 'tbxMain'
ChevronHint = 'M'#225's botones|'
DockMode = dmCannotFloatOrChangeDocks
diff --git a/Source/GUIBase/uEditorGridBase.pas b/Source/GUIBase/uEditorGridBase.pas
index 058e4af..2f3de3f 100644
--- a/Source/GUIBase/uEditorGridBase.pas
+++ b/Source/GUIBase/uEditorGridBase.pas
@@ -67,8 +67,10 @@ type
lblAno: TTBXLabelItem;
cbxListaAnos: TTBXComboBoxItem;
sepAno: TTBXSeparatorItem;
+ tbxEditFiltro2: TTBXEditItem;
procedure tbxEditFiltroChange(Sender: TObject; const Text: String);
- procedure FormShow(Sender: TObject);
+ procedure tbxEditFiltro2Change(Sender: TObject; const Text: string);
+ procedure FormShow(Sender: TObject);
procedure actQuitarFiltroExecute(Sender: TObject);
procedure actDuplicarUpdate(Sender: TObject);
procedure actModificarUpdate(Sender: TObject);
@@ -81,6 +83,7 @@ type
procedure CustomEditorDestroy(Sender: TObject);
procedure actExportarExcelExecute(Sender: TObject);
procedure actExportarExcelUpdate(Sender: TObject);
+
protected
FListaAnos: TStringList;
FViewGrid : IViewGridBase;
@@ -224,6 +227,18 @@ begin
end;
end;
+procedure TfEditorGridBase.tbxEditFiltro2Change(Sender: TObject;
+ const Text: string);
+begin
+ if Assigned(ViewGrid) then
+ begin
+ if Length(Text) > 0 then
+ ViewGrid.Filter2 := Text
+ else
+ actQuitarFiltro.Execute;
+ end;
+end;
+
procedure TfEditorGridBase.tbxEditFiltroChange(Sender: TObject; const Text: String);
begin
if Assigned(ViewGrid) then
@@ -281,6 +296,7 @@ begin
if ViewGrid.ViewFiltros.VerFiltros then
begin
tbxEditFiltro.Visible := False;
+ tbxEditFiltro2.Visible := False;
TBXItem7.Visible := False;
end
else
@@ -288,6 +304,12 @@ begin
tbxEditFiltro.Text := '';
tbxEditFiltro.Visible := True;
TBXItem7.Visible := True;
+
+ if (tbxEditFiltro2.Enabled) then
+ begin
+ tbxEditFiltro2.Text := '';
+ tbxEditFiltro2.Visible := True;
+ end;
end;
end;
@@ -326,6 +348,8 @@ begin
begin
tbxEditFiltro.Text := '';
ViewGrid.Filter := '';
+ tbxEditFiltro2.Text := '';
+ ViewGrid.Filter2 := '';
end;
end;
diff --git a/Source/GUIBase/uViewDetallesDTO.pas b/Source/GUIBase/uViewDetallesDTO.pas
index a18a936..a943e72 100644
--- a/Source/GUIBase/uViewDetallesDTO.pas
+++ b/Source/GUIBase/uViewDetallesDTO.pas
@@ -46,6 +46,7 @@ procedure TfrViewDetallesDTO.cxGridViewIMPORTENETOGetDisplayText(Sender: TcxCust
var AText: string);
var
ImporteNeto, Incremento, Decremento : Double;
+ NumDecimales : Smallint;
begin
//Se encarga de mostrar el campo calculado de importe neto
@@ -53,6 +54,8 @@ begin
Incremento := 0;
Decremento := 0;
+ NumDecimales := TcxCurrencyEditProperties(Sender.Properties).DecimalPlaces;
+
if not VarIsNull(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index]) then
begin
ImporteNeto := ARecord.Values[cxGridViewIMPORTEUNIDAD.Index];
@@ -63,12 +66,15 @@ begin
if not VarIsNull(ARecord.Values[cxGridViewDECREMENTO.Index]) then
Decremento := ARecord.Values[cxGridViewDECREMENTO.Index];
- ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento);
+ ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento, NumDecimales);
end;
if (ImporteNeto <> -1) then
begin
- AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteNeto))
+ if (NumDecimales = 2) then
+ AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteNeto))
+ else
+ AText := FormatCurr(',0.0000 €;-,0.0000 €', FloatToCurr(ImporteNeto))
end;
end;
@@ -88,6 +94,7 @@ procedure TfrViewDetallesDTO.cxGridViewIMP_UNIDAD_DTOGetDisplayText( Sender: Tcx
var AText: string);
var
ImporteUnidadDTO, ImporteNeto, Incremento, Decremento, Descuento : Double;
+ NumDecimales : Smallint;
begin
//Se encarga de mostrar el campo calculado de importe neto
@@ -96,6 +103,9 @@ begin
Decremento := 0;
Descuento := 0;
+ NumDecimales := TcxCurrencyEditProperties(Sender.Properties).DecimalPlaces;
+
+
if not VarIsNull(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index]) then
begin
if not VarIsNull(ARecord.Values[cxGridViewINCREMENTO.Index]) then
@@ -104,18 +114,21 @@ begin
if not VarIsNull(ARecord.Values[cxGridViewDECREMENTO.Index]) then
Decremento := ARecord.Values[cxGridViewDECREMENTO.Index];
- ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento);
+ ImporteNeto := CalcularImporteNeto(ARecord.Values[cxGridViewIMPORTEUNIDAD.Index], Incremento, Decremento, NumDecimales);
if not VarIsNull(ARecord.Values[cxGridViewDESCUENTO.Index]) then
Descuento := ImporteNeto * (ARecord.Values[cxGridViewDESCUENTO.Index]/100);
- ImporteUnidadDTO := RoundCurrency(ImporteNeto - Descuento);
+ ImporteUnidadDTO := RoundCurrency((ImporteNeto - Descuento), NumDecimales)
end;
if (Descuento <> 0) then
begin
- AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteUnidadDTO))
+ if (NumDecimales = 2) then
+ AText := FormatCurr(',0.00 €;-,0.00 €', FloatToCurr(ImporteUnidadDTO))
+ else
+ AText := FormatCurr(',0.0000 €;-,0.0000 €', FloatToCurr(ImporteUnidadDTO))
end;
end;
diff --git a/Source/GUIBase/uViewFiltroBase.dfm b/Source/GUIBase/uViewFiltroBase.dfm
index 5995374..ac8b713 100644
--- a/Source/GUIBase/uViewFiltroBase.dfm
+++ b/Source/GUIBase/uViewFiltroBase.dfm
@@ -1,9 +1,9 @@
inherited frViewFiltroBase: TfrViewFiltroBase
- Width = 612
- Height = 123
+ Width = 671
+ Height = 105
Visible = False
- ExplicitWidth = 612
- ExplicitHeight = 123
+ ExplicitWidth = 671
+ ExplicitHeight = 105
object TBXDockablePanel1: TTBXDockablePanel
Left = 0
Top = 0
@@ -22,8 +22,8 @@ inherited frViewFiltroBase: TfrViewFiltroBase
object dxLayoutControl1: TdxLayoutControl
Left = 0
Top = 0
- Width = 612
- Height = 68
+ Width = 671
+ Height = 70
Align = alTop
ParentBackground = True
TabOrder = 0
@@ -49,7 +49,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 0
- Width = 273
+ Width = 250
end
object edtFechaIniFiltro: TcxDateEdit
Left = 87
@@ -73,10 +73,10 @@ inherited frViewFiltroBase: TfrViewFiltroBase
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 2
- Width = 121
+ Width = 250
end
object edtFechaFinFiltro: TcxDateEdit
- Left = 379
+ Left = 386
Top = 37
Properties.OnChange = OnCamposFiltroChange
Style.BorderColor = clWindowFrame
@@ -97,10 +97,10 @@ inherited frViewFiltroBase: TfrViewFiltroBase
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 3
- Width = 121
+ Width = 250
end
object txtFiltroTodo2: TcxTextEdit
- Left = 267
+ Left = 386
Top = 10
Properties.OnChange = OnCamposFiltroChange
Style.BorderColor = clWindowFrame
@@ -119,7 +119,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 1
- Width = 468
+ Width = 250
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
@@ -140,6 +140,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase
object dxLayoutControl1Item4: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
+ Caption = 'y'
Control = txtFiltroTodo2
ControlOptions.ShowBorder = False
end
@@ -168,8 +169,8 @@ inherited frViewFiltroBase: TfrViewFiltroBase
end
object TBXAlignmentPanel1: TTBXAlignmentPanel
Left = 0
- Top = 68
- Width = 612
+ Top = 70
+ Width = 671
Height = 30
Margins.Left = 10
Align = alTop
@@ -177,7 +178,7 @@ inherited frViewFiltroBase: TfrViewFiltroBase
object tbxBotones: TTBXToolbar
Left = 10
Top = 0
- Width = 602
+ Width = 661
Height = 30
Align = alTop
AutoResize = False
diff --git a/Source/GUIBase/uViewFiltroBase.pas b/Source/GUIBase/uViewFiltroBase.pas
index 1ac572c..d3883d1 100644
--- a/Source/GUIBase/uViewFiltroBase.pas
+++ b/Source/GUIBase/uViewFiltroBase.pas
@@ -116,7 +116,7 @@ end;
procedure TfrViewFiltroBase.LimpiarCampos;
begin
txtFiltroTodo.Clear;
-// txtFiltroTodo2.Clear;
+ txtFiltroTodo2.Clear;
edtFechaIniFiltro.Clear;
edtFechaFinFiltro.Clear;
end;
@@ -157,7 +157,7 @@ end;
function TfrViewFiltroBase.GetTexto2: String;
begin
-// Result := txtFiltroTodo2.Text;
+ Result := txtFiltroTodo2.Text;
end;
procedure TfrViewFiltroBase.SetTexto(const Value: String);
@@ -167,7 +167,7 @@ end;
procedure TfrViewFiltroBase.SetTexto2(const Value: String);
begin
- txtFiltroTodo.Text := Value;
+ txtFiltroTodo2.Text := Value;
end;
end.
diff --git a/Source/GUIBase/uViewGrid.dfm b/Source/GUIBase/uViewGrid.dfm
index 0fcddf7..2a1414c 100644
--- a/Source/GUIBase/uViewGrid.dfm
+++ b/Source/GUIBase/uViewGrid.dfm
@@ -80,6 +80,7 @@ inherited frViewGrid: TfrViewGrid
Visible = False
ReadOnly = False
ExplicitWidth = 554
+ ExplicitHeight = 102
inherited TBXDockablePanel1: TTBXDockablePanel
ExplicitWidth = 554
ExplicitHeight = 102
@@ -91,26 +92,43 @@ inherited frViewGrid: TfrViewGrid
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 457
- Width = 457
+ ExplicitWidth = 250
+ Width = 250
end
inherited edtFechaIniFiltro: TcxDateEdit
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitWidth = 240
- Width = 240
+ ExplicitWidth = 250
+ Width = 250
end
inherited edtFechaFinFiltro: TcxDateEdit
- Left = 344
+ Left = 321
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
- ExplicitLeft = 344
- ExplicitWidth = 200
- Width = 200
+ ExplicitLeft = 321
+ ExplicitWidth = 250
+ Width = 250
+ end
+ inherited txtFiltroTodo2: TcxTextEdit
+ Left = 321
+ Style.LookAndFeel.SkinName = ''
+ StyleDisabled.LookAndFeel.SkinName = ''
+ StyleFocused.LookAndFeel.SkinName = ''
+ StyleHot.LookAndFeel.SkinName = ''
+ ExplicitLeft = 321
+ ExplicitWidth = 250
+ Width = 250
+ end
+ inherited dxLayoutControl1Group_Root: TdxLayoutGroup
+ inherited dxLayoutControl1Group2: TdxLayoutGroup
+ inherited dxLayoutControl1Item4: TdxLayoutItem
+ Visible = False
+ end
+ end
end
end
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@@ -135,7 +153,6 @@ inherited frViewGrid: TfrViewGrid
SupportedDocks = [dkStandardDock, dkMultiDock]
TabOrder = 2
Visible = False
- ExplicitWidth = 128
object TBXAlignmentPanel1: TTBXAlignmentPanel
Left = 0
Top = 0
@@ -183,7 +200,7 @@ inherited frViewGrid: TfrViewGrid
PrinterPage.ScaleMode = smFit
PrinterPage._dxMeasurementUnits_ = 0
PrinterPage._dxLastMU_ = 2
- ReportDocument.CreationDate = 40113.806179872680000000
+ ReportDocument.CreationDate = 44649.770773101850000000
StyleManager = dmBase.dxPrintStyleManager1
OptionsCards.Shadow.Depth = 0
OptionsExpanding.ExpandGroupRows = True
diff --git a/Source/GUIBase/uViewGridBase.pas b/Source/GUIBase/uViewGridBase.pas
index d038cfc..5d871ee 100644
--- a/Source/GUIBase/uViewGridBase.pas
+++ b/Source/GUIBase/uViewGridBase.pas
@@ -65,6 +65,10 @@ type
function GetFilter: string;
property Filter: string read GetFilter write SetFilter;
+ procedure SetFilter2(const Value: string);
+ function GetFilter2: string;
+ property Filter2: string read GetFilter2 write SetFilter2;
+
function GetFiltered: Boolean;
property Filtered : Boolean read GetFiltered;
@@ -115,8 +119,8 @@ type
function GetViewFiltros: IViewFiltroBase;
procedure SetViewFiltros(const Value: IViewFiltroBase); virtual;
procedure FilterChanged(Sender : TObject); virtual;
- procedure FiltrarGrid(TextoFiltro: String); virtual;
- procedure FiltrarGrid2(TextoFiltro : String);
+ procedure FiltrarGrid(TextoFiltro1, TextoFiltro2: String); overload; virtual;
+ procedure FiltrarGrid(TextoFiltro : String); overload; virtual;
public
constructor Create(AOwner: TComponent); override;
@@ -147,6 +151,7 @@ type
procedure RestoreFromRegistry (const Path : String); virtual;
procedure RestoreFromIniFile;
+ procedure ConfigView; virtual;
procedure StoreToIniFile;
{function Locate(const AItemIndex: Integer; const AValue: String;
@@ -220,6 +225,11 @@ begin
//
end;
+procedure TfrViewGridBase.ConfigView;
+begin
+//
+end;
+
procedure TfrViewGridBase.ContraerTodo;
begin
if Assigned(_FocusedView) then
@@ -346,7 +356,7 @@ begin
if Assigned(ViewFiltros) then
begin
Filter := ViewFiltros.Texto;
-// Filter2 := ViewFiltros.Texto2;
+ Filter2 := ViewFiltros.Texto2;
end;
end;
@@ -366,6 +376,8 @@ begin
_FocusedView.RestoreFromIniFile(AIniFile + 'grid.xml', True, False, []);
end;
+
+ ConfigView;
end;
procedure TfrViewGridBase.RestoreFromRegistry(const Path: String);
@@ -402,8 +414,7 @@ begin
if Assigned(ViewFiltros) then
ViewFiltros.Texto := FFilter;
- FiltrarGrid(FFilter);
-// FiltrarGrid('add');
+ FiltrarGrid(FFilter, FFilter2);
//Obliga a generar todos los filtros de las vista hija
AnadirOtrosFiltros;
@@ -417,16 +428,16 @@ begin
FFilter2 := Value;
//Así tendremos el mismo valor en el filtro simple que en el filtro en detalle
-// if Assigned(ViewFiltros) then
-// ViewFiltros.Texto := FFilter;
+ if Assigned(ViewFiltros) then
+ ViewFiltros.Texto2 := FFilter2;
-// FiltrarGrid2(FFilter2);
+ FiltrarGrid(FFilter, FFilter2);
//Obliga a generar todos los filtros de las vista hija
-// AnadirOtrosFiltros;
+ AnadirOtrosFiltros;
-// if Assigned(FOnFilterChanged) then
-// FOnFilterChanged(Self);
+ if Assigned(FOnFilterChanged) then
+ FOnFilterChanged(Self);
end;
procedure TfrViewGridBase.SetMultiSelect(const Value: Boolean);
@@ -492,7 +503,7 @@ begin
_FocusedView.StoreToRegistry(Path + '\\GridSettings\\' + Self.Name, False, [], Self.Name);
end;
-procedure TfrViewGridBase.FiltrarGrid(TextoFiltro : String);
+procedure TfrViewGridBase.FiltrarGrid(TextoFiltro1, TextoFiltro2 : String);
var
Columna: TcxGridDBColumn;
i: Integer;
@@ -504,7 +515,7 @@ begin
try
Options := [fcoCaseInsensitive, fcoSoftCompare];
Root.Clear;
- if Length(TextoFiltro) > 0 then
+ if Length(TextoFiltro1) > 0 then
begin
AItemList := Root.AddItemList(fboAnd);
AItemList.BoolOperatorKind := fboOr;
@@ -512,10 +523,24 @@ begin
begin
Columna := (_FocusedView as TcxGridDBTableView).Columns[i];
if (Length(Columna.Caption) > 0) and (Columna.Caption <> 'RecID') then
- AItemList.AddItem(Columna, foLike, '%'+TextoFiltro+'%', IntToStr(i));
+ AItemList.AddItem(Columna, foLike, '%'+TextoFiltro1+'%', IntToStr(i));
end;
- Active := True;
- end
+ end;
+
+ if Length(TextoFiltro2) > 0 then
+ begin
+ AItemList := Root.AddItemList(fboAnd);
+ AItemList.BoolOperatorKind := fboOr;
+ for i:=0 to (_FocusedView as TcxGridDBTableView).ColumnCount - 1 do
+ begin
+ Columna := (_FocusedView as TcxGridDBTableView).Columns[i];
+ if (Length(Columna.Caption) > 0) and (Columna.Caption <> 'RecID') then
+ AItemList.AddItem(Columna, foLike, '%'+TextoFiltro2+'%', IntToStr(i));
+ end;
+ end;
+
+ if ((Length(TextoFiltro1) > 0) or (Length(TextoFiltro2) > 0)) then
+ Active := True
else
Active := False;
finally
@@ -525,7 +550,7 @@ begin
end;
-procedure TfrViewGridBase.FiltrarGrid2(TextoFiltro: String);
+procedure TfrViewGridBase.FiltrarGrid(TextoFiltro: String);
var
Columna: TcxGridDBColumn;
i: Integer;
@@ -536,7 +561,7 @@ begin
BeginUpdate;
try
Options := [fcoCaseInsensitive, fcoSoftCompare];
-// Root.Clear;
+ Root.Clear;
if Length(TextoFiltro) > 0 then
begin
AItemList := Root.AddItemList(fboAnd);
diff --git a/Source/Informes/1/InfAlbaranCliente.fr3 b/Source/Informes/1/InfAlbaranCliente.fr3
index e7ef86c..4f91be2 100644
--- a/Source/Informes/1/InfAlbaranCliente.fr3
+++ b/Source/Informes/1/InfAlbaranCliente.fr3
@@ -1,20 +1,19 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
@@ -22,7 +21,7 @@
-
+
@@ -33,14 +32,15 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/Source/Informes/1/InfAlbaranProveedor.fr3 b/Source/Informes/1/InfAlbaranProveedor.fr3
index 18c9b39..d5f134f 100644
--- a/Source/Informes/1/InfAlbaranProveedor.fr3
+++ b/Source/Informes/1/InfAlbaranProveedor.fr3
@@ -1,28 +1,27 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
@@ -30,14 +29,15 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/Source/Informes/1/InfContratoCliente.fr3 b/Source/Informes/1/InfContratoCliente.fr3
index e37538b..fe5289e 100644
--- a/Source/Informes/1/InfContratoCliente.fr3
+++ b/Source/Informes/1/InfContratoCliente.fr3
@@ -1,23 +1,22 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -25,7 +24,7 @@
-
+
@@ -33,7 +32,7 @@
-
+
@@ -43,7 +42,7 @@
-
+
@@ -65,17 +64,18 @@
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Source/Informes/1/InfFacturaCliente.fr3 b/Source/Informes/1/InfFacturaCliente.fr3
index b3f7bb6..4db76d9 100644
--- a/Source/Informes/1/InfFacturaCliente.fr3
+++ b/Source/Informes/1/InfFacturaCliente.fr3
@@ -1,24 +1,23 @@
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
-
-
+
+
@@ -41,21 +40,22 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/Source/Informes/1/InfPedidoProveedor.fr3 b/Source/Informes/1/InfPedidoProveedor.fr3
index 9cfa68e..16be370 100644
--- a/Source/Informes/1/InfPedidoProveedor.fr3
+++ b/Source/Informes/1/InfPedidoProveedor.fr3
@@ -1,12 +1,12 @@
-
+
-
+
@@ -14,10 +14,10 @@
-
+
-
+
@@ -31,11 +31,12 @@
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Source/Informes/1/InfPresupuestoCliente.fr3 b/Source/Informes/1/InfPresupuestoCliente.fr3
index fa572cf..5e347f6 100644
--- a/Source/Informes/1/InfPresupuestoCliente.fr3
+++ b/Source/Informes/1/InfPresupuestoCliente.fr3
@@ -1,19 +1,18 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
@@ -21,7 +20,7 @@
-
+
@@ -29,7 +28,7 @@
-
+
@@ -39,7 +38,7 @@
-
+
@@ -61,17 +60,18 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/Source/Informes/2/4/InfContratoCliente.fr3 b/Source/Informes/2/4/InfContratoCliente.fr3
index feb4c34..20d767e 100644
--- a/Source/Informes/2/4/InfContratoCliente.fr3
+++ b/Source/Informes/2/4/InfContratoCliente.fr3
@@ -1,17 +1,16 @@
-
+
-
-
-
-
+
+
+
+
-
+
-
-
+
@@ -69,25 +68,28 @@
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
+
-
+
+
+
+
+
diff --git a/Source/Informes/2/4/InfFacturaCliente.fr3 b/Source/Informes/2/4/InfFacturaCliente.fr3
index 84f245b..78b73c9 100644
--- a/Source/Informes/2/4/InfFacturaCliente.fr3
+++ b/Source/Informes/2/4/InfFacturaCliente.fr3
@@ -1,25 +1,24 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
-
-
+
+
@@ -42,21 +41,22 @@
-
+
-
+
+
+
-
-
-
-
+
+
+
-
+
diff --git a/Source/Informes/2/4/InfPresupuestoCliente.fr3 b/Source/Informes/2/4/InfPresupuestoCliente.fr3
index cc82dec..db192ef 100644
--- a/Source/Informes/2/4/InfPresupuestoCliente.fr3
+++ b/Source/Informes/2/4/InfPresupuestoCliente.fr3
@@ -1,20 +1,19 @@
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
-
+
-
+
@@ -22,7 +21,7 @@
-
+
@@ -30,7 +29,7 @@
-
+
@@ -40,7 +39,7 @@
-
+
@@ -61,19 +60,19 @@
-
+
-
-
-
+
+
+
-
-
+
+
-
+
@@ -85,10 +84,9 @@
-
-
-
-
+
+
+
diff --git a/Source/Informes/2/4/InfReciboCliente.fr3 b/Source/Informes/2/4/InfReciboCliente.fr3
index 997d6e8..028ba09 100644
--- a/Source/Informes/2/4/InfReciboCliente.fr3
+++ b/Source/Informes/2/4/InfReciboCliente.fr3
@@ -1,12 +1,12 @@
-
+
-