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

Wrong data is saved on the company records if company/supervise is opened twice in the same the day #583

Open
tauame opened this issue Nov 26, 2024 · 2 comments · May be fixed by #584
Open

Comments

@tauame
Copy link

tauame commented Nov 26, 2024

It seems that everytime I open company/supervise page, the company data is updated. The problem with this approach is that if I do the following steps, wrong data gets saved about my company:

  1. Wait for a new company day to rollout and open yata supervise page;
  2. Change something on the company (such as adv. budget).
  3. Open yata supervise page;

What happens after following these steps is that the new adv. budget is considered for the profit calculation of yesterday, instead of the old one that was in place during the new company day.

My suggestion: Store the last time the data for this page was updated, and do not update the Stock Records nor Company Records panels if the last update was after 18:00TCT

Also, unrelated question: is there a crontab for updating the company data daily or do I need to open this page everyday to keep the records?

@tauame
Copy link
Author

tauame commented Nov 26, 2024

Created a pull request with a proposed fix: #584

@ate-it
Copy link
Collaborator

ate-it commented Nov 27, 2024

@tauame , many thanks for this and your PR which I'll review as soon as I can

@tauame tauame linked a pull request Dec 2, 2024 that will close this issue
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 a pull request may close this issue.

2 participants