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