<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Adding delivery-date for each item in sales-invoice]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10394&amp;type=atom" />
	<updated>2023-11-15T04:02:48Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10394</id>
		<entry>
			<title type="html"><![CDATA[Re: Adding delivery-date for each item in sales-invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=42691#p42691" />
			<content type="html"><![CDATA[<p>Why are you not using multiple deliveries against sales order and then merge deliveries on sales invoice?</p>]]></content>
			<author>
				<name><![CDATA[boxygen]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20175</uri>
			</author>
			<updated>2023-11-15T04:02:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=42691#p42691</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Adding delivery-date for each item in sales-invoice]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=42635#p42635" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I want the &#039;delivery date&#039; for each item in salesinvoice ((new) column &#039;Date&#039; (&#039;tran_date&#039; of delivery)).&nbsp; I know I have to change the function &#039;get_customer_trans_details&#039; in &#039;/sales/includes/db/cust_trans_details_db.inc&#039;, but how to select the &#039;tran_date&#039; of the delivery in the sql-syntax ?</p><p>This is the function :</p><div class="quotebox"><blockquote><p>function get_customer_trans_details($debtor_trans_type, $debtor_trans_no)<br />{<br />if (!is_array($debtor_trans_no))<br />&nbsp; &nbsp; $debtor_trans_no = array( 0=&gt;$debtor_trans_no );</p><p>&nbsp; &nbsp; $sql = &quot;SELECT line.*,<br />&nbsp; &nbsp; &nbsp; &nbsp; line.unit_price+line.unit_tax AS FullUnitPrice,<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; line.unit_price AS UnitPriceExTax,&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; line.description AS StockDescription,<br />&nbsp; &nbsp; &nbsp; &nbsp; item.long_description AS StockLongDescription,<br />&nbsp; &nbsp; &nbsp; &nbsp; item.units, item.mb_flag<br />&nbsp; &nbsp; &nbsp; &nbsp; FROM &quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .TB_PREF.&quot;debtor_trans_details line,&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .TB_PREF.&quot;stock_master item<br />&nbsp; &nbsp; &nbsp; &nbsp; WHERE (&quot;;</p><p>&nbsp; &nbsp; $tr=array();<br />&nbsp; &nbsp; foreach ($debtor_trans_no as $trans_no)<br />&nbsp; &nbsp; &nbsp; &nbsp; $tr[] = &#039;debtor_trans_no=&#039;.db_escape($trans_no);</p><p>&nbsp; &nbsp; $sql .= implode(&#039; OR &#039;, $tr);</p><br /><p>&nbsp; &nbsp; $sql.=&nbsp; &nbsp; &quot;) AND debtor_trans_type=&quot;.db_escape($debtor_trans_type).&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; AND item.stock_id=line.stock_id<br />&nbsp; &nbsp; &nbsp; &nbsp; ORDER BY id&quot;;<br />&nbsp; &nbsp; return db_query($sql, &quot;The debtor transaction detail could not be queried&quot;);<br />}</p></blockquote></div><p>Thanks,</p><p>F.</p>]]></content>
			<author>
				<name><![CDATA[advocaat.pollet]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=46170</uri>
			</author>
			<updated>2023-10-28T09:08:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=42635#p42635</id>
		</entry>
</feed>
