<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — degrade doctext.inc vars gracefully. hardcoded strings]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3761&amp;type=atom" />
	<updated>2013-01-17T07:22:31Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=3761</id>
		<entry>
			<title type="html"><![CDATA[Re: degrade doctext.inc vars gracefully. hardcoded strings]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15094#p15094" />
			<content type="html"><![CDATA[<p>It has been fixed with the last commit to HG repository for both 2.3 and 2.4.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-01-17T07:22:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15094#p15094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: degrade doctext.inc vars gracefully. hardcoded strings]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15093#p15093" />
			<content type="html"><![CDATA[<p>In that case, then the default page to be displayed should be Add New Quotation Form when there are no Quotations in the database - that way we need not bother about the database warning ever occurring here.</p><p>Thanks for the clarification.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2013-01-17T06:21:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15093#p15093</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: degrade doctext.inc vars gracefully. hardcoded strings]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15092#p15092" />
			<content type="html"><![CDATA[<p>Hello Apmuthu,</p><p>The 2 warnings in line 310 and 317 are from the database. We have decided to report all errors/warnings from database in English only.</p><p>The sales quotation and other documents will now break if there are no documents in database.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2013-01-17T00:19:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15092#p15092</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[degrade doctext.inc vars gracefully. hardcoded strings]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15091#p15091" />
			<content type="html"><![CDATA[<p>In <strong>sales/includes/db/sales_order_db.inc</strong> in the function <strong>get_sales_order_header</strong> we have a few hardcoded strings:</p><p><strong>Line 310</strong>: You have duplicate document in database</p><p><strong>Line 317</strong>: You have missing or invalid sales document in databaseYou have missing or invalid sales document in database</p><p>In the demo company, Reports =&gt; Customers =&gt; Print Sales Quotations results in the following error:<br /></p><div class="codebox"><pre><code>You have missing or invalid sales document in database (type:32, number:0).</code></pre></div><p>The database does not have any demo data for sales quotations - it does not degrade gracefully.</p><p>Almost all variables in <strong>reporting/inxludes/doctext.inc</strong> need to be gracefully degraded like <strong>line 40</strong>:<br /></p><div class="codebox"><pre><code>$this-&gt;formData[&#039;document_date&#039;] = this-&gt;formData[&#039;ord_date&#039;] ;</code></pre></div><p>which should become<br /></p><div class="codebox"><pre><code>$this-&gt;formData[&#039;document_date&#039;] = isset($this-&gt;formData[&#039;ord_date&#039;]) ? $this-&gt;formData[&#039;ord_date&#039;] : &#039;&#039;;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2013-01-16T23:13:41Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15091#p15091</id>
		</entry>
</feed>
