diff --git a/pkg/dashboard.go b/pkg/dashboard.go index bde7ae5..cb0d639 100644 --- a/pkg/dashboard.go +++ b/pkg/dashboard.go @@ -203,7 +203,7 @@ func buildDashboardChart(ctx context.Context, conn *Conn, locale *Locale, compan select to_char(date.invoice_date, '%[3]s')::integer as date , sum(amount)::integer as total from generate_series(%[1]s, %[2]s, interval '1 day') as date(invoice_date) - left join expense on expense.invoice_date = date.invoice_date and company_id = 1 + left join expense on expense.invoice_date = date.invoice_date and company_id = $1 group by date ) as expense using (date) order by date