Search by product code in SalesOrder vtiger

220 views Asked by At

I bought a bar code to label my products in my business.

The thing is that in vtiger would be very quickly to search by product code directly in the input search of the sales order product.

In here:

enter image description here

Where are the files to modified this?

Im using vtiger 6.1.

Thanks!

1

There are 1 answers

0
Fabrizio On

I finally solved it.

Just go to Record.php in modules/Products/models and modify in line 327 to this

$query = 'SELECT label, crmid, setype, createdtime FROM vtiger_crmentity INNER JOIN vtiger_products ON 
                            vtiger_products.productid = vtiger_crmentity.crmid WHERE (vtiger_products.productname LIKE ? OR vtiger_products.productcode LIKE ?)  AND vtiger_crmentity.deleted = 0 
                            AND vtiger_products.discontinued = 1 AND setype = ?';
                            $params[] = "%$searchKey%";