Deduct credit card change from cash payment account

I would like to set up an automation that changes the payment account from credit card to cash if a customer pays with credit card and ask to be charged more than the total amount.

My problem is that my payment report is out of balance every time a customer asks for his tip to be charged to his credit card. The excess amount is charged as change to the credit card payment type, making the credit card total in the payment report lower than the actual credit card payment received.

I thought I would make an action “change credit card payment account to cash payment account”
And the a rule that executed the action “payment type; equals; credit type” and “Remaining amount; greater; total order”

But I can’t find a way to do either, so if someone has a solution, I would be very happy.

Anders

Here is how to add Tips as a calculation:

For giving out cash out, I think this might help:

You setup something wrong. Follow that tutorial he linked above it should help.

i Have the same question or related question.

Over tender on Card should keep the recorded value of Card transaction as is (total value including the tip) and i have it setup like this currently. but tip is then paid out in cash on the same day, thus we need to to deduct from the cash takings for the day. can this be automated or would a function be build for the tip calculation ?