diff --git a/Build/Build.fbl6 b/Build/Build.fbl6
index a82074e..41ebf61 100644
Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ
diff --git a/Resources/Iconos/ArtÃculos/16x16/Thumbs.db b/Resources/Iconos/ArtÃculos/16x16/Thumbs.db
index c1314bf..621829d 100644
Binary files a/Resources/Iconos/ArtÃculos/16x16/Thumbs.db and b/Resources/Iconos/ArtÃculos/16x16/Thumbs.db differ
diff --git a/Resources/Iconos/Pedidos de cliente/16x16/Budget.png b/Resources/Iconos/Pedidos de cliente/16x16/Budget.png
index 8e1a402..34a2d69 100644
Binary files a/Resources/Iconos/Pedidos de cliente/16x16/Budget.png and b/Resources/Iconos/Pedidos de cliente/16x16/Budget.png differ
diff --git a/Source/ApplicationBase/ProvinciasPoblaciones/Controller/uProvinciasPoblacionesController.pas b/Source/ApplicationBase/ProvinciasPoblaciones/Controller/uProvinciasPoblacionesController.pas
index 7a29f39..a22b2b8 100644
--- a/Source/ApplicationBase/ProvinciasPoblaciones/Controller/uProvinciasPoblacionesController.pas
+++ b/Source/ApplicationBase/ProvinciasPoblaciones/Controller/uProvinciasPoblacionesController.pas
@@ -10,6 +10,7 @@ uses
type
IProvinciasPoblacionesController = interface(IControllerBase)
['{777EDE6C-DAB6-4D96-BA57-AE3DAF8A3F78}']
+ function DarListaPaises : TStringList;
function DarListaProvincias : TStringList;
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
end;
@@ -18,6 +19,7 @@ type
protected
FDataModule : IDataModuleProvinciasPoblaciones;
public
+ function DarListaPaises : TStringList;
function DarListaProvincias : TStringList;
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
destructor Destroy; override;
@@ -37,6 +39,16 @@ begin
FDataModule := TDataModuleProvinciasPoblaciones.Create(NIL);
end;
+function TProvinciasPoblacionesController.DarListaPaises: TStringList;
+begin
+ ShowHourglassCursor;
+ try
+ Result := FDataModule.DarListaPaises;
+ finally
+ HideHourglassCursor;
+ end;
+end;
+
function TProvinciasPoblacionesController.DarListaPoblaciones(
const AID_Provincia: Integer): TStringList;
begin
diff --git a/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.dfm b/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.dfm
index d02b807..cad0dc3 100644
--- a/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.dfm
+++ b/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.dfm
@@ -1,7 +1,5 @@
-object DataModuleProvinciasPoblaciones: TDataModuleProvinciasPoblaciones
+inherited DataModuleProvinciasPoblaciones: TDataModuleProvinciasPoblaciones
OldCreateOrder = False
- Height = 150
- Width = 215
object RORemoteService: TRORemoteService
Message = dmConexion.ROMessage
Channel = dmConexion.ROChannel
diff --git a/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.pas b/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.pas
index 5467fc7..5c54f3e 100644
--- a/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.pas
+++ b/Source/ApplicationBase/ProvinciasPoblaciones/Data/uDataModuleProvinciasPoblaciones.pas
@@ -8,6 +8,7 @@ uses
type
IDataModuleProvinciasPoblaciones = interface
['{E73DB3C4-BC57-44E8-A64B-F86AE2DCB7D6}']
+ function DarListaPaises : TStringList;
function DarListaProvincias : TStringList;
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
end;
@@ -15,6 +16,7 @@ type
TDataModuleProvinciasPoblaciones = class(TDataModuleBase, IDataModuleProvinciasPoblaciones)
RORemoteService: TRORemoteService;
public
+ function DarListaPaises : TStringList;
function DarListaProvincias : TStringList;
function DarListaPoblaciones (const AID_Provincia : Integer) : TStringList;
end;
@@ -28,6 +30,15 @@ uses
{ TDataModuleProvinciasPoblaciones }
+function TDataModuleProvinciasPoblaciones.DarListaPaises: TStringList;
+var
+ ABinary : Binary;
+begin
+ ABinary := (RORemoteService as IsrvProvinciasPoblaciones).DarListaPaises;
+ Result := TStringList.Create;
+ Result.LoadFromStream(ABinary);
+end;
+
function TDataModuleProvinciasPoblaciones.DarListaPoblaciones(
const AID_Provincia: Integer): TStringList;
var
diff --git a/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.dfm b/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.dfm
index 6565304..84bd0fd 100644
--- a/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.dfm
+++ b/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.dfm
@@ -40,6 +40,74 @@ object srvProvinciasPoblaciones: TsrvProvinciasPoblaciones
end>
ReadOnly = True
end
+ item
+ Params = <>
+ Statements = <
+ item
+ Connection = 'IBX'
+ ConnectionType = 'Interbase'
+ Default = True
+ Name = 'IBX'
+ SQL =
+ 'SELECT'#10' ID, ISO_NUM, ISO_DES1, ISO_DES2, DESCRIPCION, ACTIVO'#10 +
+ ' FROM'#10' PAISES'#10' WHERE (ACTIVO = 1)'#10
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'ID'
+ TableField = 'ID'
+ end
+ item
+ DatasetField = 'ISO_NUM'
+ TableField = 'ISO_NUM'
+ end
+ item
+ DatasetField = 'ISO_DES1'
+ TableField = 'ISO_DES1'
+ end
+ item
+ DatasetField = 'ISO_DES2'
+ TableField = 'ISO_DES2'
+ end
+ item
+ DatasetField = 'DESCRIPCION'
+ TableField = 'DESCRIPCION'
+ end
+ item
+ DatasetField = 'ACTIVO'
+ TableField = 'ACTIVO'
+ end>
+ end>
+ Name = 'Paises'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datInteger
+ end
+ item
+ Name = 'ISO_NUM'
+ DataType = datInteger
+ end
+ item
+ Name = 'ISO_DES1'
+ DataType = datString
+ Size = 2
+ end
+ item
+ Name = 'ISO_DES2'
+ DataType = datString
+ Size = 3
+ end
+ item
+ Name = 'DESCRIPCION'
+ DataType = datString
+ Size = 255
+ end
+ item
+ Name = 'ACTIVO'
+ DataType = datSmallInt
+ end>
+ end
item
IsPublic = False
Params = <>
diff --git a/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.pas b/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.pas
index a71d13d..c1e142b 100644
--- a/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.pas
+++ b/Source/ApplicationBase/ProvinciasPoblaciones/Servidor/srvProvinciasPoblaciones_Impl.pas
@@ -26,6 +26,7 @@ type
private
protected
{ IsrvProvinciasPoblaciones methods }
+ function DarListaPaises: Binary;
function DarListaProvincias: Binary;
function DarListaPoblaciones(const ID_Provincia: Integer): Binary;
end;
@@ -80,6 +81,42 @@ begin
end;
end;
+function TsrvProvinciasPoblaciones.DarListaPaises: Binary;
+var
+ ASchema : TDASchema;
+ AConn : IDAConnection;
+ dsData: IDADataset;
+ ALista : TStringList;
+begin
+ Result := Binary.Create;
+
+ ASchema := schProvinciasPoblaciones;
+ AConn := dmServer.ConnectionManager.NewConnection(dmServer.ConnectionManager.GetDefaultConnectionName);
+
+ try
+ dsData := ASchema.NewDataset(AConn, 'Paises');
+ except
+ RaiseError('No existe la tabla PAISES');
+ end;
+
+ ALista := TStringList.Create;
+ try
+ dsData.Active := True;
+ ALista.Sorted := True;
+ while not dsData.EOF do
+ begin
+ ALista.Add(Format('%s=%s', [dsData.Fields[4].AsString, dsData.Fields[2].AsString]));
+ dsData.Next;
+ end;
+
+ ALista.SaveToStream(Result);
+ finally
+ FreeANDNIL(ALista);
+ dsData := NIL;
+ AConn := NIL;
+ end;
+end;
+
function TsrvProvinciasPoblaciones.DarListaPoblaciones(const ID_Provincia: Integer): Binary;
var
ASchema : TDASchema;
diff --git a/Source/ApplicationBase/uFactuGES_App.pas b/Source/ApplicationBase/uFactuGES_App.pas
index 66064c0..6a5f3a8 100644
--- a/Source/ApplicationBase/uFactuGES_App.pas
+++ b/Source/ApplicationBase/uFactuGES_App.pas
@@ -13,7 +13,9 @@ const
CTE_PERFIL_VENDEDOR_GRADEN = 7;
CTE_PERFIL_VENDEDOR_MARBELLA = 9;
CTE_PERFIL_VENDEDOR_DONOSTI = 10;
- CTE_PERFIL_VENDEDOR_GRADEN_UECKO = 6;
+ CTE_PERFIL_VENDEDOR_BILBAO = 11;
+ CTE_PERFIL_VENDEDOR_GRADEN_UECKO = 6;
+ CTE_PERFIL_VENDEDOR_GRADEN_UECKO2 = 12;
CTE_PERFIL_COMPRAS = 8;
CTE_PERFIL_USUARIO = 5;
@@ -21,6 +23,7 @@ const
CTE_EMPRESA_GRADEN = 2;
CTE_EMPRESA_GRADEN_MARBELLA = 6;
CTE_EMPRESA_GRADEN_DONOSTI = 10;
+ CTE_EMPRESA_GRADEN_BILBAO = 15;
type
TAppFactuGES_Event = procedure;
diff --git a/Source/Base/Base.dproj b/Source/Base/Base.dproj
index 5008327..9afbdc4 100644
--- a/Source/Base/Base.dproj
+++ b/Source/Base/Base.dproj
@@ -44,6 +44,13 @@
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
@@ -58,54 +65,54 @@
MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Base/Utiles/uStringsUtils.pas b/Source/Base/Utiles/uStringsUtils.pas
index 68ad755..6cb3354 100644
--- a/Source/Base/Utiles/uStringsUtils.pas
+++ b/Source/Base/Utiles/uStringsUtils.pas
@@ -14,6 +14,10 @@ function StringsToString(Source:TStrings; Delimiter:char):string;
function EsCadenaVacia(const S: AnsiString): Boolean; overload;
function EsCadenaVacia(const S: Variant): Boolean; overload;
function EsNumerico(Cadena: String) : Boolean;
+function calcularLetraNIF(numeroDNI : integer): string;
+function comprobarLetraNIF(nif: string): boolean;
+function validarCIF(Cif: string) : boolean;
+function CadLimpiaCar(NIF: String): String;
implementation
@@ -62,5 +66,73 @@ begin
Result := (Codigo = 0)
end;
+//Obtiene la letra del DNI NIF de un número
+function calcularLetraNIF(numeroDNI : integer): string;
+begin
+ Result := copy('TRWAGMYFPDXBNJZSQVHLCKET', 1 + numeroDNI mod 23, 1);
+end;
+
+//Comprueba si un NIF DNI es correcto (con letra incluida y extranjero)
+function comprobarLetraNIF (nif: string): boolean;
+var
+ numeroDNI : Integer;
+begin
+ Result := false;
+ if Length(nif) = 9 then
+ begin
+ // DNI normal
+ if TryStrToInt(Copy(nif, 1, Length(nif) - 1), numeroDNI) then
+ Result := UpperCase(Copy(nif, Length(nif), 1)) = calcularLetraNIF(numeroDNI);
+ // DNI Extranjero
+ if UpperCase(Copy(nif, 1, 1)) = 'X' then
+ if TryStrToInt(Copy(nif, 2, Length(nif) - 2), numeroDNI) then
+ Result := Uppercase(Copy(nif, Length(nif), 1)) = calcularLetraNIF(numeroDNI);
+ end;
+end;
+
+//Comprueba si un CIF es correcto (se le pasa el CIF completo, incluida la letra)
+function validarCIF (Cif : string) : boolean;
+var
+ Suma, Control : integer;
+ n : byte;
+begin
+ Result:=False;
+ Cif:=UpperCase(Cif);
+ {El cif debe ser de 9 cifras}
+ if Length(Cif)=9 then
+ begin
+ Suma:= StrToInt(Cif[3])+
+ StrToInt(Cif[5])+
+ StrToInt(Cif[7]);
+ for n := 1 to 4 do
+ begin
+ Suma:=Suma+ ( (2*StrToInt(Cif[2*n])) mod 10 )+
+ ( (2*StrToInt(Cif[2*n])) div 10 );
+ end;
+ Control := 10-(Suma mod 10);
+ if Pos(Cif[1],'XP') <> 0 then
+ {Control tipo letra}
+ Result:= ( Cif[9] = Chr(64+ Control))
+ else
+ begin
+ {Control tipo número}
+ if Control =10 then
+ Control := 0;
+ Result:= ( StrToInt(Cif[9]) = Control);
+ end;
+ end;
+end;
+
+function CadLimpiaCar(NIF: String): String;
+ begin
+ Result:= NIF;
+ while (pos(' ',NIF)>0) do
+ delete(NIF,pos(' ',NIF),1);
+ while (pos('-',NIF)>0) do
+ delete(NIF,pos('-',NIF),1);
+ while (pos('/',NIF)>0) do
+ delete(NIF,pos('/',NIF),1);
+ Result:=UpperCase(NIF);
+end;
end.
diff --git a/Source/Cliente/FactuGES.dpr b/Source/Cliente/FactuGES.dpr
index 26dad99..953a000 100644
--- a/Source/Cliente/FactuGES.dpr
+++ b/Source/Cliente/FactuGES.dpr
@@ -1,6 +1,7 @@
program FactuGES;
uses
+ ExceptionLog,
Forms,
Windows,
SysUtils,
diff --git a/Source/Cliente/FactuGES.dproj b/Source/Cliente/FactuGES.dproj
index 43fae77..65e3fe1 100644
--- a/Source/Cliente/FactuGES.dproj
+++ b/Source/Cliente/FactuGES.dproj
@@ -43,7 +43,7 @@
$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib
$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib
$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;T:\COMPON~1\jcl\lib\d11\debug;$(BDSCOMMONDIR)\Dcp;..\Lib;..\Modulos\Lib
- DEBUG;
+ DEBUG;EUREKALOG;EUREKALOG_VER6
True
True
3
@@ -52,7 +52,9 @@
Delphi.Personality
VCLApplication
-FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4450FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.4.5.0FactuGESFactuGES4.4.5.0
+FalseTrueFalseC:\Archivos de programa\Borland\Delphi7\Bin\TrueFalse4490FalseFalseFalseFalseFalse30821252Rodax Software S.L.4.4.9.0FactuGESFactuGES4.4.9.0
+
+
File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found
FactuGES.dprFalse
@@ -81,7 +83,7 @@