diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index 5dfb45f..044b834 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Source/Modulos/Referencias/Controller/uReferenciasController.pas b/Source/Modulos/Referencias/Controller/uReferenciasController.pas index a2492b8..3510f43 100644 --- a/Source/Modulos/Referencias/Controller/uReferenciasController.pas +++ b/Source/Modulos/Referencias/Controller/uReferenciasController.pas @@ -59,6 +59,9 @@ end; procedure TReferenciasController.FiltrarEmpresa(AReferencias: IBizReferencia); var Condicion: TDAWhereExpression; + Condicion1: TDAWhereExpression; + Condicion2: TDAWhereExpression; + begin if AReferencias.DataTable.Active then AReferencias.DataTable.Active := False; @@ -66,9 +69,14 @@ begin // Filtrar las facturas actuales por empresa with AReferencias.DataTable.DynamicWhere do begin - // (ID_EMPRESA >= ID) - Condicion := NewBinaryExpression(NewField('', fld_ReferenciasID_EMPRESA), + + // (ID_EMPRESA = ID) + Condicion1 := NewBinaryExpression(NewField('', fld_ReferenciasID_EMPRESA), NewConstant(AppFactuGES.EmpresaActiva.ID, datInteger), dboEqual); + // (ID_EMPRESA = NULL) + Condicion2 := NewBinaryExpression(NewField('', fld_ReferenciasID_EMPRESA), NewNull(), dboEqual); + + Condicion := NewBinaryExpression(Condicion1, Condicion2, dboOr); if IsEmpty then Expression := Condicion diff --git a/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm b/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm index 2df3cca..aa26ca2 100644 --- a/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm +++ b/Source/Modulos/Referencias/Servidor/srvReferencias_Impl.dfm @@ -21,7 +21,7 @@ object srvReferencias: TsrvReferencias Name = 'IBX' SQL = 'SELECT '#10' ID, ID_EMPRESA, CODIGO, VALOR, DESCRIPCION'#10' FROM'#10' ' + - ' REFERENCIAS'#10' WHERE ID_EMPRESA IS NULL'#10' or {Where}'#10 + ' REFERENCIAS'#10' WHERE {Where}'#10 StatementType = stSQL ColumnMappings = < item diff --git a/Source/Servidor/FactuGES_Server.RES b/Source/Servidor/FactuGES_Server.RES index 573c801..458db7b 100644 Binary files a/Source/Servidor/FactuGES_Server.RES and b/Source/Servidor/FactuGES_Server.RES differ diff --git a/Source/Servidor/FactuGES_Server.rc b/Source/Servidor/FactuGES_Server.rc index 04c991f..dbe8b70 100644 --- a/Source/Servidor/FactuGES_Server.rc +++ b/Source/Servidor/FactuGES_Server.rc @@ -14,7 +14,7 @@ BEGIN BEGIN VALUE "FileVersion", "1.0.1.0\0" VALUE "ProductVersion", "1.0.1.0\0" - VALUE "CompileDate", "viernes, 12 de febrero de 2010 10:26\0" + VALUE "CompileDate", "viernes, 12 de febrero de 2010 10:53\0" END END BLOCK "VarFileInfo"