<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Customer Allocation date zero]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7250</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7250&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Customer Allocation date zero.]]></description>
		<lastBuildDate>Sun, 07 Jan 2018 08:07:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Customer Allocation date zero]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=30438#p30438</link>
			<description><![CDATA[<p>When a customer payment is allocated, the date of allocation is entered as &#039;0000-00-00&#039; but it is correctly entered for direct cash invoices. This happens in the <strong>cust_allocations</strong> and <strong>debtor_trans tables</strong>. The <strong>$_POST[&#039;DateBanked&#039;]</strong> or it&#039;s processed value like end of current fiscal_year should have been used.</p><p>The set of payment and full allocation transaction sqls are:<br /></p><div class="codebox"><pre><code>SET @alloc=400;
SET @bankcharge=5;

INSERT INTO `1_refs` VALUES
(&#039;4&#039;, &#039;12&#039;, &#039;001/2018&#039;);

INSERT INTO `1_bank_trans` VALUES
(NULL, &#039;12&#039;, &#039;4&#039;, &#039;1&#039;, &#039;001/2018&#039;, &#039;2018-01-07&#039;, @alloc-@bankcharge, &#039;0&#039;, &#039;0&#039;, &#039;2&#039;, &#039;1&#039;, NULL);
INSERT INTO `1_comments` VALUES
(&#039;12&#039;, &#039;4&#039;, &#039;2018-01-07&#039;, &#039;paid by outstation cheque&#039;);
INSERT INTO `1_cust_allocations` VALUES
(NULL, &#039;1&#039;, @alloc, &#039;0000-00-00&#039;, &#039;4&#039;, &#039;12&#039;, &#039;5&#039;, &#039;10&#039;);
INSERT INTO `1_debtor_trans` VALUES
(&#039;4&#039;, &#039;12&#039;, &#039;0&#039;, &#039;1&#039;, &#039;1&#039;, &#039;2018-01-07&#039;, &#039;0000-00-00&#039;, &#039;001/2018&#039;, &#039;0&#039;, &#039;0&#039;, &#039;400&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, @alloc, &#039;0&#039;, &#039;1&#039;, &#039;0&#039;, &#039;0&#039;, &#039;0&#039;, NULL, &#039;0&#039;),
UPDATE `1_debtor_trans` SET `alloc`=`ov_amount`-@alloc WHERE `type`=&#039;10&#039; AND `trans_no`=&#039;5&#039; AND `debtor_no`=&#039;4&#039;
INSERT INTO `1_gl_trans` VALUES
(NULL, &#039;12&#039;, &#039;4&#039;, &#039;2018-01-07&#039;, &#039;1060&#039;, &#039;&#039;, @alloc-@bankcharge, &#039;0&#039;, &#039;0&#039;, NULL, NULL),
(NULL, &#039;12&#039;, &#039;4&#039;, &#039;2018-01-07&#039;, &#039;1200&#039;, &#039;&#039;, -@alloc, &#039;0&#039;, &#039;0&#039;, &#039;2&#039;, &#039;1&#039;),
(NULL, &#039;12&#039;, &#039;4&#039;, &#039;2018-01-07&#039;, &#039;5690&#039;, &#039;&#039;, @bankcharge, &#039;0&#039;, &#039;0&#039;, NULL, NULL);
INSERT INTO `1_audit_trail` VALUES
(NULL, &#039;12&#039;, &#039;4&#039;, &#039;1&#039;, &#039;2018-01-07 10:13:49&#039;, NULL, &#039;3&#039;, &#039;2018-01-07&#039;, &#039;0&#039;);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 07 Jan 2018 08:07:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=30438#p30438</guid>
		</item>
	</channel>
</rss>
