1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

set correct invoicing_profile_id for refund invoice during wallet credit

This commit is contained in:
Sylvain 2020-04-01 17:58:32 +02:00
parent 3917d6042c
commit f24d94b979
2 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class WalletService
avoir.description = description
avoir.payment_method = 'wallet'
avoir.subscription_to_expire = false
avoir.invoicing_profile_id = wallet_transaction.invoicing_profile_id
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!

View File

@ -1,5 +1,7 @@
# frozen_string_literal: true
require 'test_helper'
class WalletsTest < ActionDispatch::IntegrationTest
# Called before every test method runs. Can be used
# to set up fixture information.