Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2025-07-31 16:43:57 +02:00
2 changed files with 17 additions and 8 deletions

View File

@@ -503,6 +503,7 @@ namespace DrobDrogenhilfe.Alt
//
// xrTableCell16
//
this.xrTableCell16.CanShrink = true;
this.xrTableCell16.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Notice")});
this.xrTableCell16.Name = "xrTableCell16";
@@ -534,6 +535,7 @@ namespace DrobDrogenhilfe.Alt
//
// xrTableCell9
//
this.xrTableCell9.CanShrink = true;
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "FehlkontakteString")});
this.xrTableCell9.Name = "xrTableCell9";
@@ -562,6 +564,7 @@ namespace DrobDrogenhilfe.Alt
//
// xrTableCell29
//
this.xrTableCell29.CanShrink = true;
this.xrTableCell29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceTimes")});
this.xrTableCell29.Name = "xrTableCell29";
@@ -591,6 +594,7 @@ namespace DrobDrogenhilfe.Alt
//
// xrTableCell31
//
this.xrTableCell31.CanShrink = true;
this.xrTableCell31.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "FinalSentence")});
this.xrTableCell31.Name = "xrTableCell31";
@@ -619,7 +623,7 @@ namespace DrobDrogenhilfe.Alt
//
// xrLabel11
//
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(582.9999F, 192F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(459.0415F, 192F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(67F, 17F);
@@ -645,7 +649,7 @@ namespace DrobDrogenhilfe.Alt
//
// bottomMarginBand1
//
this.bottomMarginBand1.HeightF = 38.91665F;
this.bottomMarginBand1.HeightF = 86.51287F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// GroupHeader1
@@ -988,7 +992,7 @@ namespace DrobDrogenhilfe.Alt
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new DevExpress.Drawing.DXMargins(90.04166F, 1F, 100F, 38.91665F);
this.Margins = new DevExpress.Drawing.DXMargins(90.04166F, 1F, 100F, 86.51287F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;

View File

@@ -897,8 +897,12 @@ namespace BeWo.Service.Invoicing
public virtual void CalculateInvoiceItemAmounts(Settlement2DC si)
{
decimal flsBudgetGesamt = si.ApprovedFLS ?? 0;
decimal flsAufgebraucht = 0;
decimal flsBudgetGesamt = si.ApprovedFLS ?? 0;
if (!CheckMaxApprovedHours())
{
flsBudgetGesamt = Decimal.MaxValue;
}
foreach (var ii in si.InvoiceItems)
{
@@ -909,7 +913,6 @@ namespace BeWo.Service.Invoicing
// dieser Abschnitt prüft und kappt ggf. Stunden bei Überschreitung Budget - unter Berücksichtigung ProzentBudget in Leistung(skategorien)
var unitCountBudget = Math.Round(ii.UnitCountBudget ?? ii.UnitCount ?? 0, 2, MidpointRounding.AwayFromZero);
ii.UnitCount = Math.Round(ii.UnitCount.Value, 2, MidpointRounding.AwayFromZero);
var relation = unitCountBudget / ii.UnitCount.Value;
var gewichteteStunden = ii.UnitCount * relation;
if (gewichteteStunden > flsBudgetGesamt - flsAufgebraucht)
@@ -928,11 +931,13 @@ namespace BeWo.Service.Invoicing
}
ii.AmountTotal = ii.UnitCount.Value * ii.AmountPerUnit.Value;
if (ii.RateFactor.HasValue && ii.RateFactor.Value != 0)
ii.GrossAmountTotal = Math.Round(ii.AmountTotal.Value * ((100m + ii.RateFactor.Value) / 100m), 2,
MidpointRounding.AwayFromZero);
{
ii.GrossAmountTotal = Math.Round(ii.AmountTotal.Value * ((100m + ii.RateFactor.Value) / 100m), 2, MidpointRounding.AwayFromZero);
}
else
{
ii.GrossAmountTotal = ii.AmountTotal;
}
}
if (ii.MaxApprovedUnitCount < ii.UnitCount)
{