<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Manufacture BOM]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10580&amp;type=atom" />
	<updated>2024-08-12T05:12:27Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10580</id>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43311#p43311" />
			<content type="html"><![CDATA[<p>@joe: Should we allow 0 qty items in BOM to exist?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2024-08-12T05:12:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43311#p43311</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43310#p43310" />
			<content type="html"><![CDATA[<p>I figured out the problem!</p><p>I have some items in my BOM that have a 0 quantity this seems to no longer work.</p><p>If I remove the q=0 items I can assemble them again!</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2024-08-11T23:18:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43310#p43310</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43309#p43309" />
			<content type="html"><![CDATA[<p>I think I am getting closer to seeing what the issue is.</p><p>On the old site if I open the database in phpmyadmin the wo_requirements table has 8000 records and on the imported site only 300</p><p>I also get an error from myphpadmin when browsing that table that looks like a php issue</p><p>I am going to try mysqldump and see if I get all 8000 records for that table</p><p>--- error below</p><p>Warning in ./libraries/sql.lib.php#613<br /> count(): Parameter must be an array or an object that implements Countable</p><p>Backtrace</p><p>./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)<br />./libraries/sql.lib.php#2062: PMA_executeQueryAndGetQueryResponse(<br />array,<br />boolean true,<br />string &#039;gotgrit_fa24&#039;,<br />string &#039;0_wo_requirements&#039;,<br />NULL,<br />NULL,<br />NULL,<br />NULL,<br />NULL,<br />NULL,<br />string &#039;&#039;,<br />string &#039;./themes/pmahomme/img/&#039;,<br />NULL,<br />NULL,<br />NULL,<br />string &#039;SELECT * FROM `0_wo_requirements`&#039;,<br />NULL,<br />NULL,<br />)<br />./sql.php#221: PMA_executeQueryAndSendQueryResponse(<br />array,<br />boolean true,<br />string &#039;gotgrit_fa24&#039;,<br />string &#039;0_wo_requirements&#039;,<br />NULL,<br />NULL,<br />NULL,<br />NULL,<br />NULL,<br />NULL,<br />string &#039;&#039;,<br />string &#039;./themes/pmahomme/img/&#039;,<br />NULL,<br />NULL,<br />NULL,<br />string &#039;SELECT * FROM `0_wo_requirements`&#039;,<br />NULL,<br />NULL,<br />)</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2024-08-11T19:55:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43309#p43309</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43308#p43308" />
			<content type="html"><![CDATA[<p>The basic FA has just 80 tables.<br />Make a fresh install of latest FA and manually import differences taking care to adjust the Primary Key and it&#039;s references.<br />Then copy over the relevant images/files renaming them for ID related differences in the new dispensation.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2024-08-09T05:15:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43308#p43308</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43307#p43307" />
			<content type="html"><![CDATA[<p>Humm... I did delete a handfull of closed fiscal years, but other than that not much.</p><p>I&#039;ll look at a known good backup and see what that table looks like..</p><p>Might I need to recreate the BOMs used to manufacture&nbsp; that product?</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2024-08-08T23:31:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43307#p43307</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43305#p43305" />
			<content type="html"><![CDATA[<p>It is possible that many IDs may be missing due to deletion but the AUTO_INCREMENT value may have advanced.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2024-08-08T17:28:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43305#p43305</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43300#p43300" />
			<content type="html"><![CDATA[<p>&gt;&nbsp; wo_requirements the highest id is 8616 and the SQL refers to 8652</p><p>The SQL refers to id = 8652 and the highest id in the table is 8616, what could cause the code to refer to a non-existent record?</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2024-08-07T23:06:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43300#p43300</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43299#p43299" />
			<content type="html"><![CDATA[<p>The file <strong>manufacturing/includes/db/work_order_requirements_db.inc</strong> has the offending code at lines 66-*74:<br /></p><div class="codebox"><pre><code>function update_wo_requirement_issued($id, $quantity, $cost)
{
    $sql = &quot;UPDATE &quot;.TB_PREF.&quot;wo_requirements SET 
                unit_cost = (units_issued*unit_cost+&quot;.$quantity*$cost.&quot;)/(units_issued+&quot;.$quantity.&quot;),
                units_issued = units_issued + &quot;.db_escape($quantity).&quot;
            WHERE id = &quot;.db_escape($id);

    db_query($sql, &quot;The work requirements issued quantity couldn&#039;t be updated&quot;);
}</code></pre></div><p>As &#039;unit_cost&#039; is computed and assigned in the sql statement whilst being part of&nbsp; the RHS as well kindly look at if it was available initially in the first place.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2024-08-07T16:57:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43299#p43299</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Manufacture BOM]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43297#p43297" />
			<content type="html"><![CDATA[<p>I have ported my db from 2.4.6 to 2.4.18 </p><p>I have a number of products are are assembled with a BOM and when I have all the items required I get the following error</p><p>&lt;b&gt;DATABASE ERROR :&lt;/b&gt; The work requirements issued quantity couldn&#039;t be updated&lt;br&gt;error code : 1048&lt;br&gt;error message : Column &#039;unit_cost&#039; cannot be null&lt;br&gt;sql that failed was : UPDATE 0_wo_requirements SET <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unit_cost = (units_issued*unit_cost+0)/(units_issued+0),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; units_issued = units_issued + &#039;0&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE id = &#039;8652&#039;&lt;br&gt;&lt;br&gt;&lt;br&gt;</p><p>I am am able to enter other work orders</p><p>in wo_requirements the highest id is 8616 and the SQL refers to 8652</p><p>strange</p><p>I am using PHP 7.4.33 and mysql 8.0</p>]]></content>
			<author>
				<name><![CDATA[tom]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=331</uri>
			</author>
			<updated>2024-08-04T19:45:53Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43297#p43297</id>
		</entry>
</feed>
