1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fix bug: cant generate avoir for wallet

This commit is contained in:
Du Peng 2021-08-05 18:56:12 +02:00
parent 51ec220a3e
commit d3bc26794c

View File

@ -62,15 +62,15 @@ class WalletService
avoir.invoicing_profile_id = wallet_transaction.wallet.user.invoicing_profile.id
avoir.statistic_profile_id = wallet_transaction.wallet.user.statistic_profile.id
avoir.total = wallet_transaction.amount * 100.0
avoir.save!
ii = InvoiceItem.new
ii.amount = wallet_transaction.amount * 100.0
ii.description = I18n.t('invoices.wallet_credit')
ii.object = wallet_transaction
ii.invoice = avoir
ii.main = true
ii.save!
avoir.invoice_items.push(ii)
avoir.save!
end
##