getRelatedNotesAttachments($id, $crmid); saveLeadRelatedProducts($id, $crmid, "Accounts"); saveLeadRelations($id, $crmid, "Accounts"); } else { if ($accountname == '') { $crmid = ''; } else { $crmid = $adb->getUniqueID("vtiger_crmentity"); //Saving Account - starts $sql_crmentity = "insert into vtiger_crmentity(crmid,smcreatorid,smownerid,setype,presence,createdtime,modifiedtime,deleted,description) values(?,?,?,?,?,?,?,?,?)"; $sql_params = array($crmid, $current_user_id, $assigned_user_id, 'Accounts', 1, $date_entered, $date_modified, 0, $row['description']); $adb->pquery($sql_crmentity, $sql_params); //Module Sequence Numbering require_once 'modules/Accounts/Accounts.php'; $acc_no_focus = new Accounts(); $account_no = $acc_no_focus->setModuleSeqNumber("increment", 'Accounts'); // END /* Modified by Minnie to fix the convertlead issue -- START*/ if (isset($row["annualrevenue"]) && !empty($row["annualrevenue"])) { $annualrevenue = $row["annualrevenue"]; } else { $annualrevenue = 'null'; } if (isset($row["noofemployees"]) && !empty($row["noofemployees"])) { $employees = $row["noofemployees"]; } else { $employees = 'null'; } $sql_insert_account = "INSERT INTO vtiger_account (account_no,accountid,accountname,industry,annualrevenue,phone,fax,rating,email1,website,employees) VALUES (?,?,?,?,?,?,?,?,?,?,?)"; /* Modified by Minnie -- END*/ $account_params = array($account_no, $crmid, $accountname, $row["industry"], $annualrevenue, $row["phone"], $row["fax"], $row["rating"], $row["email"], $row["website"], $employees);