Topic: Item Adjustments Note disable rounding of Unit Cost

Hi Every one
At the first, I would like to thank you for the great effort that you have made to develop this great software .. When I read your blogs about what you have faced in terms of issues and how to communicate to find solutions and provide support, you made me proud of you all.
Secondly, i'm asking your help and support to solve this Issue :
1-Open Inventory Module.
2-Open Inventory Adjustments.
3-Select item and fill QTY.
4- Fill Unit Cost by 100.56 But system rounding Unit cost automaticly to 101
So Kindly suuport me to disable Auto Rounding for Unit cost on Item Adjustment Note.
your quick response is appreciated.
Regards

Re: Item Adjustments Note disable rounding of Unit Cost

There is rounding option available in Preference page. Did you change it to apply more. So it would affect here better..

Subscription service based on FA
HRM CRM POS batch Themes

Re: Item Adjustments Note disable rounding of Unit Cost

Hi Kvvaradha,

Thank you for your response. I tried this option by preferences but not solved..

I solved it by editing inventory/includes/item_adjustments_ui.inc  like this:

Replace this code: 

amount_cells(null,'std_cost',null,null,null,$dec);

with:

amount_cells(null,'std_cost');

It has worked for me.

Re: Item Adjustments Note disable rounding of Unit Cost

Hello @islamsaeid3,

Its good to hear. I will check the function as well. Thank you.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Item Adjustments Note disable rounding of Unit Cost

@joe: why is this?

Re: Item Adjustments Note disable rounding of Unit Cost

I cannot reproduce this error. Which version?

Re: Item Adjustments Note disable rounding of Unit Cost

I  am also unable to reproduce the issue. But I am strongly suggesting something to make changes In our program. As I seeing some of moderate companies are asking me why FA  gives cost update entry by wrong. It happens because of the decimal values and we have double in MySql field type. That allows more decimal values to the system.  That's really some dangerous values to a single item which definitely  won't have that much huge value.  I will get you the sample when I get similar scenario with clients. Usually the decimal values are not properly controlled from our side. We should make some changes for it.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Item Adjustments Note disable rounding of Unit Cost

Frontaccounting V 2.4.8
@joe @apmuthu

Re: Item Adjustments Note disable rounding of Unit Cost

Try with FA 2.4.9+ and see if the issue persists.
Also, state your PHP/MySQL/Platform versions.

Re: Item Adjustments Note disable rounding of Unit Cost

I confirm the rounding problem.
Fix: line 202 of item_adjustment_ui.inc should be

amount_cells(null, 'std_cost', null, null, null, $dec2);

The last passed variable should be $dec2 not $dec, $dec is for quantity decimal

Phuong

11 (edited by apmuthu 12/18/2020 04:50:22 am)

Re: Item Adjustments Note disable rounding of Unit Cost

@joe: Please check and correct it:
Line 202 in inventory/includes/item_adjustments_ui.inc:

            amount_cells(null, 'std_cost', null, null, null, $dec);

needs to be replaced with:

            amount_cells(null, 'std_cost', null, null, null, $dec2);

This line was introduced in commit on 2019-06-28 as Line 194:
Inventory Adjustment: negative adjustment should always use current average item cost.

Re: Item Adjustments Note disable rounding of Unit Cost

Hello and thanks to @islamsaeid3, @notrinos and @apmuthu for seeing this.

This has been fixed and committed to stable repo (?). I think we are close to a 2.4.10 release smile

You can download the fixed file here and replace in /inventory/includes/item_adjustments_ui.inc.

/Joe