Re: [Kmymoney-devel] Feature request: improved / additional currency conversion
Thanks, Thomas. After thinking a bit more and reading kmymoneycalculator.cpp I agree that the calculator widget is more appropriate than a plugin. So, I will give it a try; but need your help already to compile kmymoney. I cloned the subversion repo of kmymoney. As this is the first KDE app that I try to compile, I needed to download a bunch of libs (desktop:~/Temp/kmymoney/build$ sudo apt-get build-dep kmymoney). Unluckily, cmake (desktop:~/Temp/kmymoney/build$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/) still reports errors: "Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARIES)" Any idea how to resolve? Best Al_ Hi, on Tuesday 18 October 2011 19:59:28 softw...@quantentunnel.de wrote: > ... > One feature in MS Money was handy that I miss in KMyMoney: entering amounts > in a foreign currency. Typical example are credit card purchases during > vacation: the customer copy lists, e.g., USD but the credit card company > will be me in Euro. In MS Money I could enter the amount in USD, then > press F8 which pops up a dialog where I can choose the destination > currency (Euro). This dialog looks otherwise similar to the currency > conversion dialog that KMyMoney presents when transferring money between > accounts with different currencies. And yes, I realize that this will only > give approximate amounts as the credit card company most often applies a > slightly different exchange rate. Nevertheless, it becomes obvious during > reconciliation whether the amount can be correct or is fraudulent. > > Instead of F8, I suggest to include a button "Convert to ..." in the pop-up > calculator, in addition to basic math (+ - / * %). > ... > PS: I am an amateur C++ / Qt4 programmer. Do you believe I could contribute > to a "Convert to ..." plugin? Certainly, you can give it a try. We can direct you to the right spot. I am not sure, if a plugin would be the right solution, but I haven't thought about it either. The calculator is organized as an object and can easily be modified. It is automatically available for all amount widgets throughout the application. p.s. Please send furhter mails to kmymoney-devel@kde.org as this is the new developer list. -- Regards Thomas Baumgart -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone ___ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel
[Kmymoney-devel] build-dep kmymoney (was: Feature request: improved / additional currency conversion)
Hi Jack Thanks; worked nicely. Shouldn't this package be included with 'apt-get build-dep kmymoney'; for the benefit of other newcomers? Best Al_ PS: I was out of town for the week, thus my late thank. Original-Nachricht > Datum: Sat, 22 Oct 2011 09:38:58 -0700 (PDT) > Von: Jack > An: softw...@quantentunnel.de, kmymoney-devel@kde.org > Betreff: Re: [Kmymoney-devel] Feature request: improved / additional currency > conversion > Hello Al, > > GMP is a library for arbitrary precision math, from http://gmplib.org/. > Depending on your distro, you should find a gmp-dev package, or something > like > it. (By the way, subversion uses checkout, git uses clone.) > > > Jack > > > > > > From: "softw...@quantentunnel.de" > To: kmymoney-devel@kde.org > Sent: Sat, October 22, 2011 12:14:30 PM > Subject: Re: [Kmymoney-devel] Feature request: improved / additional > currency > conversion > > Thanks, Thomas. After thinking a bit more and reading > kmymoneycalculator.cpp I > agree that the calculator widget is more appropriate than a plugin. So, I > will > give it a try; but need your help already to compile kmymoney. > > I cloned the subversion repo of kmymoney. As this is the first KDE app > that I > try to compile, I needed to download a bunch of libs > (desktop:~/Temp/kmymoney/build$ sudo apt-get build-dep kmymoney). > Unluckily, > cmake (desktop:~/Temp/kmymoney/build$ cmake .. > -DCMAKE_INSTALL_PREFIX=/usr/) > still reports errors: "Could NOT find GMP (missing: GMP_INCLUDE_DIR > GMP_LIBRARIES)" > > > Any idea how to resolve? > > Best > > Al_ > > > Hi, > > on Tuesday 18 October 2011 19:59:28 softw...@quantentunnel.de wrote: > > > ... > > One feature in MS Money was handy that I miss in KMyMoney: entering > amounts > > in a foreign currency. Typical example are credit card purchases during > > vacation: the customer copy lists, e.g., USD but the credit card company > > will be me in Euro. In MS Money I could enter the amount in USD, then > > press F8 which pops up a dialog where I can choose the destination > > currency (Euro). This dialog looks otherwise similar to the currency > > conversion dialog that KMyMoney presents when transferring money between > > accounts with different currencies. And yes, I realize that this will > only > > give approximate amounts as the credit card company most often applies a > > slightly different exchange rate. Nevertheless, it becomes obvious > during > > reconciliation whether the amount can be correct or is fraudulent. > > > > Instead of F8, I suggest to include a button "Convert to ..." in the > pop-up > > calculator, in addition to basic math (+ - / * %). > > ... > > PS: I am an amateur C++ / Qt4 programmer. Do you believe I could > contribute > > to a "Convert to ..." plugin? > > Certainly, you can give it a try. We can direct you to the right spot. I > am > not sure, if a plugin would be the right solution, but I haven't thought > about > it either. > > The calculator is organized as an object and can easily be modified. It is > automatically available for all amount widgets throughout the application. > > p.s. Please send furhter mails to kmymoney-devel@kde.org as this is the > new > developer list. > > -- > > Regards > > Thomas Baumgart > -- > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! > Jetzt informieren: http://www.gmx.net/de/go/freephone > ___ > KMyMoney-devel mailing list > KMyMoney-devel@kde.org > https://mail.kde.org/mailman/listinfo/kmymoney-devel -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone ___ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel
[Kmymoney-devel] MyMoneyFile::price(...) const
Hi To provide a first small piece of code (to add currency conversion to kMyMoneyCalculator) I started to look at the relevant source code, downlodade about a week ago. I do not understand the function below from mymoneyfile.cpp MyMoneyFile::price(const QString& fromId, const QString& toId, const QDate& date, const bool exactDate) const { ... // search 'from-to' rate MyMoneyPrice rc = d->m_storage->price(fromId, to, date, exactDate); if (!rc.isValid()) { // not found, search 'to-fron' rate and use reciprocal value rc = d->m_storage->price(to, fromId, date, exactDate); } return rc; } The comment correctly states that the reciprocal value needs to be taken, if to-from instead of from-to is returned. But there is no "1/". What am I missing? Thanks Al_ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone ___ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel
[Kmymoney-devel] to retrieve exchange rates for foreign currencies pairs
Hi MyMoneyFile::price(...) retrieves the price of securities, and also the exchange rate of currencies. The latter is restricted to known currency pairs (likely foreign currency versus base currency). E.g., even if EUR:USD is known and EUR:CHF is also known, the exchange rate USD:CHF is not returned. I implemented a function with the requirement that both 'base exchange rates' (EUR:USD and EUR:CHF in above example) must be for the same date. It is a crude implementation and succeeds only if the date of the newest first 'base exchange rate' is a valid exact date for the second 'base exchange rate' (else no exchange rate is returned, even if both 'base exchange rates' would be available for let's say one day earlier). Has anybody a better implementation of such function? Else, is there a wider interest in such function? MyMoneyMoney MyClass::rate(const MyMoneySecurity &from, const MyMoneySecurity &to, const QDate& date, bool exactDate) const { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyPrice price = file->price(from.id(), to.id(), date, exactDate); if (price.isValid()) return price.rate(to.id());// direct hit from:to or to:from (else needs detour via base currency) price = file->price(file->baseCurrency().id(), from.id(), date, exactDate); if (!price.isValid()) return MyMoneyMoney(0, 100); MyMoneyPrice price2 = file->price(file->baseCurrency().id(), to.id(), price.date(), true); if (!price2.isValid()) return MyMoneyMoney(0, 100); return price.rate(file->baseCurrency().id()) * price2.rate(to.id());} Best Al_ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone ___ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel
[Kmymoney-devel] validation of IBAN?
Hi I recently added a new account to KMyMoney and would have liked to validate the IBAN for typos and the like. As this is currently not possible in KMyMoney, I wrote a class IbanValidator : public QRegExpValidator that first checks a string whether it satisfies the basic, country-dependent criteria (length, numeric versus character symbols), then calculates the checksum. Questions to the development team: 1. Is such feature worthwhile in KMyMoney? 2. If so, would you like to have it as separate "Validate!" button (my preference, as this makes validation voluntary; some may enter non-IBAN numbers such as US account numbers in the IBAN field) or enforced with a validator to the respective line edit? 3. Where should the templates for the country-specific definitions be stored: separate text file read at runtime (benefit: anybody can add if his/her preferred country adopts IBAN), in the source code (benefit: no setup issue; this is current implementation); or where else? Those interested may have a look at an implementation, including a little GUI test application of both options (see question 2, above): source is on git://github.com/Al-/IbanValidator.git Best Al_ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone ___ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel
[Kmymoney-devel] KMyMoney looses data; and error when using sqlite3 database
Hi I use "KMyMoney Version 4.6.1, KDE 4.8.5" (copied from KMyMoney's About dialog), Ubuntu 12.04.2 LTS (precise) with gnome, Linux kernel 3.2.0-48-generic-pae. My KMyMoney data file is fairly big (213.7 kB) and contains 2993 transactions ("Buchungen") and 6361 split transactions ("Split-Buchungen"). I encounter a problem, now several times over the last months: some data, typically some of the last entered (or reconciled) records get lost. They were clearly there when I reconciled (as I mark each reconciled line on the hardcopy received from the bank). And when I look next time, e.g., three reconciled entries are missing. It is not that I did not save the file (otherwise the records would still be there but unreconciled). This data loss seems to occur randomly; I see no possibility to trigger it at will. Is there a way to create a log file to see what happens? In the hope to better figure out what happens, I tried to save the file as sqlite3 database. Saving works fine; when I then close and re-open kmymoney, I get an error that I am asked to report to the developers ("Unbehandelter Fehler: Bitte melden Sie die Details an die Entwickler"). The details (with user name disguised): Error in function const QMap MyMoneyStorageSql::fetchSchedules(const QStringList&, bool) const : reading Schedules Driver = QSQLITE, Host = localhost, User = XXX, Database = /home/XXX/XXX/Finanzen/KMyMoney_setup/Buchhaltung5_DB.db Driver Error: Database Error No -1: Text: Error type 0 Executed: SELECT id, name, type, typeString, occurence, occurenceMultiplier, occurenceString, paymentType, paymentTypeString, startDate, endDate, fixed, autoEnter, lastPayment, nextPaymentDue, weekendOption, weekendOptionString FROM kmmSchedules ORDER BY id;; Query error No -1: Keine Abfrage Zeile kann nicht abgeholt werden Error type 1 in Datei /build/buildd/kmymoney-4.6.1/kmymoney/mymoney/storage/mymoneystoragesql.cpp, Zeile 3362 Any suggestions? Best Al_ ___ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel
Re: [Kmymoney-devel] KMyMoney looses data; and error when using sqlite3 database
Hi Allan, all Thanks for looking into options. I have daily backups, and next time this happens (every few weeks) I will keep a copy of the newly opened version with the lost entries, too (i.e., not immediately re-add them). Then I can manually compare the last two backups and the new version with lost entries, as I have now realized that these are human-readable xlm files. 'The last two' as I do not know whether the error happens when saving or when opening the file. Input file: I assume you refer to an electronic file received from my bank. I have none; I get paper copies from the bank and reconcile manually. Best Al_ Gesendet: Donnerstag, 04. Juli 2013 um 12:01 Uhr An: softw...@quantentunnel.de On Mon, 1 Jul 2013 21:50:22 +0200 (CEST) softw...@quantentunnel.de wrote: > Hi > > I use "KMyMoney Version 4.6.1, KDE 4.8.5" (copied from KMyMoney's > About dialog), Ubuntu 12.04.2 LTS (precise) with gnome, Linux kernel > 3.2.0-48-generic-pae. My KMyMoney data file is fairly big (213.7 kB) > and contains 2993 transactions ("Buchungen") and 6361 split > transactions ("Split-Buchungen"). > > I encounter a problem, now several times over the last months: some > data, typically some of the last entered (or reconciled) records get > lost. They were clearly there when I reconciled (as I mark each > reconciled line on the hardcopy received from the bank). And when I > look next time, e.g., three reconciled entries are missing. It is not > that I did not save the file (otherwise the records would still be > there but unreconciled). This data loss seems to occur randomly; I > see no possibility to trigger it at will. Is there a way to create a > log file to see what happens? > Looking at the size of your data, you're obviously pretty experienced, so I hope you'll excuse me for asking possibly silly questions. You say that - "They were clearly there when I reconciled (as I mark each > reconciled line on the hardcopy received from the bank). And when I > look next time, e.g., three reconciled entries are missing. It is not > that I did not save the file (otherwise the records would still be > there but unreconciled)" What if you marked your hardcopy in error? What if those transactions weren't actually there because you omitted to save them initially? Do you have an earlier version of your file which shows them as having been entered? It seems a bit strange that apparently it's only recent transactions that are involved. Do you/can you keep any input file - I don't know where your data comes from - whether/how imported. Might it be an idea to keep a few backup copies to confirm that the transactions were definitely there at some stage? Allan ___ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel