<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Clone Manufactured Item -> Clone BOM?]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8333</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8333&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Clone Manufactured Item -> Clone BOM?.]]></description>
		<lastBuildDate>Sun, 18 Aug 2019 06:04:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35718#p35718</link>
			<description><![CDATA[<p>1. Search the forums and the wiki.<br />2. Study the DB changes for each transaction / form entry and see if it makes sense.<br />3. Keep track of the FA version and the DB version in <strong>version.php</strong><br />4. Study the commits in the Repos - Core and Extensions (official and others you follow).<br />5. Make sure the <a href="https://frontaccounting.com/fawiki/index.php?n=Main.Config">config.php</a> and <strong>sys_prefs</strong> table entries match the changes committed in each version.<br />6. Plug and Pray that nothing breaks.<br />7. Wish @joe &amp; @itronics a long life to fix anything that goes wrong and gets found <img src="https://frontaccounting.com/punbb/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 18 Aug 2019 06:04:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35718#p35718</guid>
		</item>
		<item>
			<title><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35710#p35710</link>
			<description><![CDATA[<p>Great - Thank you all!</p><p>&nbsp; So, what is the best way to stay &quot;current&quot; to include all that has been and to be committed? It would seem difficult to answer the many questions (from me!) without knowing what version the person is using.</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Sat, 17 Aug 2019 15:50:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35710#p35710</guid>
		</item>
		<item>
			<title><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35709#p35709</link>
			<description><![CDATA[<p>This has been <a href="https://github.com/FrontAccountingERP/FA/commit/9691e0d71e90c58167226190adbefce341e0f84a">committed</a> to repo 2.4.7.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 17 Aug 2019 15:43:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35709#p35709</guid>
		</item>
		<item>
			<title><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35708#p35708</link>
			<description><![CDATA[<p>Yes, this is ok, I guess.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 17 Aug 2019 15:19:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35708#p35708</guid>
		</item>
		<item>
			<title><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35707#p35707</link>
			<description><![CDATA[<p>@joe: want to add this?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 17 Aug 2019 13:35:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35707#p35707</guid>
		</item>
		<item>
			<title><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35705#p35705</link>
			<description><![CDATA[<p>Thank you Braath,</p><p>&nbsp; I now have your changes applied to my system. At first I attempted to apply your patch to my local file (from Sourceforge v.2.4.7,&nbsp; Build 26.07.2019) and got a &quot;patch does not apply&quot; message, so I manually added your lines as the patch indicates. I&#039;m not smart, so I am sure I didn&#039;t do something correctly when trying to apply the patch via git apply.</p><p>&nbsp; Then I didn&#039;t see how to apply the copied items at first, but then tabbing through the copy section simply finished your copy command.</p><p>&nbsp; Thank you very much!</p><p>&nbsp; Will your changes be added to the main program download for future installations?</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Sat, 17 Aug 2019 12:24:29 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35705#p35705</guid>
		</item>
		<item>
			<title><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35676#p35676</link>
			<description><![CDATA[<p>Cloning does not copy the BOM.</p><p>My fork has code to copy the BOM under Manufacturing-&gt;Bills Of Materials<br /></p><div class="codebox"><pre><code>diff --git a/core/manufacturing/manage/bom_edit.php b/core/manufacturing/manage/bom_edit.php
index 35230dd..9d6fbfd 100644
--- a/core/manufacturing/manage/bom_edit.php
+++ b/core/manufacturing/manage/bom_edit.php
@@ -45,9 +45,10 @@ function display_bom_items($selected_parent)
        table_header($th);
 
        $k = 0;
+    $found = false;
        while ($myrow = db_fetch($result))
        {
-
+        $found = true;
                alt_table_row_color($k);
 
                label_cell($myrow[&quot;component&quot;]);
@@ -62,9 +63,30 @@ function display_bom_items($selected_parent)
 
        } //END WHILE LIST LOOP
        end_table();
+
+    if ($found) {
+        start_table(TABLESTYLE, &quot;width=&#039;60%&#039;&quot;);
+        stock_manufactured_items_list_row(_(&quot;Copy BOM to another manufacturable item&quot;), &#039;new_stock_id&#039;, $selected_parent, false, true);
+        end_table();
+    }
+
        div_end();
 }
 
+function copy_bom_items($stock_id, $new_stock_id)
+{
+       $result = get_bom($stock_id);
+       while ($myrow = db_fetch($result))
+       {
+               $_POST[&#039;component&#039;] = $myrow[&quot;component&quot;];
+        $_POST[&#039;loc_code&#039;] = $myrow[&quot;loc_code&quot;];
+        $_POST[&#039;workcentre_added&#039;] = $myrow[&quot;workcentre_added&quot;];
+        $_POST[&#039;quantity&#039;] = $myrow[&quot;quantity&quot;];
+        on_submit($new_stock_id, -1);
+    }
+}
+
+
 
 
 //--------------------------------------------------------------------------------------------------
 
+if (list_updated(&#039;new_stock_id&#039;)) {
+    copy_bom_items($_POST[&#039;stock_id&#039;], $_POST[&#039;new_stock_id&#039;]);
+    $item = get_item($_POST[&#039;new_stock_id&#039;]);
+    $_POST[&#039;stock_id&#039;] = $_POST[&#039;new_stock_id&#039;];
+    $Ajax-&gt;activate(&#039;_page_body&#039;);
+    display_notification(&quot;BOM copied to &quot; . $item[&#039;description&#039;]);
+}
+

 start_form();
 
 start_form(false, true);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Braath Waate)]]></author>
			<pubDate>Thu, 15 Aug 2019 11:31:35 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35676#p35676</guid>
		</item>
		<item>
			<title><![CDATA[Clone Manufactured Item -> Clone BOM?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=35672#p35672</link>
			<description><![CDATA[<p>When I clone an item that is manufactured, the BOM is not considered if I understand correctly? Am I missing an option that would allow the BOM to also be cloned with costs (and a bonus to bring up the BOM for the new item during cloning for small modifications)? Or could this be considered for a future release?</p>]]></description>
			<author><![CDATA[null@example.com (paul)]]></author>
			<pubDate>Thu, 15 Aug 2019 02:07:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=35672#p35672</guid>
		</item>
	</channel>
</rss>
