Problema con LOCATES y nueva versión de DA. Al realizar un locate sobre un campo de tipo integer con valor real NULL (que es un 0 en integer), el locate no tiene en cuenta el 0 si no el NULL.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@925 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2009-03-06 10:45:25 +00:00
parent 08f6517288
commit 5f486f0624

View File

@ -259,7 +259,7 @@ begin
APedido.Detalles.First;
//Se cambia porque puede haber articulos del pedido que no tengan referencia de proveedor
// if not APedido.Detalles.DataTable.Locate(fld_ArticulosREFERENCIA, ADetalles.REFERENCIA, []) then
if not APedido.Detalles.DataTable.Locate(fld_INVENTARIOID_ARTICULO, ADetalles.ID_ARTICULO, []) then
if not APedido.Detalles.Locate(fld_INVENTARIOID_ARTICULO, VarArrayOf([ADetalles.DataTable.FieldByName('ID_ARTICULO').AsVariant]), []) then
raise Exception.Create(Format('No se ha encontrado el artículo del pedido con REFERENCIA %s (CopiarArticulosAAlbaran)', [ADetalles.REFERENCIA]));
ADetalles.IMPORTE_UNIDAD := APedido.Detalles.IMPORTE_UNIDAD;
ADetalles.DESCUENTO := APedido.Detalles.DESCUENTO;