Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -349,7 +349,10 @@ export class ReceiptImportService {
|
|||||||
if (byRule?.confidence === 'high') {
|
if (byRule?.confidence === 'high') {
|
||||||
const sameAsCurrent =
|
const sameAsCurrent =
|
||||||
nextSuggestion != null && nextSuggestion.categoryId === byRule.categoryId;
|
nextSuggestion != null && nextSuggestion.categoryId === byRule.categoryId;
|
||||||
if (!sameAsCurrent && (!isTrustedSuggestion || nextSuggestion == null)) {
|
if (sameAsCurrent && nextSuggestion && nextSuggestion.confidence !== 'high') {
|
||||||
|
nextSuggestion = { ...nextSuggestion, confidence: 'high' };
|
||||||
|
pushTrace(`rule applied -> "${byRule.path}" (confidence upgraded to high)`);
|
||||||
|
} else if (!sameAsCurrent && (!isTrustedSuggestion || nextSuggestion == null)) {
|
||||||
nextSuggestion = byRule;
|
nextSuggestion = byRule;
|
||||||
pushTrace(`rule applied -> "${byRule.path}"`);
|
pushTrace(`rule applied -> "${byRule.path}"`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user