- Christopherus Haus Schulbegleitung, Leistungsnachweis und Rechnung
- Bugfixes Kalender Tooltip und Anlegen von Serien in Monatsansicht mit korrektem Enddatum
This commit is contained in:
@@ -16,8 +16,46 @@ namespace ChristopherusHausMID.Reporting
|
||||
{
|
||||
public override XtraReport CreateSbdLeistungsnachweisForSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long serviceCategoryOid, int startDay, int endDay, bool checkServiceRecords, string bundesland)
|
||||
{
|
||||
return CreateReportForStundenaufstellungROs(SbdStundenaufstellungRO.Create(customerOid, month, year, orgaOid, empOid, serviceCategoryOid, startDay, endDay, true, "nrw", false));
|
||||
|
||||
return CreateReportForStundenaufstellungROs(SbdStundenaufstellungRO.Create(customerOid, month, year, orgaOid, empOid, serviceCategoryOid, startDay, endDay, true, "nrw", false, false));
|
||||
}
|
||||
|
||||
public override XtraReport CreateServiceInvoiceReport(string dcIds, long? invoiceBaseOid)
|
||||
{
|
||||
var master = base.CreateServiceInvoiceReport(dcIds, invoiceBaseOid);
|
||||
|
||||
|
||||
var oid = invoiceBaseOid;
|
||||
if (oid == null && !String.IsNullOrEmpty(dcIds))
|
||||
{
|
||||
if (Int64.TryParse(dcIds, out var temp))
|
||||
{
|
||||
oid = temp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Füge Leistungsnachweis als Anhang hinzu
|
||||
if (oid.HasValue)
|
||||
{
|
||||
var i = DAOFactory.GenericDAO.LoadByID<ServiceInvoice>(oid.Value);
|
||||
if (i.InvoiceBase.CostBearer2SupportConcept != null)
|
||||
{
|
||||
int month = i.InvoiceBase.AccountingPeriodStart.Value.Month;
|
||||
int year = i.InvoiceBase.AccountingPeriodStart.Value.Year;
|
||||
long cOid = i.InvoiceBase.CostBearer2SupportConcept.SupportConcept.Customer.Oid.Value;
|
||||
|
||||
var qb = CreateServiceOverviewSingleCustomerReport(cOid, month, year, 0, 0, null, 1, DateTime.DaysInMonth(year, month));
|
||||
qb.CreateDocument();
|
||||
if (master.Pages.Count == 0)
|
||||
{
|
||||
master.CreateDocument();
|
||||
}
|
||||
master.Pages.AddRange(qb.Pages);
|
||||
}
|
||||
}
|
||||
return master;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace ChristopherusHausMID.Invoicing
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.UnitDescription = "Faktor 1.0";
|
||||
item.CustomNumber1 = anzahlAbwesenheitsTage;
|
||||
}
|
||||
return items;
|
||||
@@ -100,7 +101,13 @@ namespace ChristopherusHausMID.Invoicing
|
||||
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
return base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
if (PoolHelper.GetAbsenceTime(scap.CostBearer2SupportConcept.SupportConcept.Customer, iServiceRecord.Start.Value) != null)
|
||||
{
|
||||
//Bei Abwesenheit darf nichts berechnet werden
|
||||
return null;
|
||||
}
|
||||
return ii;
|
||||
}
|
||||
|
||||
private decimal GetAbwesenheitsTage(Customer customer, DateTimeSpan invoicePeriod)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using BeWo.Data.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -8,5 +9,17 @@ namespace ChristopherusHausMID.Invoicing
|
||||
{
|
||||
public class PoolHelper
|
||||
{
|
||||
public static AbsenceTime GetAbsenceTime(Customer customer, DateTime date)
|
||||
{
|
||||
foreach (var at in customer.AbsenceTimes)
|
||||
{
|
||||
if ((!at.Start.HasValue || at.Start.Value.Date <= date) && (!at.End.HasValue || at.End.Value.Date >= date))
|
||||
{
|
||||
return at;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using BS.Shared.Core;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using System.Linq;
|
||||
using ChristopherusHausMID.Invoicing;
|
||||
|
||||
namespace ChristopherusHausMID
|
||||
{
|
||||
@@ -28,11 +29,12 @@ namespace ChristopherusHausMID
|
||||
String klassen = "";
|
||||
String bewilligungen = "";
|
||||
|
||||
Customer mainCustomer = null;
|
||||
if (pRO.EmployeeOid > 0 && pRO.CustomerOid > 0)
|
||||
{
|
||||
|
||||
|
||||
var mainCustomer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
|
||||
mainCustomer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
|
||||
var emp = DAOFactory.GenericDAO.LoadByID<Employee>(pRO.EmployeeOid);
|
||||
|
||||
klienten = mainCustomer.Person.FirstNameLastName;
|
||||
@@ -84,6 +86,18 @@ namespace ChristopherusHausMID
|
||||
item.IstUhrzeiten1 = String.Format("{0:HH:mm}", item.StartDate);
|
||||
item.IstUhrzeiten2 = String.Format("{0:HH:mm}", item.EndDate);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(item.EmployeeFullname) && item.EmployeeFullname != pRO.EmployeeName && item.Minutes > 0)
|
||||
{
|
||||
item.Notice = String.Format("Vertretung durch {0}", item.EmployeeFullname);
|
||||
}
|
||||
|
||||
var at = PoolHelper.GetAbsenceTime(mainCustomer, item.StartDate);
|
||||
if (at != null)
|
||||
{
|
||||
item.Notice = at.AbsenceReason.Description;
|
||||
item.Minutes = 0;
|
||||
}
|
||||
if (item.Minutes > 0)
|
||||
{
|
||||
item.Notice5 = String.Format("{0:0.0}", poolFaktor);
|
||||
@@ -93,6 +107,7 @@ namespace ChristopherusHausMID
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
|
||||
private decimal GetAktuelleBewilligung(Customer c, DateTime datum)
|
||||
{
|
||||
var scList = c.SupportConcepts;
|
||||
|
||||
@@ -222,7 +222,6 @@ namespace ChristopherusHausMID
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.IstUhrzeiten2")});
|
||||
this.xrTableCell11.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold);
|
||||
this.xrTableCell11.Name = "xrTableCell11";
|
||||
this.xrTableCell11.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 3, 0, 0, 100F);
|
||||
this.xrTableCell11.StylePriority.UseFont = false;
|
||||
this.xrTableCell11.StylePriority.UsePadding = false;
|
||||
this.xrTableCell11.Weight = 0.096551744452217175D;
|
||||
@@ -232,9 +231,10 @@ namespace ChristopherusHausMID
|
||||
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Notice")});
|
||||
this.xrTableCell8.Name = "xrTableCell8";
|
||||
this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 3, 0, 0, 100F);
|
||||
this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F);
|
||||
this.xrTableCell8.StylePriority.UsePadding = false;
|
||||
this.xrTableCell8.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell8.Weight = 0.36551731898236622D;
|
||||
//
|
||||
// xrTableCell34
|
||||
@@ -243,7 +243,6 @@ namespace ChristopherusHausMID
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Notice5")});
|
||||
this.xrTableCell34.Multiline = true;
|
||||
this.xrTableCell34.Name = "xrTableCell34";
|
||||
this.xrTableCell34.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 3, 0, 0, 100F);
|
||||
this.xrTableCell34.StylePriority.UsePadding = false;
|
||||
this.xrTableCell34.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell34.Weight = 0.090804588890990648D;
|
||||
@@ -857,13 +856,12 @@ namespace ChristopherusHausMID
|
||||
| DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTableCell15.Name = "xrTableCell15";
|
||||
this.xrTableCell15.Padding = new DevExpress.XtraPrinting.PaddingInfo(10, 0, 0, 0, 100F);
|
||||
this.xrTableCell15.StylePriority.UseBorders = false;
|
||||
this.xrTableCell15.StylePriority.UseFont = false;
|
||||
this.xrTableCell15.StylePriority.UsePadding = false;
|
||||
this.xrTableCell15.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell15.Text = "Die Richtigkeit der eingetragenen Zeiten wird hiermit bestätigt";
|
||||
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
this.xrTableCell15.Weight = 1.027586607156568D;
|
||||
//
|
||||
// xrTableRow10
|
||||
|
||||
954
ReportImp/ChristopherusHausMID/Rechnung.Designer.cs
generated
954
ReportImp/ChristopherusHausMID/Rechnung.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -22,12 +22,14 @@ namespace ChristopherusHausMID
|
||||
|
||||
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
||||
{
|
||||
var ro = CreateRechnungsRO(pRO);
|
||||
SetzeAdresse(pRO);
|
||||
SetzeSchule(pRO);
|
||||
SetzeSollIst(pRO);
|
||||
SetzeKategorie(pRO);
|
||||
|
||||
this.bindingSource1.DataSource = CreateRechnungsRO(pRO);
|
||||
SetzeSollIst(ro);
|
||||
|
||||
this.bindingSource1.DataSource = ro;
|
||||
}
|
||||
|
||||
private RechnungRO CreateRechnungsRO(ServiceInvoiceRO pRO)
|
||||
@@ -48,26 +50,32 @@ namespace ChristopherusHausMID
|
||||
if (item.UnitDescription == "Faktor 1.0")
|
||||
{
|
||||
pos.BetreuteStunden10 = item.UnitCount ?? 0;
|
||||
pos.BetragStunden10 = item.NetAmount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.1")
|
||||
{
|
||||
pos.BetreuteStunden11 = item.UnitCount ?? 0;
|
||||
pos.BetragStunden11 = item.NetAmount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.2")
|
||||
{
|
||||
pos.BetreuteStunden12 = item.UnitCount ?? 0;
|
||||
pos.BetragStunden12 = item.NetAmount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.3")
|
||||
{
|
||||
pos.BetreuteStunden13 = item.UnitCount ?? 0;
|
||||
pos.BetragStunden13 = item.NetAmount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.4")
|
||||
{
|
||||
pos.BetreuteStunden14 = item.UnitCount ?? 0;
|
||||
pos.BetragStunden14 = item.NetAmount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.5")
|
||||
{
|
||||
pos.BetreuteStunden15 = item.UnitCount ?? 0;
|
||||
pos.BetragStunden15 = item.NetAmount ?? 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -138,16 +146,21 @@ namespace ChristopherusHausMID
|
||||
|
||||
}
|
||||
|
||||
private void SetzeSollIst(ServiceInvoiceRO pRO)
|
||||
private void SetzeSollIst(RechnungRO pRO)
|
||||
{
|
||||
foreach (var ip in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
lblSollstunden.Text = String.Format("{0:0.00} h", pRO.SummenPosition.GesamtStunden);
|
||||
lblIstStunden.Text = String.Format("{0:0.00} h", pRO.SummenPosition.GesamtStunden);
|
||||
lblAbweichung.Text = String.Format("{0:0.0}%", 0);
|
||||
lblAbrechenbareStunden.Text = String.Format("{0:0.00} h", pRO.SummenPosition.GesamtStunden);
|
||||
|
||||
if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Weekly)
|
||||
continue;
|
||||
if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Monthly)
|
||||
ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval /= 4.34m;
|
||||
}
|
||||
//foreach (var ip in pRO.ServiceInvoicePeriods)
|
||||
//{
|
||||
|
||||
// if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Weekly)
|
||||
// continue;
|
||||
// if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Monthly)
|
||||
// ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval /= 4.34m;
|
||||
//}
|
||||
}
|
||||
|
||||
private void SetzeKategorie(ServiceInvoiceRO pRO)
|
||||
|
||||
@@ -17,15 +17,16 @@ namespace ChristopherusHausMID.Service
|
||||
public class CustomOperationService : OperationService
|
||||
{
|
||||
private ServiceDescription leistungSchulbegleitung;
|
||||
|
||||
private VacationService vacationService;
|
||||
|
||||
protected override bool CreateServiceRecordsIfAnyExistInDateRange { get { return true; } }
|
||||
|
||||
//public override ServiceRecord CreateServiceRecord(ArbeitszeitEintrag ae, DateTime datum, CostBearer2SupportConcept c2s, ServiceDescription defaultSd)
|
||||
//{
|
||||
|
||||
|
||||
// var sr = base.CreateServiceRecord(ae, datum, c2s, defaultSd);
|
||||
|
||||
|
||||
|
||||
// return sr;
|
||||
//}
|
||||
|
||||
@@ -37,6 +38,28 @@ namespace ChristopherusHausMID.Service
|
||||
// b.Entry.Value.Contains("Hauptbetreuung")))?.Employee;
|
||||
//}
|
||||
|
||||
private VacationService GetVacationService()
|
||||
{
|
||||
if (vacationService == null)
|
||||
{
|
||||
vacationService = PluginLoader.FindClass<VacationService>();
|
||||
}
|
||||
|
||||
return vacationService;
|
||||
}
|
||||
|
||||
protected override IList<ServiceRecord> CreateServiceRecords(Arbeitszeit arbeitszeit, DateTime datum, CostBearer2SupportConcept c2s, ServiceDescription defaultSd, List<ServiceRecord> existingList)
|
||||
{
|
||||
var ferien = GetVacationService().GetFerien(datum, "nrw");
|
||||
|
||||
if (ferien == null)
|
||||
{
|
||||
return base.CreateServiceRecords(arbeitszeit, datum, c2s, defaultSd, existingList);
|
||||
}
|
||||
|
||||
return new List<ServiceRecord>();
|
||||
}
|
||||
|
||||
public override ServiceDescription GetDefaultServiceDescription(CostBearer2SupportConcept c2s)
|
||||
{
|
||||
if (leistungSchulbegleitung == null)
|
||||
|
||||
Reference in New Issue
Block a user