<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — inventory location transfer from sales kit]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8376&amp;type=atom" />
	<updated>2019-09-04T02:59:39Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8376</id>
		<entry>
			<title type="html"><![CDATA[Re: inventory location transfer from sales kit]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35904#p35904" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>notrinos wrote:</cite><blockquote><p>try replace the <strong>inventory/includes/stock_transfers_ui.inc</strong> with this code (also in attachment) then check if any problem</p></blockquote></div><p>Hey Notrinos, thanks a lot for your help it sure works! really appreciate it.</p>]]></content>
			<author>
				<name><![CDATA[sikumbang]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44897</uri>
			</author>
			<updated>2019-09-04T02:59:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35904#p35904</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: inventory location transfer from sales kit]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35903#p35903" />
			<content type="html"><![CDATA[<p>This has been committed to 2.4.7 stable repo. Thanks @notrinos for your solution.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-09-03T16:08:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35903#p35903</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: inventory location transfer from sales kit]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35902#p35902" />
			<content type="html"><![CDATA[<p>tested with fixed asset transfer without problem as well<br />the new file can be downloaded here: <a href="https://www.dropbox.com/s/rr71ntp7e5wgiqj/stock_transfers_ui.inc?dl=0">download</a></p>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2019-09-03T15:34:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35902#p35902</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: inventory location transfer from sales kit]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35901#p35901" />
			<content type="html"><![CDATA[<p>@joe: is this okay to add into the core?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-09-03T15:23:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35901#p35901</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: inventory location transfer from sales kit]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35898#p35898" />
			<content type="html"><![CDATA[<p>try replace the <strong>inventory/includes/stock_transfers_ui.inc</strong> with this code (also in attachment) then check if any problem<br /></p><div class="quotebox"><blockquote><p>&lt;?php<br />/**********************************************************************<br />&nbsp; &nbsp; Copyright (C) FrontAccounting, LLC.<br />&nbsp; &nbsp; Released under the terms of the GNU General Public License, GPL, <br />&nbsp; &nbsp; as published by the Free Software Foundation, either version 3 <br />&nbsp; &nbsp; of the License, or (at your option) any later version.<br />&nbsp; &nbsp; This program is distributed in the hope that it will be useful,<br />&nbsp; &nbsp; but WITHOUT ANY WARRANTY; without even the implied warranty of<br />&nbsp; &nbsp; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&nbsp; <br />&nbsp; &nbsp; See the License here &lt;http://www.gnu.org/licenses/gpl-3.0.html&gt;.<br />***********************************************************************/<br />include_once($path_to_root . &quot;/includes/ui.inc&quot;);<br />include_once($path_to_root . &quot;/includes/ui/items_cart.inc&quot;);</p><p>//--------------------------------------------------------------------------------</p><p>function add_to_order(&amp;$order, $new_item, $new_item_qty, $standard_cost)<br />{<br />&nbsp; &nbsp; $kit = get_item_kit($new_item);</p><p>&nbsp; &nbsp; foreach($kit as $item) {<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;find_cart_item($item[&#039;stock_id&#039;]))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display_error(_(&quot;For Part :&quot;) . $item[&#039;stock_id&#039;] . &quot; &quot; . &quot;This item is already on this document. You can change the quantity on the existing line if necessary.&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $order-&gt;add_to_cart (count($order-&gt;line_items), $item[&#039;stock_id&#039;], $new_item_qty * $item[&#039;quantity&#039;], $standard_cost);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />}</p><p>//--------------------------------------------------------------------------------</p><p>function display_order_header(&amp;$order)<br />{<br />&nbsp; &nbsp; global $Refs;</p><p>&nbsp; &nbsp; start_outer_table(TABLESTYLE, &quot;width=&#039;70%&#039;&quot;);</p><p>&nbsp; &nbsp; table_section(1);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; locations_list_row(_(&quot;From Location:&quot;), &#039;FromStockLocation&#039;, null, false, false, $order-&gt;fixed_asset);<br />&nbsp; &nbsp; locations_list_row(_(&quot;To Location:&quot;), &#039;ToStockLocation&#039;, null,false, false, $order-&gt;fixed_asset);</p><p>&nbsp; &nbsp; table_section(2, &quot;50%&quot;);</p><p>&nbsp; &nbsp; date_row(_(&quot;Date:&quot;), &#039;AdjDate&#039;, &#039;&#039;, true);</p><p>&nbsp; &nbsp; ref_row(_(&quot;Reference:&quot;), &#039;ref&#039;, &#039;&#039;, $Refs-&gt;get_next(ST_LOCTRANSFER, null, array(&#039;date&#039;=&gt;get_post(&#039;AdjDate&#039;), &#039;location&#039;=&gt; get_post(&#039;FromStockLocation&#039;))),<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; false, ST_LOCTRANSFER);</p><p>&nbsp; &nbsp; end_outer_table(1); // outer table<br />}</p><p>//---------------------------------------------------------------------------------</p><p>function display_transfer_items($title, &amp;$order)<br />{<br />&nbsp; &nbsp; global $path_to_root;</p><p>&nbsp; &nbsp; display_heading($title);<br />&nbsp; &nbsp; div_start(&#039;items_table&#039;);<br />&nbsp; &nbsp; start_table(TABLESTYLE, &quot;width=&#039;80%&#039;&quot;);<br />&nbsp; &nbsp; $th = array(_(&quot;Item Code&quot;), _(&quot;Item Description&quot;), _(&quot;Quantity&quot;), _(&quot;Unit&quot;), &#039;&#039;);<br />&nbsp; &nbsp; if (!$order-&gt;fixed_asset &amp;&amp; count($order-&gt;line_items)) $th[] = &#039;&#039;;<br />&nbsp; &nbsp; table_header($th);<br />&nbsp; &nbsp; $k = 0;&nbsp; //row colour counter</p><p>&nbsp; &nbsp; $low_stock = $order-&gt;check_qoh($_POST[&#039;FromStockLocation&#039;], $_POST[&#039;AdjDate&#039;], true);<br />&nbsp; &nbsp; $id = find_submit(&#039;Edit&#039;);<br />&nbsp; &nbsp; foreach ($order-&gt;line_items as $line_no=&gt;$stock_item)<br />&nbsp; &nbsp; {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if ($id != $line_no)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (in_array($stock_item-&gt;stock_id, $low_stock))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start_row(&quot;class=&#039;stockmankobg&#039;&quot;);&nbsp; &nbsp; // notice low stock status<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alt_table_row_color($k);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;fixed_asset)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label_cell($stock_item-&gt;stock_id);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; view_stock_status_cell($stock_item-&gt;stock_id);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label_cell($stock_item-&gt;item_description);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qty_cell($stock_item-&gt;quantity, false, get_qty_dec($stock_item-&gt;stock_id));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label_cell($stock_item-&gt;units);</p><p>&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$order-&gt;fixed_asset)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; edit_button_cell(&quot;Edit$line_no&quot;, _(&quot;Edit&quot;),&nbsp; &nbsp; _(&#039;Edit document line&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete_button_cell(&quot;Delete$line_no&quot;, _(&quot;Delete&quot;), _(&#039;Remove line from document&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end_row();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transfer_edit_item_controls($order, $line_no);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; if ($id == -1)<br />&nbsp; &nbsp; &nbsp; &nbsp; transfer_edit_item_controls($order);</p><p>&nbsp; &nbsp; end_table();<br />&nbsp; &nbsp; if ($low_stock)<br />&nbsp; &nbsp; &nbsp; &nbsp; display_note(_(&quot;Marked items have insufficient quantities in stock as on day of transfer.&quot;), 0, 1, &quot;class=&#039;stockmankofg&#039;&quot;);<br />&nbsp; &nbsp; div_end();<br />}</p><p>//---------------------------------------------------------------------------------</p><p>function transfer_edit_item_controls(&amp;$order, $line_no=-1)<br />{<br />&nbsp; &nbsp; global $Ajax;<br />&nbsp; &nbsp; start_row();</p><p>&nbsp; &nbsp; $id = find_submit(&#039;Edit&#039;);<br />&nbsp; &nbsp; if ($line_no != -1 &amp;&amp; $line_no == $id)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;stock_id&#039;] = $order-&gt;line_items[$id]-&gt;stock_id;<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;qty&#039;] = qty_format($order-&gt;line_items[$id]-&gt;quantity, $order-&gt;line_items[$id]-&gt;stock_id, $dec);<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;units&#039;] = $order-&gt;line_items[$id]-&gt;units;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; hidden(&#039;stock_id&#039;, $_POST[&#039;stock_id&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; label_cell($_POST[&#039;stock_id&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; label_cell($order-&gt;line_items[$id]-&gt;item_description);<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$Ajax-&gt;activate(&#039;items_table&#039;);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;fixed_asset)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stock_disposable_fa_list_cells(null, &#039;stock_id&#039;, null, false, true, $order-&gt;line_items);<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sales_items_list_cells(null,&#039;stock_id&#039;, null, false, true, true);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // stock_costable_items_list_cells(null, &#039;stock_id&#039;, null, false, true);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (list_updated(&#039;stock_id&#039;)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$Ajax-&gt;activate(&#039;units&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$Ajax-&gt;activate(&#039;qty&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $item_info = get_item_edit_info($_POST[&#039;stock_id&#039;]);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $dec = $item_info[&#039;decimals&#039;];<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;qty&#039;] = number_format2(0, $dec);<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;units&#039;] = $item_info[&quot;units&quot;];<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; if ($order-&gt;fixed_asset) {<br />&nbsp; &nbsp; &nbsp; &nbsp; hidden(&#039;qty&#039;, 1);<br />&nbsp; &nbsp; &nbsp; &nbsp; qty_cell(1, false, 0);<br />&nbsp; &nbsp; } else<br />&nbsp; &nbsp; &nbsp; &nbsp; small_qty_cells(null, &#039;qty&#039;, $_POST[&#039;qty&#039;], null, null, $dec);</p><p>&nbsp; &nbsp; label_cell($_POST[&#039;units&#039;], &#039;&#039;, &#039;units&#039;);</p><p>&nbsp; &nbsp; if ($id != -1)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; button_cell(&#039;UpdateItem&#039;, _(&quot;Update&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Confirm changes&#039;), ICON_UPDATE);<br />&nbsp; &nbsp; &nbsp; &nbsp; button_cell(&#039;CancelItemChanges&#039;, _(&quot;Cancel&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Cancel changes&#039;), ICON_CANCEL);<br />&nbsp; &nbsp; &nbsp; &nbsp; hidden(&#039;LineNo&#039;, $line_no);<br /> &nbsp; &nbsp; &nbsp; &nbsp; set_focus(&#039;qty&#039;);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; submit_cells(&#039;AddItem&#039;, _(&quot;Add Item&quot;), &quot;colspan=2&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;_(&#039;Add new item to document&#039;), true);<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; end_row();<br />}</p><br /><p>//---------------------------------------------------------------------------------</p><p>function transfer_options_controls()<br />{<br />&nbsp; &nbsp;&nbsp; &nbsp;echo &quot;&lt;br&gt;&quot;;<br />&nbsp; &nbsp;&nbsp; &nbsp;start_table();</p><p>&nbsp; &nbsp;&nbsp; &nbsp;textarea_row(_(&quot;Memo&quot;), &#039;memo_&#039;, null, 50, 3);</p><p>&nbsp; &nbsp;&nbsp; &nbsp;end_table(1);<br />}</p><br /><p>//---------------------------------------------------------------------------------</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[notrinos]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=36772</uri>
			</author>
			<updated>2019-09-03T14:44:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35898#p35898</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[inventory location transfer from sales kit]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35889#p35889" />
			<content type="html"><![CDATA[<p>i try to do inventory location transfer for kit items but the kit code is not available to be selected, is there a way to enable this?</p>]]></content>
			<author>
				<name><![CDATA[sikumbang]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=44897</uri>
			</author>
			<updated>2019-09-02T09:46:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35889#p35889</id>
		</entry>
</feed>
