1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(feat) Report subsription mismatch with user's group

This commit is contained in:
Sylvain 2023-01-04 12:08:37 +01:00
parent 8ce1ceb345
commit 8d43db2579
9 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,7 @@
- Default accounting codes and labels if not set
- Active serving static files from the `/public` folder by default from rails
- Display custom error message if the PDF invoice is not found
- Report subsription mismatch with user's group
- Fix a bug: unable to run test in negative timezones (#425)
- Fix a bug: providing an array of attributes to filter OpenApi data, results in error
- Fix a bug: unable to manage stocks on new products

View File

@ -19,6 +19,8 @@ class CartItem::Reservation < CartItem::BaseItem
is_privileged = @operator.privileged? && @operator.id != @customer.id
prepaid = { minutes: PrepaidPackService.minutes_available(@customer, @reservable) }
raise InvalidGroupError, I18n.t('cart_items.group_subscription_mismatch') if !@plan.nil? && @customer.group_id != @plan.group_id
elements = { slots: [] }
amount = 0

View File

@ -485,6 +485,7 @@ de:
cart_items:
free_extension: "Kostenlose Verlängerung eines Abonnements bis %{DATE}"
must_be_after_expiration: "The new expiration date must be set after the current expiration date"
group_subscription_mismatch: "Your group mismatch with your subscription. Please report this error."
statistic_profile:
birthday_in_past: "Geburtsdatum muss in der Vergangenheit liegen"
order:

View File

@ -485,6 +485,7 @@ en:
cart_items:
free_extension: "Free extension of a subscription, until %{DATE}"
must_be_after_expiration: "The new expiration date must be set after the current expiration date"
group_subscription_mismatch: "Your group mismatch with your subscription. Please report this error."
statistic_profile:
birthday_in_past: "The date of birth must be in the past"
order:

View File

@ -485,6 +485,7 @@ es:
cart_items:
free_extension: "Free extension of a subscription, until %{DATE}"
must_be_after_expiration: "The new expiration date must be set after the current expiration date"
group_subscription_mismatch: "Your group mismatch with your subscription. Please report this error."
statistic_profile:
birthday_in_past: "The date of birth must be in the past"
order:

View File

@ -485,6 +485,7 @@ fr:
cart_items:
free_extension: "Extension gratuite d'un abonnement, jusqu'au %{DATE}"
must_be_after_expiration: "La nouvelle date d'expiration doit être définie après la date d'expiration actuelle"
group_subscription_mismatch: "Votre groupe ne correspond pas à votre abonnement. Veuillez signaler cette erreur."
statistic_profile:
birthday_in_past: "La date de naissance doit être dans le passé"
order:

View File

@ -485,6 +485,7 @@
cart_items:
free_extension: "Free extension of a subscription, until %{DATE}"
must_be_after_expiration: "The new expiration date must be set after the current expiration date"
group_subscription_mismatch: "Your group mismatch with your subscription. Please report this error."
statistic_profile:
birthday_in_past: "The date of birth must be in the past"
order:

View File

@ -485,6 +485,7 @@ pt:
cart_items:
free_extension: "Extensão gratuita de uma assinatura, até %{DATE}"
must_be_after_expiration: "The new expiration date must be set after the current expiration date"
group_subscription_mismatch: "Your group mismatch with your subscription. Please report this error."
statistic_profile:
birthday_in_past: "A data de nascimento deve estar no passado"
order:

View File

@ -485,6 +485,7 @@ zu:
cart_items:
free_extension: "crwdns22091:0%{DATE}crwdne22091:0"
must_be_after_expiration: "crwdns36221:0crwdne36221:0"
group_subscription_mismatch: "crwdns36289:0crwdne36289:0"
statistic_profile:
birthday_in_past: "crwdns22127:0crwdne22127:0"
order: