Bugfix in Stundenkontoberechnung + Statistik Factory. Fortis + Kloss QB Änderungen
This commit is contained in:
@@ -1005,4 +1005,35 @@ ADD COLUMN `IKDatenannahmestelle` VARCHAR(16) NULL DEFAULT NULL;
|
||||
|
||||
|
||||
ALTER TABLE `mandator`
|
||||
ADD COLUMN `IKLeistungserbringer` VARCHAR(16) NULL;
|
||||
ADD COLUMN `IKLeistungserbringer` VARCHAR(16) NULL;
|
||||
|
||||
ALTER TABLE signature
|
||||
ADD COLUMN EmployeeOid BIGINT DEFAULT NULL,
|
||||
ADD COLUMN CustomerOid BIGINT DEFAULT NULL,
|
||||
ADD COLUMN BargeldtransaktionsOid BIGINT DEFAULT NULL;
|
||||
|
||||
|
||||
CREATE TABLE `bargeldtransaktionshistory` (
|
||||
Oid BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
InsTs DATETIME DEFAULT NULL,
|
||||
InsUser VARCHAR(256) DEFAULT NULL,
|
||||
UdpUser VARCHAR(256) DEFAULT NULL,
|
||||
Tid INT NOT NULL,
|
||||
Notice VARCHAR(1024) DEFAULT NULL,
|
||||
Version BIGINT DEFAULT NULL,
|
||||
IsActive TINYINT DEFAULT NULL,
|
||||
SystemEntryID INT DEFAULT NULL,
|
||||
ChangeType TINYINT DEFAULT NULL,
|
||||
Zahlungstyp TINYINT DEFAULT NULL,
|
||||
Zahlungsdatum DATETIME DEFAULT NULL,
|
||||
Betrag DECIMAL(18, 10) DEFAULT NULL,
|
||||
Transaktionskassenbestand DECIMAL(18, 10) DEFAULT NULL,
|
||||
BargeldtransaktionOid BIGINT DEFAULT NULL,
|
||||
Belegnummer VARCHAR(128) DEFAULT NULL,
|
||||
SignatureOid BIGINT DEFAULT NULL,
|
||||
SignatureStateType INT DEFAULT '0',
|
||||
BargeldtransaktionInsTs DATETIME DEFAULT NULL,
|
||||
BargeldtransaktionInsUser VARCHAR(256) DEFAULT NULL,
|
||||
BargeldtransaktionVersion BIGINT DEFAULT NULL,
|
||||
BargeldtransaktionUdpUser VARCHAR(256) DEFAULT NULL
|
||||
) ENGINE=InnoDB;
|
||||
@@ -3400,13 +3400,14 @@ namespace BeWo.Report.ReportObjects
|
||||
//gibt 1 zurück wenn ganzer Feiertag und z.B. 0.5 bei halben etc.
|
||||
public virtual decimal GetFeiertagsFaktor(DateTime start)
|
||||
{
|
||||
return vacationService.GetFeiertagsFaktor(start);
|
||||
//if (IstFeiertag(start))
|
||||
//{
|
||||
// return 1;
|
||||
//}
|
||||
//return 0;
|
||||
}
|
||||
//CB 26.02.2024: Darf nicht über den VacationService gehen, sonst werden die im CustomMitarbeiterstundenkontoBerechnung hinterlegten Feiertage ignoriert
|
||||
//return vacationService.GetFeiertagsFaktor(start);
|
||||
if (IstFeiertag(start))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public virtual bool IstFeiertag(DateTime start)
|
||||
{
|
||||
|
||||
@@ -655,8 +655,11 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa
|
||||
{
|
||||
info.AbwesenheitsNotiz = "";
|
||||
}
|
||||
|
||||
abrechenbareAbwesenheiten.Add(dtIterator, info);
|
||||
if (!abrechenbareAbwesenheiten.ContainsKey(dtIterator))
|
||||
{
|
||||
abrechenbareAbwesenheiten.Add(dtIterator, info);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace Fortis
|
||||
{
|
||||
|
||||
var rootReport = CreateServicesOverviewReportForRo(lROs[0], serviceCategoryOid);
|
||||
rootReport.CreateDocument();
|
||||
//rootReport.CreateDocument();
|
||||
|
||||
for (int i = 1; i < lROs.Count; i++)
|
||||
{
|
||||
var lNext = CreateServicesOverviewReportForRo(lROs[i], serviceCategoryOid);
|
||||
lNext.CreateDocument();
|
||||
|
||||
rootReport.Pages.AddRange(lNext.Pages);
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@ namespace Fortis
|
||||
|
||||
public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||
{
|
||||
var customer = DAOFactory.GenericDAO.LoadByID<Customer>(customerOid);
|
||||
if (customer.Person.LastName.ToLower().Contains("test") || customer.Person.FirstName.ToLower().Contains("test"))
|
||||
{
|
||||
//var customer = DAOFactory.GenericDAO.LoadByID<Customer>(customerOid);
|
||||
//if (customer.Person.LastName.ToLower().Contains("test") || customer.Person.FirstName.ToLower().Contains("test"))
|
||||
//{
|
||||
DateTime startDate = new DateTime(year, month, 1);
|
||||
|
||||
if (startDay == 1 && endDay == DateTime.DaysInMonth(year, month))
|
||||
@@ -88,7 +88,7 @@ namespace Fortis
|
||||
|
||||
endDay = (int)endDate.Subtract(startDate).TotalDays;
|
||||
}
|
||||
}
|
||||
//}
|
||||
var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
|
||||
|
||||
return CreateServicesOverviewReportForRo(ro, serviceCategoryOid);
|
||||
@@ -99,8 +99,8 @@ namespace Fortis
|
||||
{
|
||||
IBeWoReport<ServicesOverviewRO> report = null;
|
||||
|
||||
if (ro.CustomerFirstName.Contains("TEST") || ro.CustomerLastName.Contains("TEST"))
|
||||
{
|
||||
//if (ro.CustomerFirstName.Contains("TEST") || ro.CustomerLastName.Contains("TEST"))
|
||||
//{
|
||||
report = new Fortis.ZeitdokumentationPlanIstUebersicht();
|
||||
report.SetReportDataSource(ro);
|
||||
((XtraReport)report).CreateDocument();
|
||||
@@ -111,7 +111,7 @@ namespace Fortis
|
||||
((XtraReport)report).Pages.AddRange(qb.Pages);
|
||||
|
||||
return report as XtraReport;
|
||||
}
|
||||
//}
|
||||
|
||||
report = new BeWo.Report.DefaultReports.Quittierungsbeleg();
|
||||
report.SetReportDataSource(ro);
|
||||
|
||||
@@ -22,10 +22,14 @@ namespace Fortis
|
||||
{
|
||||
if (pRO.Services != null)
|
||||
{
|
||||
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
Dictionary<long, FortisServiceRecord> tag2Details = new Dictionary<long, FortisServiceRecord>();
|
||||
|
||||
foreach (var sr in pRO.Services)
|
||||
{
|
||||
bool add = true;
|
||||
|
||||
if (sr.ProzentAbrechenbar < 100)
|
||||
{
|
||||
sr.Minutes = (sr.Minutes / 100) * (double)sr.ProzentAbrechenbar;
|
||||
@@ -64,12 +68,18 @@ namespace Fortis
|
||||
{
|
||||
fsr.MinutenGD += sr.Minutes;
|
||||
}
|
||||
else if (sr.ServiceDescription.Contains("abgesagt"))
|
||||
{
|
||||
fsr.FehlkontaktBeginn = sr.StartDate;
|
||||
fsr.FehlkontaktEnde = sr.EndDate;
|
||||
fsr.FehlkontaktMinuten = sr.Minutes;
|
||||
}
|
||||
else if (sr.ServiceDescription.Contains("pool") || sr.ServiceCategory.Contains("WG-Aktivität") || sr.ServiceCategory.Contains("WG Aktivität"))
|
||||
|
||||
{
|
||||
fsr.MinutenGI += sr.Minutes;
|
||||
}
|
||||
else if (sr.ServiceDescription.Contains("Kompensatorisch"))
|
||||
else if (sr.ServiceDescription.Contains("Kompensatorisch") || sr.ServiceDescription.Contains("Leistung im Auftrag"))
|
||||
|
||||
{
|
||||
fsr.MinutenKL += sr.Minutes;
|
||||
@@ -79,24 +89,25 @@ namespace Fortis
|
||||
{
|
||||
fsr.MinutenAK += sr.Minutes;
|
||||
}
|
||||
else if (sr.ServiceDescription.Contains("abgesagt"))
|
||||
{
|
||||
fsr.FehlkontaktBeginn = sr.StartDate;
|
||||
fsr.FehlkontaktEnde = sr.EndDate;
|
||||
fsr.FehlkontaktMinuten = sr.Minutes;
|
||||
}
|
||||
else
|
||||
{
|
||||
//fsr.MinutenH += sr.Minutes;
|
||||
add = false;
|
||||
}
|
||||
//if (sr.EmployeeCount > 1)
|
||||
//{
|
||||
// fsr.AnzahlMA += sr.EmployeeCount;
|
||||
//}
|
||||
fsr.AnzahlMA = sr.EmployeeCount;
|
||||
fsr.Groesse += sr.CustomerCount;
|
||||
}
|
||||
if (add)
|
||||
{
|
||||
fsr.AnzahlMA = sr.EmployeeCount;
|
||||
fsr.Groesse += sr.CustomerCount;
|
||||
|
||||
servicesBillable.Add(sr);
|
||||
}
|
||||
}
|
||||
|
||||
pRO.Services = servicesBillable;
|
||||
//List<ServicesOverviewRO.ServiceDetail> newServices = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
//DateTime dt = pRO.StartDate;
|
||||
|
||||
@@ -338,12 +338,15 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
var srDc = MapToServiceRecordDCForStatistic(sr);
|
||||
minutesProvidedRounded = calc.GetBillableDurationInMinutes(srDc, false);
|
||||
|
||||
if (periodStats.ServiceRecords == null)
|
||||
if (periodStats != null)
|
||||
{
|
||||
periodStats.ServiceRecords = new List<ServiceRecordDC>();
|
||||
|
||||
if (periodStats.ServiceRecords == null)
|
||||
{
|
||||
periodStats.ServiceRecords = new List<ServiceRecordDC>();
|
||||
}
|
||||
periodStats.ServiceRecords.Add(srDc);
|
||||
}
|
||||
periodStats.ServiceRecords.Add(srDc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -204,10 +204,12 @@ namespace BS.Shared.Services
|
||||
SupportConceptApprovalPeriodDC scap = null;
|
||||
|
||||
if (category != null)
|
||||
{
|
||||
scap = relDC.ApprovalPeriodList.FirstOrDefault(
|
||||
i =>
|
||||
dt.InBetween(i.Span, true) && i.ServiceCategory != null &&
|
||||
i.ServiceCategory.ServiceCategoryOid == category.ServiceCategoryOid);
|
||||
}
|
||||
|
||||
if (scap == null)
|
||||
scap = relDC.ApprovalPeriodList.FirstOrDefault(i => dt.InBetween(i.Span, true));
|
||||
|
||||
Reference in New Issue
Block a user