2002-1-6 Benoit Gr�goire <bock@step.polymtl.ca>

* 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.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7787 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Benoit Grégoire 2003-01-06 06:20:45 +00:00
parent c0fa51f9c6
commit c23c6b9ee7
4 changed files with 39 additions and 20 deletions

View File

@ -1,3 +1,20 @@
2002-1-6 Benoit Grégoire <bock@step.polymtl.ca>
* 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 <hampton@employees.org>
* src/app-utils/gnc-component-manager.c: New functions for

View File

@ -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

View File

@ -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)"); */
}

View File

@ -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