Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2025-02-14 13:45:48 +01:00
4 changed files with 54 additions and 29 deletions

View File

@@ -1147,7 +1147,7 @@
<Label
Grid.Row="9"
Grid.Column="0"
Content="Kommentar" />
Content="{markup:Translate CustomerKommentar}" />
<uc:NullItemComboBox
Grid.Row="0"
Grid.Column="3"

View File

@@ -49,31 +49,26 @@ namespace AsSozialeDienstleistungenEV
XtraReport invoiceReport = null;
IBeWoReport<ServiceInvoiceRO> singleReport = FindReportImp<ServiceInvoiceRO>(iDC.InvoiceBase.InvoiceId);
if (iDC.InvoiceBase != null && iDC.InvoiceBase.InvoiceId != "Jugendamt")
if (iDC.ServiceInvoicePeriods.Count > 0 && iDC.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory != null)
{
var seite1 = new ServiceInvoiceReport();
var ro = ServiceInvoiceRO.Create(iDC);
seite1.SetReportDataSource(ro);
seite1.CreateDocument();
if (iDC.ServiceInvoicePeriods.Count > 0 && iDC.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory != null)
int month = iDC.InvoiceBase.AccountingPeriodStart.Value.Month;
int year = iDC.InvoiceBase.AccountingPeriodStart.Value.Year;
long cOid = iDC.InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer.CustomerOid;
long oOid = iDC.InvoiceBase.RecipientOrganisationOid ?? 0;
while (month <= iDC.InvoiceBase.AccountingPeriodEnd.Value.Month)
{
var seite1 = new ServiceInvoiceReport();
var ro = ServiceInvoiceRO.Create(iDC);
var qb = CreateServiceOverviewSingleCustomerReport(cOid, month, year, oOid, 0, null, 1, DateTime.DaysInMonth(year, month));
qb.CreateDocument();
seite1.SetReportDataSource(ro);
seite1.CreateDocument();
int month = iDC.InvoiceBase.AccountingPeriodStart.Value.Month;
int year = iDC.InvoiceBase.AccountingPeriodStart.Value.Year;
long cOid = iDC.InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer.CustomerOid;
long oOid = iDC.InvoiceBase.RecipientOrganisationOid ?? 0;
while (month <= iDC.InvoiceBase.AccountingPeriodEnd.Value.Month)
{
var qb = CreateServiceOverviewSingleCustomerReport(cOid, month, year, oOid, 0, null, 1, DateTime.DaysInMonth(year, month));
qb.CreateDocument();
seite1.Pages.AddRange(qb.Pages);
invoiceReport = seite1;
month++;
}
seite1.Pages.AddRange(qb.Pages);
invoiceReport = seite1;
month++;
}
}
else

View File

@@ -31,12 +31,12 @@ namespace MalteserJohanniterJohanneshaus.Invoicing
// die haben 5 Standorte, die über Kostenstellen unter Notiz im Hilfeplan identifiziert werden
// Es werden grundsätzlich volle Tagessätze aus der Verwaltung abgerechnet, bei Abwesenheiten > 3 Tage,
// werden alle Abwesenheitstage nur mit 75 % berechnet
public override List<ServiceInvoiceDC> GenerateServiceInvoices(long costBearerOid,
DateTimeSpan invoicePeriod,
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
var costBearer = DAOFactory.GenericDAO.LoadByID<CostBearer>(costBearerOid);
FuegeAbgelaufeneHilfeplaeneMitAktuellenBewilligungenHinzu(costBearer, invoicePeriod, supportConcepts2ServiceRecords);
var invoiceList = new List<ServiceInvoice>();
ServiceInvoice invoice;
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> TeamKaldauen = new Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>>();
@@ -89,18 +89,47 @@ namespace MalteserJohanniterJohanneshaus.Invoicing
return result.Count > 1 ? result.OrderBy(i => i.InvoiceBase.CustomerLastName).ToList() : result;
}
private void FuegeAbgelaufeneHilfeplaeneMitAktuellenBewilligungenHinzu(CostBearer costBearer, DateTimeSpan invoicePeriod, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
var alleHilfeplaene = DAOFactory.GenericDAO.GetAllActive<SupportConcept>();
var cs = new CustomerService();
foreach (var sc in alleHilfeplaene)
{
foreach (var c2s in sc.CostBearer2SupportConceptList)
{
if (c2s.EndDate < invoicePeriod.StartDate)
{
if (c2s.CostBearer.Oid == costBearer.Oid)
{
foreach (var ap in c2s.ApprovalPeriodList)
{
if (ap.EndDate >= invoicePeriod.StartDate && ap.StartDate <= invoicePeriod.EndDate)
{
var scDc = cs.CreateFlatSupportConcept(sc, c2s);
supportConcepts2ServiceRecords.Add(scDc, new List<ServiceRecordDC>());
break;
}
}
}
}
}
}
}
private ServiceInvoice CreateCollectiveBilling2(CostBearer costBearer, DateTimeSpan invoicePeriod, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
var invoice = new ServiceInvoice();
var newDict = new Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>>();
foreach (var sc2sr in supportConcepts2ServiceRecords) // Abrechnung erfolgt auch wenn nur beantragt
{
if (sc2sr.Key.IsApproved)
newDict.Add(sc2sr.Key, sc2sr.Value);
}
foreach (var sc2sr in supportConcepts2ServiceRecords)
{
if (!sc2sr.Key.IsArchived && !sc2sr.Key.IsDeleted)
newDict.Add(sc2sr.Key, sc2sr.Value);
}
SetRecipientInformation(invoice, costBearer);
SetRecipientInformation(invoice, costBearer);
SetSenderInformation(invoice);
SetInvoiceBaseData(0, invoice, costBearer, invoicePeriod, newDict.Keys.ToList());
SetCollectiveBillingBaseData(0, invoice, costBearer, invoicePeriod, newDict);

View File

@@ -84,6 +84,7 @@ namespace BeWo.Service.Plugins
AddOrReplaceTranslation(dict, "CustomerVerhalten", "Verhalten");
AddOrReplaceTranslation(dict, "CustomerBetreuungsbedarf", "Betreuungsbedarf");
AddOrReplaceTranslation(dict, "CustomerBemerkungenSbd", "Allgemeine Bemerkungen");
AddOrReplaceTranslation(dict, "CustomerKommentar", "Kommentar");
AddOrReplaceTranslation(dict, "EmployeePflege", "Pflege");
AddOrReplaceTranslation(dict, "EmployeeToilettengang", "Toilettengang");