mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
[bug] do not display each days in invoices for multiple days event reservation
This commit is contained in:
parent
9e1e23f268
commit
e8930924e4
@ -22,6 +22,7 @@
|
||||
- Fix a bug: invoices list is not shown by default in "manage invoices" section
|
||||
- Fix a bug: unable to run rake fablab:es:* tasks due to an issue with gem faraday 0.16.x (was updated to 0.17)
|
||||
- Fix a bug: unauthorized user can see the edit project form
|
||||
- Fix a bug: do not display each days in invoices for multiple days event reservation
|
||||
- Fix a security issue: fixed [CVE-2015-9284](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-9284)
|
||||
- [TODO DEPLOY] **IMPORTANT** Please read [postgres_upgrade.md](doc/postgres_upgrade.md) for instructions on upgrading PostgreSQL.
|
||||
- [TODO DEPLOY] `rake db:migrate`
|
||||
|
@ -46,7 +46,6 @@ class Reservation < ActiveRecord::Base
|
||||
raise LockedError if slot.availability.lock
|
||||
end
|
||||
|
||||
|
||||
case reservable
|
||||
|
||||
# === Machine reservation ===
|
||||
@ -72,7 +71,6 @@ class Reservation < ActiveRecord::Base
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
# === Training reservation ===
|
||||
when Training
|
||||
base_amount = reservable.amount_by_group(user.group_id).amount
|
||||
@ -99,12 +97,18 @@ class Reservation < ActiveRecord::Base
|
||||
amount += ticket.booked * ticket.event_price_category.amount
|
||||
end
|
||||
slots.each do |slot|
|
||||
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
|
||||
description = "#{reservable.name}\n"
|
||||
description += if slot.start_at.to_date != slot.end_at.to_date
|
||||
I18n.t('events.from_STARTDATE_to_ENDDATE',
|
||||
STARTDATE: I18n.l(slot.start_at.to_date, format: :long),
|
||||
ENDDATE: I18n.l(slot.end_at.to_date, format: :long)) + ' ' +
|
||||
I18n.t('events.from_STARTTIME_to_ENDTIME',
|
||||
STARTTIME: I18n.l(slot.start_at, format: :hour_minute),
|
||||
ENDTIME: I18n.l(slot.end_at, format: :hour_minute))
|
||||
else
|
||||
"#{I18n.l slot.start_at.to_date, 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 && on_site
|
||||
invoice.invoice_items.push InvoiceItem.new(
|
||||
|
@ -155,6 +155,9 @@ en:
|
||||
# error messages when updating an event
|
||||
error_deleting_reserved_price: "Unable to delete the requested price because it is associated with some reservations"
|
||||
other_error: "An unexpected error occurred while updating the event"
|
||||
# event duration
|
||||
from_STARTDATE_to_ENDDATE: "From %{STARTDATE} to %{ENDDATE},"
|
||||
from_STARTTIME_to_ENDTIME: "from %{STARTTIME} to %{ENDTIME}"
|
||||
|
||||
export_members:
|
||||
# members list export to EXCEL format
|
||||
|
@ -155,6 +155,9 @@ es:
|
||||
# error messages when updating an event
|
||||
error_deleting_reserved_price: "No se puede eliminar el precio solicitado porque está asociado con algunas reservas."
|
||||
other_error: "Se ha producido un error inesperado al actualizar el evento."
|
||||
# event duration
|
||||
from_STARTDATE_to_ENDDATE: "Del %{STARTDATE} al %{ENDDATE},"
|
||||
from_STARTTIME_to_ENDTIME: "de %{STARTTIME} a %{ENDTIME}"
|
||||
|
||||
export_members:
|
||||
# members list export to EXCEL format
|
||||
|
@ -155,6 +155,9 @@ fr:
|
||||
# messages d'erreur lors de la mise à jour d'un évènement
|
||||
error_deleting_reserved_price: "Impossible de supprimer le tarif demandé car il est associé à des réservations"
|
||||
other_error: "Une erreur inattendue est survenue lors de la mise à jour de l'évènement"
|
||||
# durée d'un évènement
|
||||
from_STARTDATE_to_ENDDATE: "Du %{STARTDATE} au %{ENDDATE},"
|
||||
from_STARTTIME_to_ENDTIME: "de %{STARTTIME} à %{ENDTIME}"
|
||||
|
||||
export_members:
|
||||
# export de la liste des members au format EXCEL
|
||||
|
@ -155,6 +155,9 @@ pt:
|
||||
# error messages when updating an event
|
||||
error_deleting_reserved_price: "Não permitido deletar o preço requisitado, pois está associado a algumas reservas"
|
||||
other_error: "Um erro inesperado ocorreu enquanto o evento era atualizado"
|
||||
# event duration
|
||||
from_STARTDATE_to_ENDDATE: "De %{STARTDATE} a %{ENDDATE},"
|
||||
from_STARTTIME_to_ENDTIME: "das %{STARTTIME} às %{ENDTIME}"
|
||||
|
||||
export_members:
|
||||
# members list export to EXCEL format
|
||||
|
Loading…
x
Reference in New Issue
Block a user