cb
This commit is contained in:
@@ -454,12 +454,12 @@ namespace BS.Shared
|
||||
BargeldverwaltungFinanzenBearbeiten = 26002,
|
||||
BargeldverwaltungFinanzenLoeschen = 26003,
|
||||
|
||||
MedRecordsAnsehen = 27000,
|
||||
MedRecordsAnlegen = 27001,
|
||||
MedRecordsAendern = 27002,
|
||||
MedRecordsLoeschen = 27003,
|
||||
//MedRecordsAnsehen = 27000,
|
||||
//MedRecordsAnlegen = 27001,
|
||||
//MedRecordsAendern = 27002,
|
||||
//MedRecordsLoeschen = 27003,
|
||||
|
||||
ChatSettings = 28000
|
||||
//ChatSettings = 28000
|
||||
}
|
||||
|
||||
public enum PersonType
|
||||
|
||||
@@ -539,22 +539,23 @@ namespace BS.Shared.Core
|
||||
},
|
||||
{
|
||||
UserRightType.BargeldverwaltungFinanzenLoeschen, "Bargeldverwaltung unter Finanzen löschen"
|
||||
},
|
||||
{
|
||||
UserRightType.MedRecordsAnsehen, "Bedarfsmedikation ansehen"
|
||||
},
|
||||
{
|
||||
UserRightType.MedRecordsAnlegen, "Bedarfsmedikation anlegen"
|
||||
},
|
||||
{
|
||||
UserRightType.MedRecordsAendern, "Bedarfsmedikation bearbeiten"
|
||||
},
|
||||
{
|
||||
UserRightType.MedRecordsLoeschen, "Bedarfsmedikation löschen"
|
||||
},
|
||||
{
|
||||
UserRightType.ChatSettings, "Chat Einstellungen"
|
||||
}
|
||||
//,
|
||||
// {
|
||||
// UserRightType.MedRecordsAnsehen, "Bedarfsmedikation ansehen"
|
||||
// },
|
||||
// {
|
||||
// UserRightType.MedRecordsAnlegen, "Bedarfsmedikation anlegen"
|
||||
// },
|
||||
// {
|
||||
// UserRightType.MedRecordsAendern, "Bedarfsmedikation bearbeiten"
|
||||
// },
|
||||
// {
|
||||
// UserRightType.MedRecordsLoeschen, "Bedarfsmedikation löschen"
|
||||
// },
|
||||
// {
|
||||
// UserRightType.ChatSettings, "Chat Einstellungen"
|
||||
// }
|
||||
|
||||
};
|
||||
#endregion
|
||||
|
||||
@@ -587,7 +587,17 @@ namespace BS.Shared.Services
|
||||
{
|
||||
if (scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue && scap.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Weekly)
|
||||
{
|
||||
var serviceUnit = costRatePeriods.GetCostRatePeriodForDate(CostRatePeriodType.MinutesPerServiceUnit, DateTime.Now);
|
||||
DateTime dt = DateTime.Now;
|
||||
if (scap.StartDate.HasValue && scap.StartDate.Value > dt)
|
||||
{
|
||||
dt = scap.StartDate.Value;
|
||||
}
|
||||
if (scap.EndDate.HasValue && scap.EndDate.Value < dt)
|
||||
{
|
||||
dt = scap.EndDate.Value;
|
||||
}
|
||||
|
||||
var serviceUnit = costRatePeriods.GetCostRatePeriodForDate(CostRatePeriodType.MinutesPerServiceUnit, dt);
|
||||
if (serviceUnit != null)
|
||||
return serviceUnit.GetBEInHours(scap.ApprovedBEPerInterval);
|
||||
}
|
||||
@@ -611,7 +621,7 @@ namespace BS.Shared.Services
|
||||
{
|
||||
decimal? hoursPerWeek = GetApprovedHoursPerWeek(scap, costRatePeriods);
|
||||
if (hoursPerWeek.HasValue && useIsCalculationWithFactor)
|
||||
hoursPerWeek = ApplyIsCalculationWithFactor(relDC, hoursPerWeek);
|
||||
hoursPerWeek = ApplyIsCalculationWithFactor(relDC, scap, hoursPerWeek);
|
||||
return hoursPerWeek;
|
||||
}
|
||||
|
||||
@@ -641,6 +651,20 @@ namespace BS.Shared.Services
|
||||
return hoursPerWeek;
|
||||
}
|
||||
|
||||
public virtual decimal? ApplyIsCalculationWithFactor(SupportConceptCostBearerRelDC relDC, SupportConceptApprovalPeriodDC scap, decimal? valueToApply)
|
||||
{
|
||||
DateTime dt = DateTime.Now;
|
||||
if (scap.StartDate.HasValue && scap.StartDate.Value > dt)
|
||||
{
|
||||
dt = scap.StartDate.Value;
|
||||
}
|
||||
if (scap.EndDate.HasValue && scap.EndDate.Value < dt)
|
||||
{
|
||||
dt = scap.EndDate.Value;
|
||||
}
|
||||
return ApplyIsCalculationWithFactor(relDC, valueToApply, dt);
|
||||
}
|
||||
|
||||
public virtual decimal? ApplyIsCalculationWithFactor(SupportConceptCostBearerRelDC relDC, decimal? valueToApply)
|
||||
{
|
||||
return ApplyIsCalculationWithFactor(relDC, valueToApply, DateTime.Now);
|
||||
|
||||
Reference in New Issue
Block a user