From f931b80a36ff497f17c4579c22fce9a9dc421b4d Mon Sep 17 00:00:00 2001 From: "Sahil (via MelvinBot)" Date: Tue, 7 Jul 2026 08:01:44 +0000 Subject: [PATCH 1/2] Rename amount column search token from original-amount to purchase-amount Co-authored-by: Sahil --- src/CONST/index.ts | 2 +- src/libs/SearchParser/autocompleteParser.js | 378 ++++++++++---------- src/libs/SearchParser/baseRules.peggy | 2 +- src/libs/SearchParser/searchParser.js | 378 ++++++++++---------- tests/unit/SearchParserTest.ts | 2 +- 5 files changed, 379 insertions(+), 383 deletions(-) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 887e89a783a6..bc8d985521bf 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -7042,7 +7042,7 @@ const CONST = { [this.TABLE_COLUMNS.TO]: 'to', [this.TABLE_COLUMNS.CATEGORY]: 'category', [this.TABLE_COLUMNS.TAG]: 'tag', - [this.TABLE_COLUMNS.ORIGINAL_AMOUNT]: 'original-amount', + [this.TABLE_COLUMNS.ORIGINAL_AMOUNT]: 'purchase-amount', [this.TABLE_COLUMNS.REIMBURSABLE]: 'reimbursable', [this.TABLE_COLUMNS.BILLABLE]: 'billable', [this.TABLE_COLUMNS.TAX_RATE]: 'tax-rate', diff --git a/src/libs/SearchParser/autocompleteParser.js b/src/libs/SearchParser/autocompleteParser.js index 4541d301bd23..3f3d7a740d60 100644 --- a/src/libs/SearchParser/autocompleteParser.js +++ b/src/libs/SearchParser/autocompleteParser.js @@ -260,38 +260,37 @@ function peg$parse(input, options) { var peg$c74 = "per-diem"; var peg$c75 = "drafts"; var peg$c76 = "draft"; - var peg$c77 = "original-amount"; - var peg$c78 = "tax"; - var peg$c79 = "policy-name"; - var peg$c80 = "long-report-id"; - var peg$c81 = "exported-to"; - var peg$c82 = "exportedto"; - var peg$c83 = "exchange-rate"; - var peg$c84 = "reimbursable-total"; - var peg$c85 = "non-reimbursable-total"; - var peg$c86 = "group-from"; - var peg$c87 = "group-expenses"; - var peg$c88 = "group-total"; - var peg$c89 = "group-card"; - var peg$c90 = "group-feed"; - var peg$c91 = "group-bank-account"; - var peg$c92 = "group-withdrawn"; - var peg$c93 = "group-withdrawal-id"; - var peg$c94 = "group-category"; - var peg$c95 = "group-tag"; - var peg$c96 = "group-merchant"; - var peg$c97 = "group-month"; - var peg$c98 = "group-week"; - var peg$c99 = "group-year"; - var peg$c100 = "group-quarter"; - var peg$c101 = "!="; - var peg$c102 = ">="; - var peg$c103 = ">"; - var peg$c104 = "<="; - var peg$c105 = "<"; - var peg$c106 = "\u201C"; - var peg$c107 = "\u201D"; - var peg$c108 = "\""; + var peg$c77 = "tax"; + var peg$c78 = "policy-name"; + var peg$c79 = "long-report-id"; + var peg$c80 = "exported-to"; + var peg$c81 = "exportedto"; + var peg$c82 = "exchange-rate"; + var peg$c83 = "reimbursable-total"; + var peg$c84 = "non-reimbursable-total"; + var peg$c85 = "group-from"; + var peg$c86 = "group-expenses"; + var peg$c87 = "group-total"; + var peg$c88 = "group-card"; + var peg$c89 = "group-feed"; + var peg$c90 = "group-bank-account"; + var peg$c91 = "group-withdrawn"; + var peg$c92 = "group-withdrawal-id"; + var peg$c93 = "group-category"; + var peg$c94 = "group-tag"; + var peg$c95 = "group-merchant"; + var peg$c96 = "group-month"; + var peg$c97 = "group-week"; + var peg$c98 = "group-year"; + var peg$c99 = "group-quarter"; + var peg$c100 = "!="; + var peg$c101 = ">="; + var peg$c102 = ">"; + var peg$c103 = "<="; + var peg$c104 = "<"; + var peg$c105 = "\u201C"; + var peg$c106 = "\u201D"; + var peg$c107 = "\""; var peg$r0 = /^[ \t\r\n\xA0,:=<>!]/; var peg$r1 = /^[:=]/; @@ -387,54 +386,53 @@ function peg$parse(input, options) { var peg$e77 = peg$literalExpectation("per-diem", true); var peg$e78 = peg$literalExpectation("drafts", true); var peg$e79 = peg$literalExpectation("draft", true); - var peg$e80 = peg$literalExpectation("original-amount", true); - var peg$e81 = peg$literalExpectation("tax", true); - var peg$e82 = peg$literalExpectation("policy-name", true); - var peg$e83 = peg$literalExpectation("long-report-id", true); - var peg$e84 = peg$literalExpectation("exported-to", true); - var peg$e85 = peg$classExpectation([":", "="], false, false); - var peg$e86 = peg$literalExpectation("exportedTo", true); - var peg$e87 = peg$literalExpectation("exchange-rate", true); - var peg$e88 = peg$literalExpectation("reimbursable-total", true); - var peg$e89 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e90 = peg$literalExpectation("group-from", true); - var peg$e91 = peg$literalExpectation("group-expenses", true); - var peg$e92 = peg$literalExpectation("group-total", true); - var peg$e93 = peg$literalExpectation("group-card", true); - var peg$e94 = peg$literalExpectation("group-feed", true); - var peg$e95 = peg$literalExpectation("group-bank-account", true); - var peg$e96 = peg$literalExpectation("group-withdrawn", true); - var peg$e97 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e98 = peg$literalExpectation("group-category", true); - var peg$e99 = peg$literalExpectation("group-tag", true); - var peg$e100 = peg$literalExpectation("group-merchant", true); - var peg$e101 = peg$literalExpectation("group-month", true); - var peg$e102 = peg$literalExpectation("group-week", true); - var peg$e103 = peg$literalExpectation("group-year", true); - var peg$e104 = peg$literalExpectation("group-quarter", true); - var peg$e105 = peg$otherExpectation("operator"); - var peg$e106 = peg$literalExpectation("!=", false); - var peg$e107 = peg$literalExpectation(">=", false); - var peg$e108 = peg$literalExpectation(">", false); - var peg$e109 = peg$literalExpectation("<=", false); - var peg$e110 = peg$literalExpectation("<", false); - var peg$e111 = peg$otherExpectation("word"); - var peg$e112 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e113 = peg$otherExpectation("whitespace"); - var peg$e114 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e115 = peg$otherExpectation("quote"); - var peg$e116 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e117 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e118 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e119 = peg$literalExpectation("\u201C", false); - var peg$e120 = peg$literalExpectation("\u201D", false); - var peg$e121 = peg$literalExpectation("\"", false); - var peg$e122 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e123 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e124 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e125 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e126 = peg$classExpectation([","], false, false); - var peg$e127 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e80 = peg$literalExpectation("tax", true); + var peg$e81 = peg$literalExpectation("policy-name", true); + var peg$e82 = peg$literalExpectation("long-report-id", true); + var peg$e83 = peg$literalExpectation("exported-to", true); + var peg$e84 = peg$classExpectation([":", "="], false, false); + var peg$e85 = peg$literalExpectation("exportedTo", true); + var peg$e86 = peg$literalExpectation("exchange-rate", true); + var peg$e87 = peg$literalExpectation("reimbursable-total", true); + var peg$e88 = peg$literalExpectation("non-reimbursable-total", true); + var peg$e89 = peg$literalExpectation("group-from", true); + var peg$e90 = peg$literalExpectation("group-expenses", true); + var peg$e91 = peg$literalExpectation("group-total", true); + var peg$e92 = peg$literalExpectation("group-card", true); + var peg$e93 = peg$literalExpectation("group-feed", true); + var peg$e94 = peg$literalExpectation("group-bank-account", true); + var peg$e95 = peg$literalExpectation("group-withdrawn", true); + var peg$e96 = peg$literalExpectation("group-withdrawal-id", true); + var peg$e97 = peg$literalExpectation("group-category", true); + var peg$e98 = peg$literalExpectation("group-tag", true); + var peg$e99 = peg$literalExpectation("group-merchant", true); + var peg$e100 = peg$literalExpectation("group-month", true); + var peg$e101 = peg$literalExpectation("group-week", true); + var peg$e102 = peg$literalExpectation("group-year", true); + var peg$e103 = peg$literalExpectation("group-quarter", true); + var peg$e104 = peg$otherExpectation("operator"); + var peg$e105 = peg$literalExpectation("!=", false); + var peg$e106 = peg$literalExpectation(">=", false); + var peg$e107 = peg$literalExpectation(">", false); + var peg$e108 = peg$literalExpectation("<=", false); + var peg$e109 = peg$literalExpectation("<", false); + var peg$e110 = peg$otherExpectation("word"); + var peg$e111 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e112 = peg$otherExpectation("whitespace"); + var peg$e113 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); + var peg$e114 = peg$otherExpectation("quote"); + var peg$e115 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e116 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); + var peg$e117 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); + var peg$e118 = peg$literalExpectation("\u201C", false); + var peg$e119 = peg$literalExpectation("\u201D", false); + var peg$e120 = peg$literalExpectation("\"", false); + var peg$e121 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e122 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e123 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); + var peg$e124 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); + var peg$e125 = peg$classExpectation([","], false, false); + var peg$e126 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); var peg$f0 = function(ranges) { return { autocomplete, ranges }; }; var peg$f1 = function(filters) { return filters.filter(Boolean).flat(); }; @@ -2675,11 +2673,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c69) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e80); } + if (peg$silentFails === 0) { peg$fail(peg$e72); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2712,11 +2710,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c78) { + if (s1.toLowerCase() === peg$c77) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e81); } + if (peg$silentFails === 0) { peg$fail(peg$e80); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2786,11 +2784,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e81); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2897,11 +2895,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c80) { + if (s1.toLowerCase() === peg$c79) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e83); } + if (peg$silentFails === 0) { peg$fail(peg$e82); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2971,11 +2969,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3015,7 +3013,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e85); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3034,11 +3032,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c82) { + if (s1.toLowerCase() === peg$c81) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3065,11 +3063,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3103,11 +3101,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c82) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3140,11 +3138,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c84) { + if (s1.toLowerCase() === peg$c83) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e87); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3177,11 +3175,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c84) { peg$currPos += 22; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e89); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3214,11 +3212,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c85) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3251,11 +3249,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c86) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3288,11 +3286,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e92); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3325,11 +3323,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3362,11 +3360,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e94); } + if (peg$silentFails === 0) { peg$fail(peg$e93); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3399,11 +3397,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e95); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3436,11 +3434,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e95); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3473,11 +3471,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 19; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e97); } + if (peg$silentFails === 0) { peg$fail(peg$e96); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3510,11 +3508,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3547,11 +3545,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e98); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3584,11 +3582,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3621,11 +3619,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3658,11 +3656,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e102); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3695,11 +3693,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e103); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3732,11 +3730,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c100) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e104); } + if (peg$silentFails === 0) { peg$fail(peg$e103); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3774,7 +3772,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e85); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3783,12 +3781,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c101) { - s1 = peg$c101; + if (input.substr(peg$currPos, 2) === peg$c100) { + s1 = peg$c100; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e106); } + if (peg$silentFails === 0) { peg$fail(peg$e105); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3797,12 +3795,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c102) { - s1 = peg$c102; + if (input.substr(peg$currPos, 2) === peg$c101) { + s1 = peg$c101; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e107); } + if (peg$silentFails === 0) { peg$fail(peg$e106); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3812,11 +3810,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c103; + s1 = peg$c102; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e108); } + if (peg$silentFails === 0) { peg$fail(peg$e107); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3825,12 +3823,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c104) { - s1 = peg$c104; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e109); } + if (peg$silentFails === 0) { peg$fail(peg$e108); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3840,11 +3838,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c105; + s1 = peg$c104; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e110); } + if (peg$silentFails === 0) { peg$fail(peg$e109); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3859,7 +3857,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e105); } + if (peg$silentFails === 0) { peg$fail(peg$e104); } } return s0; @@ -3890,7 +3888,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { @@ -3900,7 +3898,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } } } else { @@ -3914,7 +3912,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e111); } + if (peg$silentFails === 0) { peg$fail(peg$e110); } } return s0; @@ -3942,7 +3940,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -3951,12 +3949,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e113); } + if (peg$silentFails === 0) { peg$fail(peg$e112); } return s0; } @@ -4003,7 +4001,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4012,7 +4010,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } } s2 = input.charAt(peg$currPos); @@ -4020,7 +4018,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4029,7 +4027,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -4038,7 +4036,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } } s4 = input.charAt(peg$currPos); @@ -4046,7 +4044,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4055,7 +4053,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4064,7 +4062,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } } peg$savedPos = s0; @@ -4080,7 +4078,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e115); } + if (peg$silentFails === 0) { peg$fail(peg$e114); } } return s0; @@ -4097,7 +4095,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4106,7 +4104,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } } s2 = input.charAt(peg$currPos); @@ -4114,7 +4112,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4123,7 +4121,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4139,11 +4137,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c106; + s6 = peg$c105; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4170,11 +4168,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c107; + s6 = peg$c106; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4201,11 +4199,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c108; + s6 = peg$c107; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4228,7 +4226,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4244,11 +4242,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c106; + s6 = peg$c105; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4275,11 +4273,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c107; + s6 = peg$c106; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4306,11 +4304,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c108; + s6 = peg$c107; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4342,7 +4340,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e115); } + if (peg$silentFails === 0) { peg$fail(peg$e114); } } return s0; @@ -4357,7 +4355,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4395,7 +4393,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4404,7 +4402,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } } s2 = []; @@ -4413,7 +4411,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -4422,7 +4420,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } } s3 = []; @@ -4431,7 +4429,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -4440,7 +4438,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } } s4 = peg$parseoperator(); @@ -4459,7 +4457,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4468,7 +4466,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } } s2 = peg$currPos; @@ -4515,7 +4513,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e125); } } } } @@ -4531,7 +4529,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e126); } } if (s0 === peg$FAILED) { s0 = peg$currPos; diff --git a/src/libs/SearchParser/baseRules.peggy b/src/libs/SearchParser/baseRules.peggy index b6ca372d6aa8..a6afcc350bfa 100644 --- a/src/libs/SearchParser/baseRules.peggy +++ b/src/libs/SearchParser/baseRules.peggy @@ -135,7 +135,7 @@ columnsValues perDiem = "per-diem"i &wordBoundary { return "perDiem"; } draft = ("drafts"i / "draft"i) &wordBoundary { return "drafts"; } -originalAmount = "original-amount"i &wordBoundary { return "originalamount"; } +originalAmount = "purchase-amount"i &wordBoundary { return "originalamount"; } taxAmount = "tax"i &wordBoundary { return "taxAmount"; } taxRateValue = "tax-rate"i &wordBoundary { return "taxrate"; } policyName = "policy-name"i &wordBoundary { return "policyname"; } diff --git a/src/libs/SearchParser/searchParser.js b/src/libs/SearchParser/searchParser.js index c67cbbb46533..d2400e018263 100644 --- a/src/libs/SearchParser/searchParser.js +++ b/src/libs/SearchParser/searchParser.js @@ -261,38 +261,37 @@ function peg$parse(input, options) { var peg$c74 = "per-diem"; var peg$c75 = "drafts"; var peg$c76 = "draft"; - var peg$c77 = "original-amount"; - var peg$c78 = "tax"; - var peg$c79 = "policy-name"; - var peg$c80 = "long-report-id"; - var peg$c81 = "exported-to"; - var peg$c82 = "exportedto"; - var peg$c83 = "exchange-rate"; - var peg$c84 = "reimbursable-total"; - var peg$c85 = "non-reimbursable-total"; - var peg$c86 = "group-from"; - var peg$c87 = "group-expenses"; - var peg$c88 = "group-total"; - var peg$c89 = "group-card"; - var peg$c90 = "group-feed"; - var peg$c91 = "group-bank-account"; - var peg$c92 = "group-withdrawn"; - var peg$c93 = "group-withdrawal-id"; - var peg$c94 = "group-category"; - var peg$c95 = "group-tag"; - var peg$c96 = "group-merchant"; - var peg$c97 = "group-month"; - var peg$c98 = "group-week"; - var peg$c99 = "group-year"; - var peg$c100 = "group-quarter"; - var peg$c101 = "!="; - var peg$c102 = ">="; - var peg$c103 = ">"; - var peg$c104 = "<="; - var peg$c105 = "<"; - var peg$c106 = "\u201C"; - var peg$c107 = "\u201D"; - var peg$c108 = "\""; + var peg$c77 = "tax"; + var peg$c78 = "policy-name"; + var peg$c79 = "long-report-id"; + var peg$c80 = "exported-to"; + var peg$c81 = "exportedto"; + var peg$c82 = "exchange-rate"; + var peg$c83 = "reimbursable-total"; + var peg$c84 = "non-reimbursable-total"; + var peg$c85 = "group-from"; + var peg$c86 = "group-expenses"; + var peg$c87 = "group-total"; + var peg$c88 = "group-card"; + var peg$c89 = "group-feed"; + var peg$c90 = "group-bank-account"; + var peg$c91 = "group-withdrawn"; + var peg$c92 = "group-withdrawal-id"; + var peg$c93 = "group-category"; + var peg$c94 = "group-tag"; + var peg$c95 = "group-merchant"; + var peg$c96 = "group-month"; + var peg$c97 = "group-week"; + var peg$c98 = "group-year"; + var peg$c99 = "group-quarter"; + var peg$c100 = "!="; + var peg$c101 = ">="; + var peg$c102 = ">"; + var peg$c103 = "<="; + var peg$c104 = "<"; + var peg$c105 = "\u201C"; + var peg$c106 = "\u201D"; + var peg$c107 = "\""; var peg$r0 = /^[^ \t\r\n\xA0]/; var peg$r1 = /^[ \t\r\n\xA0,:=<>!]/; @@ -391,54 +390,53 @@ function peg$parse(input, options) { var peg$e79 = peg$literalExpectation("per-diem", true); var peg$e80 = peg$literalExpectation("drafts", true); var peg$e81 = peg$literalExpectation("draft", true); - var peg$e82 = peg$literalExpectation("original-amount", true); - var peg$e83 = peg$literalExpectation("tax", true); - var peg$e84 = peg$literalExpectation("policy-name", true); - var peg$e85 = peg$literalExpectation("long-report-id", true); - var peg$e86 = peg$literalExpectation("exported-to", true); - var peg$e87 = peg$classExpectation([":", "="], false, false); - var peg$e88 = peg$literalExpectation("exportedTo", true); - var peg$e89 = peg$literalExpectation("exchange-rate", true); - var peg$e90 = peg$literalExpectation("reimbursable-total", true); - var peg$e91 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e92 = peg$literalExpectation("group-from", true); - var peg$e93 = peg$literalExpectation("group-expenses", true); - var peg$e94 = peg$literalExpectation("group-total", true); - var peg$e95 = peg$literalExpectation("group-card", true); - var peg$e96 = peg$literalExpectation("group-feed", true); - var peg$e97 = peg$literalExpectation("group-bank-account", true); - var peg$e98 = peg$literalExpectation("group-withdrawn", true); - var peg$e99 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e100 = peg$literalExpectation("group-category", true); - var peg$e101 = peg$literalExpectation("group-tag", true); - var peg$e102 = peg$literalExpectation("group-merchant", true); - var peg$e103 = peg$literalExpectation("group-month", true); - var peg$e104 = peg$literalExpectation("group-week", true); - var peg$e105 = peg$literalExpectation("group-year", true); - var peg$e106 = peg$literalExpectation("group-quarter", true); - var peg$e107 = peg$otherExpectation("operator"); - var peg$e108 = peg$literalExpectation("!=", false); - var peg$e109 = peg$literalExpectation(">=", false); - var peg$e110 = peg$literalExpectation(">", false); - var peg$e111 = peg$literalExpectation("<=", false); - var peg$e112 = peg$literalExpectation("<", false); - var peg$e113 = peg$otherExpectation("word"); - var peg$e114 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e115 = peg$otherExpectation("whitespace"); - var peg$e116 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e117 = peg$otherExpectation("quote"); - var peg$e118 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e119 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e120 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e121 = peg$literalExpectation("\u201C", false); - var peg$e122 = peg$literalExpectation("\u201D", false); - var peg$e123 = peg$literalExpectation("\"", false); - var peg$e124 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e125 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e126 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e127 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e128 = peg$classExpectation([","], false, false); - var peg$e129 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e82 = peg$literalExpectation("tax", true); + var peg$e83 = peg$literalExpectation("policy-name", true); + var peg$e84 = peg$literalExpectation("long-report-id", true); + var peg$e85 = peg$literalExpectation("exported-to", true); + var peg$e86 = peg$classExpectation([":", "="], false, false); + var peg$e87 = peg$literalExpectation("exportedTo", true); + var peg$e88 = peg$literalExpectation("exchange-rate", true); + var peg$e89 = peg$literalExpectation("reimbursable-total", true); + var peg$e90 = peg$literalExpectation("non-reimbursable-total", true); + var peg$e91 = peg$literalExpectation("group-from", true); + var peg$e92 = peg$literalExpectation("group-expenses", true); + var peg$e93 = peg$literalExpectation("group-total", true); + var peg$e94 = peg$literalExpectation("group-card", true); + var peg$e95 = peg$literalExpectation("group-feed", true); + var peg$e96 = peg$literalExpectation("group-bank-account", true); + var peg$e97 = peg$literalExpectation("group-withdrawn", true); + var peg$e98 = peg$literalExpectation("group-withdrawal-id", true); + var peg$e99 = peg$literalExpectation("group-category", true); + var peg$e100 = peg$literalExpectation("group-tag", true); + var peg$e101 = peg$literalExpectation("group-merchant", true); + var peg$e102 = peg$literalExpectation("group-month", true); + var peg$e103 = peg$literalExpectation("group-week", true); + var peg$e104 = peg$literalExpectation("group-year", true); + var peg$e105 = peg$literalExpectation("group-quarter", true); + var peg$e106 = peg$otherExpectation("operator"); + var peg$e107 = peg$literalExpectation("!=", false); + var peg$e108 = peg$literalExpectation(">=", false); + var peg$e109 = peg$literalExpectation(">", false); + var peg$e110 = peg$literalExpectation("<=", false); + var peg$e111 = peg$literalExpectation("<", false); + var peg$e112 = peg$otherExpectation("word"); + var peg$e113 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e114 = peg$otherExpectation("whitespace"); + var peg$e115 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); + var peg$e116 = peg$otherExpectation("quote"); + var peg$e117 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e118 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); + var peg$e119 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); + var peg$e120 = peg$literalExpectation("\u201C", false); + var peg$e121 = peg$literalExpectation("\u201D", false); + var peg$e122 = peg$literalExpectation("\"", false); + var peg$e123 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e124 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e125 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); + var peg$e126 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); + var peg$e127 = peg$classExpectation([","], false, false); + var peg$e128 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); var peg$f0 = function(filters) { return applyDefaults(filters); }; var peg$f1 = function(head, tail) { @@ -2859,11 +2857,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c69) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e74); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2896,11 +2894,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c78) { + if (s1.toLowerCase() === peg$c77) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e83); } + if (peg$silentFails === 0) { peg$fail(peg$e82); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2970,11 +2968,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3081,11 +3079,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c80) { + if (s1.toLowerCase() === peg$c79) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e85); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3155,11 +3153,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3199,7 +3197,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3218,11 +3216,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c82) { + if (s1.toLowerCase() === peg$c81) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e87); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3249,11 +3247,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3287,11 +3285,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c82) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e89); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3324,11 +3322,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c84) { + if (s1.toLowerCase() === peg$c83) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3361,11 +3359,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c84) { peg$currPos += 22; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3398,11 +3396,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c85) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e92); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3435,11 +3433,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c86) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3472,11 +3470,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e94); } + if (peg$silentFails === 0) { peg$fail(peg$e93); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3509,11 +3507,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e95); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3546,11 +3544,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e95); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3583,11 +3581,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e97); } + if (peg$silentFails === 0) { peg$fail(peg$e96); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3620,11 +3618,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3657,11 +3655,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 19; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e98); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3694,11 +3692,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3731,11 +3729,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3768,11 +3766,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e102); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3805,11 +3803,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e103); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3842,11 +3840,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e104); } + if (peg$silentFails === 0) { peg$fail(peg$e103); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3879,11 +3877,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e105); } + if (peg$silentFails === 0) { peg$fail(peg$e104); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3916,11 +3914,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c100) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e106); } + if (peg$silentFails === 0) { peg$fail(peg$e105); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3958,7 +3956,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3967,12 +3965,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c101) { - s1 = peg$c101; + if (input.substr(peg$currPos, 2) === peg$c100) { + s1 = peg$c100; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e108); } + if (peg$silentFails === 0) { peg$fail(peg$e107); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3981,12 +3979,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c102) { - s1 = peg$c102; + if (input.substr(peg$currPos, 2) === peg$c101) { + s1 = peg$c101; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e109); } + if (peg$silentFails === 0) { peg$fail(peg$e108); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -3996,11 +3994,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c103; + s1 = peg$c102; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e110); } + if (peg$silentFails === 0) { peg$fail(peg$e109); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -4009,12 +4007,12 @@ function peg$parse(input, options) { s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c104) { - s1 = peg$c104; + if (input.substr(peg$currPos, 2) === peg$c103) { + s1 = peg$c103; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e111); } + if (peg$silentFails === 0) { peg$fail(peg$e110); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -4024,11 +4022,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c105; + s1 = peg$c104; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; @@ -4043,7 +4041,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e107); } + if (peg$silentFails === 0) { peg$fail(peg$e106); } } return s0; @@ -4074,7 +4072,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { @@ -4084,7 +4082,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } } } else { @@ -4098,7 +4096,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e113); } + if (peg$silentFails === 0) { peg$fail(peg$e112); } } return s0; @@ -4126,7 +4124,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -4135,12 +4133,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e115); } + if (peg$silentFails === 0) { peg$fail(peg$e114); } return s0; } @@ -4187,7 +4185,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4196,7 +4194,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } } s2 = input.charAt(peg$currPos); @@ -4204,7 +4202,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4213,7 +4211,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -4222,7 +4220,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } } s4 = input.charAt(peg$currPos); @@ -4230,7 +4228,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4239,7 +4237,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4248,7 +4246,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } } peg$savedPos = s0; @@ -4264,7 +4262,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } return s0; @@ -4281,7 +4279,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4290,7 +4288,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } } s2 = input.charAt(peg$currPos); @@ -4298,7 +4296,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4307,7 +4305,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4323,11 +4321,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c106; + s6 = peg$c105; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4354,11 +4352,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c107; + s6 = peg$c106; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4385,11 +4383,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c108; + s6 = peg$c107; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4412,7 +4410,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4428,11 +4426,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c106; + s6 = peg$c105; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4459,11 +4457,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c107; + s6 = peg$c106; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4490,11 +4488,11 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c108; + s6 = peg$c107; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; @@ -4526,7 +4524,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } return s0; @@ -4541,7 +4539,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4579,7 +4577,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4588,7 +4586,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } } s2 = []; @@ -4597,7 +4595,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -4606,7 +4604,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } } s3 = []; @@ -4615,7 +4613,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e125); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -4624,7 +4622,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e125); } } } s4 = peg$parseoperator(); @@ -4643,7 +4641,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e126); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4652,7 +4650,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e126); } } } s2 = peg$currPos; @@ -4699,7 +4697,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e127); } } } } @@ -4715,7 +4713,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e129); } + if (peg$silentFails === 0) { peg$fail(peg$e128); } } if (s0 === peg$FAILED) { s0 = peg$currPos; diff --git a/tests/unit/SearchParserTest.ts b/tests/unit/SearchParserTest.ts index 29cdbbe176b9..ae1a99a38024 100644 --- a/tests/unit/SearchParserTest.ts +++ b/tests/unit/SearchParserTest.ts @@ -1112,7 +1112,7 @@ const keywordTests = [ }, }, { - query: 'columns:original-amount,tax,report-id', + query: 'columns:purchase-amount,tax,report-id', expected: { type: 'expense', status: CONST.SEARCH.STATUS.EXPENSE.ALL, From 4da21bb3fc76d51acbae6c010fc9e94cf1c39600 Mon Sep 17 00:00:00 2001 From: "Sahil (via MelvinBot)" Date: Thu, 9 Jul 2026 11:12:56 +0000 Subject: [PATCH 2/2] Sync Report/index.ts and SplitTest.ts with main to fix eslint-seatbelt budget Co-authored-by: Sahil --- src/libs/actions/Report/index.ts | 4 ++-- tests/actions/IOUTest/SplitTest.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/Report/index.ts b/src/libs/actions/Report/index.ts index 223210742db8..e5e6693c7181 100644 --- a/src/libs/actions/Report/index.ts +++ b/src/libs/actions/Report/index.ts @@ -53,7 +53,7 @@ import type UpdateRoomVisibilityParams from '@libs/API/parameters/UpdateRoomVisi import {READ_COMMANDS, SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types'; import * as ApiUtils from '@libs/ApiUtils'; import * as Browser from '@libs/Browser'; -import * as CollectionUtils from '@libs/CollectionUtils'; +import {extractCollectionItemID} from '@libs/CollectionUtils'; import type {CustomRNImageManipulatorResult} from '@libs/cropOrRotateImage/types'; import DateUtils from '@libs/DateUtils'; import * as Environment from '@libs/Environment/Environment'; @@ -470,7 +470,7 @@ Onyx.connect({ if (!key || !actions) { return; } - const reportID = CollectionUtils.extractCollectionItemID(key); + const reportID = extractCollectionItemID(key); allReportActions[reportID] = actions; }, }); diff --git a/tests/actions/IOUTest/SplitTest.ts b/tests/actions/IOUTest/SplitTest.ts index 63e3bc68a30c..fe8a82b46141 100644 --- a/tests/actions/IOUTest/SplitTest.ts +++ b/tests/actions/IOUTest/SplitTest.ts @@ -7973,7 +7973,7 @@ describe('createDistanceRequest', () => { const allTransactions = await getOnyxValue(ONYXKEYS.COLLECTION.TRANSACTION); expect(Object.keys(allReports ?? {}).length).toBeGreaterThan(initialReportsCount); expect(Object.keys(allTransactions ?? {}).length).toBeGreaterThanOrEqual(1); - const createdTransaction = Object.values(allTransactions ?? {}).at(0) as Transaction | undefined; + const createdTransaction = Object.values(allTransactions ?? {}).at(0); expect(createdTransaction).toBeTruthy(); }); });