<div dir="ltr">Scott,<div><br></div><div>Thanks for identifying the bug, you can file bugs on <a href="http://trac.vtiger.com">trac.vtiger.com</a>. <a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7781">Here</a> is the ticket created for this one.</div>

<div>If you need a login to create issues, please send an request to <span style="font-size:13px;color:rgb(0,0,0);font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif"><a href="mailto:info@vtiger.com">info@vtiger.com</a>.</span><br>

</div><div><span style="font-size:13px;color:rgb(0,0,0);font-family:Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif"><br></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 13 October 2013 11:33, sww <span dir="ltr"><<a href="mailto:scottearle@gmail.com" target="_blank">scottearle@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's a simple bug, with a simple fix, I know ... but it has a pretty<br>
catastrophic effect when (for example) creating a new product.<br>
<br>
I searched in the list to see if anyone else had previously mentioned this<br>
function, but nobody seems to so far. I don't know if there is a bug<br>
tracker, so I thought it best to post here. Apologies if I just broke some<br>
super-strict rule.<br>
<br>
In vtlib/Vtiger/Functions.php, line 68:<br>
<br>
        static function userCurrencyId($userid) {<br>
                global $current_user, $adb;<br>
<br>
                if (!isset(self::$userIdCurrencyIdCache[$userid])) {<br>
                        $result = $adb->pquery('SELECT currency_id FROM<br>
vtiger_users', array());<br>
                        while ($row = $adb->fetch_array($result)) {<br>
                                self::$userIdCurrencyIdCache[$row['id']] =<br>
$row['currency_id'];<br>
                        }<br>
                }<br>
                return self::$userIdCurrencyIdCache[$userid];<br>
        }<br>
<br>
Should be:<br>
<br>
        static function userCurrencyId($userid) {<br>
                global $current_user, $adb;<br>
<br>
                if (!isset(self::$userIdCurrencyIdCache[$userid])) {<br>
                        $result = $adb->pquery('SELECT id, currency_id FROM<br>
vtiger_users', array());<br>
                        while ($row = $adb->fetch_array($result)) {<br>
                                self::$userIdCurrencyIdCache[$row['id']] =<br>
$row['currency_id'];<br>
                        }<br>
                }<br>
                return self::$userIdCurrencyIdCache[$userid];<br>
        }<br>
<br>
Best regards,<br>
<br>
Scott<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtiger-crm.2324883.n4.nabble.com/Found-a-bug-in-the-function-userCurrencyId-vtiger-6-beta-tp8477.html" target="_blank">http://vtiger-crm.2324883.n4.nabble.com/Found-a-bug-in-the-function-userCurrencyId-vtiger-6-beta-tp8477.html</a><br>


Sent from the vtigercrm-developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards<br>Vikas<br>Vtiger Team
</div>