replaced invoices and incomes primary key(id) with primary key(date)