mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Merge branch 'dev' of git.sleede.com:projets/fab-manager into dev
This commit is contained in:
commit
f15af0292b
@ -4,6 +4,7 @@
|
||||
|
||||
- Fix a bug: statistic_sub_type.label of plan was nil
|
||||
- adds a migrations to fix all statistic_sub_types of plans having label = nil
|
||||
- Fix a bug: unable to show wallet payment mean for avoir
|
||||
|
||||
## v6.3.0 2023 November 3
|
||||
|
||||
|
@ -160,7 +160,9 @@ class Invoice < PaymentDocument
|
||||
# return a summary of the payment means used
|
||||
def payment_means
|
||||
res = []
|
||||
res.push(means: :wallet, amount: wallet_amount) if paid_by_wallet?
|
||||
res.push(means: :wallet, amount: wallet_amount || total) if paid_by_wallet?
|
||||
return res if is_a?(Avoir)
|
||||
|
||||
if paid_by_card?
|
||||
res.push(means: :card, amount: amount_paid)
|
||||
else
|
||||
@ -195,7 +197,7 @@ class Invoice < PaymentDocument
|
||||
end
|
||||
|
||||
def paid_by_wallet?
|
||||
wallet_transaction && wallet_amount.positive?
|
||||
(wallet_transaction && wallet_amount.positive?) || payment_method == 'wallet'
|
||||
end
|
||||
|
||||
def render_resource
|
||||
|
Loading…
x
Reference in New Issue
Block a user