Skip to content

Commit

Permalink
Merge branch 'dev' for release 2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainbx committed Nov 24, 2016
2 parents e365034 + 762d85f commit 29f4974
Show file tree
Hide file tree
Showing 13 changed files with 1,549 additions and 1,460 deletions.
2 changes: 1 addition & 1 deletion .fabmanager-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.3
2.4.4
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog Fab Manager

## v2.4.4 2016 November 24

- Fix a bug: unable to rollback migration 20160906145713
- Fix a bug: Title's translation for plan's forms is not loaded in French
- Fix a bug: invoice of reservation show payment by debit card when user pay with wallet

## v2.4.3 2016 November 21

- Export user's invoicing status in members' excel export
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ Developers may find information on how to implement their own authentication pro
To solve this issue copy `config/application.yml.default` to `config/application.yml`.
This is required before the first start.
- Due to a stripe limitation, you won't be ble to create plans longer than one year.
- Due to a stripe limitation, you won't be able to create plans longer than one year.
- When running the tests suite with `rake test`, all tests may fail with errors similar to the following:
Expand Down
3 changes: 3 additions & 0 deletions app/exceptions/debit_wallet_error.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Raised when debit wallet fail
class DebitWalletError < StandardError
end
10 changes: 8 additions & 2 deletions app/models/reservation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,14 @@ def debit_user_wallet
if @wallet_amount_debit.present? and @wallet_amount_debit != 0
amount = @wallet_amount_debit / 100.0
wallet_transaction = WalletService.new(user: user, wallet: user.wallet).debit(amount, self)
if !user.invoicing_disabled? and wallet_transaction
self.invoice.update_columns(wallet_amount: @wallet_amount_debit, wallet_transaction_id: wallet_transaction.id)
# wallet debit success
if wallet_transaction
# payment by online or (payment by local and invoice isnt disabled)
if stp_invoice_id or !user.invoicing_disabled?
self.invoice.update_columns(wallet_amount: @wallet_amount_debit, wallet_transaction_id: wallet_transaction.id)
end
else
raise DebitWalletError
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion config/locales/app.public.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ en:
your_subscription_expires_on_the_DATE: "Your subscription expires on the {{DATE}}" # angular interpolation
my_group: "My group"
his_group: "{GENDER, select, male{His} female{Her} other{Its}} group" # messageFormat interpolation
he_wants_to_change_group: "{ROLE, select, admin{He wants} other{I want}} to change group" # messageFormat interpolation
he_wants_to_change_group: "{ROLE, select, admin{The user wants} other{I want}} to change group" # messageFormat interpolation
change_my_group: "Change {ROLE, select, admin{{GENDER, select, male{his} female{her} other{its}}} other{my}} group" # messageFormat interpolation
your_subscription_has_expired_on_the_DATE: "Your subscription has expired on the {{DATE}}" # angular interpolation
you_ve_just_payed_the_: "You've just payed the"
Expand Down
2 changes: 1 addition & 1 deletion config/locales/app.public.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fr:
your_subscription_expires_on_the_DATE: "Votre abonnement expire au {{DATE}}" # angular interpolation
my_group: "Mon groupe"
his_group: "Son groupe" # messageFormat interpolation
he_wants_to_change_group: "{ROLE, select, admin{Il veut} other{Je veux}} changer de groupe" # messageFormat interpolation
he_wants_to_change_group: "{ROLE, select, admin{L'utilisateur veut} other{Je veux}} changer de groupe" # messageFormat interpolation
change_my_group: "Changer {ROLE, select, admin{son} other{mon}} groupe" # messageFormat interpolation
your_subscription_has_expired_on_the_DATE: "Votre abonnement a expiré au {{DATE}}" # angular interpolation
you_ve_just_payed_the_: "Vous venez de régler l'"
Expand Down
2 changes: 1 addition & 1 deletion config/locales/app.shared.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ fr:

plan:
# formulaire d'édition d'une formule d'abonnement
general_informations: "Informations générales"
general_information: "Informations générales"
name_length_must_be_less_than_24_characters: "Le nom doit faire moins de 24 caractères."
type_is_required: "Le type est requis."
group: "Groupe"
Expand Down
15 changes: 14 additions & 1 deletion db/migrate/20160906145713_insert_custom_aggregations.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class InsertCustomAggregations < ActiveRecord::Migration
def change
def up
# available reservations hours for machines
machine = StatisticIndex.find_by_es_type_key('machine')
machine_hours = StatisticType.find_by(key: 'hour', statistic_index_id: machine.id)
Expand All @@ -26,4 +26,17 @@ def change
})
available_tickets.save!
end

def down

machine = StatisticIndex.find_by_es_type_key('machine')
machine_hours = StatisticType.find_by(key: 'hour', statistic_index_id: machine.id)

StatisticCustomAggregation.where(field: 'available_hours', statistic_type_id: machine_hours.id).first.destroy!

training = StatisticIndex.find_by_es_type_key('training')
training_bookings = StatisticType.find_by(key: 'booking', statistic_index_id: training.id)

StatisticCustomAggregation.where(field: 'available_tickets', statistic_type_id: training_bookings.id).first.destroy!
end
end
120 changes: 70 additions & 50 deletions doc/controllers_brief.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 29f4974

Please sign in to comment.