Closed alexmat closed 5 years ago
I have it that way so that importing the same file twice doesn't create two of every transaction. Also so that you could import multiple weeks of transactions without having to make sure you didn't go back to redo a week you've already done.
Yeah, I could add a flag to suppress this check.
It could also be a good approach to prompt the user for how to handle a duplicate. The beets music management tool (http://beets.io/) does this when I import an album that I already have a copy off. It gives me an option to skip the import of that album, replace the existing album with the new one or to abort the entire operation. I can also pass a flag to force a default action without confirmation.
Probably more than you need for your use case, but would be a nice step towards a more general solution. The very first issue I hit using limport was that I had two transactions for the same amount to the same payee on the same date... Murphy's law in action.. haha
Regarding the following code in limport command: if !existingTransaction(generalLedger, csvDate, inputPayeeWords[0])
Would it be possible to add a flag to the import tool to suppress this check? I often have legitimate duplicate transactions in my statements. A flag would work well perhaps?
I'd even recommend that the default is not to filter "duplicates" but to have it as an option behind a flag. Deterministic behavior by default seems preferable. But that's just my opinon since I ran into this and had to work my way through the code to understand what was happening.