<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — DB Error while Placing a Direct Invoice with no customer selected.]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=1199</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1199&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in DB Error while Placing a Direct Invoice with no customer selected..]]></description>
		<lastBuildDate>Wed, 17 Oct 2012 06:51:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=13823#p13823</link>
			<description><![CDATA[<p>Ah, the supp_trans table share info with payment records. But this could be hidden more effectively in purchase_order_entry.php. Will look at it in more detail.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 17 Oct 2012 06:51:20 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=13823#p13823</guid>
		</item>
		<item>
			<title><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=13816#p13816</link>
			<description><![CDATA[<p>Thanks Joe. Maybe in v2.4, if the said field is not used, it can be removed.</p><p>Mercurial Changeset <a href="https://frontaccounting.hg.sourceforge.net/hgweb/frontaccounting/frontaccounting/changeset/85121729925f"><strong>3084</strong></a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 17 Oct 2012 04:10:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=13816#p13816</guid>
		</item>
		<item>
			<title><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=13812#p13812</link>
			<description><![CDATA[<p>@surreyhills</p><p>Thanks for telling us. In certain releases of MySql or MySql setup won&#039;t allow the insert of empty value.</p><p>Fixed in HG repository. Your fix was used.</p><p>No problems in the Direct Sales Invoice.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 16 Oct 2012 15:03:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=13812#p13812</guid>
		</item>
		<item>
			<title><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=13811#p13811</link>
			<description><![CDATA[<p>The supp_trans table is used by both documents and the payments. It is correct to set the value to 0 here.</p><p>Certain setup and versions of MySql accepts this though.</p><p>Will be fixed asap.</p><p>/Joe<br />BTW will check the ddebtor_trans also.</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 16 Oct 2012 14:49:31 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=13811#p13811</guid>
		</item>
		<item>
			<title><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=13809#p13809</link>
			<description><![CDATA[<p>Is this fix needed in Line 460 in the current version of the said file <strong>purchasing/po_entry_items.php</strong> ?</p><p>The field <strong>ov_discount</strong> in the table <strong>supp_trans</strong> is set to be NOT NULL for good reason - arithmetic cannot be done on NULL values. Hence setting it to 0.0 is correct. If it is not used as stated in the comments, then the field should be removed.</p><p>The same field name and NOT NULL state is observed in the <strong>debtor_trans</strong> table as well. Any similar inserts failing on it?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 16 Oct 2012 14:31:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=13809#p13809</guid>
		</item>
		<item>
			<title><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=13804#p13804</link>
			<description><![CDATA[<p>I have the same error on supplier Direct Invoice.&nbsp; Direct GRN works but Direct Invoice gives the following</p><p>At file G:\ServerFolders\Documents\htdocs\FATest\purchasing\includes\db\supp_trans_db.inc:45:<br />Cannot insert a supplier transaction record<br />error code : 1265<br />error message : Data truncated for column &#039;ov_discount&#039; at row 1<br />sql that failed was : INSERT INTO 0_supp_trans (trans_no, type, supplier_id, tran_date, due_date, reference, supp_reference, ov_amount, ov_gst, rate, ov_discount, tax_included) VALUES (&#039;3&#039;, &#039;20&#039;, &#039;2&#039;, &#039;2008-12-31&#039;, &#039;2009-01-01&#039;, &#039;3&#039;, &#039;123&#039;, &#039;10&#039;, &#039;0&#039;, &#039;1&#039;, &#039;&#039;, &#039;0&#039;)</p><p>The bug is due to a fix made before in line 456 in po_entry_items.php which waas commented out and left ov_discount as null not 0.0. I have changed the code to:</p><p>//&nbsp; &nbsp; MRB 16-10-12 - ov-discount set to zero to avoid DB error on insert<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $inv-&gt;ov_discount = 0.0;<br />// End of fix 16-10-12</p><p>which works.</p>]]></description>
			<author><![CDATA[null@example.com (surreyhills)]]></author>
			<pubDate>Tue, 16 Oct 2012 12:39:24 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=13804#p13804</guid>
		</item>
		<item>
			<title><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5294#p5294</link>
			<description><![CDATA[<p>Similar issue while placing a purchase order, mantis 0000217.</p>]]></description>
			<author><![CDATA[null@example.com (oscarhc)]]></author>
			<pubDate>Sun, 14 Mar 2010 06:52:54 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5294#p5294</guid>
		</item>
		<item>
			<title><![CDATA[DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5271#p5271</link>
			<description><![CDATA[<p>Hello,</p><p>&nbsp; &nbsp;Added to mantis 0000216: DB Error while Placing a Direct Invoice with no customer selected. <br />&nbsp; <br />&nbsp; &nbsp;FA 2.2.7</p><p>&nbsp; &nbsp;If a Direct invoice is placed with no customer selected a DB error is shown. This can be avoided validating if a customer is selected before posting.</p><p>&nbsp; &nbsp;Edit: Tried to place a Sales Quotation with no customer selected and is properly detected : &quot;You must enter the person or company to whom delivery should be made to.&quot;</p><p>&nbsp; &nbsp;Side efect of this error is that Sales Order is incremented.<br />&nbsp; &nbsp;Suppose all are initial transactions. After placing a correct Direct Invoice, in customer transactions you can see that Invoice number is #1 Sales Order is #2 and Sales Order #1 is &#039;lost&#039;. </p><p>&nbsp; &nbsp;Regards, Oscar.</p>]]></description>
			<author><![CDATA[null@example.com (oscarhc)]]></author>
			<pubDate>Sat, 13 Mar 2010 12:54:20 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5271#p5271</guid>
		</item>
	</channel>
</rss>
