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

fix: automatically_fetch_payment_terms resets given Posting Date #38192

Closed
wants to merge 1 commit into from

Conversation

bosue
Copy link
Contributor

@bosue bosue commented Nov 19, 2023

automatically_fetch_payment_terms resets a given (historical) Posting Date to today so validation of the Due Date will inevitably fail.

In test_02_so_to_deliver:
transaction_date = "2021-06-01"

In create_sales_invoice:
sinv.posting_date = so.transaction_date

Result:

due_date = datetime.date(2021, 6, 1)
posting_date = '2023-11-19'
frappe.exceptions.validationerror: Due Date cannot be before Posting / Supplier Invoice Date

Let‘s start with a failing test.

@bosue bosue closed this Nov 19, 2023
@bosue
Copy link
Contributor Author

bosue commented Nov 20, 2023

Closed as expected behaviour.

@bosue bosue deleted the auto-fetch_updates_posting_date branch November 20, 2023 08:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant