[Vtigercrm-commits] [vtiger development] #5937: Order by ID in trouble tickets doesn't work

vtiger development vtiger-tickets at trac.vtiger.com
Thu May 28 07:20:38 EDT 2009


#5937: Order by ID in trouble tickets doesn't work
-------------------------------+--------------------------------------------
  Reporter:  Pierluigi.Bucolo  |       Owner:  developer 
      Type:  defect            |      Status:  new       
  Priority:  major             |   Milestone:            
 Component:  vtigercrm         |     Version:  5.1.0-val2
Resolution:                    |    Keywords:            
-------------------------------+--------------------------------------------
Comment (by Pierluigi.Bucolo):

 There is some code that I don't understand in CRMEntity.php at row
 1430-1433.
 $strip is always 0, so the if is useless.

 else if ($mode == "increment") {
 1425                            //when we save new invoice we will
 increment the invoice id and write
 1426                            $check = $adb->pquery("select
 cur_id,prefix from vtiger_modentity_num where semodule=? and active = 1",
 array($module));
 1427                            $prefix =
 $adb->query_result($check,0,'prefix');
 1428                            $curid =
 $adb->query_result($check,0,'cur_id');
 1429                            $prev_inv_no=$prefix.$curid;
 1430                            $strip=strlen($curid)-strlen($curid+1);
 1431                            if($strip<0)$strip=0;
 1432                            $temp = str_repeat("0",$strip);
 1433                            $req_no.= $temp.($curid+1);
 1434                            $adb->pquery("UPDATE vtiger_modentity_num
 SET cur_id=? where cur_id=? and active=1 AND semodule=?",
 array($req_no,$curid,$module));
 1435                            return decode_html($prev_inv_no);

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5937#comment:2>
vtiger development <http://trac.vtiger.com/>
vtigerCRM




More information about the vtigercrm-commits mailing list