MH: moveAUT Rechnungsadresse
This commit is contained in:
@@ -62,14 +62,14 @@ namespace AutismusKoelnBonn
|
||||
{
|
||||
sb.AppendLine(poBox);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPoBox);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
}
|
||||
//else if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
||||
//{
|
||||
// sb.AppendLine(pRO.RecipientPoBox);
|
||||
//}
|
||||
//else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
//{
|
||||
// sb.AppendLine(pRO.RecipientStreet);
|
||||
//}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
||||
|
||||
@@ -65,11 +65,18 @@ namespace AutismusKoelnBonn.Invoicing
|
||||
settlementInvoice.RecipientOrganisation = c2s.CostBearer.Organisation.Name.Remove(ersterIndex, zweiterIndex - ersterIndex + 1);
|
||||
}
|
||||
|
||||
// Schema mit Bezeichnungen der Labels in Organisationen:
|
||||
// 1. Name
|
||||
// 2. Abteilung (ersetzt Straße)
|
||||
// 3. Adresszusatz (im Zweifel aus Rechnungsadresse)
|
||||
// 4. PLZ + Ort(im Zweifel aus Rechnungsadresse)
|
||||
|
||||
|
||||
var invoiceAdress = c2s.CostBearer.Organisation.InvoiceAddress;
|
||||
if (!invoiceAdress.AddressLine1.IsNullOrEmpty())
|
||||
settlementInvoice.RecipientDivision = invoiceAdress.AddressLine1;
|
||||
if (!invoiceAdress.Street.IsNullOrEmpty())
|
||||
settlementInvoice.RecipientStreet = invoiceAdress.Street;
|
||||
if (!c2s.CostBearer.Organisation.Name2.IsNullOrEmpty())
|
||||
settlementInvoice.RecipientStreet = c2s.CostBearer.Organisation.Name2;
|
||||
if (!invoiceAdress.PostalCode.IsNullOrEmpty())
|
||||
settlementInvoice.RecipientPostCode = invoiceAdress.PostalCode;
|
||||
if (!invoiceAdress.Town.IsNullOrEmpty())
|
||||
|
||||
@@ -59,14 +59,14 @@ namespace AutismusKoelnBonn
|
||||
{
|
||||
sb.AppendLine(poBox);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPoBox);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
}
|
||||
//else if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
||||
//{
|
||||
// sb.AppendLine(pRO.RecipientPoBox);
|
||||
//}
|
||||
//else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
//{
|
||||
// sb.AppendLine(pRO.RecipientStreet);
|
||||
//}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
||||
|
||||
@@ -27,52 +27,15 @@ namespace AutismusKoelnBonn.Alt
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientOrganisation);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientDivision);
|
||||
}
|
||||
//Angaben aus Rechnungsadresse
|
||||
//var cb2sc = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(pRO.CostBearer2SupportConceptOid);
|
||||
if (cb2sc.CostBearer != null && cb2sc.CostBearer.Organisation != null)
|
||||
{
|
||||
if (cb2sc.CostBearer.Organisation.InvoiceAddress != null &&
|
||||
!String.IsNullOrEmpty(cb2sc.CostBearer.Organisation.InvoiceAddress.Street) || !String.IsNullOrEmpty(cb2sc.CostBearer.Organisation.InvoiceAddress.Town))
|
||||
{
|
||||
if (!String.IsNullOrEmpty(cb2sc.CostBearer.Organisation.InvoiceAddress.AddressLine1))
|
||||
cb2sc.CostBearer.Organisation.Address.AddressLine1 = cb2sc.CostBearer.Organisation.InvoiceAddress.AddressLine1;
|
||||
pRO.RecipientPostCodeAndTown = String.Format("{0} {1}", cb2sc.CostBearer.Organisation.InvoiceAddress.PostalCode, cb2sc.CostBearer.Organisation.InvoiceAddress.Town);
|
||||
pRO.RecipientStreet = cb2sc.CostBearer.Organisation.InvoiceAddress.Street;
|
||||
if (cb2sc.CostBearer.Organisation.Contacts.Count > 0)
|
||||
{
|
||||
foreach (var i in cb2sc.CostBearer.Organisation.Contacts)
|
||||
{
|
||||
if (i.Type == BS.Shared.ContactType.private_POBox)
|
||||
pRO.RecipientPoBox = i.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cb2sc.CostBearer.Organisation.Address != null)
|
||||
{
|
||||
pRO.RecipientPostCodeAndTown = String.Format("{0} {1}", cb2sc.CostBearer.Organisation.Address.PostalCode, cb2sc.CostBearer.Organisation.Address.Town);
|
||||
pRO.RecipientStreet = cb2sc.CostBearer.Organisation.Address.Street;
|
||||
}
|
||||
}
|
||||
if (!String.IsNullOrEmpty(cb2sc.CostBearer.Organisation.Address.AddressLine1))
|
||||
{
|
||||
sb.AppendLine(cb2sc.CostBearer.Organisation.Address.AddressLine1);
|
||||
}
|
||||
// if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
|
||||
//{
|
||||
// sb.AppendLine(pRO.RecipientContactPerson);
|
||||
//}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPoBox);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientDivision);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
||||
|
||||
@@ -27,28 +27,14 @@ namespace AutismusKoelnBonn
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientOrganisation);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientDivision);
|
||||
}
|
||||
//Angaben aus Rechnungsadresse
|
||||
//var cb2sc = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(pRO.CostBearer2SupportConceptOid);
|
||||
if (!String.IsNullOrEmpty(AddressLine1))
|
||||
{
|
||||
sb.AppendLine(AddressLine1);
|
||||
}
|
||||
//if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
|
||||
//{
|
||||
// sb.AppendLine(pRO.RecipientContactPerson);
|
||||
//}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostBox))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPostBox);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
||||
|
||||
Reference in New Issue
Block a user