<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Clone Manufactured Item -> Clone BOM?]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8333&amp;type=atom" />
	<updated>2019-08-18T06:04:19Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8333</id>
		<entry>
			<title type="html"><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35718#p35718" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-08-18T06:04:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35718#p35718</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35710#p35710" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[paul]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44798</uri>
			</author>
			<updated>2019-08-17T15:50:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35710#p35710</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35709#p35709" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-08-17T15:43:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35709#p35709</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35708#p35708" />
			<content type="html"><![CDATA[<p>Yes, this is ok, I guess.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-08-17T15:19:02Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35708#p35708</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35707#p35707" />
			<content type="html"><![CDATA[<p>@joe: want to add this?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-08-17T13:35:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35707#p35707</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35705#p35705" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[paul]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44798</uri>
			</author>
			<updated>2019-08-17T12:24:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35705#p35705</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35676#p35676" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2019-08-15T11:31:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35676#p35676</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Clone Manufactured Item -> Clone BOM?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35672#p35672" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[paul]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44798</uri>
			</author>
			<updated>2019-08-15T02:07:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35672#p35672</id>
		</entry>
</feed>
