Se arregla error en el módulo de referencias
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@507 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
d69666649c
commit
c6e5b49604
@ -60,6 +60,9 @@ end;
|
||||
procedure TReferenciasController.FiltrarEmpresa(AReferencias: IBizReferencia);
|
||||
var
|
||||
Condicion: TDAWhereExpression;
|
||||
Condicion1: TDAWhereExpression;
|
||||
Condicion2: TDAWhereExpression;
|
||||
|
||||
begin
|
||||
if AReferencias.DataTable.Active then
|
||||
AReferencias.DataTable.Active := False;
|
||||
@ -67,9 +70,13 @@ 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
|
||||
|
||||
@ -22,8 +22,7 @@ object srvReferencias: TsrvReferencias
|
||||
Name = 'IBX'
|
||||
SQL =
|
||||
'SELECT '#10' ID, ID_EMPRESA, ID_TIENDA, CODIGO, VALOR, DESCRIPCIO' +
|
||||
'N'#10' FROM'#10' REFERENCIAS'#10' WHERE ID_EMPRESA IS NULL'#10' OR {Where}' +
|
||||
#10
|
||||
'N'#10' FROM'#10' REFERENCIAS'#10' WHERE {Where}'#10
|
||||
StatementType = stSQL
|
||||
ColumnMappings = <
|
||||
item
|
||||
|
||||
Loading…
Reference in New Issue
Block a user