Invoice delievers "num" weird integer result

Hi.

I´m just checking the instance that we had. We found a weird behavior when saving an invoice with a custom number (num) like, for example 110 and not using continuous numbering, and always the record creates a value of “2147483647”, which in someway I think relates to Integer data type.

Do someone have a clue what could be the reason?

Thanks in advance.

Yes that number is equivalent to -1 in a positive integer type. I’d say that’s an error somewhere in the code, getting output as data.

But I don’t know where that bug is, you’d need to use a debugger and trace through that saving code…

Hey… thanks again, a lot. I´ll search with the debbuger. Never used it though and it´ll be instructional to learn about it.

Seizing the chance… it is possible to just install a new single module (same one, Invoice´s module) and hope for this bug to be overwriten or that´s to hope too much?

Is this kind of error in coding succeptible of fixing when migrating to 8.x? (I´ve checked, and seems not a custom change).

You can’t upgrade single modules, you’ll likely end up breaking the system.

You could try this issue on the online demo, to see if it’s only in your installation, or a generic bug. This will give you some idea of how likely it is that future versions will address the issue…

I used a XAMPP installation to control and compare. Im not developer, so I kinda have to improvise some stuff.

In the end, I didnt need that column (“num”), so I used phpmyadmin to reset the values of “num” all to zero, after that test a new record, and it went again to 1,2,3 in continuous numbering. The issue seemed that once that you get various “2147483647” the max value of Integer is reached, so any other value will be caped at that number too.

As I didnt need that column, I just hide it and created a more suitable column with Text Data Type to replace it.

Thanks for your guidance!

1 Like