From 7f1335e6a2f7e8700f9f984bdd34774be6d7fc4d Mon Sep 17 00:00:00 2001 From: Mike Evans Date: Mon, 15 Mar 2021 11:03:38 +0000 Subject: [PATCH] Bug 798132 - Invoice Importing crashes when importing low quantity values. --- gnucash/import-export/bi-import/dialog-bi-import.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gnucash/import-export/bi-import/dialog-bi-import.c b/gnucash/import-export/bi-import/dialog-bi-import.c index d2e0ec03ce..03003e1534 100644 --- a/gnucash/import-export/bi-import/dialog-bi-import.c +++ b/gnucash/import-export/bi-import/dialog-bi-import.c @@ -24,7 +24,6 @@ * @file dialog-bi-import.c * @brief core import functions for invoice import plugin * @author Copyright (C) 2009 Sebastian Held - * @author Mike Evans * @author Rob Laan */ @@ -789,8 +788,6 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book, gncEntrySetAction (entry, action); value = gnc_numeric_zero(); gnc_exp_parser_parse (quantity, &value, NULL); - // Need to set the denom appropriately else we get stupid rounding errors. - value = gnc_numeric_convert (value, denom * 100, GNC_HOW_RND_NEVER); gncEntrySetQuantity (entry, value); acc = gnc_account_lookup_for_register (gnc_get_current_root_account (), account); @@ -800,7 +797,6 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book, gncEntrySetBillAccount (entry, acc); value = gnc_numeric_zero(); gnc_exp_parser_parse (price, &value, NULL); - value = gnc_numeric_convert (value, denom * 100, GNC_HOW_RND_NEVER); gncEntrySetBillPrice (entry, value); gncEntrySetBillTaxable (entry, text2bool (taxable)); gncEntrySetBillTaxIncluded (entry, text2bool (taxincluded)); @@ -813,14 +809,12 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book, gncEntrySetInvAccount (entry, acc); value = gnc_numeric_zero(); gnc_exp_parser_parse (price, &value, NULL); - value = gnc_numeric_convert (value, denom * 100, GNC_HOW_RND_NEVER); gncEntrySetInvPrice (entry, value); gncEntrySetInvTaxable (entry, text2bool (taxable)); gncEntrySetInvTaxIncluded (entry, text2bool (taxincluded)); gncEntrySetInvTaxTable (entry, gncTaxTableLookupByName (book, tax_table)); value = gnc_numeric_zero(); gnc_exp_parser_parse (discount, &value, NULL); - value = gnc_numeric_convert (value, denom * 100, GNC_HOW_RND_NEVER); gncEntrySetInvDiscount (entry, value); gncEntrySetInvDiscountType (entry, text2disc_type (disc_type)); gncEntrySetInvDiscountHow (entry, text2disc_how (disc_how));