Ability to adjust exchange rate for BuyXFR or SellXFR
I'm using InvestFields to create a a transaction for a sell XFER - the XFER is to an account with a different currency. Is there a way to adjust the exchange rate? Basically, I need access to the splittxn that is created.
I've thought about creating a plain sell and then another separate parent/split transaction to effect the transfer. Is there a better (easier) way>
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Sean Reilly on 28 Jun, 2020 09:29 PM
Hi Bob,
I think using a SellXfr transaction is the way to go, by setting investfields.txnType to InvestTxnType.SELL_XFER.
To adjust the exchange rate for that transaction you'll need to get the split from the ParentTxn that you pass in the call to InvestFields.storeFields(ParentTxn). You should be able to get that split by calling TxnUtil.getXfrPart(ParentTxn). By default InvestFields should be setting the default exchange rate from the currency objects for inter-currency transactions. If the InvestFields is for an existing inter-currency transaction it should re-use the same exchange rate.
Thanks!
Sean
--
Sean Reilly
Developer, The Infinite Kind
https://infinitekind.com
2 Posted by Bob B on 30 Jun, 2020 07:19 PM
Thanks - that helps
System closed this discussion on 29 Sep, 2020 07:20 PM.