LH Frankfurt Oder, Bugfix Ersteller Infos wurden nicht auf den Rechnungen angezeigt
This commit is contained in:
@@ -1,17 +1,19 @@
|
|||||||
using System;
|
using BeWo.Data;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using BeWo.Data.Access;
|
using BeWo.Data.Access;
|
||||||
using BeWo.Data.Entities;
|
using BeWo.Data.Entities;
|
||||||
using BeWo.Service.DCEntityMapper;
|
using BeWo.Service.DCEntityMapper;
|
||||||
using BeWo.Service.Invoicing;
|
using BeWo.Service.Invoicing;
|
||||||
using BeWo.Service.Plugins;
|
using BeWo.Service.Plugins;
|
||||||
|
using BeWo.Service.ServiceImplementations;
|
||||||
using BS.Shared;
|
using BS.Shared;
|
||||||
using BS.Shared.Core;
|
using BS.Shared.Core;
|
||||||
using BS.Shared.DataContracts;
|
using BS.Shared.DataContracts;
|
||||||
using BS.Shared.DataContracts.Compact;
|
using BS.Shared.DataContracts.Compact;
|
||||||
using BS.Shared.Extensions;
|
using BS.Shared.Extensions;
|
||||||
using BS.Shared.Services;
|
using BS.Shared.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace LebenshilfeFrankfurtOder.Invoicing
|
namespace LebenshilfeFrankfurtOder.Invoicing
|
||||||
{
|
{
|
||||||
@@ -101,6 +103,36 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetSenderInformation(ServiceInvoice serviceInvoice)
|
||||||
|
{
|
||||||
|
ApplicationUser user = null;
|
||||||
|
if (LoggedInUserOperationContextExt.Current != null)
|
||||||
|
{
|
||||||
|
user = LoggedInUserOperationContextExt.Current.User;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user = SessionFacade.LoggedInUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
var mandator = new OperationsServiceImp().GetMandator2(false);
|
||||||
|
serviceInvoice.InvoiceBase.SenderAddress = new Address
|
||||||
|
{
|
||||||
|
Street = mandator.Street,
|
||||||
|
PostalCode = mandator.PostalCode,
|
||||||
|
Town = mandator.Town,
|
||||||
|
State = mandator.State
|
||||||
|
};
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
serviceInvoice.InvoiceBase.CreatorFirstName = serviceInvoice.InvoiceBase.SenderFirstName = user.Employee.Person.FirstName;
|
||||||
|
serviceInvoice.InvoiceBase.CreatorLastName = serviceInvoice.InvoiceBase.SenderLastName = user.Employee.Person.LastName;
|
||||||
|
serviceInvoice.InvoiceBase.SenderContacts = user.Employee.Person.Contacts.Select(i => i.CopyToNew()).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SetzeCategory(ServiceInvoice i, List<ServiceRecordDC> records)
|
private void SetzeCategory(ServiceInvoice i, List<ServiceRecordDC> records)
|
||||||
{
|
{
|
||||||
foreach (var sr in records)
|
foreach (var sr in records)
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
using System;
|
using BeWo.Data;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using BeWo.Data.Access;
|
using BeWo.Data.Access;
|
||||||
using BeWo.Data.Entities;
|
using BeWo.Data.Entities;
|
||||||
using BeWo.Service.DCEntityMapper;
|
using BeWo.Service.DCEntityMapper;
|
||||||
using BeWo.Service.Invoicing;
|
using BeWo.Service.Invoicing;
|
||||||
using BeWo.Service.Plugins;
|
using BeWo.Service.Plugins;
|
||||||
|
using BeWo.Service.ServiceImplementations;
|
||||||
using BS.Shared;
|
using BS.Shared;
|
||||||
using BS.Shared.Core;
|
using BS.Shared.Core;
|
||||||
using BS.Shared.DataContracts;
|
using BS.Shared.DataContracts;
|
||||||
using BS.Shared.DataContracts.Compact;
|
using BS.Shared.DataContracts.Compact;
|
||||||
using BS.Shared.Extensions;
|
using BS.Shared.Extensions;
|
||||||
using BS.Shared.Services;
|
using BS.Shared.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace LebenshilfeFrankfurtOder.Invoicing
|
namespace LebenshilfeFrankfurtOder.Invoicing
|
||||||
{
|
{
|
||||||
@@ -100,6 +102,36 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
base.SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList);
|
base.SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetSenderInformation(ServiceInvoice serviceInvoice)
|
||||||
|
{
|
||||||
|
ApplicationUser user = null;
|
||||||
|
if (LoggedInUserOperationContextExt.Current != null)
|
||||||
|
{
|
||||||
|
user = LoggedInUserOperationContextExt.Current.User;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user = SessionFacade.LoggedInUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
var mandator = new OperationsServiceImp().GetMandator2(false);
|
||||||
|
serviceInvoice.InvoiceBase.SenderAddress = new Address
|
||||||
|
{
|
||||||
|
Street = mandator.Street,
|
||||||
|
PostalCode = mandator.PostalCode,
|
||||||
|
Town = mandator.Town,
|
||||||
|
State = mandator.State
|
||||||
|
};
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
serviceInvoice.InvoiceBase.CreatorFirstName = serviceInvoice.InvoiceBase.SenderFirstName = user.Employee.Person.FirstName;
|
||||||
|
serviceInvoice.InvoiceBase.CreatorLastName = serviceInvoice.InvoiceBase.SenderLastName = user.Employee.Person.LastName;
|
||||||
|
serviceInvoice.InvoiceBase.SenderContacts = user.Employee.Person.Contacts.Select(i => i.CopyToNew()).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void SetServiceInvoicePeriods(ServiceInvoice invoice, CostBearer2SupportConcept costBearer2SupportConcept,
|
public override void SetServiceInvoicePeriods(ServiceInvoice invoice, CostBearer2SupportConcept costBearer2SupportConcept,
|
||||||
DateTimeSpan invoicePeriod, List<ServiceRecordDC> serviceRecords)
|
DateTimeSpan invoicePeriod, List<ServiceRecordDC> serviceRecords)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
using System;
|
using BeWo.Data;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using BeWo.Data.Access;
|
using BeWo.Data.Access;
|
||||||
using BeWo.Data.Entities;
|
using BeWo.Data.Entities;
|
||||||
using BeWo.Service.DCEntityMapper;
|
using BeWo.Service.DCEntityMapper;
|
||||||
using BeWo.Service.Invoicing;
|
using BeWo.Service.Invoicing;
|
||||||
using BeWo.Service.Plugins;
|
using BeWo.Service.Plugins;
|
||||||
|
using BeWo.Service.ServiceImplementations;
|
||||||
using BS.Shared;
|
using BS.Shared;
|
||||||
using BS.Shared.Core;
|
using BS.Shared.Core;
|
||||||
using BS.Shared.DataContracts;
|
using BS.Shared.DataContracts;
|
||||||
using BS.Shared.DataContracts.Compact;
|
using BS.Shared.DataContracts.Compact;
|
||||||
using BS.Shared.Extensions;
|
using BS.Shared.Extensions;
|
||||||
using BS.Shared.Services;
|
using BS.Shared.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace LebenshilfeFrankfurtOder.Invoicing
|
namespace LebenshilfeFrankfurtOder.Invoicing
|
||||||
{
|
{
|
||||||
@@ -91,7 +93,7 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
|
|
||||||
//public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer)
|
//public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer)
|
||||||
//{
|
//{
|
||||||
|
|
||||||
|
|
||||||
// if (istSelbstzahler || brauchtExtraPrivatrechnung)
|
// if (istSelbstzahler || brauchtExtraPrivatrechnung)
|
||||||
// {
|
// {
|
||||||
@@ -117,9 +119,39 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
// {
|
// {
|
||||||
// base.SetRecipientInformation(serviceInvoice, costBearer);
|
// base.SetRecipientInformation(serviceInvoice, costBearer);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
public override void SetSenderInformation(ServiceInvoice serviceInvoice)
|
||||||
|
{
|
||||||
|
ApplicationUser user = null;
|
||||||
|
if (LoggedInUserOperationContextExt.Current != null)
|
||||||
|
{
|
||||||
|
user = LoggedInUserOperationContextExt.Current.User;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user = SessionFacade.LoggedInUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
var mandator = new OperationsServiceImp().GetMandator2(false);
|
||||||
|
serviceInvoice.InvoiceBase.SenderAddress = new Address
|
||||||
|
{
|
||||||
|
Street = mandator.Street,
|
||||||
|
PostalCode = mandator.PostalCode,
|
||||||
|
Town = mandator.Town,
|
||||||
|
State = mandator.State
|
||||||
|
};
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
serviceInvoice.InvoiceBase.CreatorFirstName = serviceInvoice.InvoiceBase.SenderFirstName = user.Employee.Person.FirstName;
|
||||||
|
serviceInvoice.InvoiceBase.CreatorLastName = serviceInvoice.InvoiceBase.SenderLastName = user.Employee.Person.LastName;
|
||||||
|
serviceInvoice.InvoiceBase.SenderContacts = user.Employee.Person.Contacts.Select(i => i.CopyToNew()).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void SetInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod,
|
public override void SetInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod,
|
||||||
IList<CompactSupportConceptDC> supportConceptList)
|
IList<CompactSupportConceptDC> supportConceptList)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
using System;
|
using BeWo.Data;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using BeWo.Data.Access;
|
using BeWo.Data.Access;
|
||||||
using BeWo.Data.Entities;
|
using BeWo.Data.Entities;
|
||||||
using BeWo.Service.DCEntityMapper;
|
using BeWo.Service.DCEntityMapper;
|
||||||
using BeWo.Service.Invoicing;
|
using BeWo.Service.Invoicing;
|
||||||
using BeWo.Service.Plugins;
|
using BeWo.Service.Plugins;
|
||||||
|
using BeWo.Service.ServiceImplementations;
|
||||||
using BS.Shared;
|
using BS.Shared;
|
||||||
using BS.Shared.Core;
|
using BS.Shared.Core;
|
||||||
using BS.Shared.DataContracts;
|
using BS.Shared.DataContracts;
|
||||||
@@ -13,6 +12,9 @@ using BS.Shared.DataContracts.Compact;
|
|||||||
using BS.Shared.Extensions;
|
using BS.Shared.Extensions;
|
||||||
using BS.Shared.Services;
|
using BS.Shared.Services;
|
||||||
using DevExpress.Office.Drawing;
|
using DevExpress.Office.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace LebenshilfeFrankfurtOder.Invoicing
|
namespace LebenshilfeFrankfurtOder.Invoicing
|
||||||
{
|
{
|
||||||
@@ -155,6 +157,36 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetSenderInformation(ServiceInvoice serviceInvoice)
|
||||||
|
{
|
||||||
|
ApplicationUser user = null;
|
||||||
|
if (LoggedInUserOperationContextExt.Current != null)
|
||||||
|
{
|
||||||
|
user = LoggedInUserOperationContextExt.Current.User;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user = SessionFacade.LoggedInUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
var mandator = new OperationsServiceImp().GetMandator2(false);
|
||||||
|
serviceInvoice.InvoiceBase.SenderAddress = new Address
|
||||||
|
{
|
||||||
|
Street = mandator.Street,
|
||||||
|
PostalCode = mandator.PostalCode,
|
||||||
|
Town = mandator.Town,
|
||||||
|
State = mandator.State
|
||||||
|
};
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
serviceInvoice.InvoiceBase.CreatorFirstName = serviceInvoice.InvoiceBase.SenderFirstName = user.Employee.Person.FirstName;
|
||||||
|
serviceInvoice.InvoiceBase.CreatorLastName = serviceInvoice.InvoiceBase.SenderLastName = user.Employee.Person.LastName;
|
||||||
|
serviceInvoice.InvoiceBase.SenderContacts = user.Employee.Person.Contacts.Select(i => i.CopyToNew()).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private InvoiceItem GetMaxBetragItem(ServiceInvoice invoice)
|
private InvoiceItem GetMaxBetragItem(ServiceInvoice invoice)
|
||||||
{
|
{
|
||||||
decimal? maxBetrag = null;
|
decimal? maxBetrag = null;
|
||||||
@@ -218,7 +250,7 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
{
|
{
|
||||||
foreach (var sr in records)
|
foreach (var sr in records)
|
||||||
{
|
{
|
||||||
if (sr.ServiceDescription.Name.Contains("Kurskosten") || sr.ServiceDescription.Name.Contains("Mittag"))
|
if (MussPrivatAbgerechnetWerden(sr.ServiceDescription.Name))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -231,7 +263,7 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
{
|
{
|
||||||
foreach (var sr in records)
|
foreach (var sr in records)
|
||||||
{
|
{
|
||||||
if (!sr.ServiceDescription.Name.Contains("Kurskosten") && !sr.ServiceDescription.Name.Contains("Mittag"))
|
if (!MussPrivatAbgerechnetWerden(sr.ServiceDescription.Name))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -240,6 +272,15 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool MussPrivatAbgerechnetWerden(String nameDerLeistung)
|
||||||
|
{
|
||||||
|
if (nameDerLeistung.Contains("Kurskosten") || nameDerLeistung.Contains("Mittag") || "FED Disco Verpflegung".Equals(nameDerLeistung))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List<ServiceRecordDC> serviceRecords)
|
public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List<ServiceRecordDC> serviceRecords)
|
||||||
{
|
{
|
||||||
@@ -360,7 +401,7 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
if (cat.Contains("§45") || cat.Contains("§42") || cat.Contains("§39"))
|
if (cat.Contains("§45") || cat.Contains("§42") || cat.Contains("§39"))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (i.ServiceDescription.Name.Contains("Kurskosten") || i.ServiceDescription.Name.Contains("Mittag"))
|
if (MussPrivatAbgerechnetWerden(i.ServiceDescription.Name))
|
||||||
{
|
{
|
||||||
valid = istPrivatrechnung;
|
valid = istPrivatrechnung;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,37 @@ namespace LebenshilfeFrankfurtOder.Invoicing
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ServiceInvoice> CreatePrivatRechnungen(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC sc, List<ServiceRecordDC> serviceRecords)
|
public override void SetSenderInformation(ServiceInvoice serviceInvoice)
|
||||||
|
{
|
||||||
|
ApplicationUser user = null;
|
||||||
|
if (LoggedInUserOperationContextExt.Current != null)
|
||||||
|
{
|
||||||
|
user = LoggedInUserOperationContextExt.Current.User;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user = SessionFacade.LoggedInUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
var mandator = new OperationsServiceImp().GetMandator2(false);
|
||||||
|
serviceInvoice.InvoiceBase.SenderAddress = new Address
|
||||||
|
{
|
||||||
|
Street = mandator.Street,
|
||||||
|
PostalCode = mandator.PostalCode,
|
||||||
|
Town = mandator.Town,
|
||||||
|
State = mandator.State
|
||||||
|
};
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
serviceInvoice.InvoiceBase.CreatorFirstName = serviceInvoice.InvoiceBase.SenderFirstName = user.Employee.Person.FirstName;
|
||||||
|
serviceInvoice.InvoiceBase.CreatorLastName = serviceInvoice.InvoiceBase.SenderLastName = user.Employee.Person.LastName;
|
||||||
|
serviceInvoice.InvoiceBase.SenderContacts = user.Employee.Person.Contacts.Select(i => i.CopyToNew()).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ServiceInvoice> CreatePrivatRechnungen(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC sc, List<ServiceRecordDC> serviceRecords)
|
||||||
{
|
{
|
||||||
IList<VarFieldDef> defs = DAOFactory.SearchDAO.GetVarFieldDefs(TableID.Customer);
|
IList<VarFieldDef> defs = DAOFactory.SearchDAO.GetVarFieldDefs(TableID.Customer);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ namespace LebenshilfeFrankfurtOder
|
|||||||
|
|
||||||
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
||||||
{
|
{
|
||||||
|
|
||||||
CheckLastschriftAndAnschrift(pRO);
|
CheckLastschriftAndAnschrift(pRO);
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(pRO.SenderContactPersonMail))
|
if (!String.IsNullOrEmpty(pRO.SenderContactPersonMail))
|
||||||
@@ -36,9 +35,7 @@ namespace LebenshilfeFrankfurtOder
|
|||||||
pRO.SenderContactPersonFax = pRO.SenderContactPersonFax.Replace("Fax:", "").Trim();
|
pRO.SenderContactPersonFax = pRO.SenderContactPersonFax.Replace("Fax:", "").Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
|
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user