$sql_for_expense_items = "select ei.date as date, 2 as type, u.name as user_name, p.name as project_name,
null as task_name, ei.name as note,
null as duration, ei.cost as cost from tt_expense_items ei
inner join tt_users u on (ei.user_id = u.id)
left join tt_projects p on (p.id = ei.project_id)
where ei.invoice_id = $invoice_id and ei.status = 1";
$sql_for_expense_items = "select ei.date as date, 2 as type, u.name as user_name, p.name as project_name,
null as task_name, ei.name as note,
null as duration, ei.cost as cost from tt_expense_items ei
inner join tt_users u on (ei.user_id = u.id)
left join tt_projects p on (p.id = ei.project_id)
where ei.invoice_id = $invoice_id and ei.status = 1";