SELECT `a`.*, concat(a.formNo, "[", lpad(a.serialNo, 8, "0"), "]") as formNo, `b`.`customerName`, `b`.`phoneNumber1`, `c`.`fldcurr_code`
FROM (`comp_sales_order` a)
JOIN `customer` b ON `b`.`ID` = `a`.`customerID`
JOIN `_ref_currency` c ON `c`.`fldid` = `a`.`currencyID`
WHERE `a`.`companyID` =  '3'
AND `a`.`status` =  1
AND `a`.`salesOrderDate` >= '2016-03-01'
AND `a`.`salesOrderDate` <= '2016-03-31'
ORDER BY `a`.`companyID`