-
Notifications
You must be signed in to change notification settings - Fork 37
feat(Bank Reconcilitation Beta): prioritize ranking parameters #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: version-15-hotfix
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -28,6 +28,13 @@ | |||||
| from banking.overrides.bank_transaction import CustomBankTransaction | ||||||
|
|
||||||
| MAX_QUERY_RESULTS = 150 | ||||||
| # Weights for ranking parameters | ||||||
| REF_RANK_WEIGHT = 3 # Reference number match | ||||||
| PARTY_RANK_WEIGHT = 2 # Party match | ||||||
| AMOUNT_RANK_WEIGHT = 2 # Amount match | ||||||
| DATE_RANK_WEIGHT = 1 # Date match | ||||||
| NAME_MATCH_WEIGHT = 3 # Name (Paid From) match | ||||||
| REF_MATCH_WEIGHT = 3 # Reference number match in description | ||||||
|
|
||||||
|
|
||||||
| class BankReconciliationToolBeta(Document): | ||||||
|
|
@@ -557,7 +564,6 @@ def check_matching( | |||||
| # higher rank if voucher name is in bank transaction | ||||||
| reference_no = voucher["reference_no"] | ||||||
| if reference_no and (reference_no.strip() in transaction.description): | ||||||
| voucher["rank"] += 1 | ||||||
| voucher["name_in_desc_match"] = 1 | ||||||
|
||||||
| voucher["name_in_desc_match"] = 1 | |
| voucher["rank"] += REF_MATCH_WEIGHT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment for REF_MATCH_WEIGHT says "Reference number match in description" but REF_RANK_WEIGHT also says "Reference number match". These should be more clearly differentiated. REF_RANK_WEIGHT should say "Reference field equality match" and REF_MATCH_WEIGHT should say "Reference number found in transaction description".