<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Bank Statement Report]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7405&amp;type=atom" />
	<updated>2020-02-06T15:50:21Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7405</id>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=36971#p36971" />
			<content type="html"><![CDATA[<p>Just downloaded 2.4.8 and I was expecting this issue will be resolved. but it seems not.<br />I cant understand why Braath Waate pull request is not incorporated in the core yet. It works nicely. <br />Is there a reason?</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2020-02-06T15:50:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=36971#p36971</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35352#p35352" />
			<content type="html"><![CDATA[<p>The first two parts are only re-phrased.<br />Ordinarily there should be no duplicates.<br />Besides, the tables referred to in each select are different.</p><p>But... it is possible that more than one record across the selects may refer to the same transaction causing duplicates.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-07-01T17:11:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35352#p35352</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35351#p35351" />
			<content type="html"><![CDATA[<p>@apmuthu<br />Thank you for your comment, but please help me: I don&#039;t understand fully.<br />How can a duplicate line exist, as the combination $trans_type and $trans_no together is a unique identifier for a transaction? Within one transaction, if a counterparty is either a debtor or a supplier, then person_type_id cannot be 0.</p><p>By the way: first two parts are original, I only added third part for the case where counterpart is not known in debtor/supplier-administrations but is only mentioned as &quot;miscellaneous&quot; - in this case the original routine would not show the counterpart at all.</p><p>Yours sincerely, etc. Nibbik</p>]]></content>
			<author>
				<name><![CDATA[Nibbik]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=21131</uri>
			</author>
			<updated>2019-07-01T16:31:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35351#p35351</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35350#p35350" />
			<content type="html"><![CDATA[<p>There may be duplicate lines - maybe a DISTINCT is needed somewhere. Try to make the INNER JOIN using an ON statement rather than in WHERE like:<br /></p><div class="codebox"><pre><code>        case ST_BANKPAYMENT :
        case ST_BANKDEPOSIT :
            $sql = &quot;SELECT trans.debtor_no as person_id, 
            CONVERT(debtor.name using utf8) as name
            FROM &quot;.TB_PREF.&quot;debtor_trans trans INNER JOIN &quot;.TB_PREF.&quot;debtors_master debtor USING (debtor_no)
            WHERE trans_no=&quot;.db_escape($trans_no).&quot; AND type=&quot;.db_escape($trans_type)
            .&quot;
            UNION
                SELECT trans.supplier_id as person_id, 
            CONVERT(supp.supp_name using utf8) as name
            FROM &quot;.TB_PREF.&quot;supp_trans trans INNER JOIN &quot;.TB_PREF.&quot;suppliers supp USING (supplier_id)
            WHERE trans_no=&quot;.db_escape($trans_no).&quot; AND type=&quot;.db_escape($trans_type)
            .&quot;
            UNION
                SELECT IF (person_type_id=0, 0 ,NULL) as person_id, 
            IF (person_type_id=0, CONVERT(person_id using utf8),NULL) as name 
            FROM &quot;.TB_PREF.&quot;bank_trans
            WHERE trans_no=&quot;.db_escape($trans_no).&quot; AND type=&quot;.db_escape($trans_type)
            ;
            break;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-07-01T16:02:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35350#p35350</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35349#p35349" />
			<content type="html"><![CDATA[<p>I think I solved it with this solution <br />(file: frontaccounting/admin/db/transactions_db.inc, from line 115 onward):</p><div class="codebox"><pre><code>        case ST_BANKPAYMENT :
        case ST_BANKDEPOSIT :
            $sql = &quot;SELECT trans.debtor_no as person_id, CONVERT(debtor.name using utf8) as name
            FROM &quot;.TB_PREF.&quot;debtor_trans trans, &quot;.TB_PREF.&quot;debtors_master debtor
            WHERE trans_no=&quot;.db_escape($trans_no).&quot; AND type=&quot;.db_escape($trans_type)
            .&quot; AND trans.debtor_no=debtor.debtor_no
            UNION
                SELECT trans.supplier_id as person_id, CONVERT(supp.supp_name using utf8) as name
            FROM &quot;.TB_PREF.&quot;supp_trans trans, &quot;.TB_PREF.&quot;suppliers supp
            WHERE trans_no=&quot;.db_escape($trans_no).&quot; AND type=&quot;.db_escape($trans_type)
            .&quot; AND trans.supplier_id=supp.supplier_id
            UNION
                SELECT IF (person_type_id=0, 0 ,NULL) as person_id, 
            IF (person_type_id=0, CONVERT(person_id using utf8),NULL) as name 
            FROM &quot;.TB_PREF.&quot;bank_trans WHERE type=&quot;.db_escape($trans_type).&quot; 
            AND trans_no=&quot;.db_escape($trans_no);
            break;

/*            $sql = &quot;SELECT trans.debtor_no as person_id, debtor.name as name
            FROM &quot;.TB_PREF.&quot;debtor_trans trans, &quot;.TB_PREF.&quot;debtors_master debtor
            WHERE trans_no=&quot;.db_escape($trans_no).&quot; AND type=&quot;.db_escape($trans_type)
            .&quot; AND trans.debtor_no=debtor.debtor_no
            UNION
                SELECT trans.supplier_id as person_id, supp.supp_name as name
            FROM &quot;.TB_PREF.&quot;supp_trans trans, &quot;.TB_PREF.&quot;suppliers supp
            WHERE trans_no=&quot;.db_escape($trans_no).&quot; AND type=&quot;.db_escape($trans_type)
            .&quot; AND trans.supplier_id=supp.supplier_id&quot;;
            break;
*/</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Nibbik]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=21131</uri>
			</author>
			<updated>2019-07-01T11:38:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35349#p35349</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=32030#p32030" />
			<content type="html"><![CDATA[<p>@joe: any headway?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-06-30T18:21:02Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=32030#p32030</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31147#p31147" />
			<content type="html"><![CDATA[<p>@joe: What are the consequences of this <a href="https://github.com/FrontAccountingERP/FA/pull/26">pull request</a>. @rafat seems satisfied.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-17T14:38:59Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31147#p31147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31146#p31146" />
			<content type="html"><![CDATA[<p>Thanks @BraathWaate your pull request works great. Beautiful..Thanks guys.</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-03-17T10:07:09Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31146#p31146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31145#p31145" />
			<content type="html"><![CDATA[<p>Thanks Guys.. I will test and revert back to you.</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-03-17T09:28:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31145#p31145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31136#p31136" />
			<content type="html"><![CDATA[<p>The <strong>function get_counterparty_name()</strong> defined in <strong>admin/db/transactions_db.inc</strong> is a quite extensive one whereas the alternative used in @BraathWaate&#039;s <a href="https://github.com/FrontAccountingERP/FA/pull/26">pull request</a>, <strong>function payment_person_name()</strong> defined in <strong>includes/types.inc</strong> may not cover all types of transactions.</p><p>@joe: will this pull request make for covering all types of transactions required here?<br />@rafat: can you extensively test @BraathWaate&#039;s <a href="https://github.com/FrontAccountingERP/FA/pull/26">pull request</a> with your data?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-16T15:52:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31136#p31136</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31135#p31135" />
			<content type="html"><![CDATA[<p>Or you could modify your FA installation with this pull request:<br />https://github.com/FrontAccountingERP/FA/pull/26</p>]]></content>
			<author>
				<name><![CDATA[Braath Waate]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41493</uri>
			</author>
			<updated>2018-03-16T13:17:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31135#p31135</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31134#p31134" />
			<content type="html"><![CDATA[<p>Yes this is right.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-03-16T12:31:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31134#p31134</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31132#p31132" />
			<content type="html"><![CDATA[<p>The Bank Statement only knows Customer and Suppliers as that is where the AR/AP allocations take place. Everything else is a mere Journal kind of Transaction without tracking allocations that can be seen in the GL Account Transactions.</p><p>@joe: is this right?</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-03-16T12:09:28Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31132#p31132</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Bank Statement Report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31131#p31131" />
			<content type="html"><![CDATA[<p>When asking for a Bank Statement report from Banking reports the final report does not show the person/item unless the field is either a customer or a supplier. While if asking for a GL Account Transaction Report and choosing the Bank Accounts.. the Person/Item field is shown correctly to all Person/item types. Is this how it should be?</p>]]></content>
			<author>
				<name><![CDATA[rafat]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41964</uri>
			</author>
			<updated>2018-03-16T09:58:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31131#p31131</id>
		</entry>
</feed>
