<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Add sales area in Tax report]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7443</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7443&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Add sales area in Tax report.]]></description>
		<lastBuildDate>Sun, 08 Apr 2018 06:14:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Add sales area in Tax report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31353#p31353</link>
			<description><![CDATA[<p>Thanks for your advice. Please find attached the changed file for the extension. </p><p><a href="https://app.box.com/s/ffgu7oo2qptid3ztxu0yf4ri0uykimk7">https://app.box.com/s/ffgu7oo2qptid3ztxu0yf4ri0uykimk7</a></p>]]></description>
			<author><![CDATA[null@example.com (mmohamedyaser)]]></author>
			<pubDate>Sun, 08 Apr 2018 06:14:45 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31353#p31353</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add sales area in Tax report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31350#p31350</link>
			<description><![CDATA[<p>@mmohamedyaser: post your changed files and let us make it an extension.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 07 Apr 2018 17:12:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31350#p31350</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add sales area in Tax report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31348#p31348</link>
			<description><![CDATA[<p>Hellog Guys,</p><p>I guess this is a strong candidate for an Extension. Not many countries has this legal demand.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sat, 07 Apr 2018 14:31:11 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31348#p31348</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add sales area in Tax report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31346#p31346</link>
			<description><![CDATA[<p>Thanks for the prompt reply. I had some time yesterday to research on this subject and I used the below steps. The below would help for those who require region wise information in their tax report. It would be appreciated if this feature is added in the main FA program.</p><div class="codebox"><pre><code>1. Add Line 41 branch.br_name, areas.description
2. Add Line 55 LEFT JOIN &quot;.TB_PREF.&quot;areas areas ON areas.area_code = branch.area
3. Add Line 120 (inside the bracket) , _(&#039;Area&#039;) // this is the header
4. Add Line 121 (inside the bracket) ,&#039;lift&#039;
5. Add Line 158 $rep-&gt;TextCol(10,11, $trans[&#039;description&#039;]);</code></pre></div><p>This report looks only good in landscape mode. Table does not fit in portrait mode.</p>]]></description>
			<author><![CDATA[null@example.com (mmohamedyaser)]]></author>
			<pubDate>Sat, 07 Apr 2018 12:01:25 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31346#p31346</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add sales area in Tax report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31341#p31341</link>
			<description><![CDATA[<p>The Tax Report is in <strong>reporting/rep709.php</strong>.<br />Current Report Layout that provides the Detailed and Summarised versions is attached.<br />The <strong>function getTaxTransactions</strong> in the said file is the one that provides the line items in the report.</p><p>The following is the <strong>$sql</strong> example that comes about for a company prefix of <strong>0_</strong>:<br /></p><div class="codebox"><pre><code>SELECT 
  tt.name as taxname, 
  taxrec.*, 
  taxrec.amount*ex_rate AS amount, 
  taxrec.net_amount*ex_rate AS net_amount, 
  IF(taxrec.trans_type=1 OR taxrec.trans_type=2, 
    IF(gl.person_type_id&lt;&gt;0, gl.memo_, gl.person_id), 
    IF(ISNULL(supp.supp_name), debt.name, supp.supp_name)
  ) as name, 
  branch.br_name 
FROM 0_trans_tax_details taxrec 
  LEFT JOIN 0_tax_types tt ON taxrec.tax_type_id=tt.id 
  LEFT JOIN 0_gl_trans gl ON taxrec.trans_type=gl.type 
    AND taxrec.trans_no=gl.type_no 
    AND gl.amount&lt;&gt;0 
    AND (tt.purchasing_gl_code=gl.account OR tt.sales_gl_code=gl.account) 
  LEFT JOIN 0_supp_trans strans ON taxrec.trans_no=strans.trans_no 
    AND taxrec.trans_type=strans.type 
  LEFT JOIN 0_suppliers as supp ON strans.supplier_id=supp.supplier_id 
  LEFT JOIN 0_debtor_trans dtrans ON taxrec.trans_no=dtrans.trans_no 
    AND taxrec.trans_type=dtrans.type 
  LEFT JOIN 0_debtors_master as debt ON dtrans.debtor_no=debt.debtor_no 
  LEFT JOIN 0_cust_branch as branch ON dtrans.branch_code=branch.branch_code 
WHERE (taxrec.amount &lt;&gt; 0 OR taxrec.net_amount &lt;&gt; 0) 
  AND !ISNULL(taxrec.reg_type) 
  AND taxrec.tran_date &gt;= &#039;2015-03-01&#039; 
  AND taxrec.tran_date &lt;= &#039;2018-03-31&#039; 
ORDER BY 
  taxrec.trans_type, 
  taxrec.tran_date, 
  taxrec.trans_no,
  taxrec.ex_rate;</code></pre></div><p>An example output is:<br /></p><div class="codebox"><pre><code>taxname    id    trans_type    trans_no    tran_date    tax_type_id    rate    ex_rate    included_in_price    net_amount    amount    memo    reg_type    amount    net_amount    name    br_name
Tax    5    10    2    2017-05-07    1    5    1    1    285.71    14.29    002/2017    0    14.29    285.71    Donald Easter LLC    Donald Easter LLC
\N    7    10    3    2017-05-07    0    0    1.123    1    267.14    0    003/2017    0    0    299.99822    MoneyMaker Ltd.    MoneyMaker Ltd.
Tax    2    10    1    2017-05-10    1    5    1    1    5942.86    297.14    001/2017    0    297.14    5942.86    Donald Easter LLC    Donald Easter LLC
Tax    10    10    5    2018-02-18    1    5    1    1    249.53    12.48    001/2018    0    12.48    249.53    Donald Easter LLC    Donald Easter LLC
Tax    3    20    1    2017-05-05    1    5    1    0    3000    150    rr4    1    150    3000    Dino Saurius Inc.    \N
Tax    8    20    2    2018-01-22    1    5    1.3895    0    2620    131    BE075    1    182.0245    3640.49    Beefeater Ltd.    \N</code></pre></div><p>There is no Sales Area in the above output. If we add the <strong>branch.area</strong> to the select list by making line 41<br /></p><div class="codebox"><pre><code>                branch.br_name</code></pre></div><p>to be:<br /></p><div class="codebox"><pre><code>                branch.br_name, branch.area</code></pre></div><p>we can get that field. This will need to be added in to the header part when the new area argument is included.</p><p>@joe: nice suggestion - can we add it in?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 07 Apr 2018 04:59:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31341#p31341</guid>
		</item>
		<item>
			<title><![CDATA[Add sales area in Tax report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31337#p31337</link>
			<description><![CDATA[<p>I would like to filter the tax report by Area wise. The Area field is already there in the customer /branch. May I know how to pull it into tax report.</p>]]></description>
			<author><![CDATA[null@example.com (mmohamedyaser)]]></author>
			<pubDate>Fri, 06 Apr 2018 11:18:19 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31337#p31337</guid>
		</item>
	</channel>
</rss>
