<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Allocation Details to be displayed on invoices and credit notes]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=2346&amp;type=atom" />
	<updated>2011-08-29T14:38:19Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=2346</id>
		<entry>
			<title type="html"><![CDATA[Re: Allocation Details to be displayed on invoices and credit notes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=10127#p10127" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2011-08-29T14:38:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=10127#p10127</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation Details to be displayed on invoices and credit notes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=10126#p10126" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[chaitanya]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=524</uri>
			</author>
			<updated>2011-08-29T11:05:01Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=10126#p10126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Allocation Details to be displayed on invoices and credit notes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=10123#p10123" />
			<content type="html"><![CDATA[<p>Any idea of how to implement it?</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2011-08-28T21:48:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=10123#p10123</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Allocation Details to be displayed on invoices and credit notes]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=10118#p10118" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[chaitanya]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=524</uri>
			</author>
			<updated>2011-08-28T14:26:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=10118#p10118</id>
		</entry>
</feed>
