Skip to content

More reimbursement changes#3945

Merged
T8902 merged 8 commits into
masterfrom
more_reimbursement_changes
Jun 25, 2025
Merged

More reimbursement changes#3945
T8902 merged 8 commits into
masterfrom
more_reimbursement_changes

Conversation

@Scarletto

@Scarletto Scarletto commented May 22, 2025

Copy link
Copy Markdown
Contributor

Closes #3942.

Summary

Current features (expand as more added):

  • Change in formatting HTML mail
  • File size validation
  • File upload for receipts

@Scarletto Scarletto requested review from DeD1rk, T8902 and Copilot May 22, 2025 12:48

This comment was marked as outdated.

Comment thread website/reimbursements/models.py Outdated
@Scarletto Scarletto requested review from DeD1rk and Copilot June 4, 2025 17:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread website/reimbursements/models.py
Comment thread website/reimbursements/templates/reimbursements/email/verdict.html
@Scarletto Scarletto marked this pull request as ready for review June 25, 2025 17:46
@Scarletto Scarletto force-pushed the more_reimbursement_changes branch from ed53fdf to f4b2440 Compare June 25, 2025 17:49

@T8902 T8902 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be tested on staging.

@T8902 T8902 merged commit 92e30df into master Jun 25, 2025
8 checks passed
@T8902 T8902 deleted the more_reimbursement_changes branch June 25, 2025 18:05
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reimbursements

4 participants