-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
fix: long name variable #38972
fix: long name variable #38972
Conversation
some banks no longer give check_numbers or meta data so the entire string is returned in 'name'. this gives an ExcededLength error
@@ -264,7 +264,7 @@ def new_bank_transaction(transaction): | |||
"reference_number": ( | |||
transaction["check_number"] | |||
or transaction["payment_meta"]["reference_number"] | |||
or transaction["name"] | |||
or transaction["name"][:20] |
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.
or transaction["name"][:20] | |
or transaction["name"][:140] |
Ideally you should strip to around ~135 characters and add ...
to indicate it's stripped.
OR increase length
OR convert this field to small text.
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.
convert so small text makes no sense; that would just lead to double information storage. 20 was chosen because of standard international banking check length. addition of [...] would be good though, want me to add that ?
btw. removing [name] is also an option. in v13 this field was also empty.
@ankush , please conform solution direction so this can be merged. Its breaking for our bank (ABN AMRO) now. |
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing. |
some banks no longer give check_numbers or meta data so the entire string is returned in 'name'. this gives an ExcededLength error.
btw, the truncated error gives an throw so no bank statement is created
frappe.exceptions.CharacterLengthExceededError: Bank Transaction ACC-BTN-2023-01109: 'Reference Number' (SEPA Overboeking IBAN: NL61RABO0111531012 BIC: RABONL2U Naam: NS Groep N.V. Omschrijving: FACTUUR2023-00427I NV-2023-00418 Kenmerk: 2000004896) will get truncated, as max characters allowed is 140