<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Incorrect application of exchange rate]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=4329&amp;type=atom" />
	<updated>2013-09-03T23:12:12Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=4329</id>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17565#p17565" />
			<content type="html"><![CDATA[<p>Further changes <a href="http://https:/sourceforge.net/p/frontaccounting/mercurial/ci/82fadde5177e752f5979c351efb9cabe7163a99d/tree//sales/includes/db/payment_db.inc?diff=93fb33771bae16a04c9c9967418ec15048eafd4f">done</a>.</p><p>Last Git commit <a href="http://devel.frontaccounting.com/git/?p=fa-stable.git;a=commit;h=0e98f64b40f1685b7b20e58e4a8a1f136401206d">here</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2013-09-03T23:12:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17565#p17565</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17535#p17535" />
			<content type="html"><![CDATA[<p>Janusz and Joe,</p><p>Thanks, I&#039;ve tried it with customer payments, and supplier payments and not a foreign exchange gain in sight.</p><br /><p>Jonathan</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-31T14:38:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17535#p17535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17532#p17532" />
			<content type="html"><![CDATA[<p>Please download the fixed file <a href="http://https:/sourceforge.net/p/frontaccounting/mercurial/ci/default/tree/sales/includes/db/payment_db.inc">here</a> .</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-08-31T08:47:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17532#p17532</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17528#p17528" />
			<content type="html"><![CDATA[<p>Yes, you are right again. I have finally found the original problem. Simply the calculated exchange rate should not be stored in customer Payment record (bank to home currency is stored here, and not bank to customer currency exrate; this is done later in the code).<br />I have run a couple of tests covering various currencies combinations on the write_customer_payment function, and now all looks OK (repo updated).<br />Thank you very much for your help <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" />.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2013-08-31T07:44:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17528#p17528</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17524#p17524" />
			<content type="html"><![CDATA[<p>Janusz </p><p>I think payment_db.inc line 49 is wrong.</p><p>$bank_amount = $amount/$rate;&nbsp; &nbsp; &nbsp;should be&nbsp; &nbsp; &nbsp; &nbsp; $bank_amount = $amount*$rate;</p><p>This does not cure the problem, because as the comment says it is not used here, but somewhere a similar mistake is causing my problem.</p><p>Another anomaly I have noticed, which probably is insignificant:<br />The Customer Payment&nbsp; Entry form ends with the button &quot;Update payment&quot;<br />When modifying a customer payment the button reads &quot;Add Payment&quot;<br />Something has bee swapped round.</p><p>Jonathan</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-30T19:02:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17524#p17524</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17515#p17515" />
			<content type="html"><![CDATA[<p>Home currency GBP,&nbsp; customer currency EUR, exchange rate 0.8 fixed, vat 20%.</p><p>Take a sale of 120 euro, = £96. Payment of 120 euro = £96. (no exchange gain)</p><p>Invoice ...... 100 EUR + 20EURvat = 120 euro in all. This is shown on the invoice correctly.</p><p>G/L&nbsp; 4000 &nbsp; &nbsp; Sales &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;80.00 &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;1100&nbsp; &nbsp; &nbsp; Debtors Control Account &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 96.00 &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;2200&nbsp; &nbsp; &nbsp; VAT (20%) &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;16.00 &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Total &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;96.00 &nbsp; &nbsp;&nbsp; &nbsp; 96.00 &nbsp; &nbsp; <br />This is correct, in GBP.<br />The G/L for Delivery is also correct , and in GBP</p><p>Customer payment&nbsp; = 120 EUR&nbsp; &nbsp; &nbsp; 96 GBP</p><p>G/L&nbsp; &nbsp;1200 &nbsp; &nbsp;&nbsp; Bank Current Account &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 96.00 &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1100 &nbsp; &nbsp; Debtors Control Account &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 96.00 &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1100 &nbsp; &nbsp; Debtors Control Account &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;24.00 &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sales Invoice 5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4920&nbsp; &nbsp; &nbsp; Foreign Exchange Gain &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 24.00 &nbsp; &nbsp; Sales Invoice 5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Total &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;120.00 &nbsp; &nbsp;&nbsp; 120.00 &nbsp; &nbsp; </p><p>Here £120 has come out of the Debtors account, £96 to the Bank, and £24 to Exchange gain.&nbsp; (120 was the Euro amount paid in)</p><p>Summary:<br />Invoice&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;£96&nbsp; ... 120 euro<br />payment&nbsp; &nbsp; &nbsp; &nbsp;£96&nbsp; ... 120 euro<br />Allocation&nbsp; &nbsp; £120 ...&nbsp; 150 euro</p><p>The final result is £24 Foreign exchange gain, and £24 deficit in the Debtors control account, where both should be nill.<br />The payment has allocated £120, not £96.</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-29T20:46:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17515#p17515</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17513#p17513" />
			<content type="html"><![CDATA[<p>The Customer Balances and Supplier Balances reports are fixed in <a href="http://https:/sourceforge.net/p/frontaccounting/mercurial/ci/default/tree/">mercurial</a>.<br />But I cannot reproduce the problem problem with the amounts recalculation. When the EUR and GBP amounts are not selected exactly as they would result from exchange rate stored in application, you will always end with some posting to Foreign Exchange Gain GL account. If you are sure there is still some bug here, please provide exact scenario step by step, with all currency details.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2013-08-29T19:37:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17513#p17513</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17512#p17512" />
			<content type="html"><![CDATA[<p>True, the customer balance report makes sence when I select Euros.<br />True , it is wrong when no currency filter is used,</p><p>But</p><p>It&#039;s not just the Customer Balance report, because when the payment is allocated the euro value is used instead of pounds, and the difference is recorded as Foreign Exchange gain.</p><p>Jonathan</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-29T18:44:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17512#p17512</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17501#p17501" />
			<content type="html"><![CDATA[<p>Oh, yes you are right. There is another bug in the Customer Balances report (it appears only when &#039;No currency filter&#039; is selected).<br />I will fix it asap.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2013-08-28T22:07:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17501#p17501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17493#p17493" />
			<content type="html"><![CDATA[<p>My mistake, NOT SOLVED</p><p>The problem is half way to being solved.</p><p>A payment now results in the custommer&#039;s balance ( in pounds, our currency ) being credited with the euro figure, unconverted. This is not as bad as it was, ie converted in the wrong direction.</p><p>So now the sums in the foreign exchange gain are half what they were, but should be zero.</p><br /><p>Jonathan</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-27T16:10:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17493#p17493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17492#p17492" />
			<content type="html"><![CDATA[<p>Joe and Janusz,</p><p>Problem solved, very quickly, and over the bank holiday weekend.</p><p>Many thanks<br />Jonathan</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-27T10:21:36Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17492#p17492</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17488#p17488" />
			<content type="html"><![CDATA[<p>Hello again.</p><p>Janusz has fixed the problem and the repo is updated. You can download the file fix <a href="http://https:/sourceforge.net/p/frontaccounting/mercurial/ci/default/tree/sales/includes/db/payment_db.inc"> here</a></p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-08-26T14:30:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17488#p17488</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17480#p17480" />
			<content type="html"><![CDATA[<p>Janus,</p><p>If the foreign customer payment is not related to in invoice the customer balance increases by an amount as if&nbsp; the exchange rate is applied the wrong way round. There are no foreign exchange gains or losses.</p><p>When a direct invoice, or an order- dispatch-invoice is entered there are no foreign exchange entries.</p><p>When a payment is made, directly for an invoice, or by allocating from the customer balance (which is artificially high) then the foreign exchange entries appear. They are almost twice the difference between the euro sum and the Pound equivalent.</p><p>All the above is done with no change in rate between the actions, and no bank charges.</p><p>I wondered if the wrong value was being sent from the payment form, but the problem is still there when the allocate payment form is used.</p><p>Hope this helps</p><p>Jonathan</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-25T14:50:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17480#p17480</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17479#p17479" />
			<content type="html"><![CDATA[<p>Is there any exchange variance posted in GL related to Customer Payment?<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2013-08-25T11:58:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17479#p17479</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Incorrect application of exchange rate]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=17473#p17473" />
			<content type="html"><![CDATA[<p>Joe,</p><p>Thanks for the quick reply, but I installed the two files yesterday. As I said at the beginning.</p><p>So the problem remains.</p><p>Jonathan</p>]]></content>
			<author>
				<name><![CDATA[jonathan46]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=9282</uri>
			</author>
			<updated>2013-08-24T16:17:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=17473#p17473</id>
		</entry>
</feed>
