<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Bug in Inventory valuation Report or standard cost]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=10262</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10262&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Bug in Inventory valuation Report or standard cost.]]></description>
		<lastBuildDate>Mon, 08 May 2023 10:14:22 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42347#p42347</link>
			<description><![CDATA[<p>Hello All,</p><p>I discovered that when I use Standard Cost as my basis of Costing in FrontAccounting, there is still automatic cost update which changes the Standard Cost at interval. Is that standard Cost not working? Please advice.</p><p>Popsicles12</p>]]></description>
			<author><![CDATA[null@example.com (popsicles12)]]></author>
			<pubDate>Mon, 08 May 2023 10:14:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42347#p42347</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42294#p42294</link>
			<description><![CDATA[<p>Thanks @kvvaradha for participating in this discussion.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 16 Apr 2023 15:07:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42294#p42294</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42293#p42293</link>
			<description><![CDATA[<p>I have checked. It works. You can update it .</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 16 Apr 2023 14:18:57 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42293#p42293</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42292#p42292</link>
			<description><![CDATA[<p>As you can only have 10 decimals (6 in UOM) in User Preference dialog the test for qoh or qoh+qty &gt; 0.0000000001 will handle all situations now. I have made rigorious tests and it seems to handle all situations now.<br />All values less than 0.0000000001 will not be possible in the algorithm and no calculation will be executed.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 16 Apr 2023 14:01:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42292#p42292</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42291#p42291</link>
			<description><![CDATA[<p>Seems like i told before. there is chance of having inventory less than unit one full unit is also possible.&nbsp; But you mentioned that, it will lead mis calculation. So lets get opinion from others and finalize it.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 16 Apr 2023 12:59:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42291#p42291</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42290#p42290</link>
			<description><![CDATA[<p>After having tested this weighted average material cost, I have found that the test for qoh &gt; 0 and for qoh+qty &gt; 0 will fail for very small values under 0.0000000001, so the test will be changed to test for this value instead to avoid these fails.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 15 Apr 2023 14:18:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42290#p42290</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42289#p42289</link>
			<description><![CDATA[<p>That&#039;s right. So lets condition it with&nbsp; </p><p>$qoh+$qty &gt;= 1 and make the calculation call on</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sat, 15 Apr 2023 12:47:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42289#p42289</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42288#p42288</link>
			<description><![CDATA[<p>@kvvaradha</p><p>To use our weighted average material cost, we must use the same decimals in the items qty. It is this that causes our miss calculation. F.i. if you start with qoh with 0.09 our algorithm is just fine. If we use the qoh of 0.08 we will get a zero value and nothing is calculated. Just fine.</p><p>So I see no problems here.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 15 Apr 2023 11:59:51 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42288#p42288</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42287#p42287</link>
			<description><![CDATA[<p>@Joe we can&#039;t check some&nbsp; &gt;= 1 . sometimes quantity can be saleable when its 0.5.&nbsp; So the limit can be like you told get_unit_dec,</p><p>When it comes -1 than go with user_qty_dec and than if the rounded value is less than 0, we shouldnt update the material cost.</p><p>Also lets hear from other developer suggestion to make it better fix for this.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sat, 15 Apr 2023 10:51:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42287#p42287</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42286#p42286</link>
			<description><![CDATA[<p>$kvvaradha</p><p>yes, if the ($qoh + $qty) is less than 1, there will be strange results. Before calculating this new material_cost, maybe we should first test if the (qoh + qty) &gt;= 1. what do you think?</p><p>The routine get_unic_dec() will sometimes return -1. If the return value is -1, then the UOM is using the user defined decimals on the UOM. And should be tested by user_qty_dec(). I will check if all calls to get_unic_dec() is testing for this.<br />I am aware of the user_price_dec problem with material price. Maybe a standard flag on the home_currency function. to return the value without rounding. I am jsut afraid of ev. side effects. What do you think?</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 15 Apr 2023 08:49:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42286#p42286</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42285#p42285</link>
			<description><![CDATA[<p>@Joe </p><p>I feel to show you something on this today. Actually i told you i cant give the issue without right decimals and values in my other post on other standard cost problem with a topic.&nbsp; But i have a sample data to try this for you now.</p><div class="codebox"><pre><code>$qoh = 0.08000000000000007; 

$qty = -0.08; 
$material_cost = 879.75;
$price_in_home_currency = 879.74550490191;

$material_cost = ($qoh * $material_cost + $qty * $price_in_home_currency) /    ($qoh + $qty);

//5182495254323.2 </code></pre></div><br /><p>if you applied get_qty_dec on $qoh, you will get only, 0.08 as stock, not with decimals.&nbsp; &nbsp;and also for the price in home currency you dont get more than users preferred decimal.&nbsp; </p><br /><p>I told you to apply <strong>get_qty_dec and user_price_dec </strong> . run the above code and find the difference in it.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sat, 15 Apr 2023 06:34:18 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42285#p42285</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42267#p42267</link>
			<description><![CDATA[<p>FA is using average material cost on stock items.</p><p>The operation can be seen in <strong>/purchasing/includes/db/grn_db.inc</strong> in the first <em>function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only=false)</em>.</p><p>On line 66 you will see<br /></p><div class="codebox"><pre><code>$material_cost = ($qoh * $material_cost + $qty * $price_in_home_currency) /    ($qoh + $qty);</code></pre></div><p>$material_cost will be current material cost multiplied by current qoh + transaction qty multiplied by price in home currency. This will then be divided by qoh + qty.<br />These operations will be new average material cost.<br />So the calculations are correctly done.</p><p>All stock transactions are going through this routine.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 09 Apr 2023 07:22:14 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42267#p42267</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42257#p42257</link>
			<description><![CDATA[<p>Opening stock of 15 pieces purchased at a rate of 1,637.16<br />Purchase of 10pieces at a rate of 1,708.85 in the last tax period<br />sales of 2 piece at a rate of 1712.38 in the last tax period<br />after sales purchase of 5 piece at a rate of 1708.85 in the last tax period<br />Currently, there are 28 pieces left in stock</p><br /><br /><p>Solution</p><br /><p>alculate the unit cost of the item using the Weighted Average method:</p><p>Step 1: Calculate the total cost of the opening stock<br />Total cost of opening stock = 15 x 1,637.16 = 24,557.40</p><p>Step 2: Calculate the total cost of the purchases made in the last tax period<br />Total cost of purchases = (10 - 2 + 5) x 1,708.85 = 20,351.25</p><p>Step 3: Calculate the total cost of goods available for sale<br />Total cost of goods available for sale = Total cost of opening stock + Total cost of purchases = 24,557.40 + 20,351.25 = 44,908.65</p><p>Step 4: Calculate the weighted average cost per unit<br />Total units available for sale = Opening stock + Purchases - Sales = 15 + 10 - 2 + 5 = 28<br />Weighted average cost per unit = Total cost of goods available for sale / Total units available for sale = 44,908.65 / 28 = 1,603.16</p><br /><p>as per my calculation unit price is 1603.16</p><p>but in front accounting 1776.1466666667</p>]]></description>
			<author><![CDATA[null@example.com (yubrajkafle99)]]></author>
			<pubDate>Sat, 08 Apr 2023 06:09:28 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42257#p42257</guid>
		</item>
		<item>
			<title><![CDATA[Bug in Inventory valuation Report or standard cost]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=42256#p42256</link>
			<description><![CDATA[<p>Dear Developers of Front Accounting,</p><p>I am writing to inquire about the calculation of unit cost in the inventory valuation report of Front Accounting for a particular item in my inventory. The item in question is 105aps, and I have the following information:</p><p>Opening stock of 15 pieces purchased at a rate of 1,637.16<br />Purchase of 65 pieces at a rate of 1,708.85 in the last tax period<br />Purchase of 25 pieces at a rate of 2,034.51 in the last tax period<br />Currently, there are 9 pieces left in stock<br />I have noticed that the inventory valuation report in Front Accounting shows a unit cost of 1,776.15 for this item. However, I would like to understand how this unit cost is being calculated, including the purchasing prices, opening stock price, and inventory price, as well as the final unit value price.</p><p>Could you please provide me with a detailed explanation of the calculation method used to determine the unit cost in the inventory valuation report? I would greatly appreciate it if you could also provide a breakdown of the purchasing prices, opening stock price, and inventory price that contribute to the final unit value price.</p><p>Thank you for your time and assistance in this matter. I look forward to your response.&quot;</p>]]></description>
			<author><![CDATA[null@example.com (yubrajkafle99)]]></author>
			<pubDate>Sat, 08 Apr 2023 06:08:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=42256#p42256</guid>
		</item>
	</channel>
</rss>
