SKMAachen: LVR-Rechnung nach §67 hinzugefügt

This commit is contained in:
2023-11-02 12:12:06 +01:00
parent 37b2771d38
commit 1fb439fc0f
6 changed files with 816 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Services;
namespace SKMAachen.Invoicing
{
public class CustomBeWo67InvoiceCreation : InvoiceCreation
{
public override void SetInvoiceId(ServiceInvoice invoice)
{
invoice.InvoiceBase.InvoiceId = "BeWo67";
}
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList,
DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth)
{
var newlist = new List<InvoiceItem>();
var rateToItem = new Dictionary<String, InvoiceItem>();
foreach (InvoiceItem iitem in itemList)
{
InvoiceItem item;
String key = String.Format("{0}_{1}", iitem.AmountPerUnit, iitem.RateFactor);
if (rateToItem.ContainsKey(key))
{
item = rateToItem[key];
}
else
{
item = new InvoiceItem();
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;
}
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;
}
BerechneSummaryItemsSummen2(newlist);
return newlist;
}
private void BerechneSummaryItemsSummen2(List<InvoiceItem> newlist)
{
foreach (InvoiceItem invoiceItem in newlist)
{
if (invoiceItem.RateFactor.HasValue)
{
decimal minuten = Math.Round((invoiceItem.UnitCount ?? 0) * 60, 0, MidpointRounding.AwayFromZero);
var abrunden = RundeMinutenAuf10MinutenAb(minuten);
var uc = abrunden / 40;
invoiceItem.UnitCount = Math.Round(uc, 2, MidpointRounding.AwayFromZero);
}
invoiceItem.AmountTotal = Math.Round((invoiceItem.AmountPerUnit ?? 0) * (invoiceItem.UnitCount ?? 0), 2, MidpointRounding.AwayFromZero);
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
}
}
private decimal RundeMinutenAuf10MinutenAb(decimal minuten)
{
var min = minuten;
decimal rest = min % 10;
min = min - rest;
return min;
}
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace SKMAachen.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
foreach (var item in supportConcepts2ServiceRecords)
{
var csc = item.Key;
var sc = DAOFactory.GenericDAO.LoadByID<SupportConcept>(csc.SupportConceptOid);
foreach (var cb2sc in sc.CostBearer2SupportConceptList)
{
// Stand Oktober 23 (Neu-) Kunde hat ausschließlich §67 beim LVR
if (cb2sc.CostBearer.Organisation != null && cb2sc.CostBearer.Organisation.Name.Contains("LVR"))
{
return new CustomBeWo67InvoiceCreation();
}
}
}
/*
foreach (var list in supportConcepts2ServiceRecords.Values)
{
foreach (var sr in list)
{
var sd = sr.ServiceDescription.Category;
if (!String.IsNullOrEmpty(sd.Name) && sd.Name.Contains("§67"))
{
return new CustomBeWo67InvoiceCreation();
}
}
}
*/
return new InvoiceCreation();
}
}
}

View File

@@ -0,0 +1,445 @@
using BeWo.Report.ReportObjects;
namespace SKMAachen
{
partial class RechnungBeWo67
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RechnungBeWo67));
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow6 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow8 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblForderung = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAbrechnungszeitraum = new DevExpress.XtraReports.UI.XRLabel();
this.fieldMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
//
this.Detail.HeightF = 0F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// ReportHeader
//
this.ReportHeader.Font = new System.Drawing.Font("Verdana", 10F);
this.ReportHeader.HeightF = 90.70666F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.ruleRateFactorNull.Name = "ruleRateFactorNull";
//
// topMarginBand1
//
this.topMarginBand1.HeightF = 222F;
this.topMarginBand1.Name = "topMarginBand1";
//
// bottomMarginBand1
//
this.bottomMarginBand1.HeightF = 71F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel3,
this.xrLabel1,
this.xrLabel7,
this.xrLabel8,
this.xrTable2,
this.lblForderung,
this.xrLabel2,
this.lblAbrechnungszeitraum});
this.Page1.HeightF = 464.9494F;
this.Page1.Name = "Page1";
this.Page1.StylePriority.UseFont = false;
//
// xrLabel7
//
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 22.81758F);
this.xrLabel7.Multiline = true;
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(317F, 111.5F);
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.Text = "[RecipientOrganisation]\r\n[RecipientContactPerson]\r\n[RecipientDivision]\r\n[Recipien" +
"tStreet]\r\n[RecipientPostCodeAndTown]";
//
// xrLabel8
//
this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDate")});
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(367.0001F, 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(283F, 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, 0F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2,
this.xrTableRow5,
this.xrTableRow4,
this.xrTableRow3,
this.xrTableRow1,
this.xrTableRow6,
this.xrTableRow8});
this.xrTable2.SizeF = new System.Drawing.SizeF(283F, 134F);
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell4});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 0.13245033112582783D;
//
// xrTableCell4
//
this.xrTableCell4.CanShrink = true;
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell4.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.xrTableCell4.StylePriority.UseFont = false;
this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.Text = "Ihr(e) Ansprechpartner(in):";
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell4.Weight = 1D;
//
// xrTableRow5
//
this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell13});
this.xrTableRow5.Name = "xrTableRow5";
this.xrTableRow5.Weight = 0.13245033112582783D;
//
// xrTableCell13
//
this.xrTableCell13.CanShrink = true;
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell13.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.xrTableCell13.StylePriority.UseFont = false;
this.xrTableCell13.StylePriority.UseTextAlignment = false;
this.xrTableCell13.Text = "[SenderContactPerson]";
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell13.Weight = 1D;
//
// xrTableRow4
//
this.xrTableRow4.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell11});
this.xrTableRow4.Name = "xrTableRow4";
this.xrTableRow4.Weight = 0.13245033112582783D;
//
// xrTableCell11
//
this.xrTableCell11.CanShrink = true;
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell11.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.xrTableCell11.StylePriority.UseFont = false;
this.xrTableCell11.StylePriority.UseTextAlignment = false;
this.xrTableCell11.Text = "[SenderContactPersonDivision]";
this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell11.Weight = 1D;
//
// xrTableRow3
//
this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell8});
this.xrTableRow3.Name = "xrTableRow3";
this.xrTableRow3.Weight = 0.13245033112582783D;
//
// xrTableCell8
//
this.xrTableCell8.CanShrink = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell8.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.xrTableCell8.StylePriority.UseFont = false;
this.xrTableCell8.StylePriority.UseTextAlignment = false;
this.xrTableCell8.Text = "[SenderContactPersonMail]";
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell8.Weight = 1D;
//
// xrTableRow1
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 0.13245033112582783D;
//
// xrTableCell1
//
this.xrTableCell1.CanShrink = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell1.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UseTextAlignment = false;
this.xrTableCell1.Text = "[SenderContactPersonPhone]";
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell1.Weight = 1D;
//
// xrTableRow6
//
this.xrTableRow6.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell2});
this.xrTableRow6.Name = "xrTableRow6";
this.xrTableRow6.Weight = 0.11258278145695365D;
//
// xrTableCell2
//
this.xrTableCell2.CanShrink = true;
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell2.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
this.xrTableCell2.StylePriority.UseFont = false;
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.Text = "[SenderContactPersonFax]";
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell2.Weight = 1D;
//
// xrTableRow8
//
this.xrTableRow8.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell5});
this.xrTableRow8.Name = "xrTableRow8";
this.xrTableRow8.Weight = 0.11258278145695365D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell5.Weight = 1D;
//
// lblForderung
//
this.lblForderung.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblForderung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 423.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.StylePriority.UseFont = false;
this.lblForderung.Text = "Hieraus ergibt sich eine Forderung von ___ Std. x 61,40 EUR = ________ EUR.";
//
// xrLabel2
//
this.xrLabel2.BackColor = System.Drawing.Color.Transparent;
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 257.2748F);
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, 98.91333F);
this.xrLabel2.StylePriority.UseBackColor = false;
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.Text = resources.GetString("xrLabel2.Text");
this.xrLabel2.WordWrap = false;
//
// lblAbrechnungszeitraum
//
this.lblAbrechnungszeitraum.LocationFloat = new DevExpress.Utils.PointFloat(0F, 356.1882F);
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(650.0001F, 67.49997F);
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" +
"lant Betreuten Wohnens erbracht.\r\n";
//
// fieldMinuten
//
this.fieldMinuten.DataMember = "ServiceInvoicePeriods.ServiceInvoiceItems";
this.fieldMinuten.Expression = "[UnitCount] * 60";
this.fieldMinuten.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldMinuten.Name = "fieldMinuten";
//
// xrLabel15
//
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
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, 136.7343F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.StylePriority.UseTextAlignment = false;
this.xrLabel15.Text = resources.GetString("xrLabel15.Text");
this.xrLabel15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopJustify;
//
// GroupFooter2
//
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel4,
this.xrLabel15});
this.GroupFooter2.HeightF = 240.1258F;
this.GroupFooter2.Name = "GroupFooter2";
//
// xrLabel4
//
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 199.7091F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(642F, 40.41669F);
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "Unterschrift und Stempel des Anbieters ";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// xrLabel1
//
this.xrLabel1.BackColor = System.Drawing.Color.Transparent;
this.xrLabel1.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 217.6081F);
this.xrLabel1.Multiline = true;
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(262.4527F, 23F);
this.xrLabel1.StylePriority.UseBackColor = false;
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.Text = "Rechnungs-Nr. [InvoiceNumber]\n\n";
this.xrLabel1.WordWrap = false;
//
// xrLabel3
//
this.xrLabel3.Font = new System.Drawing.Font("Verdana", 7F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel3.Multiline = true;
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(317F, 22.81758F);
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
this.xrLabel3.Text = "SKM Soziale Dienste e. V. - Heinrichsallee 56 - 52062 Aachen";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// RechnungBeWo67
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
this.ReportHeader,
this.topMarginBand1,
this.bottomMarginBand1,
this.Page1,
this.GroupFooter2});
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
this.fieldMinuten});
this.DataSource = this.bindingSource1;
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
this.Font = new System.Drawing.Font("Verdana", 10F);
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new System.Drawing.Printing.Margins(75, 75, 222, 71);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
private DevExpress.XtraReports.UI.DetailBand Detail;
private System.Windows.Forms.BindingSource bindingSource1;
private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull;
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.GroupHeaderBand Page1;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRLabel lblAbrechnungszeitraum;
private DevExpress.XtraReports.UI.CalculatedField fieldMinuten;
private DevExpress.XtraReports.UI.XRLabel lblForderung;
private DevExpress.XtraReports.UI.XRLabel xrLabel15;
private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter2;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow5;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow3;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow8;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
}
}

View File

@@ -0,0 +1,64 @@
using System;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace SKMAachen
{
[IDSpecificClass(Identifier = "BeWo67")]
public partial class RechnungBeWo67 : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public RechnungBeWo67()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
decimal hourlyRate = 0;
decimal hours = 0;
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
{
foreach (var p in pRO.ServiceInvoicePeriods)
{
if (p.ServiceInvoiceItems != null && p.ServiceInvoiceItems.Count > 0)
{
foreach (var i in p.ServiceInvoiceItems)
{
if (i.HourlyRate.HasValue)
{
hourlyRate = i.HourlyRate.Value;
if (!String.IsNullOrEmpty(i.RateFactor))
{
var rfStr = i.RateFactor.Replace("%", "").Replace(",00", "").Trim();
int rfInt = 0;
Int32.TryParse(rfStr, out rfInt);
}
}
if (i.Hours.HasValue)
{
hours += i.Hours.Value;
}
}
}
}
}
lblForderung.Text =
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00} EUR.", hours, hourlyRate, pRO.NetClaim);
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.",
pRO.AccountingPeriodStart, pRO.AccountingPeriodEnd, hours);
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="xrLabel2.Text" xml:space="preserve">
<value>Abrechnung über Dienstleistungsstunden im Ambulant Betreuten Wohnen nach § 67 SGB XII
Für: [CustomerName], geb. am [CustomerBirthdate!dd.MM.yyyy]
[CustomerStreet], [CustomerPostalCode] [CustomerTown]
AZ: [CustomerReferenceNumber]</value>
</data>
<data name="xrLabel15.Text" xml:space="preserve">
<value>Es wird ausdrücklich bestätigt, dass in den angegebenen Dienstleistungsstunden 40 Minuten unmittelbare Betreuungsleistungen sowie 20 Minuten komplementärer Leistungen im Sinne der Leistungs- und Prüfungs- sowie der Vergütungsvereinbarung enthalten sind. Alle gemachten Angaben können anhand der vorgehaltenen Quittierungsbelege sowie der Betreuungsdokumentation nachgewiesen werden. Es wird weiterhin bestätigt, dass die Verpflichtungen aus der Leistungs- und Prüfungs- sowie der Vergütungsvereinbarung eingehalten wurden.</value>
</data>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -50,6 +50,8 @@
<ItemGroup>
<Compile Include="CustomMitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="CustomMitarbeiterstundenkontoBerechnungMonate.cs" />
<Compile Include="Invoicing\CustomBeWo67InvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Mitarbeiterarbeitszeitkonto.cs">
<SubType>Component</SubType>
</Compile>
@@ -69,6 +71,12 @@
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RechnungBeWo67.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="RechnungBeWo67.Designer.cs">
<DependentUpon>RechnungBeWo67.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomCustomerService.cs" />
<Compile Include="Teamstundenkonto.cs">
<SubType>Component</SubType>
@@ -108,6 +116,11 @@
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="RechnungBeWo67.resx">
<DependentUpon>RechnungBeWo67.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Teamstundenkonto.resx">
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
</EmbeddedResource>