Access {EXCHANGE AMOUNT} in rule

Hi @emre
Remember as part of the multi-currency changes you made, you created {EXCHANGE AMOUNT}. This is a Print Template > Payment Values tag.

This value is the exact amount of a currency that was paid out.

Is there any way to access this value using a rule? Either using a rule check the exact amount paid when loading a settled/paid ticket, or to create a ticket tag with the amount paid at the moment the foreign payment is made. Storing this ticket tag would allow us to have access to it later.

Is this possible?

Would probably instead need Global Tag like {EXCHANGE AMOUNT:<currency>}

EDIT: actually, it looks like it is tied to the Account, so… {EXCHANGE AMOUNT:accountName}

Yeah, I figured, but similar to the problems the required the creation of the {EXCHANGE AMOUNT} tag, I need access to the amount of MXN on the day of the transaction, not converted at today’s exchange rate (which might be different).

For now, I am storing the exchange rate used as a ticket tag at the moment the ticket is closed, and then doing the maths later.

Have you tried the Payment Processed Rule to see if {EXCHANGE AMOUNT} is available? I think that would be the only Rule that might be able to capture that value. Worth a try?

If it works, you could Tag the Ticket in that Rule.

Yes, I tried that (tagging the ticket at the moment the payment is processed), but even at that point {EXCHANGE AMOUNT} is not available :frowning:

Yes, I just tried it too. No luck. Oh well.

Might be something that @emre can make available to that Rule, especially since the Payment Type Name is available, which is linked to the Tx Type, which is linked to the Account.

Otherwise, there are some ways to kludge it together… just probably a PITA.

Yep - And I worry I will end up with a rounding error or something…

Oh well…