Change from MiscExp to BUY for investment transactions
Hello folks
I have an investment account that downloaded a bunch of BUYs as MiscExps and it is messing up the account balances and security performance etc.
I tried to change it via a python script this way:
if (ttype == "MISCEXP"):
txn.setEditingMode()
fields.memo = "Changed from MISCEXP to BUY" + fields.memo
fields.setFieldStatus(InvestTxnType.BUY, txn)
fields.shares = fields.shares+0
fields.amount = fields.amount+0
fields.price = (fields.amount*1000)/(fields.shares)
print fields.toString()
fields.storeFields(txn)
if txn.syncItem(): print("Synced txn")
else: print("Not synced txn")
break
Try as I might, I cannot get the fields.memo type sets to take effect. Occassionally I get the number of shares right (by playing around with the order of sets). Is there a good way to convert the "MiscExp" to "Buy"s .. the UI does it right. But there are too many transactions to do so
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