1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

fix invoices list API

This commit is contained in:
Sylvain 2019-07-29 12:19:54 +02:00
parent a778b1063a
commit 5e8697de18

View File

@ -10,7 +10,7 @@ class InvoicesService
# @param filters {Hash} allowed filters: number, customer, date.
def self.list(order_key, direction, page, size, filters = {})
invoices = Invoice.includes(:avoir, :invoicing_profile, invoice_items: %i[subscription invoice_item])
.joins('invoicing_profile')
.joins(:invoicing_profile)
.order("#{order_key} #{direction}")
.page(page)
.per(size)