From kde-commits Sun Jan 02 10:56:21 2011 From: Stephane Mankowski Date: Sun, 02 Jan 2011 10:56:21 +0000 To: kde-commits Subject: extragear/office/skrooge Message-Id: <20110102105621.194FDAC8AE () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129396583610586 SVN commit 1210829 by smankowski: BUG: GNUCash import creates sometimes "wrong" splits with values close to 0 M +1 -0 CHANGELOG U skgbankmodeler/skgdocumentbank.cpp M +1 -1 skgbankmodeler/skgimportgnc.cpp --- trunk/extragear/office/skrooge/CHANGELOG #1210828:1210829 @@ -11,6 +11,7 @@ *Correction: All items are in "Skrooge" category in "Configure shortcuts" *Correction: No symbol for curves of indexes *Correction: "XX is an old tracker" advice does not give the right result when after 31 december + *Correction: GNUCash import creates sometimes "wrong" splits with values close to 0 *New feature: Import csv with ' as cote (for "Money Manager Ex" exports) *New feature: Import csv is now possible on file without header *New feature: Import csv supports more than one "category" column --- trunk/extragear/office/skrooge/skgbankmodeler/skgimportgnc.cpp #1210828:1210829 @@ -414,7 +414,7 @@ //Create sub operation on operationObj quantity -= SKGServices::stringToDouble(operationObj.getAttribute("f_QUANTITY")); - if(quantity != 0) { + if(fabs(quantity) > 10e-9) { if(err.isSucceeded()) err = operationObj.addSubOperation(suboperationObj); if(err.isSucceeded()) err = suboperationObj.setQuantity(quantity); if(err.isSucceeded() && !suboperationMemo.isNull()) err = suboperationObj.setComment(suboperationMemo.text());