<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — How to limit customer negative balance]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3868&amp;type=atom" />
	<updated>2013-03-06T13:42:20Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=3868</id>
		<entry>
			<title type="html"><![CDATA[Re: How to limit customer negative balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15913#p15913" />
			<content type="html"><![CDATA[<p>It seems no one is interested in this function <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />but it&#039;s effective function and good idea ... but for now i don&#039;t know how to use it</p>]]></content>
			<author>
				<name><![CDATA[Berctain]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17348</uri>
			</author>
			<updated>2013-03-06T13:42:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15913#p15913</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to limit customer negative balance]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=15678#p15678" />
			<content type="html"><![CDATA[<p>Hi I want t insert a query in sales_order_entry.php file<br />that if total of Current balance and sales invoice is less than -500 then form should display a error and if balance is min than max than -500 then it will alow to submit.</p><p>I have created an array which is showing customer current balance before submitting a form. ( $bal )<br />Example: </p><p>if (($bal - $_SESSION[&#039;Items&#039;]-&gt;get_items_total()) &lt; &#039;-500&#039;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; display_error(&quot;Customer balance can not be less than -500.&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; return false;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; }<br />I used this code in sales_order_entry.php at line 438 just like this---------------</p><p>if ($_SESSION[&#039;Items&#039;]-&gt;get_items_total() &lt; 0) {<br />&nbsp; &nbsp; &nbsp; &nbsp; display_error(&quot;Bill total amount cannot be less than zero.&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; return false;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; return true;</p><p>Pls help me how to write this code and where to paste it.......</p>]]></content>
			<author>
				<name><![CDATA[shive9jai]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17188</uri>
			</author>
			<updated>2013-02-18T05:05:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=15678#p15678</id>
		</entry>
</feed>
