mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-19 08:52:25 +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
|
- 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
|
- 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
|
## v6.3.0 2023 November 3
|
||||||
|
|
||||||
|
@ -160,7 +160,9 @@ class Invoice < PaymentDocument
|
|||||||
# return a summary of the payment means used
|
# return a summary of the payment means used
|
||||||
def payment_means
|
def payment_means
|
||||||
res = []
|
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?
|
if paid_by_card?
|
||||||
res.push(means: :card, amount: amount_paid)
|
res.push(means: :card, amount: amount_paid)
|
||||||
else
|
else
|
||||||
@ -195,7 +197,7 @@ class Invoice < PaymentDocument
|
|||||||
end
|
end
|
||||||
|
|
||||||
def paid_by_wallet?
|
def paid_by_wallet?
|
||||||
wallet_transaction && wallet_amount.positive?
|
(wallet_transaction && wallet_amount.positive?) || payment_method == 'wallet'
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_resource
|
def render_resource
|
||||||
|
Loading…
x
Reference in New Issue
Block a user