|
|
@ -36,7 +36,11 @@ public class UnplannedIssueNoteEventHandler |
|
|
|
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<UnplannedIssueNote> eventData) |
|
|
|
{ |
|
|
|
var entity = eventData.Entity; |
|
|
|
|
|
|
|
if (entity.Details.Count > 0) |
|
|
|
{ |
|
|
|
await AddTransactionsAsync(entity).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.UnplannedIssueRequestNumber)) |
|
|
|
{ |
|
|
@ -63,8 +67,18 @@ public class UnplannedIssueNoteEventHandler |
|
|
|
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<UnplannedIssueNote>> eventData) |
|
|
|
{ |
|
|
|
var entities = eventData.Entity; |
|
|
|
await AddTransactionsAsync(entities).ConfigureAwait(false); |
|
|
|
await RemoveExpectOut(entities).ConfigureAwait(false); |
|
|
|
List<UnplannedIssueNote> notelist = new List<UnplannedIssueNote>(); |
|
|
|
foreach (var entity in entities) |
|
|
|
{ |
|
|
|
if (entity.Details.Count > 0) |
|
|
|
{ |
|
|
|
notelist.Add(entity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await AddTransactionsAsync(notelist).ConfigureAwait(false); |
|
|
|
await RemoveExpectOut(notelist).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
private async Task AddTransactionsAsync(List<UnplannedIssueNote> unplannedIssueNotes) |
|
|
|