1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00

(bug) unable to get invoice payment details if the account code is same for card/transfer payment method

This commit is contained in:
Du Peng 2024-03-20 14:59:02 +01:00
parent 0b08510473
commit 6db25324d2
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@
- improvement: add loader for create/delete availability slot
- Fix a bug: unable to update a space with a deleted machine
- Fix a bug: unable to get invoice payment details if the account code is same for card/transfer payment method
## v6.3.16 2024 March 11

View File

@ -11,7 +11,7 @@ json.lines @lines do |line|
json.url download_open_api_v1_invoice_path(line.invoice)
json.payment_method line.invoice_payment_method
if @codes.values.include?(line.account_code) # if this is a 'payment' line
mean = @codes.select { |_key, value| value == line.account_code }
mean = @codes.select { |_key, value| value == line.account_code && _key == line.invoice_payment_method.to_sym }
json.payment_details line.invoice.payment_details(mean.keys[0])
end
end