fix creation for institutioncontract on Not Authorized contracting party
This commit is contained in:
@@ -4363,10 +4363,11 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
var creationTemp = await _institutionContractCreationTemp.Find(x => x.Id == request.TempId)
|
||||
.FirstOrDefaultAsync();
|
||||
// creationTemp.SetContractingPartyInfo(request.LegalType,request.RealParty,request.LegalParty);
|
||||
|
||||
bool tempCreated = false;
|
||||
if (creationTemp == null)
|
||||
{
|
||||
throw new BadRequestException("دیتای درخواست شده نامعتبر است");
|
||||
creationTemp = new InstitutionContractCreationTemp();
|
||||
await _institutionContractCreationTemp.InsertOneAsync(creationTemp);
|
||||
}
|
||||
|
||||
List<WorkshopTempViewModel> workshopDetails = [];
|
||||
@@ -4460,7 +4461,8 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
var res = new InstitutionContractCreationWorkshopsResponse()
|
||||
{
|
||||
TotalAmount = workshopDetails.Sum(x => x.WorkshopServicesAmount).ToMoney(),
|
||||
WorkshopTemps = workshopDetails
|
||||
WorkshopTemps = workshopDetails,
|
||||
TempId = creationTemp.Id
|
||||
};
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user