ASBHammReports: Keine Warnung bei Zeiterfassung nach Spitzabrechnung
This commit is contained in:
@@ -140,6 +140,7 @@
|
||||
<Compile Include="Teamauslastung.designer.cs">
|
||||
<DependentUpon>Teamauslastung.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Validation\CustomServiceRecordValidator.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Budgetnachweis2.resx">
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace ASBHammReports.Validation
|
||||
{
|
||||
public class CustomServiceRecordValidator : ServiceRecordValidator
|
||||
{
|
||||
public override List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics,
|
||||
int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
|
||||
{
|
||||
var result = base.ValidateServiceRecord(newServiceRecord, statistics, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids);
|
||||
|
||||
// SettlementInvoiceAlreadyExisting-Warnung entfernen (falls es eine gibt)
|
||||
ServiceRecordValidationResultDC settlementInvoiceAlreadyExistingResult = null;
|
||||
foreach (var r in result)
|
||||
{
|
||||
if (r.ResultType == ServiceRecordValidationResult.SettlementInvoiceAlreadyExisting)
|
||||
{
|
||||
settlementInvoiceAlreadyExistingResult = r;
|
||||
}
|
||||
}
|
||||
if (settlementInvoiceAlreadyExistingResult != null)
|
||||
{
|
||||
result.Remove(settlementInvoiceAlreadyExistingResult);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user