1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

fix bug: event date period dant show correct in invoice

This commit is contained in:
Peng DU 2016-11-03 12:17:19 +01:00
parent 9dca65786a
commit 99cca406d5
5 changed files with 22 additions and 5 deletions

View File

@ -2,6 +2,7 @@
## next release
- Fix bug: Event date period dont show correct in invoice
- Image max size is configutable, size by default is 2 megabytes
- Allow add more picture for project step
- Ability to use HTML in event's descriptions using a WYSIWYG editor

View File

@ -107,7 +107,11 @@ class Reservation < ActiveRecord::Base
amount += ticket.booked * ticket.event_price_category.amount
end
slots.each do |slot|
description = reservable.name + " #{I18n.l slot.start_at, format: :long} - #{I18n.l slot.end_at, format: :hour_minute}"
description = "#{reservable.name} "
(slot.start_at.to_date..slot.end_at.to_date).each do |d|
description += "\n" if slot.start_at.to_date != slot.end_at.to_date
description += "#{I18n.l d, format: :long} #{I18n.l slot.start_at, format: :hour_minute} - #{I18n.l slot.end_at, format: :hour_minute}"
end
ii_amount = amount
ii_amount = 0 if (slot.offered and on_site)
unless on_site

View File

@ -8,6 +8,12 @@
<p><%= t('.body.reserved_slots') %></p>
<ul>
<% @attached_object.slots.each do |slot| %>
<li><%= "#{I18n.l slot.start_at, format: :long} - #{I18n.l slot.end_at, format: :hour_minute}" %></li>
<% if @attached_object.reservable_type == 'Event' %>
<% (slot.start_at.to_date..slot.end_at.to_date).each do |d| %>
<li><%= "#{I18n.l d, format: :long} #{I18n.l slot.start_at, format: :hour_minute} - #{I18n.l slot.end_at, format: :hour_minute}" %></li>
<% end %>
<% else %>
<li><%= "#{I18n.l slot.start_at, format: :long} - #{I18n.l slot.end_at, format: :hour_minute}" %></li>
<% end %>
<% end %>
</ul>

View File

@ -5,6 +5,12 @@
<p><%= t('.body.your_reserved_slots') %> </p>
<ul>
<% @attached_object.slots.each do |slot| %>
<li><%= "#{I18n.l slot.start_at, format: :long} - #{I18n.l slot.end_at, format: :hour_minute}" %></li>
<% if @attached_object.reservable_type == 'Event' %>
<% (slot.start_at.to_date..slot.end_at.to_date).each do |d| %>
<li><%= "#{I18n.l d, format: :long} #{I18n.l slot.start_at, format: :hour_minute} - #{I18n.l slot.end_at, format: :hour_minute}" %></li>
<% end %>
<% else %>
<li><%= "#{I18n.l slot.start_at, format: :long} - #{I18n.l slot.end_at, format: :hour_minute}" %></li>
<% end %>
<% end %>
</ul>

View File

@ -33,7 +33,7 @@ fr:
formats:
default: "%d/%m/%Y"
short: "%e %b"
long: "%e %B %Y"
long: "%A%e %B %Y"
month_names:
-
- janvier
@ -204,4 +204,4 @@ fr:
default: "%d %B %Y %Hh %Mmin %Ss"
long: "%A %d %B %Y %Hh%M"
short: "%d %b %Hh%M"
pm: pm
pm: pm