I think it's all about capitalization... try this:
SELECT com.CompanyName, IFNULL( SUM( InvIn.total ) , 0 )
AS SumOfTotal, IFNULL( SUM( inc.income ) , 0 )
AS SumOfIncome, IFNULL( SUM( InvIn.total ) , 0 ) - IFNULL( SUM( inc.income ) , 0 )
AS difference FROM companies com LEFT JOIN invoice Inv ON Inv.CompaniesID = com.ID
JOIN invoiceinput InvIn
ON InvIn.InvoiceID = Inv.ID
LEFT JOIN income inc
ON inc.companyID = com.ID
GROUP BY com.CompanyName
ORDER BY SumOfTotal DESC LIMIT 0 , 30