7.7.1 -> 7.7.4, line item quantities lose fractional parts

Hi all

We are using AOS_Products to manage hourly rates. Invoices are created based on timesheets so that there is one product line per employee per day, billable hours calculated as quantities and other information (e.g. dates and employee names) included as description. Since daily billable hours often are not whole numbers, also product quantities do include fractional parts.

However upgrading from 7.7.1 to 7.7.4 broke this. The upgrade script resulted in all product_qty entries in the database (so not just in new or edited invoices) being reduced to integers. Instead of mathematical rounding it seems like everything past the decimal point has just been cropped, leaving many line items simply as zeros. All other fields seemed to remain unchanged. Editing an invoice would then require retyping all non-whole number quantities to line items. Upon save prices and taxes were recorded correctly, but quantities would again be reduced to integers.

After restoring backups I tried upgrading again with similar results.

Im assuming this is not an intended feature, so have others noticed a similar issue? If I’m the only one experiencing this, does anyone have any ideas how to fix it or circumvent the problem? The SuiteCRM instance in question is somewhat customized, but none of the changes should interfere with upgrades or line item quantities in this way.

I did some digging and noticed that in upgrade package’s modules/AOS_Products_Quotes/vardefs.php:
‘product_qty’ =>
array (

‘type’ => ‘int’,

)

In my installation the type is “decimal”, as was in 7.7.3. There’s no mention of this change in the release notes, so is this intentional or should I file a bug report?

Hello,

I have exactly the same Problem just noticed. This brings me in big trouble.

My question is: ist this an error or is this planned?

Is there already an bug report or can I help in some way?

Regards
Frank

I opened an issue here a while after opening this thread. Apparently it was an error resulting from an attempt to fix another issue and not necessarily an intended change. The problem should be fixed in the next release.

Thankfully I noticed the problem early on after upgrading, had backups and could recover relatively easily. I sincerely hope you can too!