Hello,

When triggering a transaction with Rules, it is needed to enter the amount of fees and the net amount in the rules parameters. There is no possibility to save the rule without providing these values.
The fees parameters are then overriding the ones defined in the module settings. It would be really great if these parameters would not be requested in the Rules setup, and if Rules would use directly the ones defined in the module settings. Especially in my case, I have a complex fees calculation which is a percentage of the transaction amount, with a minimum fixed fee (so not easy to calculate on the fly, but native in the module).
Also, the net amount should be calculated automatically by doing brut amount + fees, and not be entered manually.
As a summary, the user should indicate the brut amount, and then Rules should calculate automatically the fees using the module settings and then the net amount by adding the calculated fees to the brut amount. This is exactly what is done when the transaction is done manually.

Thanks again for this very great module, very good job done so far. :-)

CommentFileSizeAuthor
#2 3065630_rules_apply_fees.patch1.8 KBaporie

Comments

Arno2Mars created an issue. See original summary.

aporie’s picture

Status: Active » Needs review
StatusFileSize
new1.8 KB

Hey,

You'll find a patch which:

  • Applies the fee configuration (set in admin/commerce/funds/configure/fees) if you let the fee value empty in your rule.
  • Applies a fixed fee of the rule amount set otherwise.

You also need to leave the field "Net amount" empty.

arno2mars’s picture

Hey Aporie,

That's awesome!
Just tested the patch, it works perfectly.
This really brings now my use of CF to the next level!

Just for info, do you intend to include this patch in the next released version of the module, or will you keep it apart, due to Rules lack of stability?

Cheers mate,

  • Aporie committed 39dd769 on 8.x-1.x
    Issue #3065630 by Aporie, Arno2Mars: Commerce funds integration with...
aporie’s picture

Assigned: Unassigned » aporie
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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