Tarea #1268 - Fallo al calcular el total de las líneas de detalle cuando se aplica un descuento y el importe unitario tiene 4 decimales

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1080 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2013-10-02 08:09:36 +00:00
parent 886002fe30
commit 2ada180393
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<propertysets/>
<variables>
<project_path>
<![CDATA[C:\Codigo tecsitel]]>
<![CDATA[C:\Codigo Tecsitel]]>
</project_path>
</variables>
<properties>

View File

@ -45,7 +45,7 @@ begin
ImporteA := FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat * (FieldByName(CAMPO_DESCUENTO).AsFloat/100);
//Importe descuento redondeado a solo dos decimales, porque en grandes cantidades hay fluctuación
//(importe unidad - 0,6732 no es lo mismo que importe unidad - 0,67 sobre todo cuando trabajamos con grandes cantidades)
ImporteB := round(ImporteA*100)/100;
ImporteB := round(ImporteA*10000)/10000;
ImporteTotal := FieldByName(CAMPO_CANTIDAD).asfloat * (FieldByName(CAMPO_IMPORTE_UNIDAD).AsFloat - ImporteB);
end;