Comparing numbers

IT it at plastipol.com
Mon Feb 17 15:15:53 UTC 2025


Hi,

I have put an rnd() for list $total and now works properly.

rnd(lvVencimientos.$cols.importe.$total();2)<>ivFFACTURA.FR_TOT

This worries me that I can have some holes in my code regarding comparations. I can understand that different defined numbers could fail when comparing but I’m comparing same defined numbers and it mustn't fail.
Seem more a bug of $total than other thing.

Thank you all for your assistance.

xavier


> El 17 feb 2025, a las 15:01, Nigel Hughes <nigel at rnamh.co.uk> escribió:
> 
> Xavier
> 
> I seem to remember having to use the ‘rnd’ command to force a $total to be 2dp as behind the scenes it wasn’t rounding to 2dp
> 
> May help !
> 
> Nigel
> 
> 
> 
>> On 17 Feb 2025, at 12:40, IT <it at plastipol.com> wrote:
>> 
>> Hi all
>> 
>> I have an invoicing process that calculate due dates and imports depending on customer payment terms.
>> 
>> 
>> Do lvoVencimientos.$calcular_vencimientos(some parameters,,,) Returns lvVencimientos
>> If lvVencimientos.$cols.importe.$total()<>ivFFACTURA.FR_TOT
>> 	OK message  {Error [ivFFACTURA.FR_NUMERO]//Total due date import:[lvVencimientos.$cols.importe.$total()]//Invoice total:[ivFFACTURA.FR_TOT]}
>> 	Quit all methods
>> End If
>> 
>> 
>> This 'If' sometimes fail.
>> 
>> For example lvVencimientos.$cols.importe.$total() is 9087,71 and ivFFACTURA.FR_TOT is 9087,71 but Omnis shows the error message.
>> Both, ‘importe' and ‘FR_TOT' are defined same, kNumber, k2dpShortnum.
>> 
>> 
>> 
>> Is there any known bug that Omnis fail comparing numbers in certain circumstances?
>> 
>> regards
>> 
>> xavier
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at https://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list