Fixed invoice isOpen should be false if balance is 0
Fixed invoice isOpen should be false if balance is 0