<?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 Add Column Undefined property ?]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8020</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8020&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to Add Column Undefined property ?.]]></description>
		<lastBuildDate>Wed, 27 Feb 2019 03:00:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to Add Column Undefined property ?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34358#p34358</link>
			<description><![CDATA[<p>It is in <strong>sales/includes/cart_class.inc</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 27 Feb 2019 03:00:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34358#p34358</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column Undefined property ?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34356#p34356</link>
			<description><![CDATA[<p>Where do i find the cart class been looking for it everywhere ? already added but still shows blank on the database why ?.</p>]]></description>
			<author><![CDATA[null@example.com (kalmav1)]]></author>
			<pubDate>Tue, 26 Feb 2019 23:34:13 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34356#p34356</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column Undefined property ?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34353#p34353</link>
			<description><![CDATA[<p>First you need to input the from variable inside the cart class . There after extend to use it in other object files. Its simple php class variable creation</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Tue, 26 Feb 2019 16:46:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34353#p34353</guid>
		</item>
		<item>
			<title><![CDATA[How to Add Column Undefined property ?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=34351#p34351</link>
			<description><![CDATA[<p>i followed the wiki on how to&nbsp; How to Add Column why can&#039;t i add just one simple input text in this page ?</p><p>Undefined property: Cart::$From in file: C:\xampp\htdocs\erp-1\sales\sales_order_entry.php at line 322</p><p>Undefined property: Cart::$From in file: C:\xampp\htdocs\erp-1\sales\includes\ui\sales_order_ui.inc at line 585</p><p>sales/sales_order_entry.php </p><div class="quotebox"><blockquote><p>function copy_from_cart()<br />{<br />&nbsp; &nbsp; $cart = &amp;$_SESSION[&#039;Items&#039;];<br />&nbsp; &nbsp; $_POST[&#039;ref&#039;] = $cart-&gt;reference;<br />&nbsp; &nbsp; $_POST[&#039;Comments&#039;] = $cart-&gt;Comments;</p><p>&nbsp; &nbsp; $_POST[&#039;OrderDate&#039;] = $cart-&gt;document_date;<br />&nbsp; &nbsp; $_POST[&#039;delivery_date&#039;] = $cart-&gt;due_date;<br />&nbsp; &nbsp; $_POST[&#039;cust_ref&#039;] = $cart-&gt;cust_ref;<br />&nbsp; &nbsp; $_POST[&#039;freight_cost&#039;] = price_format($cart-&gt;freight_cost);</p><p>&nbsp; &nbsp; $_POST[&#039;From&#039;] = $cart-&gt;From;<br />&nbsp; &nbsp;</p><p>&nbsp; &nbsp; $_POST[&#039;deliver_to&#039;] = $cart-&gt;deliver_to;<br />&nbsp; &nbsp; $_POST[&#039;delivery_address&#039;] = $cart-&gt;delivery_address;<br />&nbsp; &nbsp; $_POST[&#039;phone&#039;] = $cart-&gt;phone;<br />&nbsp; &nbsp; $_POST[&#039;Location&#039;] = $cart-&gt;Location;<br />&nbsp; &nbsp; $_POST[&#039;ship_via&#039;] = $cart-&gt;ship_via;</p><p>&nbsp; &nbsp; $_POST[&#039;customer_id&#039;] = $cart-&gt;customer_id;</p><p>&nbsp; &nbsp; $_POST[&#039;branch_id&#039;] = $cart-&gt;Branch;<br />&nbsp; &nbsp; $_POST[&#039;sales_type&#039;] = $cart-&gt;sales_type;<br />&nbsp; &nbsp; // POS <br />&nbsp; &nbsp; $_POST[&#039;payment&#039;] = $cart-&gt;payment;<br />&nbsp; &nbsp; if ($cart-&gt;trans_type!=ST_SALESORDER &amp;&amp; $cart-&gt;trans_type!=ST_SALESQUOTE) { // 2008-11-12 Joe Hunt<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;dimension_id&#039;] = $cart-&gt;dimension_id;<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;dimension2_id&#039;] = $cart-&gt;dimension2_id;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; $_POST[&#039;cart_id&#039;] = $cart-&gt;cart_id;<br />&nbsp; &nbsp; $_POST[&#039;_ex_rate&#039;] = $cart-&gt;ex_rate;<br />}</p></blockquote></div><p>sales_order_db.inc</p><div class="quotebox"><blockquote><p>function add_sales_order(&amp;$order)<br />{<br />&nbsp; &nbsp; global $SysPrefs, $path_to_root, $Refs;</p><p>&nbsp; &nbsp; begin_transaction();<br />&nbsp; &nbsp; hook_db_prewrite($order, $order-&gt;trans_type);<br />&nbsp; &nbsp; $order_no = get_next_trans_no($order-&gt;trans_type);<br />&nbsp; &nbsp; $del_date = date2sql($order-&gt;due_date);<br />&nbsp; &nbsp; $order_type = 0; // this is default on new order<br />&nbsp; &nbsp; $total = $order-&gt;get_trans_total();<br />&nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;sales_orders (order_no, type, debtor_no, trans_type, branch_code, customer_ref, reference, comments, ord_date,<br />&nbsp; &nbsp; &nbsp; &nbsp; order_type, ship_via, deliver_to, delivery_address, From, contact_phone,<br />&nbsp; &nbsp; &nbsp; &nbsp; freight_cost, from_stk_loc, delivery_date, payment_terms, total, prep_amount)<br />&nbsp; &nbsp; &nbsp; &nbsp; VALUES (&quot; .db_escape($order_no) . &quot;,&quot; .db_escape($order_type) . &quot;,&quot; . db_escape($order-&gt;customer_id) .<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &quot;, &quot; .db_escape($order-&gt;trans_type) . &quot;,&quot; .db_escape($order-&gt;Branch) . &quot;, &quot;.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;cust_ref) .&quot;,&quot;. <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;reference) .&quot;,&quot;. <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;Comments) .&quot;,&#039;&quot; . <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; date2sql($order-&gt;document_date) . &quot;&#039;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;sales_type) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;ship_via).&quot;,&quot; . <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;deliver_to) . &quot;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;From) . &quot;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;delivery_address) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;phone) . &quot;, &quot; . <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;freight_cost) .&quot;, &quot; . <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;Location) .&quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($del_date) . &quot;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;payment) . &quot;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($total) . &quot;,&quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_escape($order-&gt;prep_amount).&quot;)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db_query($sql, &quot;order Cannot be Added&quot;);</p><p>&nbsp; &nbsp; $order-&gt;trans_no = array($order_no=&gt;0);</p><p>&nbsp; &nbsp; if ($loc_notification == 1)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; include_once($path_to_root . &quot;/inventory/includes/inventory_db.inc&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; $st_ids = array();<br />&nbsp; &nbsp; &nbsp; &nbsp; $st_names = array();<br />&nbsp; &nbsp; &nbsp; &nbsp; $st_num = array();<br />&nbsp; &nbsp; &nbsp; &nbsp; $st_reorder = array();<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; foreach ($order-&gt;line_items as $line)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($loc_notification == 1 &amp;&amp; is_inventory_item($line-&gt;stock_id))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $loc = calculate_reorder_level($order-&gt;Location, $line, $st_ids, $st_names, $st_num, $st_reorder);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;INSERT INTO &quot;.TB_PREF.&quot;sales_order_details (order_no, trans_type, stk_code, description, unit_price, quantity, discount_percent) VALUES (&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; $sql .= $order_no . &quot;,&quot;.$order-&gt;trans_type .<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;,&quot;.db_escape($line-&gt;stock_id).&quot;, &quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .db_escape($line-&gt;item_description).&quot;, $line-&gt;price,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $line-&gt;quantity,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $line-&gt;discount_percent)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; db_query($sql, &quot;order Details Cannot be Added&quot;);</p><p>&nbsp; &nbsp; // Now mark quotation line as processed<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;trans_type == ST_SALESORDER &amp;&amp; $line-&gt;src_id)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update_parent_line(ST_SALESORDER, $line-&gt;src_id, $line-&gt;qty_dispatched); // clear all the quote despite all or the part was ordered<br />&nbsp; &nbsp; } /* inserted line items into sales order details */<br />&nbsp; &nbsp; add_audit_trail($order-&gt;trans_type, $order_no, $order-&gt;document_date);<br />&nbsp; &nbsp; $Refs-&gt;save($order-&gt;trans_type, $order_no, $order-&gt;reference);</p><p>&nbsp; &nbsp; hook_db_postwrite($order, $order-&gt;trans_type);<br />&nbsp; &nbsp; commit_transaction();</p><p>&nbsp; &nbsp; if ($loc_notification == 1 &amp;&amp; count($st_ids) &gt; 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; send_reorder_email($loc, $st_ids, $st_names, $st_num, $st_reorder);<br />&nbsp; &nbsp; return $order_no;<br />}</p></blockquote></div><div class="quotebox"><blockquote><p>function display_delivery_details(&amp;$order)<br />{<br />&nbsp; &nbsp; global $Ajax;</p><p>&nbsp; &nbsp; div_start(&#039;delivery&#039;);&nbsp; &nbsp; </p><br /><p>&nbsp; &nbsp; if ($order-&gt;payment_terms[&#039;cash_sale&#039;]) {&nbsp; &nbsp; // Direct payment sale<br />&nbsp; &nbsp; &nbsp; &nbsp; $Ajax-&gt;activate(&#039;items_table&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; display_heading(_(&#039;Cash payment&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; start_table(TABLESTYLE2, &quot;width=&#039;60%&#039;&quot;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; locations_list_row(_(&quot;Deliver from Location:&quot;), &#039;Location&#039;, null, false, true);<br /> &nbsp; &nbsp; &nbsp; &nbsp; if (list_updated(&#039;Location&#039;))<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $Ajax-&gt;activate(&#039;items_table&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; label_row(_(&quot;Cash account:&quot;), $order-&gt;pos[&#039;bank_account_name&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; textarea_row(_(&quot;Comments:&quot;), &quot;Comments&quot;, $order-&gt;Comments, 31, 5);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; end_table();<br />&nbsp; &nbsp; &nbsp; &nbsp; hidden(&#039;delivery_date&#039;, $order-&gt;due_date);<br />&nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;trans_type==ST_SALESINVOICE)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $title = _(&quot;Delivery Details&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $delname = _(&quot;Due Date&quot;).&#039;:&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; elseif ($order-&gt;trans_type==ST_CUSTDELIVERY)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $title = _(&quot;Invoice Delivery Details&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $delname = _(&quot;Invoice before&quot;).&#039;:&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; elseif ($order-&gt;trans_type==ST_SALESQUOTE)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $title = _(&quot;Quotation Delivery Details&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $delname = _(&quot;Valid until&quot;).&#039;:&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $title = _(&quot;Order Delivery Details&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $delname = _(&quot;Required Delivery Date&quot;).&#039;:&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; display_heading($title);<br />&nbsp; &nbsp; &nbsp; &nbsp; start_outer_table(TABLESTYLE2, &quot;width=&#039;90%&#039;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; table_section(1);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; locations_list_row(_(&quot;Deliver from Location:&quot;), &#039;Location&#039;, null, false, true, $order-&gt;fixed_asset);<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;payment_terms[&#039;days_before_due&#039;] == -1)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $Ajax-&gt;addUpdate(&#039;items_table&#039;, &#039;prep_amount&#039;, price_format($order-&gt;get_trans_total())); // bind to items_table update<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$order-&gt;is_started())<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; amount_row(_(&quot;Pre-Payment Required:&quot;), &#039;prep_amount&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label_row(_(&quot;Pre-Payment Required:&quot;), price_format($order-&gt;prep_amount), &quot;class=&#039;label&#039;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; if (list_updated(&#039;Location&#039;))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $Ajax-&gt;activate(&#039;items_table&#039;);</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; date_row($delname, &#039;delivery_date&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $order-&gt;trans_type==ST_SALESORDER ?&nbsp; _(&#039;Enter requested day of delivery&#039;) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : $order-&gt;trans_type==ST_SALESQUOTE ? _(&#039;Enter Valid until Date&#039;) : &#039;&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; text_row(_(&quot;Deliver To:&quot;), &#039;deliver_to&#039;, $order-&gt;deliver_to, 50, 60,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Additional identifier for delivery e.g. name of receiving person&#039;));</p><p>&nbsp; &nbsp; &nbsp; &nbsp; textarea_row(_(&quot;Address:&quot;), &#039;delivery_address&#039;, $order-&gt;delivery_address, 35, 5,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Delivery address. Default is address of customer branch&#039;));</p><p>&nbsp; &nbsp; &nbsp; &nbsp; text_row(_(&quot;From:&quot;), &#039;From&#039;, $order-&gt;From, 40, 40);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; table_section(2);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; text_row(_(&quot;Contact Phone Number:&quot;), &#039;phone&#039;, $order-&gt;phone, 25, 25,<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;_(&#039;Phone number of ordering person. Defaults to branch phone number&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; text_row(_(&quot;Customer Reference:&quot;), &#039;cust_ref&#039;, $order-&gt;cust_ref, 25, 25,<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;_(&#039;Customer reference number for this order (if any)&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; textarea_row(_(&quot;Comments:&quot;), &quot;Comments&quot;, $order-&gt;Comments, 31, 5);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; </p><p>&nbsp; &nbsp; &nbsp; &nbsp; shippers_list_row(_(&quot;Shipping Company:&quot;), &#039;ship_via&#039;, $order-&gt;ship_via);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; end_outer_table(1);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; div_end();<br />}</p></blockquote></div><p>https://imgur.com/a/IsXd1iL </p><p>tried adding custom input field request by but keep getting errors what did i do wrong ?</p>]]></description>
			<author><![CDATA[null@example.com (kalmav1)]]></author>
			<pubDate>Tue, 26 Feb 2019 16:13:35 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=34351#p34351</guid>
		</item>
	</channel>
</rss>
