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

Use business timezone info when filling in SAFT info #444

Merged
merged 2 commits into from
Jun 12, 2023

Conversation

thenmaster
Copy link
Member

While the timezone was already being used for getting the documents for the given time period, we were not using the timezone for filling in the date releated fields. This meant that the daylight savings problems we were trying to fix could still happen

While the timezone was already being used for getting the documents for
the given time period, we were not using the timezone for filling in the
date releated fields. This meant that the daylight savings problems we
were trying to fix could still happen
@@ -1160,7 +1166,8 @@ private List<PaymentMethod> getPaymentsList(PTGenericInvoiceEntity document)
this.MAX_LENGTH_2, true));
payment.setPaymentAmount(this
.validateBigDecimal(((PTPayment) p).getPaymentAmount()));
payment.setPaymentDate(this.formatDate(p.getPaymentDate()));
payment.setPaymentDate(this.formatLocalDate(LocalDate
.ofInstant(document.getDate().toInstant(), document.getBusiness().getTimezone())));
Copy link
Member

Choose a reason for hiding this comment

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

This is the document creation date =/= payment date

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed alongside another similar error I found while reviewing all the other changes I did

@thenmaster thenmaster merged commit 46d788c into master Jun 12, 2023
@thenmaster thenmaster deleted the use_business_timezone_in_saft branch June 12, 2023 14:03
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.

2 participants