diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-14 14:08:52 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-06 03:55:18 +0200 |
commit | e8959f4b89a05d00ac29b8e9f35aedc2bae8d524 (patch) | |
tree | 39eaa1de5d1697fd769f547ef960c1d54cb27a43 /kmymoney2/converter/mymoneystatementreader.cpp | |
parent | 8336e7809567ac0d4b209441330a6bdfaee1bf6a (diff) | |
download | kmymoney-e8959f4b89a05d00ac29b8e9f35aedc2bae8d524.tar.gz kmymoney-e8959f4b89a05d00ac29b8e9f35aedc2bae8d524.zip |
Update to upstream stable version 1.0.5
(cherry picked from commit 8654cea10f6902719006d5975db7dc07b2fcc713)
Diffstat (limited to 'kmymoney2/converter/mymoneystatementreader.cpp')
-rw-r--r-- | kmymoney2/converter/mymoneystatementreader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kmymoney2/converter/mymoneystatementreader.cpp b/kmymoney2/converter/mymoneystatementreader.cpp index 6756767..c08dcff 100644 --- a/kmymoney2/converter/mymoneystatementreader.cpp +++ b/kmymoney2/converter/mymoneystatementreader.cpp @@ -664,6 +664,10 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra if(!t_in.m_price.isZero()) { s1.setPrice(t_in.m_price); } else { + if(t_in.m_shares.isZero()) { + KMessageBox::information(0, i18n("This imported statement contains investment transactions with no share amount. These transactions will be ignored."), i18n("No share amount provided"), TQString("BlankAmount")); + return; + } s1.setPrice(((t_in.m_amount - t_in.m_fees) / t_in.m_shares).convert(MyMoneyMoney::precToDenom(KMyMoneyGlobalSettings::pricePrecision()))); } |