Abschluss Ersteinrichtung PsychosozialeProjekteSaarpfalz

This commit is contained in:
2023-05-17 11:57:10 +02:00
parent dbf1e717de
commit 0c93bf82ce
5 changed files with 269 additions and 164 deletions

View File

@@ -79,12 +79,12 @@ namespace PsychosozialeProjekteSaarpfalz.Invoicing
{
if (iServiceRecord.DistanceInMeter <= 15)
{
ii.UnitDescription = String.Format("{0:0.00}", AMOUNT_PER_KM1);
ii.UnitDescription = String.Format("{0:0.00}", AMOUNT_PER_KM1);
ii.GrossAmountTotal += AMOUNT_PER_KM1;
}
else if (iServiceRecord.DistanceInMeter > 15)
{
ii.UnitDescription = String.Format("{0:0.00}", AMOUNT_PER_KM2);
ii.UnitDescription = String.Format("{0:0.00}", AMOUNT_PER_KM2);
ii.GrossAmountTotal += AMOUNT_PER_KM2;
}
}

View File

@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BeWo.Service.Plugins;
namespace PsychosozialeProjekteSaarpfalz.Invoicing
{
internal class CustomInvoiceNumberGenerator : InvoiceNumberGenerator
{
public override string GetNextInvoiceNumber(int increment, InvoiceBase invoiceBase)
{
var next = base.GetNextInvoiceNumber(increment, invoiceBase);
int number = 0;
String pattern = "";
if (next.IndexOf(":") > 0)
{
Int32.TryParse(next.Substring(0, next.IndexOf(":")), out number);
pattern = next.Substring(next.IndexOf(":") + 1);
}
String name = "";
if (invoiceBase != null)
{
Customer c = null;
if (invoiceBase.CostBearer2SupportConcept != null)
{
c = invoiceBase.CostBearer2SupportConcept.SupportConcept.Customer;
}
else if (invoiceBase.RecipientCustomerOid.HasValue)
{
c = DAOFactory.GenericDAO.LoadByID<Customer>(invoiceBase.RecipientCustomerOid.Value);
}
if (c != null)
{
name = c.Person.FirstName.Substring(0, 1) + c.Person.LastName.Substring(0, 1);
}
}
DateTime dt = DateTime.Now;
if (invoiceBase != null && invoiceBase.AccountingPeriodStart.HasValue)
{
dt = invoiceBase.AccountingPeriodStart.Value;
}
pattern = pattern.Replace("{jjjj}", dt.Year.ToString());
pattern = pattern.Replace("{name}", name);
return base.ApplyPatternWithId(pattern, number, "");
}
protected override string ApplyPatternWithId(string pattern, long number, string id)
{
return number + ":" + pattern;
}
}
}

View File

@@ -50,6 +50,7 @@
<ItemGroup>
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\CustomInvoiceNumberGenerator.cs" />
<Compile Include="Jahresauswertung.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -30,7 +30,6 @@ namespace PsychosozialeProjekteSaarpfalz
{
this.components = new System.ComponentModel.Container();
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary4 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary3 = new DevExpress.XtraReports.UI.XRSummary();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
@@ -39,6 +38,8 @@ namespace PsychosozialeProjekteSaarpfalz
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
@@ -63,38 +64,36 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell45 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell46 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblSumMin = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblSumPausch = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -142,6 +141,34 @@ namespace PsychosozialeProjekteSaarpfalz
this.Page1.Name = "Page1";
this.Page1.StylePriority.UseFont = false;
//
// xrLabel10
//
this.xrLabel10.BackColor = System.Drawing.Color.Transparent;
this.xrLabel10.CanShrink = true;
this.xrLabel10.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 262.2917F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel10.StylePriority.UseBackColor = false;
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.Text = "Rechnung über Soziotherapie";
this.xrLabel10.WordWrap = false;
//
// xrLabel6
//
this.xrLabel6.BackColor = System.Drawing.Color.Transparent;
this.xrLabel6.CanShrink = true;
this.xrLabel6.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 137.5F);
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel6.StylePriority.UseBackColor = false;
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.Text = "IK: 49 1000 239";
this.xrLabel6.WordWrap = false;
//
// xrLabel7
//
this.xrLabel7.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -400,7 +427,7 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell44.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell44.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell44.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.Hours", "{0:0.##} Min")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.RateFactor", "{0:0.##} Min")});
this.xrTableCell44.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell44.Name = "xrTableCell44";
this.xrTableCell44.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
@@ -418,7 +445,7 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell45.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell45.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell45.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.NetAmount", "{0:0.00}")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.NetAmount", "{0:0.00}")});
this.xrTableCell45.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell45.Name = "xrTableCell45";
this.xrTableCell45.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
@@ -436,7 +463,7 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell46.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell46.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell46.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.AmountPerUnit")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.UnitDescription", "{0:0.00} €")});
this.xrTableCell46.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell46.Name = "xrTableCell46";
this.xrTableCell46.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
@@ -459,37 +486,29 @@ namespace PsychosozialeProjekteSaarpfalz
this.GroupFooter1.HeightF = 331.5833F;
this.GroupFooter1.Name = "GroupFooter1";
//
// bindingSource1
// xrLabel5
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
this.xrLabel5.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel5.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 255.2083F);
this.xrLabel5.Multiline = true;
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(644.0001F, 33.66661F);
this.xrLabel5.StylePriority.UseBackColor = false;
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.Text = "*Dieser Aufstellung/Rechnung liegen die Zahlen der aktullen Vergütungsvereinbarun" +
"g zu Grunde.\t \t \t \r\n";
//
// xrLabel6
// xrLabel1
//
this.xrLabel6.BackColor = System.Drawing.Color.Transparent;
this.xrLabel6.CanShrink = true;
this.xrLabel6.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 137.5F);
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel6.StylePriority.UseBackColor = false;
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.Text = "IK: 49 1000 239";
this.xrLabel6.WordWrap = false;
//
// xrLabel10
//
this.xrLabel10.BackColor = System.Drawing.Color.Transparent;
this.xrLabel10.CanShrink = true;
this.xrLabel10.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 262.2917F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(650F, 20F);
this.xrLabel10.StylePriority.UseBackColor = false;
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.Text = "Rechnung über Soziotherapie";
this.xrLabel10.WordWrap = false;
this.xrLabel1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 214.5833F);
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(644.0001F, 17F);
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.Text = "Wir bitten um Überweisung des Rechnungsbetrages auf unser Konto.";
//
// xrTable1
//
@@ -509,7 +528,7 @@ namespace PsychosozialeProjekteSaarpfalz
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell2,
this.xrTableCell1,
this.lblSumMin,
this.xrTableCell4});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1D;
@@ -529,6 +548,23 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell2.Weight = 0.43537671809006306D;
//
// lblSumMin
//
this.lblSumMin.BorderColor = System.Drawing.Color.DarkGray;
this.lblSumMin.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.lblSumMin.Font = new System.Drawing.Font("Arial", 9F);
this.lblSumMin.Name = "lblSumMin";
this.lblSumMin.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.lblSumMin.StylePriority.UseBorderColor = false;
this.lblSumMin.StylePriority.UseBorders = false;
this.lblSumMin.StylePriority.UseFont = false;
this.lblSumMin.StylePriority.UsePadding = false;
this.lblSumMin.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0}";
this.lblSumMin.Summary = xrSummary1;
this.lblSumMin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.lblSumMin.Weight = 0.73116703681438677D;
//
// xrTableCell4
//
this.xrTableCell4.BorderColor = System.Drawing.Color.DarkGray;
@@ -542,26 +578,6 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell4.Weight = 1.320716170475789D;
//
// xrTableCell1
//
this.xrTableCell1.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell1.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.Hours")});
this.xrTableCell1.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell1.StylePriority.UseBorderColor = false;
this.xrTableCell1.StylePriority.UseBorders = false;
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UsePadding = false;
this.xrTableCell1.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0.##} Min";
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell1.Summary = xrSummary1;
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell1.Weight = 0.73116703681438677D;
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
@@ -616,7 +632,7 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell7,
this.xrTableCell8,
this.xrTableCell19,
this.xrTableCell10});
this.lblSumPausch});
this.xrTableRow3.Name = "xrTableRow3";
this.xrTableRow3.Weight = 1D;
//
@@ -636,22 +652,60 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell7.Weight = 0.43537671809006306D;
//
// xrTableCell10
// xrTableCell8
//
this.xrTableCell10.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell10.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell10.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell10.StylePriority.UseBorderColor = false;
this.xrTableCell10.StylePriority.UseBorders = false;
this.xrTableCell10.StylePriority.UseFont = false;
this.xrTableCell10.StylePriority.UsePadding = false;
this.xrTableCell10.StylePriority.UseTextAlignment = false;
xrSummary4.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell10.Summary = xrSummary4;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell10.Weight = 0.56850121186790292D;
this.xrTableCell8.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell8.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.Hours")});
this.xrTableCell8.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell8.StylePriority.UseBorderColor = false;
this.xrTableCell8.StylePriority.UseBorders = false;
this.xrTableCell8.StylePriority.UseFont = false;
this.xrTableCell8.StylePriority.UsePadding = false;
this.xrTableCell8.StylePriority.UseTextAlignment = false;
xrSummary2.FormatString = "{0:0.##} Stunden";
xrSummary2.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell8.Summary = xrSummary2;
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.73116703681438677D;
//
// xrTableCell19
//
this.xrTableCell19.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell19.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell19.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.NetAmount")});
this.xrTableCell19.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell19.Name = "xrTableCell19";
this.xrTableCell19.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell19.StylePriority.UseBorderColor = false;
this.xrTableCell19.StylePriority.UseBorders = false;
this.xrTableCell19.StylePriority.UseFont = false;
this.xrTableCell19.StylePriority.UsePadding = false;
this.xrTableCell19.StylePriority.UseTextAlignment = false;
xrSummary3.FormatString = "{0:0.00} €";
xrSummary3.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell19.Summary = xrSummary3;
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell19.Weight = 0.75221495860788623D;
//
// lblSumPausch
//
this.lblSumPausch.BorderColor = System.Drawing.Color.DarkGray;
this.lblSumPausch.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.lblSumPausch.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblSumPausch.Name = "lblSumPausch";
this.lblSumPausch.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.lblSumPausch.StylePriority.UseBorderColor = false;
this.lblSumPausch.StylePriority.UseBorders = false;
this.lblSumPausch.StylePriority.UseFont = false;
this.lblSumPausch.StylePriority.UsePadding = false;
this.lblSumPausch.StylePriority.UseTextAlignment = false;
this.lblSumPausch.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.lblSumPausch.Weight = 0.56850121186790292D;
//
// xrTableRow4
//
@@ -701,26 +755,6 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell14.Weight = 1.320716170475789D;
//
// xrTableCell8
//
this.xrTableCell8.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell8.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.Hours")});
this.xrTableCell8.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell8.StylePriority.UseBorderColor = false;
this.xrTableCell8.StylePriority.UseBorders = false;
this.xrTableCell8.StylePriority.UseFont = false;
this.xrTableCell8.StylePriority.UsePadding = false;
this.xrTableCell8.StylePriority.UseTextAlignment = false;
xrSummary2.FormatString = "{0:0.##} Stunden";
xrSummary2.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell8.Summary = xrSummary2;
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell8.Weight = 0.73116703681438677D;
//
// xrTableRow5
//
this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
@@ -764,19 +798,6 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell16.Weight = 0.73116703681438677D;
//
// xrTableCell17
//
this.xrTableCell17.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell17.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell17.StylePriority.UseBorderColor = false;
this.xrTableCell17.StylePriority.UseBorders = false;
this.xrTableCell17.StylePriority.UsePadding = false;
this.xrTableCell17.StylePriority.UseTextAlignment = false;
this.xrTableCell17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell17.Weight = 0.56850094140192242D;
//
// xrTableCell18
//
this.xrTableCell18.BorderColor = System.Drawing.Color.Black;
@@ -797,49 +818,22 @@ namespace PsychosozialeProjekteSaarpfalz
this.xrTableCell18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell18.Weight = 0.75221522907386684D;
//
// xrTableCell19
// xrTableCell17
//
this.xrTableCell19.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell19.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell19.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.NetAmount")});
this.xrTableCell19.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell19.Name = "xrTableCell19";
this.xrTableCell19.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell19.StylePriority.UseBorderColor = false;
this.xrTableCell19.StylePriority.UseBorders = false;
this.xrTableCell19.StylePriority.UseFont = false;
this.xrTableCell19.StylePriority.UsePadding = false;
this.xrTableCell19.StylePriority.UseTextAlignment = false;
xrSummary3.FormatString = "{0:0.00}";
xrSummary3.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell19.Summary = xrSummary3;
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell19.Weight = 0.75221495860788623D;
this.xrTableCell17.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell17.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell17.StylePriority.UseBorderColor = false;
this.xrTableCell17.StylePriority.UseBorders = false;
this.xrTableCell17.StylePriority.UsePadding = false;
this.xrTableCell17.StylePriority.UseTextAlignment = false;
this.xrTableCell17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell17.Weight = 0.56850094140192242D;
//
// xrLabel1
// bindingSource1
//
this.xrLabel1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 214.5833F);
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(644.0001F, 17F);
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.Text = "Wir bitten um Überweisung des Rechnungsbetrages auf unser Konto.";
//
// xrLabel5
//
this.xrLabel5.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel5.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 255.2083F);
this.xrLabel5.Multiline = true;
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(644.0001F, 33.66661F);
this.xrLabel5.StylePriority.UseBackColor = false;
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.Text = "*Dieser Aufstellung/Rechnung liegen die Zahlen der aktullen Vergütungsvereinbarun" +
"g zu Grunde.\t \t \t \r\n";
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// ServiceInvoiceReport
//
@@ -862,8 +856,8 @@ namespace PsychosozialeProjekteSaarpfalz
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -905,7 +899,7 @@ namespace PsychosozialeProjekteSaarpfalz
private DevExpress.XtraReports.UI.XRTable xrTable1;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell lblSumMin;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
@@ -915,7 +909,7 @@ namespace PsychosozialeProjekteSaarpfalz
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell19;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableCell lblSumPausch;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;

View File

@@ -1,9 +1,13 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using BS.Shared.Extensions;
using BS.Shared.Services;
using DevExpress.XtraReports.UI;
@@ -24,7 +28,22 @@ namespace PsychosozialeProjekteSaarpfalz
DateTime end = pRO.AccountingPeriodEnd;
SetBewilligung(pRO);
decimal sumPauschale = 0;
decimal sumMin = 0;
foreach (var sip in pRO.ServiceInvoicePeriods)
{
foreach (var ii in sip.ServiceInvoiceItems)
{
if (!ii.UnitDescription.IsNullOrEmpty())
{
sumPauschale += Convert.ToDecimal(ii.UnitDescription);
}
sumMin += ii.ServiceRecord.RoundedDuration;
ii.RateFactor = String.Format("{0:N0}", ii.ServiceRecord.RoundedDuration);
}
}
lblSumPausch.Text = String.Format("{0:0.00 €}", sumPauschale);
lblSumMin.Text = String.Format("{0:N0} Min", sumMin);
this.bindingSource1.DataSource = pRO;
}
@@ -65,12 +84,40 @@ namespace PsychosozialeProjekteSaarpfalz
var sc = sip.SupportConceptApprovalPeriod.CostBearer2SupportConcept.SupportConcept;
date = sc.ApprovalDate;
}
CostBearer2SupportConcept c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(c2sdc.CostBearer2SupportConceptOid.Value);
IList<ServiceRecord> allServiceRecords = c2s.ServiceRecords;
decimal minutenIst = 0;
DateTime endCalc = end.AddDays(1);
Dictionary<long, bool> groupBookingDict = new Dictionary<long, bool>();
foreach (var item in allServiceRecords)
{
if (!item.GroupOid.HasValue || !groupBookingDict.ContainsKey(item.GroupOid.Value))
{
if (item.Start != null)
{
if (item.Start >= c2s.StartDate.Value && item.Start.Value < endCalc)
{
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null && item.ServiceDescription.ServiceCategory.IsBillable)
{
decimal prozent = item.ServiceDescription.ServiceCategory.ProzentAbrechnung;
if (item.ServiceDescription.ProzentAbrechnung.HasValue)
{
prozent = item.ServiceDescription.ProzentAbrechnung.Value;
foreach (var ii in sip.ServiceInvoiceItems)
{
geleistetGesamt += ii.Hours ?? 0;
}
minutenIst += (item.RoundedDuration * prozent) / 100;
if (item.GroupOid.HasValue)
groupBookingDict.Add(item.GroupOid.Value, true);
}
}
}
}
}
geleistetGesamt = minutenIst / 60;
date = sc.ApprovalDate;
}
}