From 4b5bd7418838f93bb0677def6b91b96beeb8fc97 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 10 Jan 2019 13:05:57 +0100 Subject: [PATCH] add invoice_items in accounting archive --- app/views/archive/_accounting.json.jbuilder | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/archive/_accounting.json.jbuilder b/app/views/archive/_accounting.json.jbuilder index 1bd2def1e..102423376 100644 --- a/app/views/archive/_accounting.json.jbuilder +++ b/app/views/archive/_accounting.json.jbuilder @@ -42,4 +42,8 @@ json.array!(invoices) do |invoice| json.gender invoice.user.profile.gender ? 'male' : 'female' end end + json.invoice_items invoice.invoice_items do |item| + json.extract! item, :id, :stp_invoice_item_id, :created_at, :description + json.amount number_to_currency(item.amount / 100.0) + end end