Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo into master
This commit is contained in:
@@ -18,16 +18,14 @@ namespace AwoDortmund.Invoicing
|
||||
{
|
||||
var cat = sr.ServiceDescription.Category;
|
||||
|
||||
if (!String.IsNullOrEmpty(cat.Name) && cat.Name.ToLower().Contains("soziotherapie"))
|
||||
if (!String.IsNullOrEmpty(cat.Name) && cat.Name.ToLower().Contains("soziotherapie")
|
||||
|| cat.Name.ToLower().Contains("assistenzleistung nach § 45") || cat.Name.ToLower().Contains("wohngruppenzuschlag nach §38a"))
|
||||
{
|
||||
return new SoziotherapieInvoiceCreation();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return new DefaultInvoiceCreation();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,53 @@ namespace AwoDortmund.Invoicing
|
||||
invoice.InvoiceBase.InvoiceTypeText = "Soziotherapie";
|
||||
}
|
||||
|
||||
public override List<ServiceInvoiceDC> GenerateServiceInvoices(long costBearerOid, DateTimeSpan invoicePeriod, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
||||
{
|
||||
//bei den Krankenkassen wird je eine Rechnung pro Leistungskategorie benötigt. Der Wohnraumzuschlag ist dabei eine Pauschale...
|
||||
|
||||
var invoiceList = new List<ServiceInvoice>();
|
||||
var invoiceCounter = 0;
|
||||
var sortedScs = supportConcepts2ServiceRecords.Keys.OrderBy(s => s.Customer.LastNameFirstName).ToList();
|
||||
|
||||
foreach (var sc in sortedScs)
|
||||
{
|
||||
var serviceRecords = supportConcepts2ServiceRecords[sc];
|
||||
if (sc.CostBearerList.Count > 0)
|
||||
{
|
||||
var costBearer = DAOFactory.GenericDAO.LoadByID<CostBearer>(costBearerOid);
|
||||
Dictionary<string, List<ServiceRecordDC>> srDict = new Dictionary<string, List<ServiceRecordDC>>();
|
||||
|
||||
foreach (var sr in serviceRecords)
|
||||
{
|
||||
String key = sr.ServiceDescription.CategoryName;
|
||||
|
||||
if (!srDict.ContainsKey(key))
|
||||
srDict.Add(key, new List<ServiceRecordDC>());
|
||||
|
||||
srDict[key].Add(sr);
|
||||
}
|
||||
|
||||
srDict.Add("dummyFixAmount", new List<ServiceRecordDC>());
|
||||
|
||||
foreach (var catName in srDict.Keys)
|
||||
{
|
||||
var list = srDict[catName];
|
||||
var invoice = CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, sc, list);
|
||||
|
||||
if (invoice != null && invoice.ServiceInvoicePeriodList.Count > 0)
|
||||
{
|
||||
invoice.InvoiceBase.InvoiceId = "RechnungSoziotherapie";
|
||||
invoiceList.Add(invoice);
|
||||
invoiceCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var result = invoiceList.Select(item => MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(item)).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
//public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List<ServiceRecordDC> serviceRecords)
|
||||
//{
|
||||
// var invoice = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, supportConcept, serviceRecords);
|
||||
@@ -76,21 +123,28 @@ namespace AwoDortmund.Invoicing
|
||||
DateTimeSpan invoicePeriod,
|
||||
List<ServiceRecordDC> serviceRecords)
|
||||
{
|
||||
Calculations calc = PluginLoader.FindClass<Calculations>(_SpecificID) ?? Calculations.GetInstance(_SpecificID);
|
||||
List<ServiceRecordDC> serviceRecordsInPeriod = serviceRecords.Where(
|
||||
i =>
|
||||
{
|
||||
bool valid = i.Start.Value.InBetween(serviceInvoicePeriod.Start.Value,
|
||||
serviceInvoicePeriod.End.Value, true);
|
||||
if (ShouldCreateFixedAmounts(serviceInvoicePeriod, supportConceptApprovalPeriod, cb2sc) && serviceRecords.Count == 0)
|
||||
{
|
||||
CreateFixedAmounts(serviceInvoicePeriod, supportConceptApprovalPeriod, cb2sc);
|
||||
}
|
||||
else
|
||||
{
|
||||
Calculations calc = PluginLoader.FindClass<Calculations>(_SpecificID) ?? Calculations.GetInstance(_SpecificID);
|
||||
List<ServiceRecordDC> serviceRecordsInPeriod = serviceRecords.Where(
|
||||
i =>
|
||||
{
|
||||
bool valid = i.Start.Value.InBetween(serviceInvoicePeriod.Start.Value,
|
||||
serviceInvoicePeriod.End.Value, true);
|
||||
|
||||
if (valid && serviceInvoicePeriod.SupportConceptApprovalPeriod != null && serviceInvoicePeriod.SupportConceptApprovalPeriod.ServiceCategory != null)
|
||||
valid = serviceInvoicePeriod.SupportConceptApprovalPeriod.ServiceCategory.Oid ==
|
||||
i.ServiceDescription.Category.ServiceCategoryOid;
|
||||
return valid;
|
||||
}).ToList();
|
||||
if (valid && serviceInvoicePeriod.SupportConceptApprovalPeriod != null && serviceInvoicePeriod.SupportConceptApprovalPeriod.ServiceCategory != null)
|
||||
valid = serviceInvoicePeriod.SupportConceptApprovalPeriod.ServiceCategory.Oid ==
|
||||
i.ServiceDescription.Category.ServiceCategoryOid;
|
||||
return valid;
|
||||
}).ToList();
|
||||
|
||||
var itemList = CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, serviceInvoicePeriod.SupportConceptApprovalPeriod, calc);
|
||||
serviceInvoicePeriod.InvoiceItemList.AddRange(itemList);
|
||||
var itemList = CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, serviceInvoicePeriod.SupportConceptApprovalPeriod, calc);
|
||||
serviceInvoicePeriod.InvoiceItemList.AddRange(itemList);
|
||||
}
|
||||
}
|
||||
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
@@ -127,7 +181,7 @@ namespace AwoDortmund.Invoicing
|
||||
// ii.ItemDescription = "Soziotherapie 60 min.";
|
||||
//}
|
||||
ii.AmountPerUnit = preisSoziotherapie60min;
|
||||
ii.ItemDescription = "Soziotherapie";
|
||||
ii.ItemDescription = iServiceRecord.ServiceDescription.CategoryName;
|
||||
ii.RateFactor = null;
|
||||
ii.AmountTotal = ii.AmountPerUnit * ii.UnitCount;
|
||||
ii.GrossAmountTotal = ii.AmountTotal;
|
||||
@@ -215,5 +269,33 @@ namespace AwoDortmund.Invoicing
|
||||
{
|
||||
return base.CreateSummaryInvoiceItems(itemList, invoicePeriod, scap, calc, true, true);
|
||||
}
|
||||
|
||||
public override void CreateFixedAmounts(ServiceInvoicePeriod serviceInvoicePeriod, SupportConceptApprovalPeriodDC supportConceptApprovalPeriod, CostBearer2SupportConcept cb2sc)
|
||||
{
|
||||
var calc = PluginLoader.FindClass<Calculations>(_SpecificID) ?? Calculations.GetInstance(_SpecificID);
|
||||
var data = calc.GetFixedBillingData(supportConceptApprovalPeriod, serviceInvoicePeriod.Start, serviceInvoicePeriod.End);
|
||||
|
||||
foreach (var billingData in data)
|
||||
{
|
||||
var ii = new InvoiceItem
|
||||
{
|
||||
AmountTotal = billingData.AmountTotal,
|
||||
GrossAmountTotal = billingData.GrossAmountTotal,
|
||||
ItemPeriodStart = billingData.BillingPeriodStart,
|
||||
ItemPeriodEnd = billingData.BillingPeriodEnd,
|
||||
AccountingInterval = billingData.AccountingInterval,
|
||||
AmountPerUnit = billingData.AmountPerUnit,
|
||||
UnitCount = billingData.UnitCount
|
||||
};
|
||||
|
||||
if (supportConceptApprovalPeriod.ServiceCategory != null)
|
||||
{
|
||||
ii.ItemDescription = supportConceptApprovalPeriod.ServiceCategory.Name;
|
||||
ii.UnitCount = null;
|
||||
}
|
||||
serviceInvoicePeriod.InvoiceItemList.Add(ii);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
113
ReportImp/IBPReports/Budgetnachweis.Designer.cs
generated
113
ReportImp/IBPReports/Budgetnachweis.Designer.cs
generated
@@ -47,17 +47,21 @@ namespace IBPReports
|
||||
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
|
||||
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
|
||||
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel19 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
|
||||
this.lblAbsender = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.lblAbsender = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.RecipientPostCodeAndTown = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel_RecipientStreet = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel_RecipientDivision = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel_RecipientContactPerson = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
@@ -276,18 +280,6 @@ namespace IBPReports
|
||||
//
|
||||
this.bottomMarginBand1.HeightF = 50F;
|
||||
this.bottomMarginBand1.Name = "bottomMarginBand1";
|
||||
//
|
||||
// lblAdresse
|
||||
//
|
||||
this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 161.8959F);
|
||||
this.lblAdresse.Multiline = true;
|
||||
this.lblAdresse.Name = "lblAdresse";
|
||||
this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.lblAdresse.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.lblAdresse.SizeF = new System.Drawing.SizeF(329.9999F, 81.58333F);
|
||||
this.lblAdresse.StylePriority.UseFont = false;
|
||||
this.lblAdresse.Text = "Landschaftsverband Westfalen- Lippe\r\nLWL- Inklusionsamt Soziale Teilhabe\r\n48133 M" +
|
||||
"ünster\r\n";
|
||||
//
|
||||
// xrLabel19
|
||||
//
|
||||
@@ -336,6 +328,11 @@ namespace IBPReports
|
||||
// GroupHeader1
|
||||
//
|
||||
this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.RecipientPostCodeAndTown,
|
||||
this.xrLabel_RecipientStreet,
|
||||
this.xrLabel_RecipientDivision,
|
||||
this.xrLabel_RecipientContactPerson,
|
||||
this.xrLabel13,
|
||||
this.lblAbsender,
|
||||
this.xrLabel11,
|
||||
this.xrLabel8,
|
||||
@@ -343,13 +340,24 @@ namespace IBPReports
|
||||
this.xrLabel5,
|
||||
this.xrLabel2,
|
||||
this.xrLabel1,
|
||||
this.xrLabel19,
|
||||
this.lblAdresse});
|
||||
this.xrLabel19});
|
||||
this.GroupHeader1.Font = new System.Drawing.Font("Arial", 11F);
|
||||
this.GroupHeader1.HeightF = 316.2917F;
|
||||
this.GroupHeader1.Name = "GroupHeader1";
|
||||
this.GroupHeader1.StylePriority.UseFont = false;
|
||||
//
|
||||
// lblAbsender
|
||||
//
|
||||
this.lblAbsender.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAbsender.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.lblAbsender.Multiline = true;
|
||||
this.lblAbsender.Name = "lblAbsender";
|
||||
this.lblAbsender.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.lblAbsender.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.lblAbsender.SizeF = new System.Drawing.SizeF(309.1667F, 61.37498F);
|
||||
this.lblAbsender.StylePriority.UseFont = false;
|
||||
this.lblAbsender.Text = "Interkulturelle Begegnungsprojekte e.V.";
|
||||
//
|
||||
// xrLabel11
|
||||
//
|
||||
this.xrLabel11.Font = new System.Drawing.Font("Arial", 10F);
|
||||
@@ -402,22 +410,65 @@ namespace IBPReports
|
||||
this.xrLabel5.StylePriority.UseFont = false;
|
||||
this.xrLabel5.Text = "Ort, Datum";
|
||||
//
|
||||
// lblAbsender
|
||||
//
|
||||
this.lblAbsender.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblAbsender.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.lblAbsender.Multiline = true;
|
||||
this.lblAbsender.Name = "lblAbsender";
|
||||
this.lblAbsender.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.lblAbsender.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.lblAbsender.SizeF = new System.Drawing.SizeF(309.1667F, 61.37498F);
|
||||
this.lblAbsender.StylePriority.UseFont = false;
|
||||
this.lblAbsender.Text = "Interkulturelle Begegnungsprojekte e.V.";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SettlementRO);
|
||||
//
|
||||
// RecipientPostCodeAndTown
|
||||
//
|
||||
this.RecipientPostCodeAndTown.CanShrink = true;
|
||||
this.RecipientPostCodeAndTown.LocationFloat = new DevExpress.Utils.PointFloat(0F, 226.7709F);
|
||||
this.RecipientPostCodeAndTown.Name = "RecipientPostCodeAndTown";
|
||||
this.RecipientPostCodeAndTown.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.RecipientPostCodeAndTown.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.RecipientPostCodeAndTown.SizeF = new System.Drawing.SizeF(328.4583F, 17F);
|
||||
this.RecipientPostCodeAndTown.StylePriority.UseFont = false;
|
||||
this.RecipientPostCodeAndTown.Text = "[RecipientPostCodeAndTown]";
|
||||
//
|
||||
// xrLabel_RecipientStreet
|
||||
//
|
||||
this.xrLabel_RecipientStreet.CanShrink = true;
|
||||
this.xrLabel_RecipientStreet.LocationFloat = new DevExpress.Utils.PointFloat(0F, 209.7709F);
|
||||
this.xrLabel_RecipientStreet.Name = "xrLabel_RecipientStreet";
|
||||
this.xrLabel_RecipientStreet.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel_RecipientStreet.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel_RecipientStreet.SizeF = new System.Drawing.SizeF(328.4583F, 16.99999F);
|
||||
this.xrLabel_RecipientStreet.StylePriority.UseFont = false;
|
||||
this.xrLabel_RecipientStreet.Text = "[RecipientStreet]";
|
||||
//
|
||||
// xrLabel_RecipientDivision
|
||||
//
|
||||
this.xrLabel_RecipientDivision.CanShrink = true;
|
||||
this.xrLabel_RecipientDivision.LocationFloat = new DevExpress.Utils.PointFloat(0F, 192.7709F);
|
||||
this.xrLabel_RecipientDivision.Name = "xrLabel_RecipientDivision";
|
||||
this.xrLabel_RecipientDivision.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel_RecipientDivision.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel_RecipientDivision.SizeF = new System.Drawing.SizeF(328.4583F, 17F);
|
||||
this.xrLabel_RecipientDivision.StylePriority.UseFont = false;
|
||||
this.xrLabel_RecipientDivision.Text = "[RecipientDivision]";
|
||||
//
|
||||
// xrLabel_RecipientContactPerson
|
||||
//
|
||||
this.xrLabel_RecipientContactPerson.CanShrink = true;
|
||||
this.xrLabel_RecipientContactPerson.LocationFloat = new DevExpress.Utils.PointFloat(0F, 175.7709F);
|
||||
this.xrLabel_RecipientContactPerson.Name = "xrLabel_RecipientContactPerson";
|
||||
this.xrLabel_RecipientContactPerson.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel_RecipientContactPerson.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel_RecipientContactPerson.SizeF = new System.Drawing.SizeF(328.4583F, 17F);
|
||||
this.xrLabel_RecipientContactPerson.StylePriority.UseFont = false;
|
||||
this.xrLabel_RecipientContactPerson.Text = "[RecipientContactPerson]";
|
||||
//
|
||||
// xrLabel13
|
||||
//
|
||||
this.xrLabel13.CanShrink = true;
|
||||
this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(0F, 158.7709F);
|
||||
this.xrLabel13.Name = "xrLabel13";
|
||||
this.xrLabel13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel13.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel13.SizeF = new System.Drawing.SizeF(328.4583F, 17F);
|
||||
this.xrLabel13.StylePriority.UseFont = false;
|
||||
this.xrLabel13.Text = "[RecipientOrganisation]";
|
||||
//
|
||||
// Spitzabrechnung
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -451,7 +502,6 @@ namespace IBPReports
|
||||
private DevExpress.XtraReports.UI.XRCheckBox xrCheckBox1;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel35;
|
||||
private DevExpress.XtraReports.UI.XRLine xrLine1;
|
||||
private DevExpress.XtraReports.UI.XRLabel lblAdresse;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel19;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
|
||||
@@ -469,5 +519,10 @@ namespace IBPReports
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
|
||||
private DevExpress.XtraReports.UI.XRLabel lblAbsender;
|
||||
private DevExpress.XtraReports.UI.XRLabel RecipientPostCodeAndTown;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel_RecipientStreet;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel_RecipientDivision;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel_RecipientContactPerson;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel13;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ using BS.Shared.Core;
|
||||
|
||||
namespace IBPReports
|
||||
{
|
||||
[IDSpecificClass(Identifier = "LWL")]
|
||||
[IDSpecificClass(Identifier = "LWLNEU")]
|
||||
|
||||
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SettlementRO>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user