AsSozialeDienstleistungenEV/LeistungnachweisMonatsbericht - Rundung gel Min wie in Tätigkeitsbericht

This commit is contained in:
2025-05-16 11:41:44 +02:00
parent a737152c3a
commit 82ef68f74a
2 changed files with 8 additions and 5 deletions

View File

@@ -275,7 +275,7 @@ namespace AsSozialeDienstleistungenEV
// xrTableCell2
//
this.xrTableCell2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.MinutesDateTime")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.hours")});
this.xrTableCell2.Font = new DevExpress.Drawing.DXFont("Arial", 8F);
this.xrTableCell2.Multiline = true;
this.xrTableCell2.Name = "xrTableCell2";
@@ -284,7 +284,7 @@ namespace AsSozialeDienstleistungenEV
this.xrTableCell2.StylePriority.UsePadding = false;
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell2.TextFormatString = "{0:HH:mm}";
this.xrTableCell2.TextFormatString = "{0:0.00}";
this.xrTableCell2.Weight = 0.084965788182126717D;
//
// xrTableCell15
@@ -1510,7 +1510,7 @@ namespace AsSozialeDienstleistungenEV
// hours
//
this.hours.DataMember = "Services";
this.hours.Expression = "[Minutes]/60";
this.hours.Expression = "Round([Minutes]/60, 2)";
this.hours.Name = "hours";
//
// PageFooter

View File

@@ -25,7 +25,8 @@ namespace AsSozialeDienstleistungenEV
public void SetReportDataSource(ServicesOverviewRO pRO)
{
double minutes = 0;
decimal minutes = 0;
pRO.TotalFLS = 0;
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
@@ -35,12 +36,14 @@ namespace AsSozialeDienstleistungenEV
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
{
ServicesOverviewRO.CreateSignatureString(sd);
minutes += sd.Minutes;
var minut = Math.Round((decimal)sd.Minutes / 60, 2, MidpointRounding.AwayFromZero);
minutes += minut;
servicesBillable.Add(sd);
}
}
pRO.TotalFLS = (double)minutes;
pRO.Services = servicesBillable;
}