<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — error while doing delivery of Sale order]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7435&amp;type=atom" />
	<updated>2018-04-03T12:18:10Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7435</id>
		<entry>
			<title type="html"><![CDATA[Re: error while doing delivery of Sale order]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31313#p31313" />
			<content type="html"><![CDATA[<p>Line 45 in <strong>includes/types.inc </strong>is:<br /></p><div class="codebox"><pre><code>define(&#039;ST_SALESORDER&#039;, 30);</code></pre></div><p>The execution of the $sql defined from Line 224 in <strong>sales/includes/db/sales_order_db.inc</strong> provides a non unique resultset which triggers the error message you stated. The simplified query (assuming company db table prefix as &quot;_1&quot;) to test this case is:<br /></p><div class="codebox"><pre><code>SELECT * FROM 1_sales_orders WHERE trans_no=30 AND order_no=3;</code></pre></div><p>If you get more than 1 row output, then your Chart of Accounts is not proper as the primary key has not been defined to be a compound one comprising <strong>trans_no</strong> and <strong>order_no</strong>.</p><p>Since you say that there is no duplicate sales order with that combination of fields, then the new sales order you are trying to insert may have these same values which comes from the <strong>type</strong> and <strong>reference</strong> fields in the <strong>1_refs</strong> table.</p><p>All of this is assuming you are using FA v2.4.x. When you ask for assistance, please provide details of versions of server components and platform used.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-04-03T12:18:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31313#p31313</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[error while doing delivery of Sale order]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31308#p31308" />
			<content type="html"><![CDATA[<p>I am getting following error while doing delivery against sale order. When checked there is no duplicate in table sale order. Require urgent help to solve this.</p><p>error message &quot; You have duplicate document in database: (type:30, number:3)&quot;</p><p>Thanks for your help</p>]]></content>
			<author>
				<name><![CDATA[tripathi.products]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42381</uri>
			</author>
			<updated>2018-04-02T19:50:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31308#p31308</id>
		</entry>
</feed>
