From c23c6b9ee7c0de10ef88a275eeb17175cbce4e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoit=20Gr=C3=A9goire?= Date: Mon, 6 Jan 2003 06:20:45 +0000 Subject: [PATCH] =?UTF-8?q?2002-1-6=20=20Benoit=20Gr=EF=BF=BDgoire=20=20=20=09*=20src/import-export/import-backend.?= =?UTF-8?q?c:=20Give=20a=20much=20higher=20importance=20=09the=20date=20he?= =?UTF-8?q?uristics.=20=20=20Exact=20date=20now=20worth=20+3,=20date=20wit?= =?UTF-8?q?hin=20=09MATCH=5FDATE=5FTHRESHOLD=20worth=20+2,=20and=20dates?= =?UTF-8?q?=20outside=20=09MATCH=5FDATE=5FNOT=5FTHRESHOLD=20(now=20set=20t?= =?UTF-8?q?o=2025)=20are=20worth=20-100.=20=09The=20side=20effect=20it=20t?= =?UTF-8?q?hat=20any=20transaction=20outside=20a=2025=20day=20=09range=20c?= =?UTF-8?q?an't=20be=20matched=20at=20all.=20=09-Disable=20skipping=20tran?= =?UTF-8?q?sactions=20which=20already=20have=20an=20online=20id=20=09durin?= =?UTF-8?q?g=20matching,=20untill=20a=20fix=20for=20the=20"transfer=20betw?= =?UTF-8?q?een=20two=20=09accounts"=20bug=20is=20properly=20fixed.=20=09*?= =?UTF-8?q?=20src/import-export/generic-import.scm:=20=09*=20src/import-ex?= =?UTF-8?q?port/import-settings.c:=20=09-Disable=20EDIT=20action=20enablin?= =?UTF-8?q?g,=20(it=20won't=20be=20complete=20for=201.8.0).=20=09-Fix=20ty?= =?UTF-8?q?pos=20reported=20by=20Bill=20Wohler.=20=09-Adjust=20default=20A?= =?UTF-8?q?DD=20and=20RECONCILE=20threshold=20to=20account=20for=20above?= =?UTF-8?q?=20=09change.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7787 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 17 +++++++++++++++++ src/import-export/generic-import.scm | 22 ++++++++++++---------- src/import-export/import-backend.c | 16 ++++++++-------- src/import-export/import-settings.c | 4 ++-- 4 files changed, 39 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb81585881..9b3547a6e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2002-1-6 Benoit Grégoire + * src/import-export/import-backend.c: Give a much higher importance + the date heuristics. Exact date now worth +3, date within + MATCH_DATE_THRESHOLD worth +2, and dates outside + MATCH_DATE_NOT_THRESHOLD (now set to 25) are worth -100. + The side effect it that any transaction outside a 25 day + range can't be matched at all. + -Disable skipping transactions which already have an online id + during matching, untill a fix for the "transfer between two + accounts" bug is properly fixed. + * src/import-export/generic-import.scm: + * src/import-export/import-settings.c: + -Disable EDIT action enabling, (it won't be complete for 1.8.0). + -Fix typos reported by Bill Wohler. + -Adjust default ADD and RECONCILE threshold to account for above + change. + 2003-01-05 David Hampton * src/app-utils/gnc-component-manager.c: New functions for diff --git a/src/import-export/generic-import.scm b/src/import-export/generic-import.scm index 30f8d1232a..61497c1e0c 100644 --- a/src/import-export/generic-import.scm +++ b/src/import-export/generic-import.scm @@ -12,11 +12,13 @@ ; "b" (N_ "Enable the SKIP action in the transaction matcher. If enabled, a transaction whose best match's score is in the yellow zone (above the Auto-ADD threshold but below the Auto-CLEAR threshold) will be SKIPed by default.") ; #t)) -(gnc:register-configuration-option - (gnc:make-simple-boolean-option - (N_ "Transaction Matcher") (N_ "Enable EDIT match action") - "b" (N_ "Enable the EDIT action in the transaction matcher. NOT YET SUPPORTED") - #f)) +; Disable for 1.8 release until implemented + +;(gnc:register-configuration-option +; (gnc:make-simple-boolean-option +; (N_ "Transaction Matcher") (N_ "Enable EDIT match action") +; "b" (N_ "Enable the EDIT action in the transaction matcher. NOT YET SUPPORTED") +; #f)) (gnc:register-configuration-option (gnc:make-number-range-option @@ -32,8 +34,8 @@ (gnc:register-configuration-option (gnc:make-number-range-option (N_ "Transaction Matcher") (N_ "Auto-ADD threshold") - "g" (N_ "A transaction whose best match's score is in the red zone (above the display treshold but below or equal to the Auto-ADD treshold) will be ADDed by default.") - 2.0 ;; default + "g" (N_ "A transaction whose best match's score is in the red zone (above the display threshold but below or equal to the Auto-ADD threshold) will be ADDed by default.") + 3.0 ;; default 1.0 ;; lower bound 6.0 ;; upper bound 0.0 ;; number of decimals @@ -44,9 +46,9 @@ (gnc:make-number-range-option (N_ "Transaction Matcher") (N_ "Auto-CLEAR threshold") "g" (N_ "A transaction whose best match's score is in the green zone (above or equal to the Auto-CLEAR threshold) will be CLEARed by default.") - 5.0 ;; default + 6.0 ;; default 1.0 ;; lower bound - 6.0 ;; upper bound + 10.0 ;; upper bound 0.0 ;; number of decimals 1.0 ;; step size )) @@ -54,7 +56,7 @@ (gnc:register-configuration-option (gnc:make-number-range-option (N_ "Transaction Matcher") (N_ "Commercial ATM fees threshold") - "g" (N_ "In some places commercial ATMs (not belonging to a financial institution) are installed in places like convienience store. These ATM add it's fee directly to the amount instead of showing up as a separate transaction or in your monthly banking fees. For example, you withdraw 100$, and you are charged 101,50$ plus Interac fees. If you manually entered that 100$, the amounts won't match. You should set this to whatever is the maximum such fee in your area (in units of your local currency), so the transaction will be recognised as a match.") + "g" (N_ "In some places commercial ATMs (not belonging to a financial institution) are installed in places like convienience store. These ATM add its fee directly to the amount instead of showing up as a separate transaction or in your monthly banking fees. For example, you withdraw 100$, and you are charged 101,50$ plus Interac fees. If you manually entered that 100$, the amounts won't match. You should set this to whatever is the maximum such fee in your area (in units of your local currency), so the transaction will be recognised as a match.") 2.00 ;; default 0.0 ;; lower bound 1000.0 ;; upper bound diff --git a/src/import-export/import-backend.c b/src/import-export/import-backend.c index 4a96f08088..d68c42c5e7 100644 --- a/src/import-export/import-backend.c +++ b/src/import-export/import-backend.c @@ -55,13 +55,13 @@ static short module = MOD_IMPORT; \********************************************************************/ static const int MATCH_DATE_THRESHOLD=4; /*within 4 days*/ -static const int MATCH_DATE_NOT_THRESHOLD = 16; +static const int MATCH_DATE_NOT_THRESHOLD = 25; /**Transaction's who have an online_id kvp frame have been downloaded online can probably be skipped in the match list, since it is very unlikely that they would match a transaction downloaded at a later date and yet not have the same online_id. This also increases performance of the matcher. */ -static const int SHOW_TRANSACTIONS_WITH_UNIQUE_ID = FALSE; +static const int SHOW_TRANSACTIONS_WITH_UNIQUE_ID = TRUE; /* DISABLE once account transfer bug is fixed! */ /********************************************************************\ * Structures passed between the functions * @@ -477,20 +477,20 @@ static void split_find_match (GNCImportTransInfo * trans_info, /*DEBUG("diff day %d", datediff_day);*/ if (datediff_day == 0) { - prob = prob+2; - /*DEBUG("heuristics: probability + 2 (date)");*/ + prob = prob+3; + /*DEBUG("heuristics: probability + 3 (date)");*/ } else if (datediff_day <= MATCH_DATE_THRESHOLD) { - prob = prob+1; - /*DEBUG("heuristics: probability + 1 (date)");*/ + prob = prob+2; + /*DEBUG("heuristics: probability + 2 (date)");*/ } else if (datediff_day > MATCH_DATE_NOT_THRESHOLD) { /* Extra penalty if that split lies awfully far away from the given one. */ - prob = prob-1; - /* DEBUG("heuristics: probability - 1 (date)"); */ + prob = prob-10; + /* DEBUG("heuristics: probability - 10 (date)"); */ } diff --git a/src/import-export/import-settings.c b/src/import-export/import-settings.c index ee36374da9..3f8b82824b 100644 --- a/src/import-export/import-settings.c +++ b/src/import-export/import-settings.c @@ -42,10 +42,10 @@ /** Transaction who's best match probability is equal or higher than this will reconcile their best match by default */ -#define DEFAULT_CLEAR_THRESHOLD 5 +#define DEFAULT_CLEAR_THRESHOLD 6 /** Transaction who's best match probability is below or equal to this will be added as new by default */ -#define DEFAULT_ADD_THRESHOLD 2 +#define DEFAULT_ADD_THRESHOLD 3 /** Transaction's match probability must be at least this much to be displayed in the match list. Dont set this to 0 except for debugging purposes, otherwise all transactions of every accounts