Inline html to template for portfolio and fix balance = 0 check