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

This commit is contained in:
2025-01-10 15:23:20 +01:00
9 changed files with 280 additions and 43 deletions

View File

@@ -34,7 +34,7 @@ namespace BeWo.View.Controls
if (overtime != null)
{
TxtUeberstunden.Text = string.Format("{0:0.00}", overtime.Betrag);
TxtAuszahlungsart.Text = overtime.Auszahlungsart.Name;
TxtAuszahlungsart.Text = overtime.Auszahlungsart != null ? overtime.Auszahlungsart.Name : "-";
TxtUeberstunden.Visibility = Visibility.Visible;
TxtAuszahlungsart.Visibility = Visibility.Visible;

View File

@@ -258,6 +258,23 @@ namespace BeWo.BetreutesWohnenAmRheinReports
}
return pausenZeit;
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2024 && start.Month == 12 && (start.Day == 24 || start.Day == 31))
{
return 0.5m;
}
return base.GetFeiertagsFaktor(start);
}
public override bool IstAnrechenbareAbsenceTime(AbsenceTime item)
{
if (item.AbsenceReason.Description == "Überstundenfrei")
return false;
else
return base.IstAnrechenbareAbsenceTime(item);
}
}
}

View File

@@ -19,21 +19,29 @@ namespace BetreutesWohnenAmRheinReports.Service
// return list;
//}
public override List<FeiertagDC> GetFeiertage(int year, string bundesland)
{
var list = base.GetFeiertage(year, bundesland);
var osterSonntag = GetOsterSonntag(year);
list.Add(new FeiertagDC() {Datum = osterSonntag.AddDays(-48), Name = "Rosenmontag" }); // "Rosenmontag"
list.Add(new FeiertagDC() { Datum = osterSonntag.AddDays(-48), Name = "Rosenmontag" }); // "Rosenmontag"
if (year >= 2024)
{
var heiligabend = list.FirstOrDefault(l => l.Name == "Heilig Abend");
if (heiligabend != null)
list.Remove(heiligabend);
list.Add(new FeiertagDC() { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
}
return list;
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2024 && start.Month == 12 && (start.Day == 24 || start.Day == 31))
{
return 0.5m;
}
return base.GetFeiertagsFaktor(start);
}
}
}

View File

@@ -1,15 +1,17 @@
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Services;
using System;
using System.Collections.Generic;
using System.Linq;
namespace BetreutesWohnenWoellReports.Invoicing
{
public class JugendamtInvoiceCreation : InvoiceCreation
{
{
public override IList<InvoiceItem> CreateInvoiceItems(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
{
var list = new List<InvoiceItem>();
@@ -20,6 +22,7 @@ namespace BetreutesWohnenWoellReports.Invoicing
if (!iServiceRecord.AlreadyAccounted)
{
InvoiceItem invoiceItem = CreateInvoiceItem(iServiceRecord, scap, calc);
invoiceItem.Notice = iServiceRecord.ServiceDescription.CategoryName;
if (invoiceItem != null)
{
list.Add(invoiceItem);
@@ -31,7 +34,12 @@ namespace BetreutesWohnenWoellReports.Invoicing
}
}
return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc);
if (scap.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && scap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value == "Jugendamt")
return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc, false, true);
else
return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc, false);
//return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc);
}
private InvoiceItem CreateFahrtkostenItem(InvoiceItem item)
@@ -63,5 +71,136 @@ namespace BetreutesWohnenWoellReports.Invoicing
return key;
}
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList,
DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth, bool addRateFactorToUnitCount)
{
#region Standard
//Fasse InvoiceItems mit gleichem Stundensatz zusammen:
var newlist = new List<InvoiceItem>();
var rateToItem = new Dictionary<String, InvoiceItem>();
foreach (InvoiceItem iitem in itemList)
{
InvoiceItem item;
var key = GetSummaryItemKey(scap, iitem, summaryPerMonth);
if (rateToItem.ContainsKey(key))
{
item = rateToItem[key];
}
else
{
item = new InvoiceItem();
#endregion
item.Notice = iitem.Notice; // Brauche die Notice..
#region Standard
newlist.Add(item);
item.AmountPerUnit = iitem.AmountPerUnit;
if (invoicePeriod != null)
{
item.ItemPeriodStart = invoicePeriod.StartDate;
item.ItemPeriodEnd = invoicePeriod.EndDate;
}
else
{
item.ItemPeriodStart = scap.StartDate;
item.ItemPeriodEnd = scap.EndDate;
}
if (summaryPerMonth && iitem.ItemPeriodStart.HasValue)
{
DateTime start = new DateTime(iitem.ItemPeriodStart.Value.Year, iitem.ItemPeriodStart.Value.Month, 1);
DateTime end = start.AddMonths(1).AddDays(-1);
if (item.ItemPeriodStart < start)
{
item.ItemPeriodStart = start;
}
if (item.ItemPeriodEnd > end)
{
item.ItemPeriodEnd = end;
}
}
item.RateFactor = iitem.RateFactor;
item.AccountingInterval = iitem.AccountingInterval;
item.ItemDescription = iitem.ItemDescription;
item.UnitDescription = iitem.UnitDescription;
item.SupportConceptApprovalPeriodOid = scap.Oid;
rateToItem[key] = item;
}
if (!item.UnitCount.HasValue)
{
item.UnitCount = 0;
}
item.UnitCount += iitem.UnitCount ?? 0;
}
BerechneSummaryItemsSummen(newlist, addRateFactorToUnitCount);
return newlist;
#endregion
}
public override void CheckMaxApprovedAmount(ServiceInvoice invoice, ServiceInvoicePeriod sip, SupportConceptApprovalPeriodDC scap, CostBearer2SupportConcept costBearer2SupportConcept, DateTimeSpan invoicePeriod, List<ServiceRecordDC> serviceRecords)
{
if (sip.ApprovedHours.HasValue && !scap.IsApprovedBEShifting)
{
//Prüfen ob der abzurechnende Zeitraum kleiner als das Bewilligungsintervall ist
if (scap.ApprovedBEInterval.HasValue)
{
var days = invoicePeriod.GetTimeSpan().Days + 1;
switch (scap.ApprovedBEInterval.Value)
{
case SupportConceptApprovalInterval.Quarterly:
if (days < 89) //CB: Machen wir es mal nicht zu kompliziert, wenn man weniger als 89 Tage abrechnet, gehen wir davon aus, dass nicht das gesamte Quartal abgerechnet wird
{
return; // Mach nix. TODO: Gesamtstunden prüfen und dann nur das abrechnen, was noch offen ist. Wer das macht bekommt ein Fleißsternchen:-)
}
break;
case SupportConceptApprovalInterval.HalfYearly:
if (days < 178) //CB: Siehe oben
{
return; // Mach nix. TODO: Gesamtstunden prüfen und dann nur das abrechnen, was noch offen ist. Wer das macht bekommt ein Fleißsternchen:-)
}
break;
case SupportConceptApprovalInterval.Yearly:
if (days < 365) //CB: Siehe oben
{
return; // Mach nix. TODO: Gesamtstunden prüfen und dann nur das abrechnen, was noch offen ist. Wer das macht bekommt ein Fleißsternchen:-)
}
break;
default:
break;
}
}
decimal totalHours = 0;
foreach (var ii in sip.InvoiceItemList.Where(ii => ii.UnitCount.HasValue && ii.ItemDescription != "Fahrkosten pro km")) // KM werden immer abgerechnet, wie werden nicht vom Budget abgezogen
{
if (totalHours + ii.UnitCount.Value > sip.ApprovedHours)
{
ii.UnitCount = Math.Round(sip.ApprovedHours.Value - totalHours, 2, MidpointRounding.AwayFromZero);
if (ii.AmountPerUnit.HasValue)
{
ii.AmountTotal = ii.AmountPerUnit.Value * ii.UnitCount;
ii.GrossAmountTotal = ii.AmountTotal;
}
totalHours = sip.ApprovedHours.Value;
}
else
{
totalHours += ii.UnitCount.Value;
}
}
}
}
}
}

View File

@@ -153,8 +153,7 @@ namespace BeWo.Report.DefaultReports
this.xrLabel5.SizeF = new System.Drawing.SizeF(240.5833F, 65.66664F);
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.StylePriority.UseTextAlignment = false;
this.xrLabel5.Text = "Geschäftsführung:\r\nFiona Wöll, B.A. Soziale Arbeit\r\nLisa Wöll, Dipl- Sozialarbeit" +
"erin";
this.xrLabel5.Text = "Geschäftsführung:\r\nFiona Wöll, B.A. Soziale Arbeit";
this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// xrLabel4
@@ -277,6 +276,8 @@ namespace BeWo.Report.DefaultReports
// xrTableCell8
//
this.xrTableCell8.CanShrink = true;
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerInsuranceNumber")});
this.xrTableCell8.Multiline = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Weight = 5.0079144287109374D;

View File

@@ -1,7 +1,7 @@
using System;
using System.Text;
using BeWo.Report.ReportObjects;
using BS.Shared.Extensions;
using DevExpress.XtraReports.UI;
namespace BeWo.Report.DefaultReports
@@ -18,16 +18,28 @@ namespace BeWo.Report.DefaultReports
DateTime start = pRO.AccountingPeriodStart;
DateTime end = pRO.AccountingPeriodEnd;
var istJugendamt = false;
// Überschrift je nach Leistung setzen und Briefkopf nach Kostenträgerfunktion
foreach (var ip in pRO.ServiceInvoicePeriods)
{
foreach (var ap in ip.CostBearer2SupportConcept.ApprovalPeriodList)
{
if (ap.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && ap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value == "Jugendamt")
istJugendamt = true;
if (ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("§"))
{
lblUeberschrift.Text = ap.ServiceCategory.Name;
}
else
{
foreach (var item in ip.ServiceInvoiceItems)
{
if (!item.Notice.IsNullOrEmpty() && item.Notice.Contains("§"))
lblUeberschrift.Text = item.Notice;
}
}
// Wenn es keine Rechnung an ein Jugendamt ist, Briefkopf ändern
if (ap.CostBearer2SupportConcept.CostBearer.Organisation.Function == null || ap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value != "Jugendamt")
{
lblFachbereich.Text = null;
@@ -41,8 +53,8 @@ namespace BeWo.Report.DefaultReports
{
rowFamilienhilfe.Visible = false;
rowVersicherungsnummer.Visible = false;
//rowZeichen.Visible = false;
rowBewilligungsumfang.Visible = false;
labelIKoderGP.Text = "GP-Nummer:";
WertIKoderGP.Text = pRO.BusinessPartnerId;
}
@@ -56,20 +68,28 @@ namespace BeWo.Report.DefaultReports
string periode = "";
switch (ip.SupportConceptApprovalPeriod.ApprovedBEInterval)
{
case BS.Shared.SupportConceptApprovalInterval.Daily: periode = "Tag";break;
case BS.Shared.SupportConceptApprovalInterval.Weekly: periode = "Woche";break;
case BS.Shared.SupportConceptApprovalInterval.Monthly: periode = "Monat";break;
case BS.Shared.SupportConceptApprovalInterval.HalfYearly: periode = "Halbjahr";break;
case BS.Shared.SupportConceptApprovalInterval.Yearly: periode = "Jahr";break;
case BS.Shared.SupportConceptApprovalInterval.Fortnightly: periode = "Pauschal";break;
case BS.Shared.SupportConceptApprovalInterval.Daily: periode = "Tag"; break;
case BS.Shared.SupportConceptApprovalInterval.Weekly: periode = "Woche"; break;
case BS.Shared.SupportConceptApprovalInterval.Monthly: periode = "Monat"; break;
case BS.Shared.SupportConceptApprovalInterval.HalfYearly: periode = "Halbjahr"; break;
case BS.Shared.SupportConceptApprovalInterval.Yearly: periode = "Jahr"; break;
case BS.Shared.SupportConceptApprovalInterval.Fortnightly: periode = "Pauschal"; break;
}
cellBewilligungsumfang.Text += string.Format("{0:0.00}", ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval) + " FLS / " + periode + " bis " + string.Format("{0:dd.MM.yyyy}", ip.SupportConceptApprovalPeriod.EndDate) + "\n";
}
}
// Für Jugendamt IK und Versicherungsnummer raus
if (istJugendamt)
{
rowIKNummer.Visible = false;
rowVersicherungsnummer.Visible = false;
}
if (start.Month == end.Month && start.Year == end.Year)
{

View File

@@ -26,6 +26,19 @@ namespace KommMit.Service
}
return list;
}
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2024 && start.Month == 12 && (start.Day == 24 || start.Day == 31))
{
return 0.5m;
}
else if (IstFeiertag(start))
{
return 1;
}
return 0;
}
}
}

View File

@@ -69,6 +69,8 @@ namespace SKMAachen
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.lblDifferenzrechnung1 = new DevExpress.XtraReports.UI.XRLabel();
this.lblDifferenzrechnung2 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -93,7 +95,7 @@ namespace SKMAachen
// xrPictureBox1
//
this.xrPictureBox1.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox1.ImageSource"));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(421.7502F, 0F);
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(440.5837F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(255.2498F, 80.70667F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
@@ -123,7 +125,7 @@ namespace SKMAachen
//
this.xrLabel10.Font = new DevExpress.Drawing.DXFont("Verdana", 7F);
this.xrLabel10.ForeColor = System.Drawing.Color.Gray;
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(578.1249F, 0F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(596.9584F, 0F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -138,11 +140,11 @@ namespace SKMAachen
//
this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Verdana", 7F);
this.xrLabel9.ForeColor = System.Drawing.Color.Gray;
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(385.4167F, 0F);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(396.875F, 0F);
this.xrLabel9.Multiline = true;
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(192.7083F, 71.10926F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(200.0835F, 71.10926F);
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.StylePriority.UseForeColor = false;
this.xrLabel9.StylePriority.UseTextAlignment = false;
@@ -158,7 +160,7 @@ namespace SKMAachen
this.xrLabel6.Multiline = true;
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(192.7083F, 71.10926F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(204.1667F, 71.10926F);
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.StylePriority.UseForeColor = false;
this.xrLabel6.StylePriority.UseTextAlignment = false;
@@ -184,6 +186,8 @@ namespace SKMAachen
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblDifferenzrechnung2,
this.lblDifferenzrechnung1,
this.xrLabel11,
this.xrLabel3,
this.xrLabel1,
@@ -193,7 +197,7 @@ namespace SKMAachen
this.lblForderung,
this.xrLabel2,
this.lblAbrechnungszeitraum});
this.Page1.HeightF = 473.1048F;
this.Page1.HeightF = 488.313F;
this.Page1.Name = "Page1";
this.Page1.StylePriority.UseFont = false;
//
@@ -258,14 +262,14 @@ namespace SKMAachen
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(501.3751F, 217.6081F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(148.6251F, 23F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(194.4584F, 23F);
this.xrLabel8.StylePriority.UseTextAlignment = false;
this.xrLabel8.Text = "xrLabel8";
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// xrTable2
//
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(367.0001F, 10F);
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(367.0001F, 10.00001F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2,
@@ -275,7 +279,7 @@ namespace SKMAachen
this.xrTableRow1,
this.xrTableRow6,
this.xrTableRow8});
this.xrTable2.SizeF = new System.Drawing.SizeF(283F, 134F);
this.xrTable2.SizeF = new System.Drawing.SizeF(328.8332F, 134F);
//
// xrTableRow2
//
@@ -406,13 +410,12 @@ namespace SKMAachen
//
// lblForderung
//
this.lblForderung.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.lblForderung.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F);
this.lblForderung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 432.6881F);
this.lblForderung.Multiline = true;
this.lblForderung.Name = "lblForderung";
this.lblForderung.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblForderung.SizeF = new System.Drawing.SizeF(650F, 40.41666F);
this.lblForderung.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblForderung.StylePriority.UseFont = false;
this.lblForderung.Text = "Hieraus ergibt sich eine Forderung von ___ Std. x 61,40 EUR = ________ EUR.";
//
@@ -423,7 +426,7 @@ namespace SKMAachen
this.xrLabel2.Multiline = true;
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(650F, 112.9134F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(695.8333F, 112.9134F);
this.xrLabel2.StylePriority.UseBackColor = false;
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.Text = resources.GetString("xrLabel2.Text");
@@ -435,7 +438,7 @@ namespace SKMAachen
this.lblAbrechnungszeitraum.Multiline = true;
this.lblAbrechnungszeitraum.Name = "lblAbrechnungszeitraum";
this.lblAbrechnungszeitraum.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(650F, 62F);
this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(695.8333F, 62F);
this.lblAbrechnungszeitraum.StylePriority.UseFont = false;
this.lblAbrechnungszeitraum.Text = "Im Zeitraum [AccountingPeriodStart!dd.MM.yyyy] bis [AccountingPeriodEnd!dd.MM.yyy" +
"y] wurden ____ Dienstleistungsstunden unmittelbare Betreuungsleistungen des Ambu" +
@@ -450,11 +453,11 @@ namespace SKMAachen
//
// xrLabel15
//
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0.0002066294F, 21.875F);
this.xrLabel15.Multiline = true;
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(650F, 124.7343F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(695.8333F, 124.7343F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.StylePriority.UseTextAlignment = false;
this.xrLabel15.Text = resources.GetString("xrLabel15.Text");
@@ -465,12 +468,12 @@ namespace SKMAachen
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel4,
this.xrLabel15});
this.GroupFooter2.HeightF = 229.1258F;
this.GroupFooter2.HeightF = 247.6877F;
this.GroupFooter2.Name = "GroupFooter2";
//
// xrLabel4
//
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 188.7091F);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 207.271F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -478,6 +481,28 @@ namespace SKMAachen
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "Unterschrift und Stempel des Anbieters ";
//
// lblDifferenzrechnung1
//
this.lblDifferenzrechnung1.CanShrink = true;
this.lblDifferenzrechnung1.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F);
this.lblDifferenzrechnung1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 451.2297F);
this.lblDifferenzrechnung1.Multiline = true;
this.lblDifferenzrechnung1.Name = "lblDifferenzrechnung1";
this.lblDifferenzrechnung1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblDifferenzrechnung1.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblDifferenzrechnung1.StylePriority.UseFont = false;
//
// lblDifferenzrechnung2
//
this.lblDifferenzrechnung2.CanShrink = true;
this.lblDifferenzrechnung2.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblDifferenzrechnung2.LocationFloat = new DevExpress.Utils.PointFloat(0.0002066294F, 469.7714F);
this.lblDifferenzrechnung2.Multiline = true;
this.lblDifferenzrechnung2.Name = "lblDifferenzrechnung2";
this.lblDifferenzrechnung2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblDifferenzrechnung2.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblDifferenzrechnung2.StylePriority.UseFont = false;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
@@ -500,7 +525,7 @@ namespace SKMAachen
this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new DevExpress.Drawing.DXMargins(75F, 75F, 135.5417F, 125.5471F);
this.Margins = new DevExpress.Drawing.DXMargins(75F, 24F, 135.5417F, 125.5471F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
@@ -553,5 +578,7 @@ namespace SKMAachen
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
private DevExpress.XtraReports.UI.XRLabel lblDifferenzrechnung1;
private DevExpress.XtraReports.UI.XRLabel lblDifferenzrechnung2;
}
}

View File

@@ -20,6 +20,9 @@ namespace SKMAachen
{
decimal hourlyRate = 0;
decimal hours = 0;
ServiceInvoiceItemRO bereitsBerechnetesItem = null;
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
{
foreach (var p in pRO.ServiceInvoicePeriods)
@@ -32,7 +35,8 @@ namespace SKMAachen
{
if (i.HourlyRate.HasValue)
{
hourlyRate = i.HourlyRate.Value;
if (i.HourlyRate.Value >= 0)
hourlyRate = i.HourlyRate.Value;
if (!String.IsNullOrEmpty(i.RateFactor))
{
@@ -44,7 +48,10 @@ namespace SKMAachen
if (i.Hours.HasValue)
{
hours += i.Hours.Value;
if (!i.ServiceDescription.Contains("Rechnungsnummer"))
hours += i.Hours.Value;
else
bereitsBerechnetesItem = i;
}
}
}
@@ -52,8 +59,13 @@ namespace SKMAachen
}
lblForderung.Text =
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, pRO.NetClaim.Replace("€", "EUR"));
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, string.Format("{0:0.00} EUR", hours * hourlyRate));
//String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, pRO.NetClaim.Replace("€", "EUR"));
if (pRO.InvoiceBase.InvoiceTypeText == "Differenzrechnung" && bereitsBerechnetesItem != null)
{
lblDifferenzrechnung1.Text = string.Format("{0}: {1:0.00} Std. x {2:0.00} EUR = {3:0.00} EUR", bereitsBerechnetesItem.ServiceDescription, bereitsBerechnetesItem.Hours, bereitsBerechnetesItem.HourlyRate * -1, Convert.ToDecimal(bereitsBerechnetesItem.GrossAmount.Split(' ')[0]) * -1);
lblDifferenzrechnung2.Text = string.Format("Daraus ergibt sich eine zu zahlende Summe von {0} EUR.", pRO.NetClaim.Replace("€", ""));
}
lblAbrechnungszeitraum.Text =
String.Format(
"Im Zeitraum vom {0:dd.MM.yyyy} bis {1:dd.MM.yyyy} wurden {2:0.00} Dienstleistungsstunden unmittelbare Betreuungsleistungen des Ambulant Betreuten Wohnens erbracht.",