tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/252-a-proper-way-to-add-an-uncomfirmed-transactionInfinite Kind: Discussion 2015-03-31T16:15:07Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/226570322012-12-17T23:56:02Z2012-12-17T23:56:02ZA proper way to add an 'unconfirmed' transaction<div><p>Hi Thomas,</p>
<p>To mark a transaction as unconfirmed you can call setIsNew(true)
on the transaction object. There are other transaction parameters
that you can specify if you'd like moneydance to perform
auto-matching based on the transaction description or memo
fields.</p>
<p>Thanks!<br>
Sean</p></div>Sean Reillytag:infinitekind.tenderapp.com,2009-01-14:Comment/226570322012-12-18T21:30:19Z2012-12-18T21:32:09ZA proper way to add an 'unconfirmed' transaction<div><p>Hi Sean,</p>
<p>brilliant, that (almost) works! Indeed, when I mark transaction
as setIsNew(true) it appears as it should - really cool! So I am
getting now the new transactions to appear in the lower pane of the
window and if selected - I get 'Current Transaction' in top right
part and 'Similar Payees' in lower right. Now two next
problems.</p>
<p>Q1. When I click on 'Confirm' next to 'current transaction -
nothing happens and in console following java trace appears [*1].
Anything I can do to fix this?</p>
<p>all what I do in my code:</p>
<pre>
<code> #if there is no match - just create a new transaction
if txn_found == 0:
txn = ParentTxn(_date1, _date1, _date1, str(_trxnr), acc1, _payee, str(_desc), long(_xfer), AbstractTxn.STATUS_UNRECONCILED )
txn.setTransferType(AbstractTxn.TRANSFER_TYPE_BANK)
txn.setIsNew(1)
# split
txnSplit = SplitTxn(txn, long(_xfer), long(_xfer), 1.0, acc2, str(_desc), -1, AbstractTxn.STATUS_UNRECONCILED )
txn.addSplit(txnSplit)
txnSet.addNewTxn(txn)
#</code>
</pre>
<p>Q2. If I confirm in 'Similar Payee' pane, it actually gets
confirmed but my new description gets overwritten - any way to
actually make MD preserve newly imported description only copying
Category and Payee?</p>
<p>*1) : Exception in thread "AWT-EventQueue-0"
java.lang.NullPointerException</p>
<pre>
<code>at com.moneydance.apps.md.view.gui.OnlineTxnMerger$TxnMatch.record(OnlineTxnMerger.java:827)
at com.moneydance.apps.md.view.gui.txnreg.OnlineTxnStatusPanel2.confirmSelection(OnlineTxnStatusPanel2.java:188)
at com.moneydance.apps.md.view.gui.txnreg.OnlineTxnStatusPanel2.access$400(OnlineTxnStatusPanel2.java:29)
at com.moneydance.apps.md.view.gui.txnreg.OnlineTxnStatusPanel2$VerticalTxn$1.actionPerformed(OnlineTxnStatusPanel2.java:731)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at com.moneydance.apps.md.view.gui.RoundedButtonUI$ButtonListener.mouseReleased(RoundedButtonUI.java:407)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)</code>
</pre></div>thomas.bikeevtag:infinitekind.tenderapp.com,2009-01-14:Comment/226570322013-04-21T17:10:52Z2013-04-21T17:10:52ZA proper way to add an 'unconfirmed' transaction<div><p>Coming to this conversation a couple of months late:</p>
<p>Sean, you mention that there are other transaction parameters
that may be set to make MD to try and auto-match. I can't find any
mention of that - or <em>txn.setIsNew(1)</em> for that matter - in
the documentation anywhere. Am I just missing it or is it
undocumented?</p>
<p>Thanks</p></div>kim.aldistag:infinitekind.tenderapp.com,2009-01-14:Comment/226570322013-05-14T18:10:44Z2013-08-28T17:42:21ZA proper way to add an 'unconfirmed' transaction<div><p>I'm not smart on all this, but can you set an existing
transaction to "new" in order to "unconfirm" it if you already
confirmed it, or does this only work when importing? I looked at
the existing transaction fields and didn't see that field.</p>
<p>My goal is unconfirming some transactions and then merging them.
Also would just like to unconfirm in general if I've confirmed by
accident.</p></div>caramall2-buytag:infinitekind.tenderapp.com,2009-01-14:Comment/226570322013-08-15T07:14:31Z2013-08-15T07:14:31ZA proper way to add an 'unconfirmed' transaction<div><p>Sean,</p>
<p>When trying to mark a parent transaction / split transaction as
unconfirmed by calling <code>setIsNew(true)</code> on the
transaction object, I'm getting a NullPointerException later in the
accounts view. Did I miss anything? I'm using Moneydance 2011r2
(803).</p>
<pre>
<code>invalid match type: ''
java.lang.NullPointerException
at com.moneydance.apps.md.view.gui.OnlineTxnMerger.findMatches(OnlineTxnMerger.java:124)
at com.moneydance.apps.md.view.gui.txnreg.OnlineTxnStatusPanel2.selectionUpdated(OnlineTxnStatusPanel2.java:401)
at com.moneydance.apps.md.view.gui.txnreg.OnlineTxnStatusPanel2.access$300(OnlineTxnStatusPanel2.java:29)
at com.moneydance.apps.md.view.gui.txnreg.OnlineTxnStatusPanel2$1.valueChanged(OnlineTxnStatusPanel2.java:93)
at com.moneydance.apps.md.view.gui.txnreg.TxnRegister.selectedTxnsUpdated(TxnRegister.java:742)
at com.moneydance.apps.md.view.gui.txnreg.TxnRegister.setSelectedTransaction(TxnRegister.java:865)
at com.moneydance.apps.md.view.gui.txnreg.TxnRegister.setSelectedTransaction(TxnRegister.java:836)
at com.moneydance.apps.md.view.gui.txnreg.TxnRegister.mouseClickedOnTxn(TxnRegister.java:845)
at com.moneydance.apps.md.view.gui.txnreg.TxnRegisterList$RegMouseListener.mousePressed(TxnRegisterList.java:605)
at java.awt.Component.processMouseEvent(Component.java:6411)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6179)
at java.awt.Container.processEvent(Container.java:2083)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2141)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4619)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4277)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4210)
at java.awt.Container.dispatchEventImpl(Container.java:2127)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)</code>
</pre></div>Florian J. Breunigtag:infinitekind.tenderapp.com,2009-01-14:Comment/226570322013-09-21T20:50:45Z2013-09-21T20:50:45ZA proper way to add an 'unconfirmed' transaction<div><p>Florian,</p>
<p>Sorry for our delayed response. Are you still having trouble
with marking a parent transaction / split transaction as
unconfirmed? Let me know and I'll check in with Sean about it if
you still need help.</p>
<p>Angie Rauscher<br>
Moneydance Support</p></div>Angie Rauschertag:infinitekind.tenderapp.com,2009-01-14:Comment/226570322013-09-26T16:29:42Z2013-09-26T16:29:42ZA proper way to add an 'unconfirmed' transaction<div><p>Sorry for the super-delayed response. The NPE is caused by the
transaction being marked as "new" but there not being any
"ol.orig_txn" tag on the transaction that contains the values of
the original downloaded transaction. You may be able to avoid it by
setting "{}" as the value for that tag, but I'd recommend using the
ol.orig_txn value from a properly merged transaction as an example.
The NPE is a bug in Moneydance that has been fixed for the next
version.</p>
<p>As for un-confirming a transaction, that can be done, but what
must be done depends upon whether or not the transaction was
merged, categorised, or accepted as-is, which could get messy. I'd
recommend not doing that, and rely-ing on 'undo' to un-confirm any
accidentally confirmed transactions.</p>
<p>Thanks,<br>
Sean</p></div>Sean Reilly