Topic: Inventory valuation report. 301 unit decimal -1 issue.

Yes, while making the inventory valuation report and if the stock is in single digit and the decimal for that item unit set -1. then the item won't appear in the report.

Line no 120 

HAVING ROUND(SUM(move.qty), units.decimals) != 0";

has to be like this.

$dec= user_price_dec();
...
...
..
HAVING ROUND(SUM(move.qty), IF(units.decimals=-1, ".$dec.", units.decimals) != 0";

Joe check this

Subscription service based on FA
HRM CRM POS batch Themes

Re: Inventory valuation report. 301 unit decimal -1 issue.

Strange, I cannot reproduce this. Have tried with 'User Quantity Decimals (-1) and stock with single digit. And tried in PHP 7.1.33 and 8.1. No problems. It works perfectly here. Others having problems?

/Joe

3 (edited by kvvaradha 12/23/2022 04:50:52 am)

Re: Inventory valuation report. 301 unit decimal -1 issue.

The situation you need to reproduce.

You should have one item with only one digit stock balance and which is also only one entry. 

And try the valuation report again.   That specific item won't be in the list.

And ofcourse logically  we said -1 means user decimal quantity.   Is that not right to put that in the query to get properly decimal valued stock. ?

Subscription service based on FA
HRM CRM POS batch Themes

Re: Inventory valuation report. 301 unit decimal -1 issue.

Yes, now I see it. In this specific case the line was not there. Thanks for observing this.

To retrieve the user unit dec, the function user_qty_dec() is uset, not user_price_dec() smile.

This has now been committed to stable repo. A fixed file can be downloaded here and replaced on your server.


Joe

Re: Inventory valuation report. 301 unit decimal -1 issue.

Perfect.  I thought to say the user qty dec. But used price dec there by mistake.

Subscription service based on FA
HRM CRM POS batch Themes