<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — How to clear "current credit" in the direct invoice screen?]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3727&amp;type=atom" />
	<updated>2013-01-09T19:34:17Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=3727</id>
		<entry>
			<title type="html"><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14944#p14944" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-01-09T19:34:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14944#p14944</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14942#p14942" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2013-01-09T19:16:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14942#p14942</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14933#p14933" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-01-09T08:09:16Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14933#p14933</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14926#p14926" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-01-08T15:41:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14926#p14926</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14925#p14925" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2013-01-08T14:44:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14925#p14925</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to clear "current credit" in the direct invoice screen?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14918#p14918" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-01-07T23:23:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14918#p14918</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to clear "current credit" in the direct invoice screen?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14915#p14915" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[erwindebruin]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=4582</uri>
			</author>
			<updated>2013-01-07T20:53:46Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14915#p14915</id>
		</entry>
</feed>
