<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — How to pass data from one page into another page]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8022</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8022&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to pass data from one page into another page.]]></description>
		<lastBuildDate>Wed, 27 Feb 2019 11:31:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[How to pass data from one page into another page]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34360#p34360</link>
			<description><![CDATA[<p>im trying to pass data from one page into the next but im having problems i don&#039;t know where to modify this code po_db.inc</p><p>trying to add another add_po from my po_inquiry_items and save them on to another page like pr_entry_items<br />where can i find button for this function to change from add_po into add_po_inquiry ---&gt; po_inquiry_items ?, how do i pass the value from po_inquiry_items into my -----&gt; pr_entry_items?.</p><p>function add_po(&amp;$po_obj)<br />{<br />&nbsp; &nbsp; global $Refs;</p><p>&nbsp; &nbsp; begin_transaction();<br />&nbsp; &nbsp; hook_db_prewrite($po_obj, ST_PURCHORDER);</p><p>&nbsp; &nbsp; &nbsp;/*Insert to purchase order header record */<br />&nbsp; &nbsp; &nbsp;$sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;purch_orders (supplier_id, Comments, ord_date, reference, <br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; requisition_no, into_stock_location, delivery_address, total, tax_included, prep_amount) VALUES(&quot;;<br />&nbsp; &nbsp; &nbsp;$sql .= db_escape($po_obj-&gt;supplier_id) . &quot;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;db_escape($po_obj-&gt;Comments) . &quot;,&#039;&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;date2sql($po_obj-&gt;orig_order_date) . &quot;&#039;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; db_escape($po_obj-&gt;reference) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;db_escape($po_obj-&gt;supp_ref) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;db_escape($po_obj-&gt;Location) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;db_escape($po_obj-&gt;delivery_address) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;db_escape($po_obj-&gt;get_trans_total()). &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;db_escape($po_obj-&gt;tax_included). &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;db_escape($po_obj-&gt;prep_amount). &quot;)&quot;;</p><p>&nbsp; &nbsp; db_query($sql, &quot;The purchase order header record could not be inserted&quot;);</p><p>&nbsp; &nbsp; &nbsp;/*Get the auto increment value of the order number created from the sql above */<br />&nbsp; &nbsp; &nbsp;$po_obj-&gt;order_no = db_insert_id();</p><p>&nbsp; &nbsp; &nbsp;/*Insert the purchase order detail records */<br />&nbsp; &nbsp; &nbsp;foreach ($po_obj-&gt;line_items as $line_no =&gt; $po_line)<br />&nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;purch_order_details (order_no, item_code, description, delivery_date,&nbsp; &nbsp; unit_price,&nbsp; &nbsp; quantity_ordered) VALUES (&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; $sql .= $po_obj-&gt;order_no . &quot;, &quot; . db_escape($po_line-&gt;stock_id). &quot;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; db_escape($po_line-&gt;item_description). &quot;,&#039;&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; date2sql($po_line-&gt;req_del_date) . &quot;&#039;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; db_escape($po_line-&gt;price) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; db_escape($po_line-&gt;quantity). &quot;)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; db_query($sql, &quot;One of the purchase order detail records could not be inserted&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; $po_obj-&gt;line_items[$line_no]-&gt;po_detail_rec = db_insert_id();<br />&nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; $Refs-&gt;save(ST_PURCHORDER, $po_obj-&gt;order_no, $po_obj-&gt;reference);</p><p>&nbsp; &nbsp; add_audit_trail(ST_PURCHORDER, $po_obj-&gt;order_no, $po_obj-&gt;orig_order_date);<br />&nbsp; &nbsp; hook_db_postwrite($po_obj, ST_PURCHORDER);<br />&nbsp; &nbsp; commit_transaction();</p><p>&nbsp; &nbsp; return $po_obj-&gt;order_no;<br />}</p>]]></description>
			<author><![CDATA[null@example.com (ryanayao)]]></author>
			<pubDate>Wed, 27 Feb 2019 11:31:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34360#p34360</guid>
		</item>
	</channel>
</rss>
