MH: aha eV Anpassungen
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BetreuungsserviceFuerAlltagUndWohnen.Invoicing
|
||||
{
|
||||
public class CustomInvoiceCreation : InvoiceCreation
|
||||
{
|
||||
public override void BerechneSummaryItemsSummen(List<InvoiceItem> newlist, bool addRateFactorToUnitCount)
|
||||
{
|
||||
addRateFactorToUnitCount = true;
|
||||
foreach (InvoiceItem invoiceItem in newlist)
|
||||
{
|
||||
if (!invoiceItem.AmountPerUnit.HasValue)
|
||||
{
|
||||
invoiceItem.AmountPerUnit = 0;
|
||||
}
|
||||
invoiceItem.AmountPerUnit = Math.Round(invoiceItem.AmountPerUnit.Value, 2, MidpointRounding.AwayFromZero);
|
||||
|
||||
if (!invoiceItem.UnitCount.HasValue)
|
||||
{
|
||||
invoiceItem.UnitCount = 0;
|
||||
}
|
||||
|
||||
if (addRateFactorToUnitCount && invoiceItem.RateFactor.HasValue)
|
||||
{
|
||||
invoiceItem.UnitCount = (invoiceItem.UnitCount ?? 0) * ((invoiceItem.RateFactor + 100) / 100);
|
||||
}
|
||||
|
||||
invoiceItem.UnitCount = Math.Round(invoiceItem.UnitCount.Value, 2, MidpointRounding.AwayFromZero);
|
||||
|
||||
|
||||
invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount;
|
||||
invoiceItem.AmountTotal = Math.Round(invoiceItem.AmountTotal.Value, 2, MidpointRounding.AwayFromZero);
|
||||
|
||||
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
|
||||
|
||||
|
||||
if (!addRateFactorToUnitCount && invoiceItem.RateFactor.HasValue)
|
||||
{
|
||||
invoiceItem.GrossAmountTotal *= ((invoiceItem.RateFactor + 100) / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BetreuungsserviceFuerAlltagUndWohnen.Invoicing
|
||||
{
|
||||
public class CustomInvoiceFactory : InvoiceFactory
|
||||
{
|
||||
|
||||
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
||||
{
|
||||
return new CustomInvoiceCreation();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,15 @@ namespace ahaEV
|
||||
{
|
||||
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
|
||||
{
|
||||
public override List<DateTime> GetFeiertage(int year)
|
||||
{
|
||||
var list = base.GetFeiertage(year);
|
||||
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public override bool ShouldCreateDayDetails()
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -10,5 +10,17 @@ namespace ahaEV
|
||||
class CustomVacationService : VacationService
|
||||
{
|
||||
public override string Bundesland { get => "Hessen"; }
|
||||
|
||||
public override decimal GetFeiertagsFaktor(DateTime start)
|
||||
{
|
||||
if (IstFeiertag(start))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (start.Month == 12 && start.Day == 24 || start.Month == 12 && start.Day == 31)
|
||||
return 0.5m;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace ahaEV
|
||||
var msb = new CustomMitarbeiterstundenkontoBerechnung();
|
||||
msb.CreateReport(pRO);
|
||||
|
||||
var stunden = 0.0m;
|
||||
|
||||
foreach (var ed in pRO.EmployeeDetailList)
|
||||
{
|
||||
var c = ed.Employee.GetValidContractForDate(pRO.ReportStartDate);
|
||||
@@ -38,8 +40,16 @@ namespace ahaEV
|
||||
ed.Regelarbeitszeit = String.Format("{0:0.00} Stunden pro Woche", c.WeeklyTotalHours);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (var day in ed.Days)
|
||||
{
|
||||
stunden += day.MinutesTotal / 60;
|
||||
}
|
||||
stunden += ed.SollProTag * ed.UrlaubUndKrankheit.Value;
|
||||
ed.Custom15 = stunden;
|
||||
}
|
||||
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace ahaEV
|
||||
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.Title = new DevExpress.XtraReports.UI.XRControlStyle();
|
||||
this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle();
|
||||
this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle();
|
||||
@@ -115,6 +114,7 @@ namespace ahaEV
|
||||
this.fieldSumHoliday2 = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldIstArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
@@ -614,7 +614,7 @@ namespace ahaEV
|
||||
this.xrTableCell46.Name = "xrTableCell46";
|
||||
this.xrTableCell46.StylePriority.UseBorders = false;
|
||||
this.xrTableCell46.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell46.Text = "Arbeitszeit:";
|
||||
this.xrTableCell46.Text = "Ist-Stunden";
|
||||
this.xrTableCell46.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.xrTableCell46.Weight = 0.0899362101431268D;
|
||||
//
|
||||
@@ -622,15 +622,13 @@ namespace ahaEV
|
||||
//
|
||||
this.cellSumMinutesTotalDecimal2.Borders = DevExpress.XtraPrinting.BorderSide.Top;
|
||||
this.cellSumMinutesTotalDecimal2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.fieldHours")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Custom15", "{0:0.00}")});
|
||||
this.cellSumMinutesTotalDecimal2.Name = "cellSumMinutesTotalDecimal2";
|
||||
this.cellSumMinutesTotalDecimal2.StylePriority.UseBorders = false;
|
||||
this.cellSumMinutesTotalDecimal2.StylePriority.UseTextAlignment = false;
|
||||
xrSummary4.FormatString = "{0:0.00}";
|
||||
xrSummary4.IgnoreNullValues = true;
|
||||
xrSummary4.Running = DevExpress.XtraReports.UI.SummaryRunning.Group;
|
||||
this.cellSumMinutesTotalDecimal2.Summary = xrSummary4;
|
||||
this.cellSumMinutesTotalDecimal2.Text = "cellSumMinutesTotalDecimal2";
|
||||
this.cellSumMinutesTotalDecimal2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.cellSumMinutesTotalDecimal2.Weight = 0.071948964683863317D;
|
||||
//
|
||||
@@ -839,10 +837,6 @@ namespace ahaEV
|
||||
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.xrTableCell14.Weight = 0.080942614161178317D;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
|
||||
//
|
||||
// Title
|
||||
//
|
||||
this.Title.BackColor = System.Drawing.Color.White;
|
||||
@@ -972,6 +966,10 @@ namespace ahaEV
|
||||
this.fieldUeberstundenGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
|
||||
this.fieldUeberstundenGesamt.Name = "fieldUeberstundenGesamt";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
|
||||
//
|
||||
// Mitarbeiterarbeitszeitkonto
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
|
||||
Reference in New Issue
Block a user