summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-01-14 14:08:52 -0600
committerTimothy Pearson <[email protected]>2012-01-14 14:08:52 -0600
commit8654cea10f6902719006d5975db7dc07b2fcc713 (patch)
tree6cf0608a089c234056746a467f739722687b645a /kmymoney2/converter
parent2a54aa58cfe166f48d6f1395cbc6c9bfd5e31bfc (diff)
downloadkmymoney-8654cea10f6902719006d5975db7dc07b2fcc713.tar.gz
kmymoney-8654cea10f6902719006d5975db7dc07b2fcc713.zip
Update to upstream stable version 1.0.5
Diffstat (limited to 'kmymoney2/converter')
-rw-r--r--kmymoney2/converter/mymoneystatementreader.cpp4
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())));
}