Hi john,<br><br>try changing typeofdata to NN~..., from N|I~..<br><br>Thanks,<br>MAK<br><br><div class="gmail_quote">On Thu, May 27, 2010 at 5:48 PM, John Crisp <span dir="ltr"><<a href="mailto:john@reetspetit.net">john@reetspetit.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I have been trying to allow negative values for Credit Notes and am well<br>
& truly stuck and wondered if anyone had any suggestions - see my posts<br>
<a href="http://forums.vtiger.com/viewtopic.php?p=107753" target="_blank">http://forums.vtiger.com/viewtopic.php?p=107753</a><br>
<br>
I have managed to allow negative prices in Invoices by amending the<br>
following :<br>
<br>
Inventory.js around Line 334<br>
<br>
From :<br>
if (!numValidate("listPrice"+i,alert_arr.LIST_PRICE,"any")) return false<br>
<br>
<br>
To :<br>
if (!numValidate("listPrice"+i,alert_arr.LIST_PRICE,"any","1")) return false<br>
<br>
But it would be better to allow a negative quantity.<br>
<br>
I tried to change the following and add ,"1"<br>
<br>
From :<br>
if (!numValidate("qty"+i,"Qty","any")) return false<br>
<br>
To :<br>
if (!numValidate("qty"+i,"Qty","any","1")) return false<br>
<br>
If I put in a 1 I get 'Qty should be greater than 0' If I put a 0 I get<br>
'Invalid Quantity'<br>
<br>
I don't understand why it works for one piece of code, but not for the<br>
other ! Is there something else going on in the numValidate function in<br>
general.js ?<br>
<br>
My guess is that if this cold be solved there is nothing to stop<br>
creating a Credit Invoice module as it would be pretty well exactly the<br>
same as an Invoice but with negative numbers, or at least decrementing<br>
the stock and a minus Total.<br>
<br>
Any assistance or thoughts greatly appreciated<br>
_______________________________________________<br>
Join vtiger community network at <a href="http://forums.vtiger.com" target="_blank">http://forums.vtiger.com</a><br>
</blockquote></div><br>