Page 1 of 3

Decimal comma & nuDebug() Entries

Posted: Wed May 23, 2018 5:46 pm
by ahernandez
Hi everybody,

Two questions...

I have got a problem typing in a nuNumber field type. I have defined nuNumber as "€ 1.000,00" format, but when I try to enter a decimal number typing a comma it doesn't work. Just typing . as decimal point it works.

Could you help me ?

And the second one..

I have a huge nuDebug() log and when I try to delete it doesn't work. Is easy for me delete records in the table, but I don't know where are de entries of each nuDebug log.

Thanks.

Re: Decimal comma & nuDebug() Entries

Posted: Thu May 24, 2018 8:29 am
by toms
ahernandez wrote:Hi everybody,And the second one..

I have a huge nuDebug() log and when I try to delete it doesn't work. Is easy for me delete records in the table, but I don't know where are de entries of each nuDebug log.

Thanks.
So you click the "Delete All" button and the entries are not deleted then?
Run this query on your database to delete all debug entries.

Code: Select all

DELETE FROM zzzzsys_debug
Regarding your other question: This is something Steven should be looking at.

Re: Decimal comma & nuDebug() Entries

Posted: Thu May 24, 2018 12:19 pm
by ahernandez
Done toms. Logs deleted and now works fine. Thank you.

Any idea about decimal comma?

Re: Decimal comma & nuDebug() Entries

Posted: Thu May 24, 2018 1:57 pm
by toms
Numbers with comma as decimal separator are not accepted because of this check:
number.png

Re: Decimal comma & nuDebug() Entries

Posted: Thu May 24, 2018 4:18 pm
by ahernandez
Sorry toms,

I am pretty new with php and I don't understand this code.
Does that mean there is no solution?

Thank you.

Re: Decimal comma & nuDebug() Entries

Posted: Thu May 24, 2018 4:47 pm
by toms
Actually, this info is for the admin so that he can see why the problem exists. I am sure that a solution can be found.

Re: Decimal comma & nuDebug() Entries

Posted: Fri May 25, 2018 5:53 am
by ahernandez
Thank you toms.

Re: Decimal comma & nuDebug() Entries

Posted: Fri May 25, 2018 8:32 am
by toms
At least you can still enter a number with a decimal point and it will be formatted correctly.

Workaround, until it's fixed:
This will replace the comma with a decimal point before the formatting is taking place.

Code: Select all

$('#yourfieldid').attr('onchange','').on('blur', function(event) {
    $(this).val($(this).val().replace(',','.'));
    nuChange(event);
});
E.g. you enter: 12345,4
It will be turned into : € 12.345,40

Re: Decimal comma & nuDebug() Entries

Posted: Fri May 25, 2018 10:47 am
by ahernandez
Great idea!!

Thank you very much toms!!

Re: Decimal comma & nuDebug() Entries

Posted: Fri May 25, 2018 10:54 am
by ahernandez
But...

I can't do it on a Subform...

I can't insert JavaScript code. isn't it?