<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>494159</bug_id>
          
          <creation_ts>2024-10-05 08:35:39 +0000</creation_ts>
          <short_desc>Wrong decimal separator in CSV import</short_desc>
          <delta_ts>2025-01-21 17:04:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>skrooge</product>
          <component>general</component>
          <version>2.33.0</version>
          <rep_platform>Debian testing</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>25.1.0</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>pat_h</reporter>
          <assigned_to>pat_h</assigned_to>
          <cc>stephane</cc>
          
          <cf_commitlink>https://invent.kde.org/office/skrooge/-/commit/459a500b74fd03b315ffef2d3d86e3192b888b60</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2362990</commentid>
    <comment_count>0</comment_count>
    <who name="">pat_h</who>
    <bug_when>2024-10-05 08:35:39 +0000</bug_when>
    <thetext>Hi,

with a German bank, the CSV export uses comma as a decimal separator and a point as a digit group separator (https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping). However, for integer values, the bank does not include the fractional part in the CSV output resulting in something like &quot;1.234&quot; for 1234 €. This, however, is imported by Skrooge as a fraction resulting in 1.23 € (i.e. a euro and 23 cent).

I see at least four possibilities how this can be solved
1. Argue with the bank to avoid using a point as a group separator as this is against the standards (https://en.wikipedia.org/wiki/Decimal_separator#Current_standards). I&apos;ll try that, but this is unlikely to change anything (we are talking about Germany here, where more than 25 years after introducing ISO 8601 via DIN EN 28601 kids still do not learn in school how to write a date correctly).
2. Use the decimal and group separators from the current locale when doing the CSV import in Skrooge.
3. Have an option to change the decimal and group separators when doing the CSV import in Skrooge.
4. Interpret the point as a group separator if there are three trailing digits.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2363214</commentid>
    <comment_count>1</comment_count>
    <who name="Stephane MANKOWSKI">stephane</who>
    <bug_when>2024-10-06 12:05:45 +0000</bug_when>
    <thetext>Hi,

Could you provide me a sample csv file anonymized ?
This is just to be sure I well take into account the right use case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2363245</commentid>
    <comment_count>2</comment_count>
      <attachid>174481</attachid>
    <who name="">pat_h</who>
    <bug_when>2024-10-06 16:15:16 +0000</bug_when>
    <thetext>Created attachment 174481
Example for group separator</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2363246</commentid>
    <comment_count>3</comment_count>
    <who name="">pat_h</who>
    <bug_when>2024-10-06 16:20:30 +0000</bug_when>
    <thetext>Thanks for taking a look. I prepared a file with some lines deleted where only examples of relevant amounts and their formatting are included.

I can&apos;t comment in #494197 as it is already closed, therefore I&apos;ll state it here: Thank you very much for implementing the &quot;checking&quot; functionality and in addition doing it in such a short time! I really appreciate that!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2365275</commentid>
    <comment_count>4</comment_count>
    <who name="Stephane MANKOWSKI">stephane</who>
    <bug_when>2024-10-12 16:04:48 +0000</bug_when>
    <thetext>Git commit 459a500b74fd03b315ffef2d3d86e3192b888b60 by Stephane MANKOWSKI.
Committed on 12/10/2024 at 16:04.
Pushed by smankowski into branch &apos;master&apos;.

Wrong decimal separator in CSV import

M  +1    -0    CHANGELOG
M  +19   -17   skgbasemodeler/skgservices.cpp
A  +6    -0    tests/input/skgtestimportcsv/494159.csv
M  +15   -15   tests/input/skgtestimportcsvunit/test2.csv
M  +28   -3    tests/skgbankmodelertest/skgtestimportcsv.cpp
M  +6    -0    tests/skgbasemodelertest/skgtestbase.cpp

https://invent.kde.org/office/skrooge/-/commit/459a500b74fd03b315ffef2d3d86e3192b888b60</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2391360</commentid>
    <comment_count>5</comment_count>
    <who name="Stephane MANKOWSKI">stephane</who>
    <bug_when>2025-01-21 17:04:11 +0000</bug_when>
    <thetext>For information, this fix is generating issues for some German users: https://bugs.kde.org/show_bug.cgi?id=498903</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>174481</attachid>
            <date>2024-10-06 16:15:16 +0000</date>
            <delta_ts>2024-10-06 16:15:16 +0000</delta_ts>
            <desc>Example for group separator</desc>
            <filename>export_group_separator.csv</filename>
            <type>text/csv</type>
            <size>919</size>
            <attacher>pat_h</attacher>
            
              <data encoding="base64">77u/Ikdpcm9rb250byIsIkRFWFhYWFhYWFhYWFhYWFhYWFhYWFgiCiIiCiJLb250b3N0YW5kIHZv
bSAxNy4wOS4yMDI0OiIsIlguWFhYLFhYwqDigqwiCiIiCiJCdWNodW5nc2RhdHVtIiwiV2VydHN0
ZWxsdW5nIiwiU3RhdHVzIiwiWmFobHVuZ3NwZmxpY2h0aWdlKnIiLCJaYWhsdW5nc2VtcGbDpG5n
ZXIqaW4iLCJWZXJ3ZW5kdW5nc3p3ZWNrIiwiVW1zYXR6dHlwIiwiSUJBTiIsIkJldHJhZyAo4oKs
KSIsIkdsw6R1YmlnZXItSUQiLCJNYW5kYXRzcmVmZXJlbnoiLCJLdW5kZW5yZWZlcmVueiIKIjEw
LjA5LjI0IiwiMTAuMDkuMjQiLCJHZWJ1Y2h0IiwiTXkgTmFtZSIsIk90aGVyIE5hbWUiLCJUZXh0
IiwiQXVzZ2FuZyIsIkRFWFhYWF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