Topic: entries showing in red

Hi,

Wondering if someone can point me at what is going on with this once in a while occurrence. 

like just now, I entered a vendor invoice dated 3 days ago.  I added an attachment, and then applied a payment, also for 3 days ago, as they took it from visa on the same day.  I have actually entered 4 invoices from this vendor for this week, ranging from 5 days ago to 2 days ago, all payments matching the date of the entered invoice.  But for some reason, when I go look under suppliers=>transactions for this vendor, this one invoice is listed in red.  it is not overdue, it is not unpaid. 

I see this with some frequency; always have, with vendors and customers.  For example, under allocate customer payments, I have one payment listed in green from 2014, but there is 0.00 left to allocate, and the only invoice she ever got from me is paid in full.   

So long as everything looks good, I have just been ignoring it, but today my curiosity got the better of me and I started trying to find a reason, and there doesn't appear to be one.  What am I missing?

Re: entries showing in red

Have a look at the value 0.00 in the database tables and see if there is some 3rd decimal place error. If so, we may need to incorporate the DELTA difference makeover in the formula that computes it before triggering the red font. Provide the url part after the webroot that caused the error.

Re: entries showing in red

Hi Apmuthu, happy day to you.

I am not sure exactly what you are asking for in the database tables.  A query like select * from supp_trans where trans_no=1501; shows no 3rd decimal places at all.  I thought in 2.3 there was a spot to say what decimals were calculated to, so thought I would check that, but can't seem to find that setting in 2.4   Only thing I can find is decimals displayed, and all of those are set to two except exchange rate, which is set to 4.

The URL after webroot; this is the one I referenced as the one vendor invoice out of 4 that I just posted:
purchasing/manage/suppliers.php?

Here is for the customer allocation that shows green even though the customer invoice was paid:
sales/allocations/customer_allocation_main.php?

Re: entries showing in red

When arithmetic computations occur whether in the sql statement or in the php expressions, there is room for additional decimal places. These are rounded off and discarded if the DELTA is below a threshold. Search for the constant FLOAT_COMP_DELTA in the FA files and see what gives.

It is defined in includes/current_user.inc and is used in the suppliers and customers "_db.inc" files.

define('FLOAT_COMP_DELTA', 0.004);

Re: entries showing in red

Hi Apmuthu, thanks for following up.  looks like I have the expected value:

./includes/current_user.inc:define('FLOAT_COMP_DELTA', 0.004);

Re: entries showing in red

Check whether the expected value is 'visible' and is used as needed in the included file in your error.

Re: entries showing in red

okay, I know what you are asking there, but going to have to put that on the pile of things to look at in FA later...
will get back to you in some weeks on this...