<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Edit bank transfer]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5218&amp;type=atom" />
	<updated>2014-10-12T16:03:03Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5218</id>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21134#p21134" />
			<content type="html"><![CDATA[<p>@Janusz - please check to see if it can be included in the core with or without a flag in the config.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-10-12T16:03:03Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21134#p21134</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21128#p21128" />
			<content type="html"><![CDATA[<p>Updated code <a href="https://github.com/cambell-prince/frontaccounting/pull/2">is here</a>.&nbsp; Unit tests <a href="https://github.com/cambell-prince/frontaccounting-wrapper/blob/master/tests/php/GLBankTransfer_Test.php">are here</a>.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2014-10-12T14:21:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21128#p21128</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21106#p21106" />
			<content type="html"><![CDATA[<p>Ok. I think I&#039;ve got it.&nbsp; I&#039;ll add a check to ensure that voiding the original transaction does not result in a -ve balance unless the new transaction would correct that before it happens.&nbsp; This should cover the special case.&nbsp; The new transaction is covered by existing code.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2014-10-08T23:52:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21106#p21106</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21101#p21101" />
			<content type="html"><![CDATA[<p>Please look closer on the check_bank_account_history() algorithm. This function scans all the bank history to find whether atomic change in balance made on some date is safe or not. </p><p>If you try implement transfer edition as void/entry sequence in general you have take into consideration two dates: <br />1. original date for which old transaction is voided (check against -ve balance in target account);<br />2. new date for which new transaction is entered (check against -ve balance in source account).</p><p>In addition you should consider special situation, when only amount changes (but from/to account and date don&#039;t): in this case only change in amount on the old transaction date should be tested, otherwise you can have &#039;false positive&#039; results in case of small change made on big transfer amount.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2014-10-08T20:21:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21101#p21101</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21096#p21096" />
			<content type="html"><![CDATA[<p>@Janusz Items 2, 3, and 4 are complete.&nbsp; I&#039;ve attempted 1 but I&#039;m not that satisfied.&nbsp; For example consider the following scenario:</p><p>1. Add a transfer $100 from current -&gt; cash account at date d<br />2. Add a transfer $60 from cash -&gt; current account at date d + 2 weeks<br />3. Add a transfer $80 from cash -&gt; current account at date d + 1 week.</p><p>This succeeds and results in a -ve balance in the cash account of -40 in the existing code.</p><p>I&#039;ve attempted a fix by setting a future date in the validation.&nbsp; Please have a look and <a href="https://github.com/cambell-prince/frontaccounting/commit/fbc141c0a3d6874f43518ae6b66290e39d7daa9f">review the fix here</a>.</p><p>This fix would fix your review #1 but would also change the existing functionality.</p><p>Note that I&#039;m not proposing hard coding the date 2099.&nbsp; I&#039;d like to know what future date from the perspective of the transfer the date should be.&nbsp; End of FY?&nbsp; Current date?&nbsp; Something else?</p><p>The bank edit feature can be <a href="https://github.com/cambell-prince/frontaccounting/compare/feature/banktransferedit#diff-628a08cc83b32e8800913841385fa3a8R193">compared to current master here</a>.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2014-10-08T15:17:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21096#p21096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21095#p21095" />
			<content type="html"><![CDATA[<p>No not yet.&nbsp; See <a href="https://trello.com/c/7pADk6md/20-bank-transfer-edit-fixes">my Trello board</a> if you want to track progress on anything I&#039;m doing with FrontAccounting.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2014-10-08T12:01:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21095#p21095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21086#p21086" />
			<content type="html"><![CDATA[<p>Is it completed now at:<br />https://github.com/cambell-prince/frontaccounting/commits/feature/tempBankTransferEdit<br />?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-10-07T18:00:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21086#p21086</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21057#p21057" />
			<content type="html"><![CDATA[<p>Consider following simple scenario:<br />1. Create new Bank Account of cash type;<br />2. Transfer $100 to this account from any other account;<br />3. Entry $60 payment to supplier from the cash account;<br />4. Edit transfer created in step 2 changing amount from $100 to $50</p><p>and you will end with -$10 balance on the cash account without any warning nor error. <br />The same negative balance issue you can trigger by simply changing target account to any other one during edition.</p><p>Regarding the zero entries displayed in bank account inquire they just should be omitted in Bank Inquiry listing. This can be achieved by sql modification in get_bank_trans_for_bank_account() function.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2014-10-04T21:13:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21057#p21057</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21056#p21056" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>itronics wrote:</cite><blockquote><p>1. Edition can easily lead to negative balance on account which is not acceptable especially accounts of&nbsp; on cash type. At least check_valid_entries() has to be&nbsp; modified to forbid such situations testing change in transfer value against future account history.&nbsp; But generally I guess it will be hard to achieve when edition is done as void/insert sequence instead of transaction modification, and without any limits (keep in mind situation, when one changes not only amount but also to/from accounts during edition).</p></blockquote></div><p>In my testing cash accounts cannot go below zero when submitting the edition (red error box is displayed), but the current account can.&nbsp; I think this is consistent with the current behavior of FA which allows -ve balance on the current account.&nbsp; &nbsp;Let me know if there&#039;s a particular scenario you&#039;ve got in mind.</p><div class="quotebox"><cite>itronics wrote:</cite><blockquote><p>2. Voided entries are still visible as zero amount transfers in bank account history.</p></blockquote></div><p>Can you help me to see that?&nbsp; Where do I get that view?&nbsp; I see zero amounts for all manner of voided items in the bank reconciliation screen, and I can see zero amount transfers in the reconciliation also.</p><p>What&#039;s the preferred way to not display them.&nbsp; a) delete them? (I&#039;m guessing not)&nbsp; b) not display them via some &#039;if voided&#039; type function the don&#039;t display. c) something else?</p><div class="quotebox"><cite>itronics wrote:</cite><blockquote><p>3. There are a couple of small problems with variables declarations, which are not visible until debugging mode is on. Please set&nbsp; $go_debug=1 in your config.php file during development to see it.</p></blockquote></div><p>Yes, I can see those.&nbsp; I&#039;ll go fix them.</p><div class="quotebox"><cite>itronics wrote:</cite><blockquote><p>4. For better UI consistency I would also add edition links to bank transfers in &#039;Bank Account Inquiry&#039; page.</p></blockquote></div><p>Will do.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2014-10-04T17:08:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21056#p21056</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21055#p21055" />
			<content type="html"><![CDATA[<p>@cambell</p><p>Nice feature, however it needs some cleanups to be integrated in FA sources. </p><p>1. Edition can easily lead to negative balance on account which is not acceptable especially accounts of&nbsp; on cash type. At least check_valid_entries() has to be&nbsp; modified to forbid such situations testing change in transfer value against future account history.&nbsp; But generally I guess it will be hard to achieve when edition is done as void/insert sequence instead of transaction modification, and without any limits (keep in mind situation, when one changes not only amount but also to/from accounts during edition).<br />2. Voided entries are still visible as zero amount transfers in bank account history.<br />3. There are a couple of small problems with variables declarations, which are not visible until debugging mode is on. Please set&nbsp; $go_debug=1 in your config.php file during development to see it.<br />4. For better UI consistency I would also add edition links to bank transfers in &#039;Bank Account Inquiry&#039; page.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2014-10-04T14:19:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21055#p21055</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21051#p21051" />
			<content type="html"><![CDATA[<p>Janusz is about to look at this.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2014-10-03T12:57:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21051#p21051</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21049#p21049" />
			<content type="html"><![CDATA[<p>Joe please add this.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-10-03T09:57:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21049#p21049</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Edit bank transfer]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21020#p21020" />
			<content type="html"><![CDATA[<p>I&#039;ve implemented a bank transfer edit feature.&nbsp; The patch is <a href="https://github.com/cambell-prince/frontaccounting/commit/fad33ed06e661e7c7781bbeab866441a2da0669f">available here</a>.</p><p>If you have some mechanism for accepting pull requests via either git or hg do let me know.</p><p>E2E tests are also available in my <a href="https://github.com/cambell-prince/frontaccounting-wrapper">frontaccounting-wrapper</a> repo.&nbsp; If you&#039;re interested in incorporating the e2e tests it would be nice to push the current code down one level and have the tests in a folder that is not in the main src (htdocs) tree.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2014-10-01T14:28:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21020#p21020</id>
		</entry>
</feed>
