<?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 clear "current credit" in the direct invoice screen?]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=3727</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3727&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to clear "current credit" in the direct invoice screen?.]]></description>
		<lastBuildDate>Wed, 09 Jan 2013 19:34:17 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14944#p14944</link>
			<description><![CDATA[<p>No, it is stored as positive.</p><p>Example customer payment:<br /></p><div class="codebox"><pre><code>Customer pays 100. Discount is 10.
debtor_trans table.
ov_amount   100
ov_discount  10

Gl posting:
Bank debit      100
AR.    Credit.        110
Discount debit   10</code></pre></div><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 09 Jan 2013 19:34:17 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14944#p14944</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14942#p14942</link>
			<description><![CDATA[<p>If so, is the <strong>ov_discount</strong> being stored as a negative value in the table? In related vein, will the discount percentages be stored in the negative as well while being entered positive in the form?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 09 Jan 2013 19:16:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14942#p14942</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14933#p14933</link>
			<description><![CDATA[<p>@apmuthu</p><p>Yes it is correct. The ov_discount should be added in these cases. When the customer payments are done, they should include the ov_discount.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 09 Jan 2013 08:09:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14933#p14933</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14926#p14926</link>
			<description><![CDATA[<p>@apmuthu</p><p>I am not in office at present. Please make a test on the training Co. Make a direct invoice on a customer with some discount percent.</p><p>Also try a payment with a discount. Look into the table 0_debtor_trans and see if it is negative or positive. I cannot recall right now.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 08 Jan 2013 15:41:27 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14926#p14926</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14925#p14925</link>
			<description><![CDATA[<p>Lines 457-458 of <strong>sales/includes/db/sales_order_db.inc</strong>:<br /></p><div class="codebox"><pre><code>cust.credit_limit - Sum(IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2,
-1, 1) * (ov_amount + ov_gst + ov_freight + ov_freight_tax + ov_discount),0)) as cur_credit</code></pre></div><p>The <strong>ov_discount</strong> field is being added - is that right - should it not be subtracted?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 08 Jan 2013 14:44:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14925#p14925</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14918#p14918</link>
			<description><![CDATA[<p>Remember that the credit limit is&nbsp; not included in the information.</p><p>You can look at the function for duing this calculation in file /sales/includes/db/sales_order_db.inc, function<br />function get_customer_to_order($customer_id)<br />This is about line 457.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 07 Jan 2013 23:23:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14918#p14918</guid>
		</item>
		<item>
			<title><![CDATA[How to clear "current credit" in the direct invoice screen?]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=14915#p14915</link>
			<description><![CDATA[<p>In the direct invoice screen for a certain debtor a negative &quot;current credit appears&quot;, but there are no outstanding payments. How can I reset this amount to zero?</p><p>thnx</p>]]></description>
			<author><![CDATA[null@example.com (erwindebruin)]]></author>
			<pubDate>Mon, 07 Jan 2013 20:53:46 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=14915#p14915</guid>
		</item>
	</channel>
</rss>
