tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/2861-ability-to-adjust-exchange-rate-for-buyxfr-or-sellxfrInfinite Kind: Discussion 2020-09-29T19:20:27Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/484307212020-06-28T21:29:36Z2020-06-28T21:29:36ZAbility to adjust exchange rate for BuyXFR or SellXFR<div><p>Hi Bob,</p>
<p>I think using a SellXfr transaction is the way to go, by setting investfields.txnType to InvestTxnType.SELL_XFER.</p>
<p>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.</p>
<p>Thanks!<br>
Sean</p>
<p>--<br>
Sean Reilly<br>
Developer, The Infinite Kind<br>
<a href="https://infinitekind.com">https://infinitekind.com</a></p></div>Sean Reillytag:infinitekind.tenderapp.com,2009-01-14:Comment/484307212020-06-30T19:19:52Z2020-06-30T19:19:52ZAbility to adjust exchange rate for BuyXFR or SellXFR<div><p>Thanks - that helps</p></div>Bob B