From 8c1ecd6eac30a091b1904b579edf8cf3cdd455ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 24 Mar 2023 07:32:23 +0800 Subject: [PATCH] Renamed the #isDebitCreditMatches and #isQueryMatches methods in the JavaScript OriginalLineItem class to #isDebitCreditMatched and #isQueryMatched, respectively. --- src/accounting/static/js/original-line-item-selector.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/accounting/static/js/original-line-item-selector.js b/src/accounting/static/js/original-line-item-selector.js index 664a702..2278e5c 100644 --- a/src/accounting/static/js/original-line-item-selector.js +++ b/src/accounting/static/js/original-line-item-selector.js @@ -340,9 +340,9 @@ class OriginalLineItem { isMatched(debitCredit, currencyCode, query = null) { return this.netBalance.greaterThan(0) && this.date <= this.#selector.lineItemEditor.form.date - && this.#isDebitCreditMatches(debitCredit) + && this.#isDebitCreditMatched(debitCredit) && this.#currencyCode === currencyCode - && this.#isQueryMatches(query); + && this.#isQueryMatched(query); } /** @@ -351,7 +351,7 @@ class OriginalLineItem { * @param debitCredit {string} either "debit" or credit * @return {boolean} true if the option matches, or false otherwise */ - #isDebitCreditMatches(debitCredit) { + #isDebitCreditMatched(debitCredit) { return (debitCredit === "debit" && this.#debitCredit === "credit") || (debitCredit === "credit" && this.#debitCredit === "debit"); } @@ -362,7 +362,7 @@ class OriginalLineItem { * @param query {string|null} the query term * @return {boolean} true if the option matches, or false otherwise */ - #isQueryMatches(query) { + #isQueryMatched(query) { if (query === "") { return true; }