More reimbursement changes#3945
Merged
Merged
Conversation
DeD1rk
reviewed
May 22, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements changes to improve reimbursement processing by updating the HTML email format, adding file size validation logic, and modifying the file upload endpoints for receipts.
- Improved HTML formatting in reimbursement email notifications
- Added a file size validator function and updated the FileField validator to include TIFF files
- Updated Moneybird API calls to support file uploads via a new post_file method
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| website/reimbursements/templates/reimbursements/email/verdict.html | Updated email template structure for better HTML semantics |
| website/reimbursements/models.py | Introduced a file size validation function and updated file validators |
| website/reimbursements/migrations/0004_alter_reimbursement_receipt.py | Updated migration to reflect changes in the file upload validator and upload destination |
| website/moneybirdsynchronization/moneybird.py | Adjusted file upload method to call the new post_file API |
| website/moneybirdsynchronization/administration.py | Added a dedicated post_file method for file uploads |
Comments suppressed due to low confidence (1)
website/moneybirdsynchronization/administration.py:219
- If the API endpoint expects multipart/form-data for file uploads, consider using the 'files' parameter instead of 'data' to ensure the file is properly encoded.
response = self.session.post(url, data=file)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ed53fdf to
f4b2440
Compare
T8902
approved these changes
Jun 25, 2025
T8902
left a comment
Contributor
There was a problem hiding this comment.
Needs to be tested on staging.
Scarletto
added a commit
that referenced
this pull request
Jun 25, 2025
* Change verdict mail formatting * Add file size validation * Minor minor fix to mail template Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * yet another template change * Migrate * Maybe maybe very maybe fix file post for receipts maybe perhaps possibly * convert to MB instead of MiB * Removed tiff from allowed image formats --------- Co-authored-by: Marijn <scarlettokun@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Scarletto
added a commit
that referenced
this pull request
Jun 25, 2025
* Change verdict mail formatting * Add file size validation * Minor minor fix to mail template Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * yet another template change * Migrate * Maybe maybe very maybe fix file post for receipts maybe perhaps possibly * convert to MB instead of MiB * Removed tiff from allowed image formats --------- Co-authored-by: Marijn <scarlettokun@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3942.
Summary
Current features (expand as more added):