Skip to content
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

More options for supplier emails (WIP - help welcome) #1065

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

twothreenine
Copy link
Contributor

@twothreenine twothreenine commented Apr 28, 2024

Old behavior:
The order email sent to the supplier will be sent as a copy (CC) to the user* and the supplier will be request to send any replies to that user*.
*user: If sent by clicking on the "Send to supplier" button, the user who clicked the button; if sent automatically by end action, the user who created the order.

New behavior:
In Administration/Configuration, there's a new tab "Suppliers" where admins can set options for communication with suppliers.
The default by migration is: The order email sent to the supplier will be sent as a copy (CC) to the associated users* and the supplier will be requested to send any replies to them.
*associated users: both a) the user who created the order and b) (unless it was auto-sent) the user who clicked the button "Send to supplier."
The copy of the email to the supplier can be changed to blind copy (BCC, default for new instances) or no copy at all.
If a reply-to address is set, the supplier will be requested to send any replies to that address instead.
If the "send reply copy" option below is checked, there will be multiple reply-to addresses: the specified address and the associated user(s).

Zwischenablage_04-24-2024_01

Zwischenablage_04-24-2024_02

Old behavior:
If not a single article has been ordered, the empty order will be sent to the supplier anyway (unless a minimum order quantity has been set and the respective end action been selected.)

New behavior:
Not to disrupt any workflows, this behavior remains the same if "Close the order and send it to the supplier" selected, but is pointed out now by the affix "(even if nothing has been ordered.)"
There's a new option "Close the order and send it to the supplier unless nothing has been ordered." This checks if at least one article has been ordered (i.e. 1 box filled.)
The behavior of "Close the order and send it to the supplier if the minimum quantity has been reached" is changed slightly: It also checks if at least one article has been ordered. This makes it a good general option that fulfills most use cases, so you don't have to memorize whether a minimum order quantity has been set for each supplier.

Zwischenablage_04-24-2024_03

TO DO: (help welcome!)

  • The "send reply copy" checkbox should only collapse if the email field above is filled. I didn't manage to solve this (yet)
  • I could only test the "unless nothing ordered" code indirectly, as the end actions didn't work in my local environment. The check worked in another method, but it should be tested if this exact code actually works (both for auto_close_and_send_min_quantity and auto_close_and_send_unless_empty.)
  • I tried to update the tests (since the min_order_quantity test didn't work anymore) and add more, but they don't work yet -- no email gets sent. I either made a mistake in the tests (didn't really grasp the "let" etc. logic yet) or the emailing function is broken for some reason.
  • Config test fails: I think the bcc option should be set as a default, or else no copy of the email to the supplier will be sent. How to fix this?

Previous behavior:
The order email sent to the supplier will be sent as a copy (CC) to the user* and the supplier will be request to send any replies to that user*.
*user: If sent by clicking on the "Send to supplier" button, the user who clicked the button; if sent automatically by end action, the user who created the order.

New behavior:
In Administration/Configuration, there's a new tab "Suppliers" where admins can set options for communication with suppliers.
The default by migration is: The order email sent to the supplier will be sent as a copy (CC) to the associated users* and the supplier will be requested to send any replies to them.
*associated users: both a) the user who created the order and b) (unless it was auto-sent) the user who clicked the button "Send to supplier."
The copy of the email to the supplier can be changed to blind copy (BCC, default for new instances) or no copy at all.
If a reply-to address is set, the supplier will be requested to send any replies to that address instead.
If the "send reply copy" option below is checked, there will be multiple reply-to addresses: the specified address and the associated user(s)

Old behavior:
If not a single article has been ordered, the empty order will be sent to the supplier anyway (unless a minimum order quantity has been set and the respective end action been selected.)

New behavior:
Not to disrupt any workflows, this behavior remains the same if "Close the order and send it to the supplier" selected, but is pointed out now by the affix "(even if nothing has been ordered.)"
There's a new option "Close the order and send it to the supplier unless nothing has been ordered." This checks if at least one article has been ordered (i.e. 1 box filled.)
The behavior of "Close the order and send it to the supplier if the minimum quantity has been reached" is changed slightly: It also checks if at least one article has been ordered. This makes it a good general option that fulfills most use cases, so you don't have to memorize whether a minimum order quantity has been set for each supplier.

TO DO: (help welcome!)
- The "send reply copy" checkbox should only collapse if the email field above is filled. I didn't manage to solve this (yet)
- I could only test the "unless nothing ordered" code indirectly, as the end actions didn't work in my local environment. The check worked in another method, but it should be tested if this exact code actually works (both for auto_close_and_send_min_quantity and auto_close_and_send_unless_empty.)
- I tried to update the tests (since the min_order_quantity test didn't work anymore) and add more, but they don't work yet -- no email gets sent. I either made a mistake in the tests (didn't really grasp the "let" etc. logic yet) or the emailing function is broken for some reason.
- Config test fails: I think the bcc option should be set as a default, or else no copy of the email to the supplier will be sent. How to fix this?
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.

1 participant