Skip to content

[IP-1033]: Bugfix: creation dates of invoices should never be changed#1036

Merged
nielsdrost7 merged 5 commits intoInvoicePlane:bugfix/1033-creation-dates-of-invoices-should-never-be-changedfrom
mheiduk:bugfix/1033-creation-dates-of-invoices-should-never-be-changed
Mar 26, 2024
Merged

[IP-1033]: Bugfix: creation dates of invoices should never be changed#1036
nielsdrost7 merged 5 commits intoInvoicePlane:bugfix/1033-creation-dates-of-invoices-should-never-be-changedfrom
mheiduk:bugfix/1033-creation-dates-of-invoices-should-never-be-changed

Conversation

@mheiduk
Copy link
Copy Markdown
Contributor

@mheiduk mheiduk commented Mar 3, 2024

Description

only update invoice_date_due when sending email

invoice_date_created should not be updated and always stay the same

See (#1033) for more details

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

mheiduk added 2 commits March 3, 2024 17:22
invoice_date_created should not be updated and always stay the same
@nielsdrost7
Copy link
Copy Markdown
Contributor

Great PR.
How do I test proper working of this PR?
What do I fill where in order to see it in action?
What should happen?
What should not happen?

@Verony-makesIT

This comment was marked as off-topic.

@nielsdrost7
Copy link
Copy Markdown
Contributor

@mheiduk again, thank you for this PR. I'll try to go over it this weekend.
If you could just answer those questions I asked, that would be awesome.

@mheiduk
Copy link
Copy Markdown
Contributor Author

mheiduk commented Mar 8, 2024

@nielsdrost7

How do I test proper working of this PR? What do I fill where in order to see it in action? What should happen? What should not happen?

You have to send an overdue invoice to a client. If the setting in Settings -> Invoices -> Other settings is set to "No", then only the due date should update to the current date. If the setting is set to "Yes", then no date should be updated. The creation date should not be updated at all.

@nielsdrost7
Copy link
Copy Markdown
Contributor

Thanks mam! I'll take a look this weekend

@nielsdrost7 nielsdrost7 changed the title Bugfix: creation dates of invoices should never be changed #1033 [IP-1033]: Bugfix: creation dates of invoices should never be changed Mar 10, 2024
@nielsdrost7 nielsdrost7 linked an issue Mar 10, 2024 that may be closed by this pull request
@nielsdrost7 nielsdrost7 changed the base branch from development to bugfix/1033-creation-dates-of-invoices-should-never-be-changed March 10, 2024 05:20
Copy link
Copy Markdown
Contributor

@nielsdrost7 nielsdrost7 left a comment

Choose a reason for hiding this comment

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

Also:
public function mark_sent($invoice_id) in Mdl_invoices.php
Shouldn't you check for that due date as well there?

Because right now it's only checked when the invoice is emailed, but when someone manually sets the invoice to sent that due_date isn't checked?

What do you think?

Comment thread application/language/english/ip_lang.php Outdated
mheiduk added 3 commits March 25, 2024 20:06
…#1033

* remove unnecessary settings tmp_invoice_date and tmp_due_date settings
* remove unnecessary helper function reset_invoice_due_dates
@mheiduk
Copy link
Copy Markdown
Contributor Author

mheiduk commented Mar 25, 2024

Also: public function mark_sent($invoice_id) in Mdl_invoices.php Shouldn't you check for that due date as well there?

Because right now it's only checked when the invoice is emailed, but when someone manually sets the invoice to sent that due_date isn't checked?

What do you think?

Thanks for the input! Tried to simplify it as much as possible and cleaned up some things in the process. Please check if everything is working as expected for you.

@nielsdrost7 nielsdrost7 merged commit 90c3d0c into InvoicePlane:bugfix/1033-creation-dates-of-invoices-should-never-be-changed Mar 26, 2024
@nielsdrost7
Copy link
Copy Markdown
Contributor

Great, great Job!
I merged it into our 1033 branch, as I now noticed and then merged the 1033 branch into develop.
I'll make sure to credit you, once we make the new release.

It was fun doing this PR with you.

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.

Creation dates of invoices should never be changed

3 participants