[Pkg-kde-extras] Bug#668458: [kmymoney] Decimal symbol lost when importing from CSV

2012-04-11 Thread Nicolas Michaux
Package: kmymoney
Version: 4.6.2-1
Severity: important
Tags: patch

--- Please enter the report below this line. ---
When importing data from CSV file, it seems that kmymoney loose every decimal 
symbol (everything seems to be multiplied by 100). I tried with previous 
working CSV files and result is the same : no decimal symbol.

I spent some time in the code and I think I found a solution by comparing with 
current kmymoney git repository. Patch is attached to this bugreport.

Regards,
Nicolas

--- System information. ---
Architecture: amd64
Kernel:   Linux 3.2.0-2-amd64

Debian Release: wheezy/sid
  500 testing ftp.be.debian.org

--- Package information. ---
Depends   (Version) | Installed
===-+-===
kde-runtime | 4:4.7.4-2
kdepim-runtime  | 4:4.4.11.1-3
libalkimia4 | 4.3.2-1
libaqbanking33  (>= 4.99.2) | 5.0.22-1
libc6(>= 2.2.5) | 2.13-27
libgcc1(>= 1:4.1.1) | 1:4.7.0-1
libgmp10| 2:5.0.4+dfsg-1
libgpgme++2(>= 4:4.4.4) | 4:4.7.4-2
libgwengui-qt4-0| 4.3.1-1
libgwenhywfar60 (>= 3.11.6) | 4.3.1-1
libical0  (>= 0.30) | 0.44-3
libkabc4   (>= 4:4.4.4) | 4:4.7.4-2
libkcmutils4  (>= 4:4.4.95) | 4:4.7.4-4
libkdecore5 (>= 4:4.4.4-2~) | 4:4.7.4-4
libkdeui5  (>= 4:4.4.4) | 4:4.7.4-4
libkfile4  (>= 4:4.4.4) | 4:4.7.4-4
libkholidays4  (>= 4:4.5.0) | 4:4.7.4-2
libkhtml5  (>= 4:4.4.4) | 4:4.7.4-4
libkio5(>= 4:4.4.4) | 4:4.7.4-4
libofx4 | 1:0.9.4-2
libqt4-dbus(>= 4:4.5.3) | 4:4.7.4-2
libqt4-network (>= 4:4.5.3) | 4:4.7.4-2
libqt4-sql (>= 4:4.5.3) | 4:4.7.4-2
libqt4-svg (>= 4:4.5.3) | 4:4.7.4-2
libqt4-xml (>= 4:4.5.3) | 4:4.7.4-2
libqtcore4   (>= 4:4.7.0~beta1) | 4:4.7.4-2
libqtgui4  (>= 4:4.6.1) | 4:4.7.4-2
libstdc++6 (>= 4.6) | 4.7.0-1
kmymoney-common (= 4.6.2-1) | 4.6.2-1


Recommends(Version) | Installed
===-+-===
gpg-agent   | 
pinentry-qt4| 0.8.1-1


Package's Suggests field is empty.
--- kmymoney-4.6.2.orig/kmymoney/plugins/csvimport/csvprocessing.cpp
+++ kmymoney-4.6.2/kmymoney/plugins/csvimport/csvprocessing.cpp
@@ -466,8 +466,8 @@ void CsvProcessing::csvImportTransaction
 return ;
 }
   }
-  tr.m_amount = m_trData.amount;
-  tr.m_shares = m_trData.amount;
+  tr.m_amount = MyMoneyMoney(m_trData.amount);
+  tr.m_shares = MyMoneyMoney(m_trData.amount);
 
   tmp = m_trData.number;
   tr.m_strNumber = tmp;

___
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras

[Pkg-kde-extras] Bug#668458: [kmymoney] Decimal symbol lost when importing from CSV

2012-04-11 Thread Nicolas Michaux
I should have put some more info in my previous report.

I added a lot of debug in csvprocessing.cpp to track this bug. Everything is 
working fine until amount is converted in MyMoneyMoney class : 
- amount is correctly detected in csv file
- decimal symbol and thousand operator are correctly detected from KDE 
settings
- decimal symbol and thousand operator positions are correctly detected

But, when the amount is (implicitely) converted to MyMoneyMoney class and 
assigned to Transaction in csvImportTransaction function, something is going 
wrong.

Here is an example : 
If I import an amount of "-1039,03" EUR, I can see in debug logs that this 
number is correctly processed, but after assignment, the result is "-103903/1" 
in place of "-103903/100".

It seems to be a problem in implicit conversion of a string to a MyMoneyMoney 
class (compiler optimization?).
By forcing an instanciation of a MyMoneyMoney class, the conversion is 
correct. It seems that this bug has been corrected in Kmymoney git repository 
in csvdialog.cpp : 
http://quickgit.kde.org/index.php?p=kmymoney.git&a=commit&h=ff75edf07655f814de489e336d7f5c501a7540c0

I filled this bug as important as Kmymoney is unusable in wheezy/sid if you 
want to import some data from csv files.

Regards,
Nicolas




___
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras


[Pkg-kde-extras] Bug#668458: [kmymoney] Decimal symbol lost when importing from CSV

2012-05-09 Thread Simon Brandmair
Package: kmymoney
Version: 4.6.2-1+b1
Followup-For: Bug #668458

I can also reproduce this bug, when I use built-in cvs import
(File->Import->CVS). It does not make any difference which decimal
symbol I select.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.16-20120429-grsec (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages kmymoney depends on:
ii  kde-runtime   4:4.7.4-2
ii  kdepim-runtime4:4.4.11.1-3
ii  kmymoney-common   4.6.2-1
ii  libalkimia4   4.3.2-1
ii  libaqbanking335.0.22-1
ii  libc6 2.13-32
ii  libgcc1   1:4.7.0-7
ii  libgmp10  2:5.0.4+dfsg-1
ii  libgpgme++2   4:4.7.4-2+b1
ii  libgwengui-qt4-0  4.3.1-1
ii  libgwenhywfar60   4.3.1-1
ii  libical0  0.44-3
ii  libkabc4  4:4.7.4-2+b1
ii  libkcmutils4  4:4.7.4-4
ii  libkdecore5   4:4.7.4-4
ii  libkdeui5 4:4.7.4-4
ii  libkfile4 4:4.7.4-4
ii  libkholidays4 4:4.7.4-2+b1
ii  libkhtml5 4:4.7.4-4
ii  libkio5   4:4.7.4-4
ii  libofx4   1:0.9.4-2
ii  libqt4-dbus   4:4.7.4-3
ii  libqt4-network4:4.7.4-3
ii  libqt4-sql4:4.7.4-3
ii  libqt4-svg4:4.7.4-3
ii  libqt4-xml4:4.7.4-3
ii  libqtcore44:4.7.4-3
ii  libqtgui4 4:4.7.4-3
ii  libstdc++64.7.0-7

Versions of packages kmymoney recommends:
pn  gpg-agent 
pn  pinentry-qt4  

kmymoney suggests no packages.

-- debconf-show failed



___
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras