MalteserJohanniterJohanneshaus/RechnungTagesstaetten - Zwischenstand
This commit is contained in:
@@ -14,7 +14,7 @@ using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
|
||||
|
||||
namespace Wabe.Invoicing
|
||||
namespace MalteserJohanniterJohanneshaus.Invoicing
|
||||
{
|
||||
public class CollectiveInvoiceCreation : InvoiceCreation
|
||||
{
|
||||
@@ -34,10 +34,25 @@ namespace Wabe.Invoicing
|
||||
var costBearer = DAOFactory.GenericDAO.LoadByID<CostBearer>(costBearerOid);
|
||||
var invoiceList = new List<ServiceInvoice>();
|
||||
ServiceInvoice invoice;
|
||||
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> TeamKaldauen = new Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>>();
|
||||
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> TeamRoisdorf = new Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>>();
|
||||
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> TeamSiegburg = new Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>>();
|
||||
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> TeamWitter = new Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>>();
|
||||
|
||||
invoice = CreateCollectiveBilling2(costBearer, invoicePeriod, supportConcepts2ServiceRecords);
|
||||
foreach (var sc in supportConcepts2ServiceRecords.Keys)
|
||||
{
|
||||
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(sc.CostBearerRelOids[0]);
|
||||
if (c2s.Notice.IsNotNullOrEmpty() && c2s.Notice.Contains("10"))
|
||||
{
|
||||
TeamKaldauen.Add(sc, supportConcepts2ServiceRecords[sc]);
|
||||
}
|
||||
else
|
||||
TeamRoisdorf.Add(sc, supportConcepts2ServiceRecords[sc]);
|
||||
}
|
||||
invoice = CreateCollectiveBilling2(costBearer, invoicePeriod, TeamKaldauen);
|
||||
if (invoice != null)
|
||||
invoiceList.Add(invoice);
|
||||
|
||||
|
||||
var result = invoiceList.Select(item => MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(item)).ToList();
|
||||
return result.Count > 1 ? result.OrderBy(i => i.InvoiceBase.CustomerLastName).ToList() : result;
|
||||
@@ -94,7 +109,7 @@ namespace Wabe.Invoicing
|
||||
var data = calc.GetFixedBillingData(supportConceptApprovalPeriod, serviceInvoicePeriod.Start, serviceInvoicePeriod.End);
|
||||
var scap = supportConceptApprovalPeriod;
|
||||
|
||||
if (scap != null && scap.ServiceCategory != null && scap.ServiceCategory.Name.Contains("HEG"))
|
||||
if (scap != null && scap.ServiceCategory != null)
|
||||
{
|
||||
IList<InvoiceItem> ergebnis = new List<InvoiceItem>();
|
||||
var customer = cb2sc.SupportConcept.Customer;
|
||||
|
||||
@@ -15,6 +15,13 @@ namespace MalteserJohanniterJohanneshaus.Invoicing
|
||||
{
|
||||
foreach (var sr in list)
|
||||
{
|
||||
if (sr.CostBearer != null)
|
||||
{
|
||||
if (sr.CostBearer.Name.Contains("besW"))
|
||||
{
|
||||
return new CollectiveInvoiceCreation();
|
||||
}
|
||||
}
|
||||
var sd = sr.ServiceDescription.Category;
|
||||
var ic = GetInvoiceCreatorForCategory(sd);
|
||||
if (ic != null)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,9 @@ using BS.Shared.Core;
|
||||
using BeWo.Report;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace MalteserJohanniterJohanneshaus
|
||||
{
|
||||
@@ -81,14 +84,15 @@ namespace MalteserJohanniterJohanneshaus
|
||||
{
|
||||
int newRows = 0;
|
||||
int index = 2;
|
||||
var newDict = new Dictionary<long, List<AbsenceTimeDC>>();
|
||||
foreach (var sip in pRo.ServiceInvoicePeriods)
|
||||
{
|
||||
if (sip.Customer.AbsenceTimes.Any(a => a.AbsenceSpan.EndDate >= pRo.AccountingPeriodStart && a.AbsenceSpan.StartDate <= pRo.AccountingPeriodEnd))
|
||||
if (sip.CostBearer2SupportConcept.SupportConcept.Customer.AbsenceTimes != null && sip.CostBearer2SupportConcept.SupportConcept.Customer.AbsenceTimes.Count > 0)
|
||||
{
|
||||
if (sip.Customer.AbsenceTimes != null && sip.Customer.AbsenceTimes.Count > 0)
|
||||
if (sip.CostBearer2SupportConcept.SupportConcept.Customer.AbsenceTimes.Any(a => a.AbsenceSpan.EndDate >= pRo.AccountingPeriodStart && a.AbsenceSpan.StartDate <= pRo.AccountingPeriodEnd))
|
||||
{
|
||||
sip.Customer.AbsenceTimes = sip.Customer.AbsenceTimes.OrderBy(a => a.Start).ToList();
|
||||
foreach (var at in sip.Customer.AbsenceTimes)
|
||||
sip.CostBearer2SupportConcept.SupportConcept.Customer.AbsenceTimes = sip.CostBearer2SupportConcept.SupportConcept.Customer.AbsenceTimes.OrderBy(a => a.Start).ToList();
|
||||
foreach (var at in sip.CostBearer2SupportConcept.SupportConcept.Customer.AbsenceTimes)
|
||||
{
|
||||
if (at.AbsenceSpan.EndDate >= pRo.AccountingPeriodStart && at.AbsenceSpan.StartDate <= pRo.AccountingPeriodEnd)
|
||||
{
|
||||
@@ -115,7 +119,8 @@ namespace MalteserJohanniterJohanneshaus
|
||||
{
|
||||
row.Cells[3].Text = "unbekannt";
|
||||
}
|
||||
row.Cells[4].Text = at.Reason.Description;
|
||||
row.Cells[4].Text = "ja";
|
||||
row.Cells[5].Text = at.AbsenceReason.Description;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@@ -131,15 +136,21 @@ namespace MalteserJohanniterJohanneshaus
|
||||
row.Cells[1].Text = sip.CostBearer2SupportConcept.CustomerReferenceNumber;
|
||||
row.Cells[2].Text = "";
|
||||
row.Cells[3].Text = "";
|
||||
row.Cells[4].Text = sip.Customer.TerminationReason;
|
||||
row.Cells[5].Text = String.Format("{0:dd.MM.yyyy}", sip.Customer.TerminationDate);
|
||||
row.Cells[5].Text = sip.Customer.TerminationReason;
|
||||
row.Cells[6].Text = String.Format("{0:dd.MM.yyyy}", sip.Customer.TerminationDate);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
if (newRows > 0)
|
||||
{
|
||||
//lblUnterschriftKlient.Top += newRows * 20;
|
||||
//lblUnterschriftMitarbeiter.Top += newRows * 20;
|
||||
lblFuss1.Top += newRows * 15;
|
||||
lblFuss2.Top += newRows * 15;
|
||||
lblFuss3.Top += newRows * 15;
|
||||
lblFuss4.Top += newRows * 15;
|
||||
lblFuss5.Top += newRows * 15;
|
||||
lblFuss6.Top += newRows * 15;
|
||||
lblFuss7.Top += newRows * 15;
|
||||
lblFuss8.Top += newRows * 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user