<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — DB Error while Placing a Direct Invoice with no customer selected.]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1199&amp;type=atom" />
	<updated>2012-10-17T06:51:20Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1199</id>
		<entry>
			<title type="html"><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13823#p13823" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-10-17T06:51:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13823#p13823</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13816#p13816" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-10-17T04:10:41Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13816#p13816</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13812#p13812" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-10-16T15:03:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13812#p13812</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13811#p13811" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-10-16T14:49:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13811#p13811</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13809#p13809" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-10-16T14:31:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13809#p13809</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13804#p13804" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[surreyhills]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=14852</uri>
			</author>
			<updated>2012-10-16T12:39:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13804#p13804</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=5294#p5294" />
			<content type="html"><![CDATA[<p>Similar issue while placing a purchase order, mantis 0000217.</p>]]></content>
			<author>
				<name><![CDATA[oscarhc]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=653</uri>
			</author>
			<updated>2010-03-14T06:52:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=5294#p5294</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[DB Error while Placing a Direct Invoice with no customer selected.]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=5271#p5271" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[oscarhc]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=653</uri>
			</author>
			<updated>2010-03-13T12:54:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=5271#p5271</id>
		</entry>
</feed>
