Hi I notice another issue when is updated account balance non admin (uid = 1).
In my case testing user is marinex :-) user create order to deposit 10$ and payment method is "bank transfer" admin must confirm manually this payment. resp. that order is paid. So when admin confirm that marinex order is paid it should update marinex balance but it updates admin balance.



1) There is missing marinex transaction, this is marinex balance:

missing transaction


2) Marinex order bank transfer is confirm by admin, this is admin view:

orders


3)All transaction on site, there is updated admin balance instead of marinex balance:

site transactions

Comments

marinex created an issue. See original summary.

marinex’s picture

Issue summary: View changes
marinex’s picture

I thinks that problem is in the function _commerce_funds_rules_update_account_balance() because:

global $user is admin when admin manually confirm payment for marinex order.
I suggest changing to a local variable: $user = user_load($order->uid);

marinex’s picture

Title: Issue update only site balance (account admin) » Update only site balance (account admin)

  • Aporie committed ba32053 on 7.x-3.x
    Issue #3036710 by marinex: Update only site balance (account admin)
    
aporie’s picture

I have updated the rules so it updates the account of the user which actually creates the order.

For the specific scenario where the deposit is paid with a second-time payment method (such as cash or bank transfer) I think you can play with rules to make something like that :

- Modify the actual rule for deposit putting a restriction on these payment methods.
- Create a new rule which triggers "Update user account balance" on order update (like, paid) when payment method = these payment methods.

aporie’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.