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

IP-895: Option to Initiate Terms When Sending Invoice #924

Merged
merged 2 commits into from Feb 12, 2023

Conversation

Verony-makesIT
Copy link
Contributor

Description

As indicated in the problem (#895), when sending the invoice, the invoice date and due date are not changed.
Those details are retained as set when the invoice is created, even if changes are made in the period (days, weeks) thereafter.
My solution will always "by default" change the invoice date to the current date and also recalculate the due date, IF the setting [Disable the change of invoice date and due date before emailing] is NOT activated BEFORE SENDING THE EMAIL!
So if the setting is active then the invoice date and due date are NOT changed.

Related Issue

#895

Motivation and Context

For me, this is a problem/rectification that needs to be resolved

#895

Screenshots (if appropriate):

Pull Request Checklist

  • My code follows the code formatting guidelines.
  • I have an issue ID for this pull request.
  • I selected the corresponding branch.
  • I have rebased my changes on top of the corresponding branch.

Issue Type (Please check one or more)

  • Bugfix
  • Improvement of an existing Feature
  • New Feature

@nielsdrost7 nielsdrost7 changed the title [WIP] Ip 895 IP-895 Feb 11, 2023
@nielsdrost7 nielsdrost7 changed the title IP-895 IP-895: Option to Initiate Terms When Sending Invoice (WIP) Feb 11, 2023
@nielsdrost7
Copy link
Contributor

Great PR! My compliments.
I have a question for you:

How do you get these settings I'm the database?
Is it just through the settings panel, fill a field and then hot 'save'?

@Verony-makesIT
Copy link
Contributor Author

Thank you for your kind words.

How did I handle this:

  1. I keep the old dates in a temporary setting in the settings db.
  2. Then the 2 dates are automatically adjusted in the invoice db so it can also be put in the right places in the email.
  3. If the email is NOT sent, the original dates are adjusted back in the invoice db and the 2 tmp dates are removed from the settings db.
  4. If the email IS sent, only the 2 tmp dates have to be removed from the settings db.
    Done!

Email example:
image

@nielsdrost7
Copy link
Contributor

Thanks @Verony-makesIT for this contribution.
It will make it into the Beta release.
We'll give you credit in the readme of the 1.6.1 release, once it comes out

@nielsdrost7 nielsdrost7 merged commit e4072da into InvoicePlane:development Feb 12, 2023
@Verony-makesIT Verony-makesIT changed the title IP-895: Option to Initiate Terms When Sending Invoice (WIP) IP-895: Option to Initiate Terms When Sending Invoice Feb 12, 2023
@Verony-makesIT Verony-makesIT deleted the IP-895 branch February 12, 2023 23:09
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.

None yet

2 participants