Commit 1b42323c authored by Md Suleman's avatar Md Suleman

updated bench billing end date

parent 6a563e1f
...@@ -79,6 +79,14 @@ public class ResourceService implements IResourceService { ...@@ -79,6 +79,14 @@ public class ResourceService implements IResourceService {
} }
this.updateExistedResource(prevAllocation); this.updateExistedResource(prevAllocation);
} }
if(resourceAllocList.isEmpty()){
List<Resource> resourceBenchList = resourceRepo.findByEmployeeIdAndProjectId(resourceReq.getEmployeeId(),MyTeamUtils.BENCH_PROJECT_ID);
if(!resourceBenchList.isEmpty()){
Resource resourceBench = resourceBenchList.get(0);
resourceBench.setBillingEndDate(MyTeamDateUtils.getDayLessThanDate(resourceReq.getBillingStartDate()));
resourceRepo.save(resourceBench);
}
}
return resourceRepo.save(resourceReq); return resourceRepo.save(resourceReq);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment