mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-07 01:54:16 +01:00
Merge branch 'dev' for release 4.7.11
This commit is contained in:
commit
2b6bbbd7b8
14
.github/ISSUE_TEMPLATE.md
vendored
14
.github/ISSUE_TEMPLATE.md
vendored
@ -1,14 +0,0 @@
|
|||||||
This issue tracker is **reserved** for bug reports.
|
|
||||||
|
|
||||||
The place to ask a question or call for help is at [Fab-manager forums](https://forum.fab-manager.com)
|
|
||||||
|
|
||||||
The place to request or vote for new feature is on the [feedback website](https://feedback.fab-manager.com)
|
|
||||||
|
|
||||||
To report a bug, please describe:
|
|
||||||
- Expected behavior and actual behavior.
|
|
||||||
- Steps to reproduce the problem.
|
|
||||||
- Specifications like the version of the project, operating system, or hardware.
|
|
||||||
|
|
||||||
The following elements may help to quickly resolve your issue:
|
|
||||||
- Server logs `tail -f /apps/fabmanager/log/app-stdout.log` on the server
|
|
||||||
- Client logs `Ctrl`+`Maj`+`i` > `Console` in the browser
|
|
36
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
36
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Server (please complete the following information):**
|
||||||
|
- OS: [report here the result of `lsb_release -a`]
|
||||||
|
- Kernel: [report here the result of `uname -a`]
|
||||||
|
- Fab-manager version [report here the result of `\curl -sSL run.fab.mn | bash -s "fablab:maintenance:version"`]
|
||||||
|
|
||||||
|
**Browser (please complete the following information):**
|
||||||
|
- Name: [e.g. Firefox]
|
||||||
|
- Version: [e.g. 88.0.1, please refer to the About menu of your browser]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
10
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for Fab-manager
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Please visit [feedback.fab-manager.com](https://feedback.fab-manager.com/) and vote for existing feature requests or propose a new one.
|
10
.github/ISSUE_TEMPLATE/support.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/support.md
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Support
|
||||||
|
about: Call for help while using Fab-manager
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Please visit [the forum](https://forum.fab-manager.com/) to get assistance from the community. If you subscribed to paid assistance, please contact us by email for a faster reply.
|
@ -1,5 +1,12 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
|
## v4.7.11 2021 May 26
|
||||||
|
|
||||||
|
- Updated ffi to 1.15.1
|
||||||
|
- Updated GitHub issue templates
|
||||||
|
- Fix a bug: zero-decimal currencies were charged multiplied by 100
|
||||||
|
- Fix a bug: fablab:fix_invoices task fails to recreate the data if the date is in english
|
||||||
|
|
||||||
## v4.7.10 2021 May 25
|
## v4.7.10 2021 May 25
|
||||||
|
|
||||||
- CAD lists of types and extensions are now ordered alphabetically
|
- CAD lists of types and extensions are now ordered alphabetically
|
||||||
|
@ -140,7 +140,7 @@ GEM
|
|||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
faraday (0.17.3)
|
faraday (0.17.3)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
ffi (1.14.2)
|
ffi (1.15.1)
|
||||||
foreman (0.87.0)
|
foreman (0.87.0)
|
||||||
forgery (0.7.0)
|
forgery (0.7.0)
|
||||||
friendly_id (5.1.0)
|
friendly_id (5.1.0)
|
||||||
|
@ -26,7 +26,7 @@ class API::PaymentsController < API::ApiController
|
|||||||
intent = Stripe::PaymentIntent.create(
|
intent = Stripe::PaymentIntent.create(
|
||||||
{
|
{
|
||||||
payment_method: params[:payment_method_id],
|
payment_method: params[:payment_method_id],
|
||||||
amount: amount[:amount],
|
amount: StripeService.stripe_amount(amount[:amount]),
|
||||||
currency: Setting.get('stripe_currency'),
|
currency: Setting.get('stripe_currency'),
|
||||||
confirmation_method: 'manual',
|
confirmation_method: 'manual',
|
||||||
confirm: true,
|
confirm: true,
|
||||||
|
@ -50,7 +50,7 @@ class StripeService
|
|||||||
if coupon.type == 'percent_off'
|
if coupon.type == 'percent_off'
|
||||||
stp_coupon[:percent_off] = coupon.percent_off
|
stp_coupon[:percent_off] = coupon.percent_off
|
||||||
elsif coupon.type == 'amount_off'
|
elsif coupon.type == 'amount_off'
|
||||||
stp_coupon[:amount_off] = coupon.amount_off
|
stp_coupon[:amount_off] = stripe_amount(coupon.amount_off)
|
||||||
stp_coupon[:currency] = Setting.get('stripe_currency')
|
stp_coupon[:currency] = Setting.get('stripe_currency')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -61,6 +61,13 @@ class StripeService
|
|||||||
Stripe::Coupon.create(stp_coupon, api_key: Setting.get('stripe_secret_key'))
|
Stripe::Coupon.create(stp_coupon, api_key: Setting.get('stripe_secret_key'))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def stripe_amount(amount)
|
||||||
|
currency = Setting.get('stripe_currency')
|
||||||
|
return amount / 100 if zero_decimal_currencies.any? { |s| s.casecmp(currency).zero? }
|
||||||
|
|
||||||
|
amount
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def subscription_invoice_items(payment_schedule, subscription, first_item, reservable_stp_id)
|
def subscription_invoice_items(payment_schedule, subscription, first_item, reservable_stp_id)
|
||||||
@ -91,7 +98,7 @@ class StripeService
|
|||||||
|
|
||||||
def create_price(amount, stp_product_id, name, monthly: false)
|
def create_price(amount, stp_product_id, name, monthly: false)
|
||||||
params = {
|
params = {
|
||||||
unit_amount: amount,
|
unit_amount: stripe_amount(amount),
|
||||||
currency: Setting.get('stripe_currency'),
|
currency: Setting.get('stripe_currency'),
|
||||||
product: stp_product_id,
|
product: stp_product_id,
|
||||||
nickname: name
|
nickname: name
|
||||||
@ -107,5 +114,10 @@ class StripeService
|
|||||||
customer_id = payment_schedule.invoicing_profile.user.stp_customer_id
|
customer_id = payment_schedule.invoicing_profile.user.stp_customer_id
|
||||||
Stripe::Customer.update(customer_id, { balance: -payment_schedule.wallet_amount }, { api_key: Setting.get('stripe_secret_key') })
|
Stripe::Customer.update(customer_id, { balance: -payment_schedule.wallet_amount }, { api_key: Setting.get('stripe_secret_key') })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @see https://stripe.com/docs/currencies#zero-decimal
|
||||||
|
def zero_decimal_currencies
|
||||||
|
%w[BIF CLP DJF GNF JPY KMF KRW MGA PYG RWF UGX VND VUV XAF XOF XPF]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -98,8 +98,9 @@ namespace :fablab do
|
|||||||
description = ii.description
|
description = ii.description
|
||||||
# DateTime.parse only works with english dates, so translate the month name
|
# DateTime.parse only works with english dates, so translate the month name
|
||||||
month_idx = I18n.t('date.month_names').find_index { |month| month && description.include?(month) }
|
month_idx = I18n.t('date.month_names').find_index { |month| month && description.include?(month) }
|
||||||
description.gsub!(/#{I18n.t('date.month_names')[month_idx]}/, I18n.t('date.month_names', locale: :en)[month_idx])
|
unless month_idx.nil?
|
||||||
|
description.gsub!(/#{I18n.t('date.month_names')[month_idx]}/, I18n.t('date.month_names', locale: :en)[month_idx])
|
||||||
|
end
|
||||||
start = DateTime.parse(description)
|
start = DateTime.parse(description)
|
||||||
end_time = DateTime.parse(/- (.+)$/.match(description)[1])
|
end_time = DateTime.parse(/- (.+)$/.match(description)[1])
|
||||||
[start, DateTime.new(start.year, start.month, start.day, end_time.hour, end_time.min, end_time.sec, DateTime.current.zone)]
|
[start, DateTime.new(start.year, start.month, start.day, end_time.hour, end_time.min, end_time.sec, DateTime.current.zone)]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fab-manager",
|
"name": "fab-manager",
|
||||||
"version": "4.7.10",
|
"version": "4.7.11",
|
||||||
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
|
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"fablab",
|
"fablab",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user