-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FFT-202 Update payroll forecast on user actions (#625)
- Loading branch information
Showing
5 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from celery import shared_task | ||
|
||
from core.models import FinancialYear | ||
from costcentre.models import CostCentre | ||
from payroll.services.payroll import update_payroll_forecast | ||
|
||
|
||
@shared_task | ||
def update_all_payroll_forecast(*, financial_year: int): | ||
financial_year = FinancialYear(pk=financial_year) | ||
|
||
for cost_centre in CostCentre.objects.all(): | ||
update_payroll_forecast(financial_year=financial_year, cost_centre=cost_centre) |