SELECT `a`.*, concat(a.formNo, "[", lpad(a.serialNo, 8, "0"), "]") as formNo, `b`.`supplierName` as supplierName, `b`.`phoneNumber1` as phoneNumber1, `b`.`attention` as attention, `c`.`fldcurr_code`
FROM (`comp_supplier_invoice` a)
JOIN `supplier` b ON `b`.`ID` = `a`.`supplierID`
JOIN `_ref_currency` c ON `c`.`fldid` = `a`.`currencyID`
WHERE `a`.`totalPayable` != 0
AND `a`.`companyID` =  '3'