Fix passing company ID to expenses chart query
By mistake, i was using 1 instead of $1, but i all was OK in testing because there is only a single company with ID = 1.
This commit is contained in:
parent
ee0b5d0bdc
commit
f40e4fdb2e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue