TRIAS Ambulante Sozialarbeit: Selbstzahler-Rechnungen auch als Sammelrechnung / RechnungHaushaltsnaheDienstleistung
This commit is contained in:
@@ -24,8 +24,50 @@ namespace TRIASAmbulanteSozialarbeit.Invoicing
|
||||
}
|
||||
|
||||
public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer)
|
||||
{
|
||||
if (!"Haushaltshilfe".Equals(costBearer.Organisation.Name))
|
||||
{
|
||||
if (costBearer.Organisation.Name.ToLower().StartsWith("selbstzahler"))
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientDivision = costBearer.Organisation.Name2;
|
||||
serviceInvoice.InvoiceBase.RecipientOrganisationOid = costBearer.Organisation.Oid;
|
||||
serviceInvoice.InvoiceBase.RecipientOrganisation = costBearer.Organisation.Name;
|
||||
serviceInvoice.InvoiceBase.RecipientContacts = costBearer.Organisation.Contacts.Select(i => i.CopyToNew()).ToList();
|
||||
serviceInvoice.InvoiceBase.RecipientCostBearerOid = costBearer.Oid;
|
||||
|
||||
if (serviceInvoice.InvoiceBase.CostBearer2SupportConcept != null)
|
||||
{
|
||||
var cust = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.SupportConcept.Customer;
|
||||
|
||||
if (cust.Person.InvoiceAddress != null)
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientAddress = cust.Person.InvoiceAddress.CopyToNew();
|
||||
}
|
||||
else if (cust.Person.Address != null)
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientAddress = cust.Person.Address.CopyToNew();
|
||||
}
|
||||
if (cust.Person.InvoiceAddress != null && cust.Person.InvoiceAddress.AddressLine1 != null) // Anderer Rechnungsempfänger z.B. Vormund
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientPersonFirstName = cust.Person.InvoiceAddress.AddressLine1;
|
||||
serviceInvoice.InvoiceBase.RecipientPersonLastName = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientPersonFirstName = cust.Person.FirstName;
|
||||
serviceInvoice.InvoiceBase.RecipientPersonLastName = cust.Person.LastName;
|
||||
}
|
||||
serviceInvoice.InvoiceBase.RecipientPersonOid = cust.Person.Oid;
|
||||
return;
|
||||
}
|
||||
if (costBearer.Organisation.InvoiceAddress != null)
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientAddress = costBearer.Organisation.InvoiceAddress.CopyToNew();
|
||||
}
|
||||
else if (costBearer.Organisation.Address != null)
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientAddress = costBearer.Organisation.Address.CopyToNew();
|
||||
}
|
||||
}
|
||||
else if (!"Haushaltshilfe".Equals(costBearer.Organisation.Name))
|
||||
{
|
||||
base.SetRecipientInformation(serviceInvoice, costBearer);
|
||||
if (serviceInvoice.InvoiceBase.CostBearer2SupportConcept != null &&
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,8 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
|
||||
|
||||
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
||||
{
|
||||
bool selbstzahler = pRO.RecipientOrganisation != null && pRO.RecipientOrganisation.StartsWith("Selbstzahler");
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if ("Haushaltshilfe".Equals(pRO.RecipientOrganisation))
|
||||
{
|
||||
@@ -48,16 +50,16 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
|
||||
|
||||
if (p != null)
|
||||
{
|
||||
lblAnrede.Text = String.Format("Sehr geehrte Frau {0}", p.LastName);
|
||||
lblAnrede.Text = String.Format("Sehr geehrte Frau {0},", p.LastName);
|
||||
|
||||
if (p != null && p.Sex.HasValue && p.Sex.Value == Sex.Male)
|
||||
{
|
||||
lblAnrede.Text = String.Format("Sehr geehrter Herr {0}", p.LastName);
|
||||
lblAnrede.Text = String.Format("Sehr geehrter Herr {0},", p.LastName);
|
||||
|
||||
anrede = "Herr ";
|
||||
}
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && !selbstzahler)
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientOrganisation);
|
||||
}
|
||||
@@ -77,11 +79,6 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
|
||||
lblAdresse.Text = sb.ToString();
|
||||
lblIK.Text = "Institutskennzeichen: 460948378";
|
||||
|
||||
//if (!String.IsNullOrEmpty(pRO.BusinessPartnerId))
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
|
||||
decimal stundensatz = 0;
|
||||
decimal pauschale = 0;
|
||||
@@ -130,7 +127,12 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
|
||||
customername = String.Format("Frau {0}", customername);
|
||||
}
|
||||
}
|
||||
lblAbrechnungszeitraum.Text = lblAbrechnungszeitraum.Text.Replace("[CUSTOMER]", customername);
|
||||
|
||||
if (selbstzahler)
|
||||
lblAbrechnungszeitraum.Text = lblAbrechnungszeitraum.Text.Replace(" für [CUSTOMER]", "");
|
||||
else
|
||||
lblAbrechnungszeitraum.Text = lblAbrechnungszeitraum.Text.Replace("[CUSTOMER]", customername);
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user