Bug 459006 - Investment activity type 'Remove' is replaced by 'Add' in CSV import
Summary: Investment activity type 'Remove' is replaced by 'Add' in CSV import
Status: RESOLVED DUPLICATE of bug 406223
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.1.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-11 17:36 UTC by René
Modified: 2022-09-13 20:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description René 2022-09-11 17:36:00 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
Hi everybody,

I'm using KMyMoney (V 5.1.3) under Opensuse Tumbleweed (20220908 x86_64) with Gnome 42.2 (with Wayland). 
I created a CSV file for importing investments with different activity types (Buy, Sell, Dividend, Add and Remove).
Buy, Sell, Dividend, Add activity types work well and create the corresponding records in the KMM empty created investment account.

The rows containing Remove for removing securities after they have been created (with dates in the correct order) operate as Add activity type.

STEPS TO REPRODUCE
1. The CSV file:

Type de compte :Placement,,,,,,,,,,,
,,,,,,,,,,,
Date,Titre,Action/type,Montant,Quantité,Cours,Intérêts,Commissions,Compte,Note,État,Symbole
2022-10-10,AMUNDI CRDT Euro P,Buy,"-2812,26","18,2","154,69",,,TitreTest (Courtage),,,FR0010775429
2022-10-10,AMUNDI CRDT Euro P,Buy,"-2534,94","0,3","9749,77",,,TitreTest (Courtage),,,FR0010775429
2022-10-10,BNP Paribas,Buy,"-417,67","4,3","97,36",,,TitreTest (Courtage),,,FR0011362094
2022-10-10,SG MONE PLUS P - FR0011362094,Buy,"-299,67","4,5","66,89",,,TitreTest (Courtage),,,FR0000131104
2022-10-11,AMUNDI CRDT Euro P,ReinvDiv,"5,45","18,2","0,3","-5,45",,TitreTest (Courtage),,,FR0010775429
2022-10-11,BNP Paribas,Sell,"223,11","3,3",67,,,TitreTest (Courtage),,,FR0011362094
2022-10-12,BNP Paribas,DivX,10,0,0,-10,,TitreTest (Courtage),,,FR0011362094
2022-10-15,SG MONE PLUS P - FR0011362094,Shrsin,0,5,0,,,TitreTest (Courtage),,,FR0000131104
2022-10-16,SG MONE PLUS P - FR0011362094,Remove,0,2,0,,,TitreTest (Courtage),,,FR0000131104
2022-10-10,AMUNDI CRDT Euro P,Remove,0,3,0,,,TitreTest (Courtage),,,FR0010775429

2. The output of the import process:

Type de compte :Placement

Date,Titre,Action/type,Montant,Quantité,Cours,Intérêts,Commissions,Compte,Note,État
2022-10-10,"SG MONE PLUS P - FR0011362094",Buy,"-299,67","4,50","66,890000",,,"Titres_Pour_Tests (Courtage)",,
2022-10-10,"BNP Paribas",Buy,"-417,67","4,30","97,360000",,,"Titres_Pour_Tests (Courtage)",,
2022-10-10,"AMUNDI CRDT Euro P",Shrsin,,"3,00",,,,,,
2022-10-10,"AMUNDI CRDT Euro P",Buy,"-2534,94","0,30","9749,770000",,,"Titres_Pour_Tests (Courtage)",,
2022-10-10,"AMUNDI CRDT Euro P",Buy,"-2812,26","18,20","154,690000",,,"Titres_Pour_Tests (Courtage)",,
2022-10-11,"BNP Paribas",Sell,"223,11","3,30","67,000000",,,"Titres_Pour_Tests (Courtage)",,
2022-10-11,"AMUNDI CRDT Euro P",ReinvDiv,"5,45","18,20","0,300000","-5,45",,,,
2022-10-12,"BNP Paribas",DivX,"10,00",,,"-10,00",,"Titres_Pour_Tests (Courtage)",,
2022-10-15,"SG MONE PLUS P - FR0011362094",Shrsin,,"5,00",,,,,,
2022-10-16,"SG MONE PLUS P - FR0011362094",Shrsin,,"2,00",,,,,,
3. 

OBSERVED RESULT

The two rows of the CSV file indicating to remove the corresponding securities are the two last rows:

2022-10-16,SG MONE PLUS P - FR0011362094,Remove,0,2,0,,,TitreTest (Courtage),,,FR0000131104
2022-10-10,AMUNDI CRDT Euro P,Remove,0,3,0,,,TitreTest (Courtage),,,FR0010775429

The corresponding rows in the output are 

2022-10-10,"AMUNDI CRDT Euro P",Shrsin,,"3,00",,,,,,
2022-10-16,"SG MONE PLUS P - FR0011362094",Shrsin,,"2,00",,,,,,


EXPECTED RESULT

As one can note, the activity type in the output is  Shrsin, which corresponds to Add ans not to Remove .

Many thanks for your help

René


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version:  .......................................  Qt5

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2022-09-12 06:24:00 UTC
Thanks for the details. One important detail is missing though: does the KMyMoney ledger show the correct or the wrong information? Depending on the answer of this we can hunt the source of the problem to be either in the CSV importer or CSV exporter.
Comment 2 René 2022-09-12 07:37:49 UTC
Dear Thomas,

Thank you for your rapid reply.

The KMyMoney ledger shows the wrong information: "Add" ("Ajouter des
titres" in French) instead of "Remove". The issues seems to occur in
the importer CSV file.

Best regards.

René


Le lundi 12 septembre 2022 à 06:24 +0000, Thomas Baumgart a écrit :
> https://bugs.kde.org/show_bug.cgi?id=459006
> 
> Thomas Baumgart <tbaumgart@kde.org> changed:
> 
>            What    |Removed                     |Added
> ---------------------------------------------------------------------
> -------
>          Resolution|---                         |WAITINGFORINFO
>              Status|REPORTED                    |RESOLVED
> 
> --- Comment #1 from Thomas Baumgart <tbaumgart@kde.org> ---
> Thanks for the details. One important detail is missing though: does
> the
> KMyMoney ledger show the correct or the wrong information? Depending
> on the
> answer of this we can hunt the source of the problem to be either in
> the CSV
> importer or CSV exporter.
>
Comment 3 Jack 2022-09-13 20:12:22 UTC
I have reproduced this using only csv import, so the problem is there.  I'm closing this as a duplicate of an older report of the same issue,  and will add further info to that bug.

*** This bug has been marked as a duplicate of bug 406223 ***