1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-11 22:24:21 +01:00
fab-manager/app/views/api/invoices/avoir.json.jbuilder

17 lines
536 B
Plaintext
Raw Normal View History

2021-05-27 15:58:55 +02:00
# frozen_string_literal: true
json.extract! @avoir, :id, :created_at, :reference, :avoir_date, :payment_method, :invoice_id
2019-05-29 12:01:24 +02:00
json.user_id @avoir.invoicing_profile.user_id
json.total @avoir.total / 100.00
2016-03-23 18:39:41 +01:00
json.name @avoir.user.profile.full_name
json.has_avoir false
json.is_avoir true
json.date @avoir.avoir_date
json.chained_footprint @avoir.check_footprint
2016-03-23 18:39:41 +01:00
json.items @avoir.invoice_items do |item|
json.id item.id
json.amount item.amount / 100.0
2016-03-23 18:39:41 +01:00
json.description item.description
json.invoice_item_id item.invoice_item_id
end