<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Large Numbers of branches hangs and fails the editor]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9677&amp;type=atom" />
	<updated>2022-02-04T04:15:19Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=9677</id>
		<entry>
			<title type="html"><![CDATA[Re: Large Numbers of branches hangs and fails the editor]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40607#p40607" />
			<content type="html"><![CDATA[<p>So it freezes on browser. So you need to go with popup search for branches list. Otherwise it will freeze your browser for sometime. </p><p>Other than this server config also a problem, increase server spec.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2022-02-04T04:15:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40607#p40607</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Large Numbers of branches hangs and fails the editor]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40606#p40606" />
			<content type="html"><![CDATA[<p>Ok so I copied all the persons for each branch and it still fails. There is something else going on here.</p>]]></content>
			<author>
				<name><![CDATA[trafficpest]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42061</uri>
			</author>
			<updated>2022-02-03T22:49:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40606#p40606</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Large Numbers of branches hangs and fails the editor]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40601#p40601" />
			<content type="html"><![CDATA[<p>Though the person is same, don&#039;t use single&nbsp; person for two customers and their branches. </p><p>I think you can use the same person for more&nbsp; than one branch under single customer. </p><p>@itronics can you advice him the logics behind persons and its entity connectivity. We recently fixed issue with&nbsp; deletion of persons from suppliers&nbsp; and customers.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2022-02-01T01:06:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40601#p40601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Large Numbers of branches hangs and fails the editor]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=40599#p40599" />
			<content type="html"><![CDATA[<p>/sales/manage/customer_branches.php</p><p>will fail and hang on large numbers of branches for clients ( 745 branches)<br />fetch time for any client increases if more branches are made even for other clients. I think the issue might be is our same crm persons are listed on the other customer branches in crm contacts.</p><p>Example<br />Debtor (MHN Health Net Insurance)<br />Branch (MHN Patient Jim) -&gt; Crm Person (Patient Jim)</p><p>Debtor (Anthem Blue Cross)<br />Branch (Anthem Patient Jim) -&gt; Crm Person (Patient Jim)</p><p>Person is the same that both branches are referencing so they both point to the same ID.</p><p>SQL Called on page<br /></p><div class="codebox"><pre><code>SET sql_mode = &#039;STRICT_ALL_TABLES&#039;
SELECT name, value FROM 0_sys_prefs
SELECT value FROM 0_sys_prefs WHERE name=&#039;version_id&#039;
SELECT name, value FROM 0_sys_prefs
SELECT COUNT(*) FROM 0_debtors_master
SELECT COUNT(*) FROM 0_salesman
SELECT COUNT(*) FROM 0_areas
SELECT COUNT(*) FROM 0_shippers
SELECT COUNT(*) FROM 0_tax_groups
SELECT debtor_no, debtor_ref, curr_code, inactive FROM 0_debtors_master  ORDER BY debtor_ref
SELECT COUNT(*) FROM 0_cust_branch WHERE debtor_no=&#039;757&#039;
SELECT COUNT(*) FROM (SELECT b.branch_code, b.branch_ref, b.br_name, p.name as contact_name, s.salesman_name, a.description, p.phone, p.fax, p.email, t.name AS tax_group_name, b.inactive
        FROM 0_cust_branch b LEFT JOIN 0_crm_contacts c
            ON c.entity_id=b.branch_code AND c.type=&#039;cust_branch&#039; AND c.action=&#039;general&#039;
            LEFT JOIN 0_crm_persons p on c.person_id=p.id,0_areas a, 0_salesman s, 0_tax_groups t
        WHERE b.tax_group_id=t.id
        AND b.area=a.area_code
        AND b.salesman=s.salesman_code
        AND b.debtor_no = &#039;757&#039; AND !b.inactive GROUP BY b.branch_code ORDER BY branch_ref) tmp_count
SELECT b.branch_code, b.branch_ref, b.br_name, p.name as contact_name, s.salesman_name, a.description, p.phone, p.fax, p.email, t.name AS tax_group_name, b.inactive
     FROM 0_cust_branch b LEFT JOIN 0_crm_contacts c
            ON c.entity_id=b.branch_code AND c.type=&#039;cust_branch&#039; AND c.action=&#039;general&#039;
            LEFT JOIN 0_crm_persons p on c.person_id=p.id,0_areas a, 0_salesman s, 0_tax_groups t
      WHERE (b.tax_group_id=t.id
        AND b.area=a.area_code
        AND b.salesman=s.salesman_code
        AND b.debtor_no = &#039;757&#039; AND !b.inactive) GROUP BY b.branch_code ORDER BY branch_ref LIMIT 0, 10
SELECT name, address, debtor_ref
        FROM 0_debtors_master WHERE debtor_no = &#039;757&#039;
SELECT salesman_code, salesman_name, inactive FROM 0_salesman ORDER BY salesman_name
SELECT area_code, description, inactive FROM 0_areas ORDER BY description
SELECT id, description, inactive FROM 0_groups ORDER BY description
SELECT loc_code, location_name, inactive FROM 0_locations WHERE fixed_asset=0 ORDER BY location_name
SELECT shipper_id, shipper_name, inactive FROM 0_shippers ORDER BY shipper_name
SELECT id, name, inactive FROM 0_tax_groups ORDER BY id
SELECT chart.account_code, chart.account_name, type.name, chart.inactive, type.id
            FROM 0_chart_master chart,0_chart_types type
            WHERE chart.account_type=type.id ORDER BY type.class_id,type.id,account_code
SELECT chart.account_code, chart.account_name, type.name, chart.inactive, type.id
            FROM 0_chart_master chart,0_chart_types type
            WHERE chart.account_type=type.id ORDER BY type.class_id,type.id,account_code
SELECT chart.account_code, chart.account_name, type.name, chart.inactive, type.id
            FROM (0_chart_master chart,0_chart_types type) LEFT JOIN 0_bank_accounts acc ON chart.account_code=acc.account_code
                WHERE acc.account_code  IS NULL
            AND chart.account_type=type.id ORDER BY type.class_id,type.id,account_code
SELECT chart.account_code, chart.account_name, type.name, chart.inactive, type.id
            FROM 0_chart_master chart,0_chart_types type
            WHERE chart.account_type=type.id ORDER BY type.class_id,type.id,account_code</code></pre></div>]]></content>
			<author>
				<name><![CDATA[trafficpest]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42061</uri>
			</author>
			<updated>2022-01-31T17:07:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=40599#p40599</id>
		</entry>
</feed>
