accept transaction cleared flag

Thomas Baumgart thb at net-bembel.de
Sat Aug 8 11:08:38 BST 2020


On Dienstag, 4. August 2020 20:21:55 CEST Scott Lair wrote:

> On Sat, 01 Aug 2020 10:24:56 +0200
> Thomas Baumgart <thb at net-bembel.de> wrote:
> 
> > On Mittwoch, 29. Juli 2020 19:07:58 CEST Jack wrote:
> > 
> > > On 2020.07.29 10:33, Thomas Baumgart wrote:  
> > > > On Mittwoch, 29. Juli 2020 03:23:43 CEST Scott Lair wrote:
> > > >   
> > > > > I'm using 5.1.0 on debian linux.  I'd like to change the
> > > > > behavior    
> > > > of accepting imported transactions. Right now, the transaction
> > > > is marked cleared. I would prefer the reconcile flag to remain
> > > > empty. I was able to do this by changing the source code in
> > > > version 4.8.0. The change was made around line 5830 in the
> > > > kmymoney.cpp file. Simply commenting out one line did the trick.
> > > > Oooh, that is a real hammer and makes the whole reconciliation
> > > > stop working ;)
> > > >   
> > > > > Can someone guide me as to where this can be changed in 5.1.0?
> > > > > I    
> > > > can't seem to figure out how it's implemented this time around.
> > > > Check the following patch which should do what you want w/o
> > > > breaking the feature in general:
> > > > 
> > > > diff --git kmymoney/converter/mymoneystatementreader.cpp    
> > > > kmymoney/converter/mymoneystatementr>  
> > > > index 5de39e146..b710720e3 100644
> > > > --- kmymoney/converter/mymoneystatementreader.cpp
> > > > +++ kmymoney/converter/mymoneystatementreader.cpp
> > > > @@ -1130,7 +1130,7 @@ void  
> > > > MyMoneyStatementReader::processTransactionEntry(const
> > > > MyMoneyState> if
> > > > MyMoneyState> (statementTransactionUnderImport.m_listSplits.isEmpty()
> > > > MyMoneyState> &&    
> > > > !payeeObj.defaultAccount>  
> > > >          MyMoneyAccount splitAccount =  
> > > > file->account(payeeObj.defaultAccountId());
> > > >          MyMoneySplit s;
> > > > -        s.setReconcileFlag(eMyMoney::Split::State::Cleared);
> > > > +        // s.setReconcileFlag(eMyMoney::Split::State::Cleared);
> > > >          s.clearId();
> > > >          s.setBankID(QString());
> > > >          s.setShares(-s1.shares());
> > > > 
> > > > It removes the flag setting only during import.  
> 
> Is this the only method that is used to set the Cleared flag?
> 
> setReconcileFlag(eMyMoney::Split::State::Cleared)
> 
> or are there others?
> 
> Still can't track down how the Cleared flag gets set after clicking the
> accept button.

This is more a developer than a user question. So please use the developer list
at kmymoney-developer at kde.org if we need to go into more details. For now, I used

  git grep -n "State::Cleared" | grep set | grep -v /tests/

to get a list of possible 'set' usages in all of the code. This is

kmymoney/converter/mymoneystatementreader.cpp:1133:        s.setReconcileFlag(eMyMoney::Split::State::Cleared);
kmymoney/dialogs/transactionmatcher.cpp:128:    sm.setReconcileFlag(eMyMoney::Split::State::Cleared);
kmymoney/plugins/gnc/import/mymoneygncreader.cpp:1726:      split.setReconcileFlag(eMyMoney::Split::State::Cleared);
kmymoney/views/kgloballedgerview.cpp:1622:                s.setReconcileFlag(eMyMoney::Split::State::Cleared);
kmymoney/views/kgloballedgerview_p.h:1359:                  sp.setReconcileFlag(eMyMoney::Split::State::Cleared);
kmymoney/views/kgloballedgerview_p.h:1374:                  sp.setReconcileFlag(eMyMoney::Split::State::Cleared);
kmymoney/wizards/endingbalancedlg/kendingbalancedlg.cpp:382:    s1.setReconcileFlag(eMyMoney::Split::State::Cleared);

and I am pretty sure that

kmymoney/views/kgloballedgerview.cpp:1622:                s.setReconcileFlag(eMyMoney::Split::State::Cleared);

is the one you are looking for.

-- 

Regards

Thomas Baumgart

https://www.signal.org/       Signal, the better WhatsApp
-------------------------------------------------------------
The gates in my computer are AND,OR and NOT, not Bill
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 868 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20200808/34790e7f/attachment.sig>


More information about the KMyMoney mailing list