[UPDT] PAYROLL: Add condition in contract creation signals
This commit is contained in:
@@ -633,7 +633,9 @@ class OverrideWorkInfo(EmployeeWorkInformation):
|
||||
contract = Contract()
|
||||
contract.contract_name = f"{active_employee}'s Contract"
|
||||
contract.employee_id = active_employee
|
||||
contract.contract_start_date = datetime.today()
|
||||
contract.contract_start_date = (
|
||||
instance.date_joining if instance.date_joining else datetime.today()
|
||||
)
|
||||
contract.wage = (
|
||||
instance.basic_salary if instance.basic_salary is not None else 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user