<?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 in Direct Invoice]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=3643</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3643&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to Add Column in Direct Invoice.]]></description>
		<lastBuildDate>Wed, 26 Apr 2017 16:38:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27742#p27742</link>
			<description><![CDATA[<p>Provide screenshot of what you want. Cannot understand you. All form elements code are common to entire FA. Which version of FA are you on and what platform?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 26 Apr 2017 16:38:29 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27742#p27742</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27739#p27739</link>
			<description><![CDATA[<p>Successfully updating Sales Quotation Items Table head. But when item select, which function or line number are doing that. Please help.</p>]]></description>
			<author><![CDATA[null@example.com (mahfuzak08)]]></author>
			<pubDate>Mon, 24 Apr 2017 10:55:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27739#p27739</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27013#p27013</link>
			<description><![CDATA[<p><a href="https://frontaccounting.com/fawiki/index.php?n=Devel.AddingColumnsToFATables">Wiki</a>-ed it.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 11 Dec 2016 04:53:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27013#p27013</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27011#p27011</link>
			<description><![CDATA[<div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>The order of the inserted fields must match the order of the values to be inserted in them.<br />Your first bold SQL code entry:<br /></p><div class="codebox"><pre><code>        order_type, ship_via, deliver_to, delivery_address, contact_phone, shipper_address, ship_from,</code></pre></div><p>should be:<br /></p><div class="codebox"><pre><code>        order_type, ship_via, deliver_to, delivery_address, shipper_address, ship_from, contact_phone,</code></pre></div></blockquote></div><p>Thank you so much.&nbsp; I knew I was missing something really really simple.&nbsp; That was all that was wrong.&nbsp; Thank you again!!!!</p>]]></description>
			<author><![CDATA[null@example.com (myhandgunpursedotcom)]]></author>
			<pubDate>Sat, 10 Dec 2016 23:18:32 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27011#p27011</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27010#p27010</link>
			<description><![CDATA[<p>The order of the inserted fields must match the order of the values to be inserted in them.<br />Your first bold SQL code entry:<br /></p><div class="codebox"><pre><code>        order_type, ship_via, deliver_to, delivery_address, contact_phone, shipper_address, ship_from,</code></pre></div><p>should be:<br /></p><div class="codebox"><pre><code>        order_type, ship_via, deliver_to, delivery_address, shipper_address, ship_from, contact_phone,</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 10 Dec 2016 10:00:29 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27010#p27010</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27009#p27009</link>
			<description><![CDATA[<p>So I turned some of the debug options on in the config.php file and when I entered a new sales order here is the error I got.</p><div class="quotebox"><blockquote><p>Undefined index: Ship_from in file: /hermes/bosnaweb03a/b240/dom.abintra2012/james/accounting/sales/sales_order_entry.php at line 277<br />/hermes/bosnaweb03a/b240/dom.abintra2012/james/accounting/sales/sales_order_entry.php:352:&nbsp; &nbsp; copy_to_cart()<br />/hermes/bosnaweb03a/b240/dom.abintra2012/james/accounting/sales/sales_order_entry.php:458:&nbsp; &nbsp; can_process()</p></blockquote></div><p>not sure what any of this means now, but I hope it helps.</p>]]></description>
			<author><![CDATA[null@example.com (myhandgunpursedotcom)]]></author>
			<pubDate>Sat, 10 Dec 2016 07:39:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27009#p27009</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27007#p27007</link>
			<description><![CDATA[<div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>Add the necessary fields values into the <strong><em>function</em> add_sales_order()</strong> in <strong>sales/includes/db/sales_order_db.inc</strong>.</p></blockquote></div><p>Ok, I attempted to do what you suggested and it still won&#039;t write anything to the db.&nbsp; Here is what I edited.&nbsp; Maybe you can tell me what I did wrong.&nbsp; Thanks</p><p>I am adding &quot;shipper_address&quot; and &quot;ship_from&quot;.&nbsp; Those are the two fields I am adding to the db and to the sales order.&nbsp; Below is the add sales order function from the <strong>sales/includes/db/sales_order_db.inc</strong> that I am trying to modify.<br /></p><div class="quotebox"><blockquote><p>function add_sales_order(&amp;$order)<br />{<br />&nbsp; &nbsp; global $loc_notification, $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, contact_phone, <strong>shipper_address, ship_from,</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; freight_cost, from_stk_loc, delivery_date, payment_terms, total)<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;delivery_address) . &quot;, &quot; .<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<strong>db_escape($order-&gt;shipper_address) . &quot;, &quot;.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;db_escape($order-&gt;ship_from) . &quot;, &quot;.</strong><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;;</p><p>&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><p>Here is the <strong>sales/include/ui/sales_order_ui.inc</strong> that I modified as well.&nbsp; I bolded the section that I added below.</p><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);<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;100%&#039;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; table_section(1); <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>text_row(_(&quot;Ship From:&quot;), &#039;ship_from&#039;, $order-&gt;ship_from, 40, 40,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Additional identifier for delivery e.g. name of receiving person&#039;));</strong></p><p><strong>&nbsp; &nbsp; &nbsp; &nbsp; textarea_row(_(&quot;Address:&quot;), &#039;shipper_address&#039;, $order-&gt;shipper_address, 35, 5,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Shipper address.&#039;));</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; table_section(2);</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;);</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, 40, 40,<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; table_section(3);</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; 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();</p></blockquote></div><p>And finally here is the <strong>sales/sales_order_entry.php</strong> that I modified in the <em><strong> function</strong></em><strong> copy_from_cart()</strong></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);<br /><strong><br />&nbsp; &nbsp; $_POST[&#039;ship_from&#039;] = $cart-&gt;ship_from;<br />&nbsp; &nbsp; $_POST[&#039;shipper_address&#039;] = $cart-&gt;shipper_address;<br /></strong><br />&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>]]></description>
			<author><![CDATA[null@example.com (myhandgunpursedotcom)]]></author>
			<pubDate>Sat, 10 Dec 2016 05:23:26 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27007#p27007</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=26977#p26977</link>
			<description><![CDATA[<p>Add the necessary fields values into the <strong><em>function</em> add_sales_order()</strong> in <strong>sales/includes/db/sales_order_db.inc</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 06 Dec 2016 15:10:06 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=26977#p26977</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=26969#p26969</link>
			<description><![CDATA[<p>I know this topic is kind of old, but I am trying to do something similar.&nbsp; I need to add 2 fields, ship_to and shipper_address.&nbsp; I have added the fields into the db table already, _sales_orders.&nbsp; And I was able to get the fields to show up on the sales order page.&nbsp; What I can&#039;t figure out is how to get the information I type into those fields to be saved in the db.&nbsp; That is far beyond my skills.&nbsp; I would appreciate as much help as possible.</p><p>The reason for doing this is because of trying to use the batch invoice function.&nbsp; I have one customer that I bill to, but I pick up and delivery from different locations.&nbsp; So when I use the branch to set up each pick up location and then I manually get to type in the delivery address and deliver to instead of using the branch billing address so I can track where something was picked up from and delivered to. </p><p>Since batch can only be used with the same branch, I can&#039;t batch invoice to the customer like I need to for all the loads that were run during that period.&nbsp; &nbsp;That is why I am trying to create the extra 2 fields so I can add the ship from and shipper address.&nbsp; Once I can get it to save in the DB I have figured how to pull the information from the DB in the reports or invoices.&nbsp; I just need to get the information into the DB.</p><p>Thanks for the help!</p>]]></description>
			<author><![CDATA[null@example.com (myhandgunpursedotcom)]]></author>
			<pubDate>Tue, 06 Dec 2016 06:10:24 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=26969#p26969</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=24834#p24834</link>
			<description><![CDATA[<p>Thanks #reservhotel. is topic can use reference how to remove line Column in Sales Invoice / Sales Order</p><p>Best Regard<br />/Jujuk</p>]]></description>
			<author><![CDATA[null@example.com (juju)]]></author>
			<pubDate>Sat, 28 Nov 2015 10:56:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=24834#p24834</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16030#p16030</link>
			<description><![CDATA[<p>hm.. i checked that.. no errors <img src="https://frontaccounting.com/punbb/img/smilies/sad.png" width="15" height="15" alt="sad" /></p>]]></description>
			<author><![CDATA[null@example.com (simplykool)]]></author>
			<pubDate>Wed, 13 Mar 2013 20:19:26 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16030#p16030</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16028#p16028</link>
			<description><![CDATA[<p>Copy paste the full code in:<br />http://phpcodechecker.com/<br />and you might find syntax errors.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 13 Mar 2013 20:13:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16028#p16028</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16027#p16027</link>
			<description><![CDATA[<p>can someone pls help me also on similar kind of prob,</p><p>i have tried to update almost everything.. but now i think i am facing an prob in<br />sales\include\ui\sales_order_ui.inc</p><p>---------------------------------------------------------------------<br />Line no: 168 - 183~~<br />-----------------------------------------------------------------------</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; view_stock_status_cell($stock_item-&gt;stock_id);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //label_cell($stock_item-&gt;item_description, &quot;nowrap&quot; );<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label_cell($stock_item-&gt;item_description );<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $dec = get_qty_dec($stock_item-&gt;stock_id);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qty_cell($stock_item-&gt;qty_dispatched, false, $dec);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;trans_no!=0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qty_cell($stock_item-&gt;qty_done, false, $dec);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; amount_cell($stock_item-&gt;price);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; amount_cell($stock_item-&gt;price);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; amount_cell($stock_item-&gt;price);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; label_cell($stock_item-&gt;units);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; amount_cell($stock_item-&gt;price);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; percent_cell($stock_item-&gt;discount_percent * 100);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; amount_cell($line_total);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($editable_items)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; edit_button_cell(&quot;Edit$line_no&quot;, _(&quot;Edit&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Edit document line&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete_button_cell(&quot;Delete$line_no&quot;, _(&quot;Delete&quot;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _(&#039;Remove line from document&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<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; sales_order_item_controls($order, $k,&nbsp; $line_no);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $total += $line_total;<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; if ($id==-1 &amp;&amp; $editable_items)<br />&nbsp; &nbsp; &nbsp; &nbsp; sales_order_item_controls($order, $k);</p><p>&nbsp; &nbsp; $colspan = 10;<br />&nbsp; &nbsp; if ($order-&gt;trans_no!=0)<br />&nbsp; &nbsp; &nbsp; &nbsp; ++$colspan;<br />&nbsp; &nbsp; start_row();<br />&nbsp; &nbsp; label_cell(_(&quot;Shipping Charge&quot;), &quot;colspan=$colspan align=right&quot;);<br />&nbsp; &nbsp; small_amount_cells(null, &#039;freight_cost&#039;, price_format(get_post(&#039;freight_cost&#039;,0)));<br />&nbsp; &nbsp; label_cell(&#039;&#039;, &#039;colspan=2&#039;);<br />&nbsp; &nbsp; end_row();<br />&nbsp; &nbsp; $display_sub_total = price_format($total + input_num(&#039;freight_cost&#039;));<br />&nbsp; &nbsp; label_row(_(&quot;Sub-total&quot;), $display_sub_total, &quot;colspan=$colspan align=right&quot;,&quot;align=right&quot;, 2);<br />&nbsp; &nbsp; $taxes = $order-&gt;get_taxes(input_num(&#039;freight_cost&#039;));<br />&nbsp; &nbsp; $tax_total = display_edit_tax_items($taxes, $colspan, $order-&gt;tax_included, 2);</p><p>&nbsp; &nbsp; $display_total = price_format(($total + input_num(&#039;freight_cost&#039;) + $tax_total));</p><p>&nbsp; &nbsp; start_row();<br />&nbsp; &nbsp; label_cells(_(&quot;Amount Total&quot;), $display_total, &quot;colspan=$colspan align=right&quot;,&quot;align=right&quot;);<br />&nbsp; &nbsp; submit_cells(&#039;update&#039;, _(&quot;Update&quot;), &quot;colspan=2 align=&#039;center&#039;&quot;, _(&quot;Refresh&quot;), true);<br />&nbsp; &nbsp; end_row();</p><p>&nbsp; &nbsp; end_table();<br />&nbsp; &nbsp; if ($has_marked) {<br />&nbsp; &nbsp; &nbsp; &nbsp; display_note(_(&quot;Marked items have insufficient quantities in stock as on day of delivery.&quot;), 0, 1, &quot;class=&#039;stockmankofg&#039;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($order-&gt;trans_type!=30 &amp;&amp; !$SysPrefs-&gt;allow_negative_stock())<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display_error(_(&quot;The delivery cannot be processed because there is an insufficient quantity for item:&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; . &#039;&lt;br&gt;&#039;. $qoh_msg);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; div_end();<br />}</p><br /><p>somthing is worng in the above code.. <br />the data is not getting entred,</p><p>you can try my demo <br />www.ptsvee.com/simplykool.com/test/1/<br />user: admin<br />pass:admin<br />company: sunrise</p><br /><p>Please help of the same</p>]]></description>
			<author><![CDATA[null@example.com (simplykool)]]></author>
			<pubDate>Wed, 13 Mar 2013 19:40:57 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16027#p16027</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14728#p14728</link>
			<description><![CDATA[<p>Lines 490-574 in <strong>sales/includes/ui/sales_order_ui.inc</strong> - function <strong>sales_order_item_controls()</strong> dictates what goes into each row and it&#039;s columns.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 20 Dec 2012 04:04:34 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14728#p14728</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to Add Column in Direct Invoice]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14727#p14727</link>
			<description><![CDATA[<p>Ah, thank you, that was helpful. </p><p>Now how would I tell FA that I want another cell in the second row or how would I change the coding that affects the content of each cell in the item row?</p>]]></description>
			<author><![CDATA[null@example.com (reservhotel)]]></author>
			<pubDate>Wed, 19 Dec 2012 20:37:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14727#p14727</guid>
		</item>
	</channel>
</rss>
