MH: Schubkraft QB + Rechnung ApprovedFLS

This commit is contained in:
2024-05-08 16:35:07 +02:00
parent ef159f567c
commit 3dd511553c
3 changed files with 31 additions and 99 deletions

View File

@@ -12,7 +12,9 @@ namespace ABCBetreuungenReports.Calculation
public override decimal? GetApprovedHoursForPeriod(SupportConceptApprovalPeriodDC scap, List<CostRatePeriodDC> costRatePeriods, DateTime? pStart,
DateTime? pEnd)
{
decimal weeksPerMonth = 4.3m;
decimal weeksPerMonth = 4.3m;
if (scap.ApprovedBETotal.HasValue)
{
@@ -61,7 +63,14 @@ namespace ABCBetreuungenReports.Calculation
DAOFactory.GenericDAO.LoadByID<SupportConceptApprovalPeriod>(scap.SupportConceptApprovalPeriodOid.Value);
var org = scapEnt.CostBearer2SupportConcept.CostBearer.Organisation;
if (org.Name != "Landkreis Osnabrück")
if (org.Name.ToLower().Contains("neu") && scap.ApprovedBEPerInterval.HasValue)
{
var month = Math.Round(Convert.ToDecimal(((pEnd.Value.Date - pStart.Value.Date).TotalDays + 1) / 7), 2);
month /= 4.35m;
return scap.ApprovedBEPerInterval.Value * 4.35m * Math.Round(month, 2);
}
if (org.Name != "Landkreis Osnabrück")
{
weeksPerMonth = 4.33m;
}

View File

@@ -33,6 +33,7 @@ namespace ABCBetreuungenReports
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Quittierungsbeleg));
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
@@ -63,7 +64,6 @@ namespace ABCBetreuungenReports
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
@@ -100,20 +100,16 @@ namespace ABCBetreuungenReports
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
this.lblUnterschriftMitarbeiter = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.lblSummeAusfallstunden = new DevExpress.XtraReports.UI.XRLabel();
this.lblSummeWegepauschalen = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.wennGruppeAnzPersonen = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -561,10 +557,6 @@ namespace ABCBetreuungenReports
this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell32.Weight = 0.40075152404214204D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -1081,14 +1073,9 @@ namespace ABCBetreuungenReports
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel2,
this.xrLabel11,
this.xrPictureBox3,
this.lblUnterschriftMitarbeiter,
this.xrLabel12,
this.xrPictureBox2,
this.xrLabel9,
this.xrLabel8,
this.xrLabel7,
this.lblSummeAusfallstunden,
this.lblSummeWegepauschalen,
this.xrLabel6,
@@ -1116,71 +1103,25 @@ namespace ABCBetreuungenReports
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel11
//
this.xrLabel11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy,}")});
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(0F, 73.87498F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(100F, 23F);
this.xrLabel11.Visible = false;
//
// xrPictureBox3
//
this.xrPictureBox3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")});
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(120.6207F, 61.37498F);
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(797.3143F, 53.04165F);
this.xrPictureBox3.Name = "xrPictureBox3";
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(136.8472F, 35.50002F);
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(224.3472F, 43.83335F);
this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// lblUnterschriftMitarbeiter
//
this.lblUnterschriftMitarbeiter.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.lblUnterschriftMitarbeiter.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.lblUnterschriftMitarbeiter.LocationFloat = new DevExpress.Utils.PointFloat(737.7292F, 96.87494F);
this.lblUnterschriftMitarbeiter.Name = "lblUnterschriftMitarbeiter";
this.lblUnterschriftMitarbeiter.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.lblUnterschriftMitarbeiter.SizeF = new System.Drawing.SizeF(336.6944F, 19.99998F);
this.lblUnterschriftMitarbeiter.StylePriority.UseBackColor = false;
this.lblUnterschriftMitarbeiter.StylePriority.UseBorders = false;
this.lblUnterschriftMitarbeiter.StylePriority.UseFont = false;
this.lblUnterschriftMitarbeiter.StylePriority.UsePadding = false;
this.lblUnterschriftMitarbeiter.StylePriority.UseTextAlignment = false;
this.lblUnterschriftMitarbeiter.Text = "Datum, verantwortliche/r Mitarbeiter/in";
this.lblUnterschriftMitarbeiter.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel12
//
this.xrLabel12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeSignatureDate", "{0:dd.MM.yyyy,}")});
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(774.5578F, 73.87498F);
this.xrLabel12.Name = "xrLabel12";
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel12.SizeF = new System.Drawing.SizeF(100F, 23F);
this.xrLabel12.Visible = false;
//
// xrPictureBox2
//
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "EmployeeSignature")});
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(875.0579F, 61.37498F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrLabel9
//
this.xrLabel9.BackColor = System.Drawing.Color.Transparent;
this.xrLabel9.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel9.BorderWidth = 1F;
this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Calibri", 11F);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(124.2305F, 116.875F);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(155.7865F, 116.875F);
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(983.7695F, 20.00001F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(952.2136F, 20.00002F);
this.xrLabel9.StylePriority.UseBackColor = false;
this.xrLabel9.StylePriority.UseBorders = false;
this.xrLabel9.StylePriority.UseBorderWidth = false;
@@ -1189,7 +1130,7 @@ namespace ABCBetreuungenReports
this.xrLabel9.StylePriority.UseTextAlignment = false;
this.xrLabel9.Text = "Mit der Unterschrift bestätigt die leistungsberechtigte Person die aufgeführten L" +
"eistungen in Minuten (incl. Ausfallzeiten) erhalten zu haben.";
this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrLabel9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// xrLabel8
//
@@ -1197,7 +1138,7 @@ namespace ABCBetreuungenReports
this.xrLabel8.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel8.BorderWidth = 1F;
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Calibri", 11F);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(124.2305F, 96.875F);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(768.5888F, 96.875F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(320.4112F, 20F);
@@ -1207,28 +1148,9 @@ namespace ABCBetreuungenReports
this.xrLabel8.StylePriority.UseFont = false;
this.xrLabel8.StylePriority.UsePadding = false;
this.xrLabel8.StylePriority.UseTextAlignment = false;
this.xrLabel8.Text = "Unterschrift der leistungsberechtigten Person";
this.xrLabel8.Text = "Unterschrift";
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel7
//
this.xrLabel7.BackColor = System.Drawing.Color.Transparent;
this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel7.BorderWidth = 1F;
this.xrLabel7.Font = new DevExpress.Drawing.DXFont("Calibri", 11F);
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 96.875F);
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(124.2305F, 20F);
this.xrLabel7.StylePriority.UseBackColor = false;
this.xrLabel7.StylePriority.UseBorders = false;
this.xrLabel7.StylePriority.UseBorderWidth = false;
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.StylePriority.UsePadding = false;
this.xrLabel7.StylePriority.UseTextAlignment = false;
this.xrLabel7.Text = "Datum";
this.xrLabel7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// lblSummeAusfallstunden
//
this.lblSummeAusfallstunden.BackColor = System.Drawing.Color.Transparent;
@@ -1324,6 +1246,10 @@ namespace ABCBetreuungenReports
this.wennGruppeAnzPersonen.Expression = "Iif([CustomerCount] > 1,[CustomerCount],\'\')";
this.wennGruppeAnzPersonen.Name = "wennGruppeAnzPersonen";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// Quittierungsbeleg
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1349,6 +1275,8 @@ namespace ABCBetreuungenReports
this.PageWidth = 1169;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
@@ -1425,14 +1353,9 @@ namespace ABCBetreuungenReports
private DevExpress.XtraReports.UI.XRLabel lblGesamtbudgetQuali;
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel xrLabel9;
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox3;
private DevExpress.XtraReports.UI.XRLabel lblUnterschriftMitarbeiter;
private DevExpress.XtraReports.UI.XRLabel xrLabel12;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell16;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;

View File

@@ -18,11 +18,11 @@ namespace BeWo.ABCBetreuungenReports
public void SetReportDataSource(Settlement2RO pRO)
{
if (pRO.RecipientOrganisation.ToLower().Contains("neu"))
{
var fls = pRO.ApprovedFLS.Split(' ')[0];
pRO.ApprovedFLS = string.Format("{0:0.00} FLS", Convert.ToDecimal(fls) / 50 * 60);
}
//if (pRO.RecipientOrganisation.ToLower().Contains("neu"))
//{
// var fls = pRO.ApprovedFLS.Split(' ')[0];
// pRO.ApprovedFLS = string.Format("{0:0.00} FLS", Convert.ToDecimal(fls) / 50 * 60);
//}
foreach (var item in pRO.InvoiceItems)
{