mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
Merge branch 'dev' for release 5.1.3
This commit is contained in:
commit
4aa388cbff
@ -1,10 +1,17 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
## v5.1.3 2021 July 2
|
||||
|
||||
- Fix a bug: missing hour format for norwegian
|
||||
- Fix a bug: missing invoice watermark for norwegian
|
||||
- Fix a bug: prepaid hours not used if bought slot is longer than remaining prepaid time
|
||||
- Fix a bug: cookies modal buttons are too small
|
||||
- Fix a bug: do not include fully used packs in user's packs
|
||||
|
||||
## v5.1.2 2021 July 2
|
||||
|
||||
- Fix a bug: invalid rails locale for Norwegian
|
||||
|
||||
|
||||
## v5.1.1 2021 July 1st
|
||||
|
||||
- Set up the linter for Typescript files
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
.cookies-actions {
|
||||
display: flex;
|
||||
height: 45px;
|
||||
|
||||
button {
|
||||
flex-basis: 50%;
|
||||
|
@ -86,7 +86,7 @@ class CartItem::Reservation < CartItem::BaseItem
|
||||
slot_rate
|
||||
end
|
||||
# subtract free minutes from prepaid packs
|
||||
if real_price.positive? && options[:prepaid][:minutes] >= slot_minutes
|
||||
if real_price.positive? && options[:prepaid][:minutes]&.positive?
|
||||
consumed = slot_minutes
|
||||
consumed = options[:prepaid][:minutes] if slot_minutes > options[:prepaid][:minutes]
|
||||
real_price = (slot_minutes - consumed) * (slot_rate / MINUTES_PER_HOUR)
|
||||
|
BIN
app/pdfs/data/watermark-no.png
Normal file
BIN
app/pdfs/data/watermark-no.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
@ -27,6 +27,7 @@ class PrepaidPackService
|
||||
.where('expires_at > ?', DateTime.current)
|
||||
.where('prepaid_packs.priceable_id = ?', priceable.id)
|
||||
.where('prepaid_packs.priceable_type = ?', priceable.class.name)
|
||||
.where('minutes_used < prepaid_packs.minutes')
|
||||
end
|
||||
|
||||
# subtract the number of used prepaid minutes from the user's count
|
||||
|
5
config/locales/base.no.yml
Normal file
5
config/locales/base.no.yml
Normal file
@ -0,0 +1,5 @@
|
||||
"no":
|
||||
time:
|
||||
formats:
|
||||
# See http://apidock.com/ruby/DateTime/strftime for a list of available directives
|
||||
hour_minute: "%H:%M"
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fab-manager",
|
||||
"version": "5.1.2",
|
||||
"version": "5.1.3",
|
||||
"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": [
|
||||
"fablab",
|
||||
|
@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'test_helper'
|
||||
|
||||
module Prices
|
||||
class AsAdminTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
|
Loading…
x
Reference in New Issue
Block a user