Bug #1522: Use delivery date as deadline when subcontracting tasks
FEA: ItEr76S04BugFixing
This commit is contained in:
parent
f9a3e30694
commit
9b1fc4d75b
1 changed files with 9 additions and 7 deletions
|
|
@ -332,17 +332,19 @@ public class SubcontractServiceREST implements ISubcontractService {
|
|||
order.setCustomerReference(subcontractedTaskDataDTO.subcontractedCode);
|
||||
order.setWorkBudget(subcontractedTaskDataDTO.subcontractPrice);
|
||||
|
||||
if (subcontractedTaskDataDTO.deliverDate != null) {
|
||||
Date deliveryDate = DateConverter
|
||||
.toDate(subcontractedTaskDataDTO.deliverDate);
|
||||
DeadlineCommunication deadlineCommunication = DeadlineCommunication
|
||||
.create(new Date(), deliveryDate);
|
||||
order.getDeliveringDates().add(deadlineCommunication);
|
||||
order.setDeadline(deliveryDate);
|
||||
}
|
||||
|
||||
synchronizeWithSchedule(order,
|
||||
TaskSource.persistTaskSources(taskSourceDAO));
|
||||
order.writeSchedulingDataChanges();
|
||||
|
||||
if (subcontractedTaskDataDTO.deliverDate != null) {
|
||||
DeadlineCommunication deadlineCommunication = DeadlineCommunication
|
||||
.create(new Date(), DateConverter
|
||||
.toDate(subcontractedTaskDataDTO.deliverDate));
|
||||
order.getDeliveringDates().add(deadlineCommunication);
|
||||
}
|
||||
|
||||
order.validate();
|
||||
orderElementDAO.save(order);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue