<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Allocation Details to be displayed on invoices and credit notes]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=2346</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2346&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Allocation Details to be displayed on invoices and credit notes.]]></description>
		<lastBuildDate>Mon, 29 Aug 2011 14:38:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Allocation Details to be displayed on invoices and credit notes]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=10127#p10127</link>
			<description><![CDATA[<p>Seems like a good idea. Implemented in HG repository to goto next minor release. Also implemented on supplier side.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 29 Aug 2011 14:38:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=10127#p10127</guid>
		</item>
		<item>
			<title><![CDATA[Re: Allocation Details to be displayed on invoices and credit notes]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=10126#p10126</link>
			<description><![CDATA[<p>Hi Joe,</p><p>similar to following code in view_receipt.php <br />display_allocations_from(PT_CUSTOMER, $receipt[&#039;debtor_no&#039;], ST_CUSTPAYMENT, $trans_id, $receipt[&#039;Total&#039;]);</p><p>we can add<br />display_allocations_to(PT_CUSTOMER, $receipt[&#039;debtor_no&#039;], ST_SALESINVOICE, $trans_id, $receipt[&#039;Total&#039;]);</p><p>custalloc_db.inc has function get_allocatable_to_cust_transactions similarly we can write function get_allocatable_FROM_cust_transactions<br />as below -</p><p>function get_allocatable_from_cust_transactions($customer_id, $trans_no=null, $type=null)<br />{<br />&nbsp; &nbsp; if ($trans_no != null and $type != null)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $sql = get_alloc_trans_sql(&quot;amt&quot;, &quot;trans.trans_no = alloc.trans_no_from<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND trans.type = alloc.trans_type_from<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND alloc.trans_no_to=&quot;.db_escape($trans_no).&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND alloc.trans_type_to=&quot;.db_escape($type).&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND trans.debtor_no=&quot;.db_escape($customer_id),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;.TB_PREF.&quot;cust_allocations as alloc&quot;);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $sql = get_alloc_trans_sql(null, &quot;round(ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount-alloc,6) &gt; 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND trans.type &lt;&gt; &quot; . ST_CUSTPAYMENT . &quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND trans.type &lt;&gt; &quot; . ST_BANKDEPOSIT . &quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND trans.type &lt;&gt; &quot; . ST_CUSTCREDIT . &quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND trans.type &lt;&gt; &quot; . ST_CUSTDELIVERY . &quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND trans.debtor_no=&quot;.db_escape($customer_id));<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; return db_query($sql.&quot; ORDER BY trans_no&quot;, &quot;Cannot retreive alloc to transactions&quot;);<br />}</p><p>Hope I am clear enough. <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (chaitanya)]]></author>
			<pubDate>Mon, 29 Aug 2011 11:05:01 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=10126#p10126</guid>
		</item>
		<item>
			<title><![CDATA[Re: Allocation Details to be displayed on invoices and credit notes]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=10123#p10123</link>
			<description><![CDATA[<p>Any idea of how to implement it?</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 28 Aug 2011 21:48:35 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=10123#p10123</guid>
		</item>
		<item>
			<title><![CDATA[Allocation Details to be displayed on invoices and credit notes]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=10118#p10118</link>
			<description><![CDATA[<p>Hi,</p><p>Currently the customer/supplier payment entry shows its allocations to invoices.<br />But in reverse way, the invoice is allocated by which payment entry is not displayed.</p><p>Sometimes finding such details are required. Displaying them on &#039;view&#039; pages of invoices and credit notes will be helpful.</p><p>Thanks,</p>]]></description>
			<author><![CDATA[null@example.com (chaitanya)]]></author>
			<pubDate>Sun, 28 Aug 2011 14:26:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=10118#p10118</guid>
		</item>
	</channel>
</rss>
