MH: Negativbeträge in Leistungen und Kategorien erlaubt

This commit is contained in:
2024-03-27 18:25:18 +01:00
parent 97b25d2111
commit 06cbee8893
6 changed files with 15 additions and 14 deletions

View File

@@ -207,7 +207,7 @@ namespace BeWo.ViewModel
List<CostRatePeriodDC> crpList = _CostRatePeriods.CopyToDCList(doCommit);
foreach (var costRatePeriodDc in crpList)
{
if (costRatePeriodDc.CostRateValue.HasValue && costRatePeriodDc.CostRateValue.Value > 0)
if (costRatePeriodDc.CostRateValue.HasValue && costRatePeriodDc.CostRateValue.Value != 0)
bDataContract.CostRatePeriods.Add(costRatePeriodDc);
}

View File

@@ -377,7 +377,7 @@ namespace BeWo.ViewModel
List<CostRatePeriodDC> crpList = this._CostRatePeriods.CopyToDCList(doCommit);
foreach (var costRatePeriodDc in crpList)
{
if (costRatePeriodDc.CostRateValue.HasValue && costRatePeriodDc.CostRateValue.Value > 0)
if (costRatePeriodDc.CostRateValue.HasValue && costRatePeriodDc.CostRateValue.Value != 0)
pDataContract.CostRatePeriods.Add(costRatePeriodDc);
}
if (pDataContract.CostRatePeriods.Count == 0)

View File

@@ -391,10 +391,10 @@ namespace BeWo.ViewModel
pDataContract.CostRatePeriods = new List<CostRatePeriodDC>();
List<CostRatePeriodDC> crpList = _CostRatePeriods.CopyToDCList(doCommit);
List<CostRatePeriodDC> crpList = _CostRatePeriods.CopyToDCList(doCommit);
foreach (var costRatePeriodDc in crpList)
{
if (costRatePeriodDc.CostRateValue.HasValue && costRatePeriodDc.CostRateValue.Value > 0)
if (costRatePeriodDc.CostRateValue.HasValue && costRatePeriodDc.CostRateValue.Value != 0)
pDataContract.CostRatePeriods.Add(costRatePeriodDc);
}

View File

@@ -153,7 +153,7 @@ namespace BeWo.Service.Invoicing
{
foreach (var costRatePeriod in ap.ServiceCategory.CostRatePeriods)
{
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value > 0)
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value != 0)
return false;
}
}
@@ -164,7 +164,7 @@ namespace BeWo.Service.Invoicing
{
foreach (var costRatePeriod in sd.CostRatePeriods)
{
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value > 0)
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value != 0)
return false;
}
}
@@ -185,7 +185,7 @@ namespace BeWo.Service.Invoicing
{
foreach (var costRatePeriod in sr.ServiceDescription.CostRatePeriods)
{
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value > 0)
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value != 0)
return false;
}
}
@@ -194,7 +194,7 @@ namespace BeWo.Service.Invoicing
{
foreach (var costRatePeriod in sr.ServiceDescription.ServiceCategory.CostRatePeriods)
{
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value > 0)
if (costRatePeriod.CostRateValue.HasValue && costRatePeriod.CostRateValue.Value != 0)
return false;
}
}
@@ -384,7 +384,7 @@ namespace BeWo.Service.Invoicing
decimal tolerance = 100;
if (tolerancesInSpanList.Count > 0)
{
if (tolerancesInSpanList[0].Key.CostRateValue.HasValue && tolerancesInSpanList[0].Key.CostRateValue.Value > 0)
if (tolerancesInSpanList[0].Key.CostRateValue.HasValue && tolerancesInSpanList[0].Key.CostRateValue.Value != 0)
{
tolerance = tolerancesInSpanList[0].Key.CostRateValue ?? 100;
}

View File

@@ -61,11 +61,12 @@ namespace BeWo.Service.Plugins
}
var creator = factory.CreateInvoiceCreator(cb.ID, tenant, supportConcepts2ServiceRecords);
var newInvoices = creator.GenerateServiceInvoices(costBearerOid, invoicePeriod, supportConcepts2ServiceRecords);
var newInvoices = creator.GenerateServiceInvoices(costBearerOid, invoicePeriod, supportConcepts2ServiceRecords);
//Prüfe ob Rechnungen neu sind oder Diff vorhanden
var differenzRechnungChecks = GetNewInvoices(newInvoices, invoicePeriod.StartDate, invoicePeriod.EndDate);
var resultList = ErstelleNeueRechnungen(differenzRechnungChecks);
//Prüfe ob Rechnungen neu sind oder Diff vorhanden
var differenzRechnungChecks = GetNewInvoices(newInvoices, invoicePeriod.StartDate, invoicePeriod.EndDate);
var resultList = ErstelleNeueRechnungen(differenzRechnungChecks);
return resultList;
}

View File

@@ -1216,7 +1216,7 @@ namespace BS.Shared.Services
var duration = Convert.ToDecimal((iRecord.End - iRecord.Start).Value.TotalMinutes);
//###CB 5min
if (minuteInterval != null && minuteInterval.CostRateValue.HasValue && minuteInterval.CostRateValue.Value > 0)
if (minuteInterval != null && minuteInterval.CostRateValue.HasValue && minuteInterval.CostRateValue.Value != 0)
{
iRecord.RoundedDuration = GetRoundedDuration((int)minuteInterval.CostRateValue.Value, duration);
}