Pusteblume Änderungen an der Invest Abrechnung eingebaut

This commit is contained in:
2026-03-13 15:13:54 +01:00
parent 9df422a01a
commit a9e8c534e9
2 changed files with 28 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ namespace PraxisPusteblume
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
bool mq = false;
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
if (pRO.RecipientOrganisation.Contains(" - IFS"))
@@ -66,7 +66,7 @@ namespace PraxisPusteblume
rtKopfIfs.Text = rtKopfIfs.Text.Replace("Jahnstraße 31, 83278 Traunstein", "Staudacher Str. 12, 83250 Marquartstein");
}
SetzePreise(pRO);
SetzePreise(pRO, mq);
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
{
@@ -119,6 +119,10 @@ namespace PraxisPusteblume
if (sip.ServiceInvoiceItems != null && sip.ServiceInvoiceItems.Count > 0)
{
if (sip.Customer.LastName == "Achatz")
{
}
foreach (var i in sip.ServiceInvoiceItems)
{
if (i.ServiceDescription == null)
@@ -196,7 +200,7 @@ namespace PraxisPusteblume
return 0;
}
private void SetzePreise(ServiceInvoiceRO pRO)
private void SetzePreise(ServiceInvoiceRO pRO, bool istMQ)
{
decimal preisAmbulant = 58.24m;
decimal preisMobil = 78.08m;
@@ -240,7 +244,16 @@ namespace PraxisPusteblume
if (pRO.AccountingPeriodStart >= new DateTime(2024, 08, 01))
{
var preise = DAOFactory.GenericDAO.GetAllActive<Preis>();
preisInvest = GetPreis(preise, "Invest (MQ)", pRO.AccountingPeriodStart);
if (istMQ)
{
preisInvest = GetPreis(preise, "Invest (MQ)", pRO.AccountingPeriodStart);
}
else
{
preisInvest = GetPreis(preise, "Invest (TS)", pRO.AccountingPeriodStart);
}
preisTeam = GetPreis(preise, "Team", pRO.AccountingPeriodStart);
}
if (pRO.AccountingPeriodStart >= new DateTime(2025, 09, 01))

View File

@@ -92,6 +92,16 @@ namespace PraxisPusteblume.Invoicing
serviceInvoicePeriod.InvoiceItemList.Add(item);
}
List<int> vernetzung = new List<int> { 2, 3, 5, 9, 12 };
if (invoicePeriod.StartDateTime >= new DateTime(2025, 09, 01) && vernetzung.Contains(invoicePeriod.EndDate.Month))
{
var itemVernetzung = CreateVernetzungInvoiceItem(scap, invoicePeriod);
if (itemVernetzung != null)
{
serviceInvoicePeriod.InvoiceItemList.Add(itemVernetzung);
}
}
decimal count = 0;
foreach (var ii in serviceInvoicePeriod.InvoiceItemList)
{
@@ -106,15 +116,7 @@ namespace PraxisPusteblume.Invoicing
serviceInvoicePeriod.InvoiceItemList.Add(itemInvest);
}
}
List<int> vernetzung = new List<int> { 2, 3, 5, 9, 12 };
if (invoicePeriod.StartDateTime >= new DateTime(2025, 09, 01) && vernetzung.Contains(invoicePeriod.EndDate.Month))
{
var itemVernetzung = CreateVernetzungInvoiceItem(scap, invoicePeriod);
if (itemVernetzung != null)
{
serviceInvoicePeriod.InvoiceItemList.Add(itemVernetzung);
}
}
}
}