mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
25 lines
657 B
Ruby
25 lines
657 B
Ruby
# frozen_string_literal: true
|
|
|
|
json.price @amount[:total] / 100.00
|
|
json.price_without_coupon @amount[:before_coupon] / 100.00
|
|
if @amount[:elements]
|
|
json.details do
|
|
json.slots @amount[:elements][:slots] do |slot|
|
|
json.slot_id slot[:slot_id]
|
|
json.start_at slot[:start_at]
|
|
json.price slot[:price] / 100.00
|
|
json.promo slot[:promo]
|
|
end
|
|
json.plan @amount[:elements][:plan] / 100.00 if @amount[:elements][:plan]
|
|
end
|
|
end
|
|
if @amount[:schedule]
|
|
json.schedule do
|
|
json.items @amount[:schedule][:items] do |item|
|
|
json.amount item.amount / 100.00
|
|
json.due_date item.due_date
|
|
end
|
|
end
|
|
end
|
|
json.errors @errors
|