Soziale Dienstleistungen Becker: Neue Rechnung für Integrationsdienst und Datev Export eingebaut
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Service.Invoicing.FibuExport;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace SozialeDienstleistungenBeckerReports.Export
|
||||
{
|
||||
public class CustomDataExporter : DataExporter
|
||||
{
|
||||
public override QueryDC CreateQuery(QueryDC query)
|
||||
{
|
||||
var fibuExport = new DatevExporter(query);
|
||||
return fibuExport.CreateQuery();
|
||||
//return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing.FibuExport;
|
||||
using BeWo.Service.Invoicing.FiBuExport;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace SozialeDienstleistungenBeckerReports.Export
|
||||
{
|
||||
public class DatevExporter : TempFiBuExport
|
||||
{
|
||||
public DatevExporter(QueryDC query) : base(query)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<KeyValuePair<String, String>> GetHeader()
|
||||
{
|
||||
return new List<KeyValuePair<String, String>>
|
||||
{
|
||||
new KeyValuePair<string, string> ("UMSATZ", "Betrag"),
|
||||
new KeyValuePair<string, string> ("GEGENKONTO", "DebitorNummer"),
|
||||
new KeyValuePair<string, string> ("BELEG1", "Belegnummer"),
|
||||
new KeyValuePair<string, string> ("DATUM", "Datum"),
|
||||
new KeyValuePair<string, string> ("KONTO", "KontoHilfeplan"),
|
||||
new KeyValuePair<string, string> ("KOST1", "KostenstelleKlient"),
|
||||
new KeyValuePair<string, string> ("KOST2", "KostenstelleHilfeplan"),
|
||||
new KeyValuePair<string, string> ("BUCHUNGSTEXT", "Buchungstext")
|
||||
};
|
||||
}
|
||||
|
||||
public override FiBuDatensatz CreateFibuDatensatz(DataRow row)
|
||||
{
|
||||
var fd = base.CreateFibuDatensatz(row);
|
||||
|
||||
|
||||
SetzeFehlendeKontenUndKostenstellen(fd);
|
||||
|
||||
|
||||
fd.Buchungstext = String.Format("{0}, {1}", fd.CustomerLastName, fd.CustomerFirstName);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
private void SetzeFehlendeKontenUndKostenstellen(FiBuDatensatz fd)
|
||||
{
|
||||
if (String.IsNullOrEmpty(fd.KostenstelleHilfeplan) || String.IsNullOrEmpty(fd.KontoHilfeplan) || String.IsNullOrEmpty(fd.KostenstelleKlient))
|
||||
{
|
||||
if (fd.CustomerOid.HasValue)
|
||||
{
|
||||
var c = DAOFactory.GenericDAO.LoadByID<Customer>(fd.CustomerOid.Value);
|
||||
|
||||
fd.KostenstelleKlient = GetMitarbeiterKostenstelle(c);
|
||||
|
||||
var bereich = GetBereich(c);
|
||||
|
||||
if ("BEWO".Equals(bereich))
|
||||
{
|
||||
fd.KostenstelleHilfeplan = "40000";
|
||||
fd.KontoHilfeplan = "4000";
|
||||
}
|
||||
else if ("JH".Equals(bereich))
|
||||
{
|
||||
fd.KostenstelleHilfeplan = "40020";
|
||||
fd.KontoHilfeplan = "4002";
|
||||
}
|
||||
else if ("IB".Equals(bereich))
|
||||
{
|
||||
fd.KostenstelleHilfeplan = "40010";
|
||||
fd.KontoHilfeplan = "4001";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string GetMitarbeiterKostenstelle(Customer customer)
|
||||
{
|
||||
|
||||
var hauptbetreuer = customer.Employee2CustomerList.FirstOrDefault(e2c => e2c.IsActive == ActivationTypeId.Active &&
|
||||
(!e2c.StartDate.HasValue || e2c.StartDate.Value.Date <= Datum) && (!e2c.EndDate.HasValue || e2c.EndDate.Value.Date >= Datum) &&
|
||||
e2c.ValueList.Any(b => b.Entry.Type.Equals(ValueListEntryType.StaffRoleType) && b.Entry.Value.ToLower().Equals("hauptbetreuung")))?.Employee;
|
||||
|
||||
if (hauptbetreuer != null)
|
||||
{
|
||||
return hauptbetreuer.PersonnelNumber;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
private String GetBereich(Customer customer)
|
||||
{
|
||||
foreach (var t2c in customer.Team2CustomerList)
|
||||
{
|
||||
if (t2c.Team.Name.ToLower().Contains("bewo"))
|
||||
{
|
||||
return "BEWO";
|
||||
}
|
||||
else if (t2c.Team.Name.ToLower().Contains("jugendhilfe"))
|
||||
{
|
||||
return "JH";
|
||||
}
|
||||
else if (t2c.Team.Name.ToLower().Contains("inklusion"))
|
||||
{
|
||||
return "IB";
|
||||
}
|
||||
}
|
||||
|
||||
return "BEWO";
|
||||
}
|
||||
|
||||
public override IList<FiBuDatensatz> CreateDatensaetze(bool holeSammelRechnungen, bool holeSpitzabrechnungen, bool holeStundenBetraege, bool holeAbschlagszahlungen)
|
||||
{
|
||||
return base.CreateDatensaetze(true, false, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SozialeDienstleistungenBeckerReports.Export
|
||||
{
|
||||
public class FiBuDatensatz
|
||||
{
|
||||
public String CustomerFirstName { get; set; }
|
||||
public String CustomerLastName { get; set; }
|
||||
public decimal? Betrag { get; set; }
|
||||
public String Belegnummer { get; set; }
|
||||
public DateTime Datum { get; set; }
|
||||
public String DebitorNummer { get; set; }
|
||||
public String KontoHilfeplan { get; set; }
|
||||
public String KostenstelleKlient { get; set; }
|
||||
public String KostenstelleHilfeplan { get; set; }
|
||||
public String Buchungstext { get; set; }
|
||||
public String InvoiceId { get; set; }
|
||||
public String OrganisationName { get; set; }
|
||||
public long? Costbearer2SupportConceptOid { get; set; }
|
||||
public long? CustomerOid { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,446 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Invoicing.FiBuExport;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace SozialeDienstleistungenBeckerReports.Export
|
||||
{
|
||||
public class TempFiBuExport
|
||||
{
|
||||
|
||||
public QueryDC Query { get; set; }
|
||||
public DateTime Datum { get; set; }
|
||||
public bool FilterNachRechnungsdatum { get; set; }
|
||||
|
||||
public TempFiBuExport(QueryDC query)
|
||||
{
|
||||
Query = query;
|
||||
DateTime dt = DateTime.Now;
|
||||
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
|
||||
|
||||
Datum = dt;
|
||||
FilterNachRechnungsdatum = false;
|
||||
}
|
||||
|
||||
|
||||
public virtual QueryDC CreateQuery()
|
||||
{
|
||||
Query.FileName = GetFileName();
|
||||
Query.QueryResult = GetResultString();
|
||||
|
||||
return Query;
|
||||
}
|
||||
|
||||
|
||||
public virtual String GetFileName()
|
||||
{
|
||||
return String.Format("Export {0:yyyyMM}.csv", Datum);
|
||||
}
|
||||
|
||||
public virtual string GetResultString()
|
||||
{
|
||||
return GetCsvString();
|
||||
}
|
||||
|
||||
public virtual List<KeyValuePair<String, String>> GetHeader()
|
||||
{
|
||||
return new List<KeyValuePair<String, String>>
|
||||
{
|
||||
new KeyValuePair<string, string> ("Betrag", "Betrag"),
|
||||
new KeyValuePair<string, string> ("Belegnummer", "Belegnummer"),
|
||||
new KeyValuePair<string, string> ("Datum", "Datum"),
|
||||
new KeyValuePair<string, string> ("Konto", "KontoHilfeplan"),
|
||||
new KeyValuePair<string, string> ("Gegenkonto", "Debitornummer"),
|
||||
new KeyValuePair<string, string> ("Kostenstelle", "KostenstelleKlient"),
|
||||
new KeyValuePair<string, string> ("Buchungstext", "Buchungstext")
|
||||
};
|
||||
}
|
||||
|
||||
public virtual String GetCsvString(String separator = ";")
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
var header = GetHeader();
|
||||
if (header != null && header.Count > 0)
|
||||
{
|
||||
sb.AppendLine(String.Join(separator, header.Select(k => k.Key)));
|
||||
}
|
||||
|
||||
var daten = CreateDatensaetze();
|
||||
|
||||
var s = GetDatenCsv(daten);
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(s))
|
||||
{
|
||||
sb.Append(s);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public virtual IList<FiBuDatensatz> CreateDatensaetze()
|
||||
{
|
||||
return CreateDatensaetze(true, true, true, true);
|
||||
}
|
||||
|
||||
public virtual string GetDatenCsv(IList<FiBuDatensatz> daten, String separator = ";")
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
var header = GetHeader();
|
||||
foreach (var item in daten)
|
||||
{
|
||||
sb.AppendLine(String.Join(separator, GetDatensatzValues(item, header)));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public virtual string[] GetDatensatzValues(FiBuDatensatz item, List<KeyValuePair<string, string>> header)
|
||||
{
|
||||
var values = new List<string>();
|
||||
foreach (var kv in header)
|
||||
{
|
||||
var test = GetDatensatzValue(item, kv.Value);
|
||||
if (test != null)
|
||||
{
|
||||
values.Add(test.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
values.Add(String.Empty);
|
||||
}
|
||||
}
|
||||
return values.ToArray();
|
||||
}
|
||||
|
||||
public virtual string GetDatensatzValue(FiBuDatensatz item, string propertyName)
|
||||
{
|
||||
if ("Betrag".Equals(propertyName))
|
||||
{
|
||||
return String.Format("{0:0.00}", item.Betrag);
|
||||
}
|
||||
if ("Datum".Equals(propertyName))
|
||||
{
|
||||
return String.Format("{0:dd.MM.yyyy}", item.Datum);
|
||||
}
|
||||
var test = item.GetPropertyValue(propertyName);
|
||||
if (test != null)
|
||||
{
|
||||
return test.ToString();
|
||||
}
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
public virtual IList<FiBuDatensatz> CreateDatensaetze(bool holeSammelRechnungen, bool holeSpitzabrechnungen, bool holeStundenBetraege, bool holeAbschlagszahlungen)
|
||||
{
|
||||
var result = new List<FiBuDatensatz>();
|
||||
|
||||
if (holeSammelRechnungen)
|
||||
{
|
||||
var sql = GetSammelRechnungenSql();
|
||||
var dt = ExecuteQuery(sql);
|
||||
|
||||
result.AddRange(GetRechnungenDatensaetze(dt));
|
||||
}
|
||||
if (holeSpitzabrechnungen)
|
||||
{
|
||||
var sql = GetSpitzabrechnungenSql();
|
||||
var dt = ExecuteQuery(sql);
|
||||
|
||||
result.AddRange(GetRechnungenDatensaetze(dt));
|
||||
}
|
||||
if (holeStundenBetraege)
|
||||
{
|
||||
var sql = GetMonatlicheBetraegeAnhandGeleisteterStundenSql();
|
||||
var dt = ExecuteQuery(sql);
|
||||
|
||||
result.AddRange(GetRechnungenDatensaetze(dt));
|
||||
}
|
||||
if (holeAbschlagszahlungen)
|
||||
{
|
||||
var sql = GetAbschlagszahlungenSql();
|
||||
var dt = ExecuteQuery(sql);
|
||||
|
||||
result.AddRange(GetRechnungenDatensaetze(dt));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private IEnumerable<FiBuDatensatz> GetRechnungenDatensaetze(DataTable dt)
|
||||
{
|
||||
var result = new List<FiBuDatensatz>();
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
var fd = CreateFibuDatensatz(row);
|
||||
|
||||
result.Add(fd);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual FiBuDatensatz CreateFibuDatensatz(DataRow row)
|
||||
{
|
||||
var fd = new FiBuDatensatz();
|
||||
|
||||
fd.CustomerLastName = row[0].ToString();
|
||||
fd.CustomerFirstName = row[1].ToString();
|
||||
fd.Betrag = (decimal?)row[2];
|
||||
fd.DebitorNummer = row[3].ToString();
|
||||
fd.Datum = (DateTime)row[4];
|
||||
fd.Belegnummer = row[5].ToString();
|
||||
fd.InvoiceId = row[6].ToString();
|
||||
fd.KostenstelleKlient = row[7].ToString();
|
||||
fd.OrganisationName = row[8].ToString();
|
||||
fd.KontoHilfeplan = row[9].ToString();
|
||||
fd.KostenstelleHilfeplan = row[10].ToString();
|
||||
fd.Costbearer2SupportConceptOid = (long?)row[11];
|
||||
fd.CustomerOid = (long?)row[12];
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
public virtual String GetSammelRechnungenSql()
|
||||
{
|
||||
String sql = @"
|
||||
select
|
||||
p.Lastname,
|
||||
p.Firstname,
|
||||
sip.Claim,
|
||||
c.DebitorNumber,
|
||||
ib.InvoiceDate,
|
||||
ib.invoicenumber,
|
||||
ib.InvoiceId,
|
||||
c.CostCenter,
|
||||
org.Name,
|
||||
c2s.KontoHilfeplan,
|
||||
c2s.KostenstelleHilfeplan,
|
||||
c2s.Oid as 'c2sOid',
|
||||
c.Oid as 'CustomerOid'
|
||||
from
|
||||
person p
|
||||
inner join customer c on c.personoid = p.oid
|
||||
inner join supportconcept sc on sc.customeroid = c.oid
|
||||
inner join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid
|
||||
inner join costbearer cb on c2s.costbeareroid = cb.oid
|
||||
inner join organisation org on org.costbeareroid = cb.oid
|
||||
inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid
|
||||
inner join serviceinvoice si on si.invoicebaseoid = ib.oid
|
||||
inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid
|
||||
WHERE DATUMFILTER AND ib.IsActive = 1 AND ib.`IsExported` = 0
|
||||
";
|
||||
if (FilterNachRechnungsdatum)
|
||||
{
|
||||
sql = sql.Replace("DATUMFILTER", "ib.InvoiceDate >= ':Monat_Start' AND ib.InvoiceDate < ':Monat_End'");
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = sql.Replace("DATUMFILTER", "ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End'");
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
|
||||
public virtual String GetSpitzabrechnungenSql()
|
||||
{
|
||||
String sql = @"
|
||||
select
|
||||
p.Lastname,
|
||||
p.Firstname,
|
||||
si.Claim,
|
||||
c.DebitorNumber,
|
||||
ib.InvoiceDate,
|
||||
ib.invoicenumber,
|
||||
ib.InvoiceId,
|
||||
c.CostCenter,
|
||||
org.Name,
|
||||
c2s.KontoHilfeplan,
|
||||
c2s.KostenstelleHilfeplan,
|
||||
c2s.Oid as 'c2sOid',
|
||||
c.Oid as 'CustomerOid'
|
||||
from invoicebase ib
|
||||
join settlementinvoice si on si.invoicebaseoid = ib.oid
|
||||
join supportconcept sc on sc.oid = ib.supportconceptoid
|
||||
join costbearer2supportconcept c2s on c2s.supportconceptoid = sc.oid
|
||||
join costbearer cb on c2s.costbeareroid = cb.oid
|
||||
join organisation org on org.costbeareroid = cb.oid
|
||||
join customer c on c.oid = sc.customeroid
|
||||
join `person` p on c.`PersonOid` = p.`Oid`
|
||||
WHERE DATUMFILTER
|
||||
AND ib.type = 1 AND ib.isactive = 1 and c.isactive <> 0 AND ib.`IsExported` = 0
|
||||
";
|
||||
//if (FilterNachRechnungsdatum)
|
||||
//{
|
||||
sql = sql.Replace("DATUMFILTER", "ib.InvoiceDate >= ':Monat_Start' AND ib.InvoiceDate < ':Monat_End'");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// sql = sql.Replace("DATUMFILTER", "ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End'");
|
||||
//}
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual String GetAbschlagszahlungenSql()
|
||||
{
|
||||
String sql = @"
|
||||
SELECT
|
||||
p.Lastname,
|
||||
p.Firstname,
|
||||
at.Amount as 'Betrag',
|
||||
c.DebitorNumber,
|
||||
at.BookingDate,
|
||||
at.Notice,
|
||||
'Abschlagszahlung',
|
||||
c.CostCenter,
|
||||
org.Name,
|
||||
c2s.KontoHilfeplan,
|
||||
c2s.KostenstelleHilfeplan,
|
||||
c2s.Oid as 'c2sOid',
|
||||
c.Oid as 'CustomerOid'
|
||||
from accountingtransaction at
|
||||
join costbearer2supportconcept c2s on c2s.oid = at.costbearer2supportconceptoid
|
||||
join costbearer cb on c2s.costbeareroid = cb.oid
|
||||
join organisation org on org.costbeareroid = cb.oid
|
||||
join supportconcept sc on sc.oid = c2s.supportconceptoid
|
||||
join customer c on sc.customeroid = c.oid
|
||||
join person p on c.personoid = p.oid
|
||||
WHERE at.`BookingDate` >= ':Monat_Start' AND at.`BookingDate` < ':Monat_End' and c.`IsActive` <> 0 AND sc.`IsActive` <> 0
|
||||
ORDER BY p.`LastName`, p.`FirstName`
|
||||
";
|
||||
return sql;
|
||||
}
|
||||
|
||||
public virtual String GetMonatlicheBetraegeAnhandGeleisteterStundenSql()
|
||||
{
|
||||
return GetMonatlicheBetraegeAnhandGeleisteterStundenSql("LVR%");
|
||||
}
|
||||
|
||||
public virtual String GetMonatlicheBetraegeAnhandGeleisteterStundenSql(String organisationFilter, String fehlkontaktString = "Fehlkontakt")
|
||||
{
|
||||
String sql = @"
|
||||
SELECT
|
||||
qry.LastName,
|
||||
qry.FirstName,
|
||||
sum(qry.Betrag),
|
||||
qry.DebitorNumber,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
qry.CostCenter,
|
||||
qry.Kostentraeger,
|
||||
qry.KontoHilfeplan,
|
||||
qry.KostenstelleHilfeplan,
|
||||
qry.cb2scOid,
|
||||
qry.CustomerOid
|
||||
FROM
|
||||
(
|
||||
(SELECT
|
||||
IF(crpRateFactor.`CostRateValue` is null, ROUND((sr.`GeleisteteFLM` / 60) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 )),
|
||||
ROUND(ROUND((sr.`GeleisteteFLM` / 60), 2) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ) * ((100 + crpRateFactor.`CostRateValue`)/100), 2)) AS 'Betrag',
|
||||
c.DebitorNumber,
|
||||
c.CostCenter,
|
||||
cb2sc.KontoHilfeplan,
|
||||
p.LastName,
|
||||
p.FirstName,
|
||||
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
|
||||
org.Name AS Kostentraeger,
|
||||
cb2sc.Oid as 'cb2scOid',
|
||||
c.Oid as 'CustomerOid'
|
||||
FROM `supportconcept` sc
|
||||
INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid`
|
||||
INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid`
|
||||
LEFT JOIN
|
||||
(SELECT crp.`ObjectOid`, crp.`CostRateValue` FROM `costrateperiod` crp
|
||||
WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 2 AND(crp.`EndDate` is null or crp.`EndDate` > NOW()))
|
||||
AS crpRateFactor ON crpRateFactor.`ObjectOid` = cb.`Oid`
|
||||
INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid`
|
||||
INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid`
|
||||
INNER JOIN `person` p on c.`PersonOid` = p.`Oid`
|
||||
LEFT JOIN
|
||||
(SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM FROM `servicerecord` sr2
|
||||
INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
|
||||
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
|
||||
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 FEHLKONTAKTFILTER1 GROUP BY sr2.`CostBearer2SupportConceptOid`)
|
||||
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
|
||||
WHERE ORGANISATIONFILTER c.`IsActive` <> 0 AND sc.`IsActive` <> 0 AND (sr.`GeleisteteFLM` is not null))
|
||||
UNION
|
||||
(SELECT
|
||||
ROUND(0.8 * (sr.`GeleisteteFLM` / 60) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ),2) AS 'Betrag',
|
||||
c.DebitorNumber,
|
||||
c.CostCenter,
|
||||
cb2sc.KontoHilfeplan,
|
||||
p.LastName,
|
||||
p.FirstName,
|
||||
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
|
||||
org.Name AS Kostentraeger,
|
||||
cb2sc.Oid as 'cb2scOid',
|
||||
c.Oid as 'CustomerOid'
|
||||
FROM `supportconcept` sc
|
||||
INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid`
|
||||
INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid`
|
||||
INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid`
|
||||
INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid`
|
||||
INNER JOIN `person` p on c.`PersonOid` = p.`Oid`
|
||||
LEFT JOIN
|
||||
(SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM FROM `servicerecord` sr2
|
||||
INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
|
||||
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
|
||||
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 FEHLKONTAKTFILTER2 GROUP BY sr2.`CostBearer2SupportConceptOid`)
|
||||
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
|
||||
WHERE ORGANISATIONFILTER c.`IsActive` <> 0 AND sc.`IsActive` <> 0 AND (sr.`GeleisteteFLM` is not null))
|
||||
)qry
|
||||
GROUP BY qry.cb2scOid
|
||||
";
|
||||
|
||||
String orgFilter = "";
|
||||
if (!String.IsNullOrEmpty(organisationFilter))
|
||||
{
|
||||
if (organisationFilter.Contains("%"))
|
||||
{
|
||||
sql = sql.Replace("ORGANISATIONFILTER", String.Format("org.Name LIKE '{0}' AND", organisationFilter));
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = sql.Replace("ORGANISATIONFILTER", String.Format("org.Name = '{0}' AND", organisationFilter));
|
||||
}
|
||||
}
|
||||
|
||||
String fkFilter1 = "";
|
||||
String fkFilter2 = "";
|
||||
if (!String.IsNullOrEmpty(fehlkontaktString))
|
||||
{
|
||||
fkFilter1 = String.Format("AND sd.Name <> '{0}'", fehlkontaktString);
|
||||
fkFilter2 = String.Format("AND sd.Name = '{0}'", fehlkontaktString);
|
||||
}
|
||||
sql = sql.Replace("FEHLKONTAKTFILTER1", fkFilter1);
|
||||
sql = sql.Replace("FEHLKONTAKTFILTER2", fkFilter2);
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual DataTable ExecuteQuery(String sql)
|
||||
{
|
||||
var newsql = sql;
|
||||
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:dd.MM.yyyy}", Datum));
|
||||
newsql = newsql.Replace(":Belegnr", String.Format("{0:yyMM}", Datum));
|
||||
newsql = newsql.Replace(":Monat_MM", String.Format("{0:MM}", Datum));
|
||||
newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", Datum));
|
||||
newsql = newsql.Replace(":Monat_End", String.Format("{0:yyyy-MM}-01", Datum.AddMonths(1)));
|
||||
|
||||
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
using DevExpress.Office.Drawing;
|
||||
using Service.Invoicing;
|
||||
|
||||
namespace SozialeDienstleistungenBeckerReports.Invoicing
|
||||
{
|
||||
public class CustomInvoiceCreation : InvoiceCreation
|
||||
{
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
if (iServiceRecord != null && iServiceRecord.Betrag.HasValue && iServiceRecord.Betrag > 0 && ii.ServiceRecord.ServiceDescription.Name.Contains("Zusatzleistung")) {
|
||||
ii.UnitCount = 1;
|
||||
ii.AmountPerUnit = iServiceRecord.Betrag;
|
||||
ii.ItemDescription = iServiceRecord.Notice;
|
||||
if (String.IsNullOrEmpty(ii.ItemDescription))
|
||||
{
|
||||
ii.ItemDescription = "Zusatzleistung";
|
||||
}
|
||||
}
|
||||
return ii;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace SozialeDienstleistungenBeckerReports.Invoicing
|
||||
{
|
||||
public class CustomInvoiceFactory : InvoiceFactory
|
||||
{
|
||||
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
||||
{
|
||||
var creator = new CustomInvoiceCreation();
|
||||
|
||||
return creator;
|
||||
|
||||
}
|
||||
|
||||
// private InvoiceCreation GetInvoiceCreatorForCategory(String catName)
|
||||
// {
|
||||
// if (!String.IsNullOrEmpty(catName))
|
||||
// {
|
||||
// String cat = catName.ToLower().Trim();
|
||||
// if (cat.IndexOf("assistenz") >= 0)
|
||||
// return new CustomInvoiceCreation();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
}
|
||||
}
|
||||
63
ReportImp/SozialeDienstleistungenBeckerReports/Properties/Resources.Designer.cs
generated
Normal file
63
ReportImp/SozialeDienstleistungenBeckerReports/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SozialeDienstleistungenBeckerReports.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SozialeDienstleistungenBeckerReports.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -29,13 +29,14 @@ namespace BeWo.Report.DefaultReports
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ServiceInvoiceReport));
|
||||
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
|
||||
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
|
||||
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
|
||||
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
@@ -93,8 +94,6 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrTableCell46 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
|
||||
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
|
||||
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
|
||||
this.xrTableRow9 = new DevExpress.XtraReports.UI.XRTableRow();
|
||||
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
@@ -102,6 +101,8 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrTableRow10 = new DevExpress.XtraReports.UI.XRTableRow();
|
||||
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
|
||||
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
|
||||
@@ -133,19 +134,28 @@ namespace BeWo.Report.DefaultReports
|
||||
// topMarginBand1
|
||||
//
|
||||
this.topMarginBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrPictureBox1,
|
||||
this.xrLabel7,
|
||||
this.xrLabel6,
|
||||
this.xrLabel5});
|
||||
this.topMarginBand1.HeightF = 250F;
|
||||
this.topMarginBand1.Name = "topMarginBand1";
|
||||
//
|
||||
// xrPictureBox1
|
||||
//
|
||||
this.xrPictureBox1.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox1.ImageSource"));
|
||||
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 43.125F);
|
||||
this.xrPictureBox1.Name = "xrPictureBox1";
|
||||
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(160.3966F, 53.11836F);
|
||||
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// xrLabel7
|
||||
//
|
||||
this.xrLabel7.Font = new DevExpress.Drawing.DXFont("Arial", 12F);
|
||||
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 76.00001F);
|
||||
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(160.3967F, 76.00001F);
|
||||
this.xrLabel7.Name = "xrLabel7";
|
||||
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel7.SizeF = new System.Drawing.SizeF(711.9997F, 43.66666F);
|
||||
this.xrLabel7.SizeF = new System.Drawing.SizeF(449.6028F, 43.66666F);
|
||||
this.xrLabel7.StylePriority.UseFont = false;
|
||||
this.xrLabel7.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel7.Text = "50674 Köln - Hohenstaufenring 72";
|
||||
@@ -153,11 +163,11 @@ namespace BeWo.Report.DefaultReports
|
||||
//
|
||||
// xrLabel6
|
||||
//
|
||||
this.xrLabel6.Font = new DevExpress.Drawing.DXFont("Arial", 20F, DevExpress.Drawing.DXFontStyle.Bold);
|
||||
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(0.0002034505F, 26.66668F);
|
||||
this.xrLabel6.Font = new DevExpress.Drawing.DXFont("Arial", 18F, DevExpress.Drawing.DXFontStyle.Bold);
|
||||
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(160.3967F, 26.66667F);
|
||||
this.xrLabel6.Name = "xrLabel6";
|
||||
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel6.SizeF = new System.Drawing.SizeF(711.9997F, 47.00001F);
|
||||
this.xrLabel6.SizeF = new System.Drawing.SizeF(449.6033F, 47.00001F);
|
||||
this.xrLabel6.StylePriority.UseFont = false;
|
||||
this.xrLabel6.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel6.Text = "SDB Soziale Dienstleistungen Becker";
|
||||
@@ -165,11 +175,11 @@ namespace BeWo.Report.DefaultReports
|
||||
//
|
||||
// xrLabel5
|
||||
//
|
||||
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Bahnschrift Light Condensed", 9F, DevExpress.Drawing.DXFontStyle.Underline);
|
||||
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 218F);
|
||||
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 6.5F, DevExpress.Drawing.DXFontStyle.Underline);
|
||||
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 222F);
|
||||
this.xrLabel5.Name = "xrLabel5";
|
||||
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel5.SizeF = new System.Drawing.SizeF(385.4167F, 17.00002F);
|
||||
this.xrLabel5.SizeF = new System.Drawing.SizeF(385.4167F, 22.00002F);
|
||||
this.xrLabel5.StylePriority.UseFont = false;
|
||||
this.xrLabel5.Text = "SDB Soziale Dienstleistungen Becker, Hohenstaufenring 72, 50674 Köln";
|
||||
//
|
||||
@@ -355,6 +365,8 @@ namespace BeWo.Report.DefaultReports
|
||||
//
|
||||
this.xrTableCell13.CanGrow = false;
|
||||
this.xrTableCell13.CanShrink = true;
|
||||
this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CreatorName")});
|
||||
this.xrTableCell13.Name = "xrTableCell13";
|
||||
this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrTableCell13.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
@@ -740,6 +752,7 @@ namespace BeWo.Report.DefaultReports
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTableCell42.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.ServiceDescription")});
|
||||
this.xrTableCell42.Multiline = true;
|
||||
this.xrTableCell42.Name = "xrTableCell42";
|
||||
this.xrTableCell42.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
|
||||
this.xrTableCell42.StylePriority.UseBorderColor = false;
|
||||
@@ -803,24 +816,6 @@ namespace BeWo.Report.DefaultReports
|
||||
this.GroupFooter1.HeightF = 60F;
|
||||
this.GroupFooter1.Name = "GroupFooter1";
|
||||
//
|
||||
// GroupFooter2
|
||||
//
|
||||
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrLabel9});
|
||||
this.GroupFooter2.HeightF = 217.5F;
|
||||
this.GroupFooter2.Level = 1;
|
||||
this.GroupFooter2.Name = "GroupFooter2";
|
||||
//
|
||||
// xrLabel9
|
||||
//
|
||||
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0.0002034505F, 0F);
|
||||
this.xrLabel9.Multiline = true;
|
||||
this.xrLabel9.Name = "xrLabel9";
|
||||
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel9.SizeF = new System.Drawing.SizeF(701.9998F, 217.5F);
|
||||
this.xrLabel9.StylePriority.UseFont = false;
|
||||
this.xrLabel9.Text = resources.GetString("xrLabel9.Text");
|
||||
//
|
||||
// xrTable1
|
||||
//
|
||||
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
@@ -908,6 +903,24 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.xrTableCell19.Weight = 0.4431315074114891D;
|
||||
//
|
||||
// GroupFooter2
|
||||
//
|
||||
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrLabel9});
|
||||
this.GroupFooter2.HeightF = 217.5F;
|
||||
this.GroupFooter2.Level = 1;
|
||||
this.GroupFooter2.Name = "GroupFooter2";
|
||||
//
|
||||
// xrLabel9
|
||||
//
|
||||
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0.0002034505F, 0F);
|
||||
this.xrLabel9.Multiline = true;
|
||||
this.xrLabel9.Name = "xrLabel9";
|
||||
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel9.SizeF = new System.Drawing.SizeF(701.9998F, 217.5F);
|
||||
this.xrLabel9.StylePriority.UseFont = false;
|
||||
this.xrLabel9.Text = resources.GetString("xrLabel9.Text");
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
|
||||
@@ -922,6 +935,7 @@ namespace BeWo.Report.DefaultReports
|
||||
this.Page1,
|
||||
this.DetailReport});
|
||||
this.DataSource = this.bindingSource1;
|
||||
this.DisplayName = "Rechnung";
|
||||
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
|
||||
this.Font = new DevExpress.Drawing.DXFont("Arial", 9F);
|
||||
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
|
||||
@@ -1014,5 +1028,6 @@ namespace BeWo.Report.DefaultReports
|
||||
private DevExpress.XtraReports.UI.XRTableRow xrTableRow10;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell19;
|
||||
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Utils;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using System;
|
||||
using System.Text;
|
||||
@@ -29,9 +30,39 @@ namespace BeWo.Report.DefaultReports
|
||||
|
||||
if (pRO.CustomerSalutation.IsNullOrEmpty())
|
||||
{
|
||||
lblAnrede.Text = "Guten Tag,";
|
||||
lblAnrede.Text = "Sehr geehrte Damen und Herren,";
|
||||
}
|
||||
|
||||
|
||||
if (pRO.InvoiceBase.SupportConceptCostBearerRelDc != null && pRO.InvoiceBase.SupportConceptCostBearerRelDc.ApprovalPeriodList != null)
|
||||
{
|
||||
foreach (var item in pRO.InvoiceBase.SupportConceptCostBearerRelDc.ApprovalPeriodList)
|
||||
{
|
||||
if (item.StartDate <= pRO.AccountingPeriodEnd && item.EndDate >= pRO.AccountingPeriodStart)
|
||||
{
|
||||
lblBereich.Text = item.Notice;
|
||||
}
|
||||
}
|
||||
if (pRO.InvoiceBase.SupportConceptCostBearerRelDc.CostBearerContactPerson != null)
|
||||
{
|
||||
String personname = pRO.RecipientContactPerson;
|
||||
if (pRO.InvoiceBase.SupportConceptCostBearerRelDc.CostBearerContactPerson.Geschlecht.HasValue)
|
||||
{
|
||||
if (pRO.InvoiceBase.SupportConceptCostBearerRelDc.CostBearerContactPerson.Geschlecht == BS.Shared.Sex.Female)
|
||||
{
|
||||
personname = String.Format("Frau {0}", pRO.InvoiceBase.SupportConceptCostBearerRelDc.CostBearerContactPerson.LastName);
|
||||
lblAnrede.Text = String.Format("Sehr geehrte {0},", personname);
|
||||
}
|
||||
else if (pRO.InvoiceBase.SupportConceptCostBearerRelDc.CostBearerContactPerson.Geschlecht == BS.Shared.Sex.Male)
|
||||
{
|
||||
personname = String.Format("Herr {0}", pRO.InvoiceBase.SupportConceptCostBearerRelDc.CostBearerContactPerson.LastName);
|
||||
lblAnrede.Text = String.Format("Sehr geehrte {0},", personname);
|
||||
}
|
||||
}
|
||||
pRO.RecipientContactPerson = personname;
|
||||
}
|
||||
}
|
||||
|
||||
SetzeAdresse(pRO);
|
||||
|
||||
String name = Regex.Replace(String.Format("{0}, {1}", pRO.CustomerLastName, pRO.CustomerFirstName), @"\s*\(.*?\)", "");
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -82,6 +82,10 @@
|
||||
<Compile Include="EmployeeKilometerauswertungsReport.designer.cs">
|
||||
<DependentUpon>EmployeeKilometerauswertungsReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export\DatevExporter.cs" />
|
||||
<Compile Include="Export\CustomDataExporter.cs" />
|
||||
<Compile Include="Export\TempFiBuExport.cs" />
|
||||
<Compile Include="Export\FiBuDatensatz.cs" />
|
||||
<Compile Include="FlsAuswertungRO.cs" />
|
||||
<Compile Include="FlsAuswertung.cs">
|
||||
<SubType>Component</SubType>
|
||||
@@ -95,6 +99,8 @@
|
||||
<Compile Include="InvoiceCustomerReport.Designer.cs">
|
||||
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
|
||||
<Compile Include="Mitarbeiterstundenkonto.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -125,6 +131,11 @@
|
||||
<Compile Include="OverlappingServiceRecords.designer.cs">
|
||||
<DependentUpon>OverlappingServiceRecords.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Quittierungsbeleg.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -200,6 +211,10 @@
|
||||
<EmbeddedResource Include="OverlappingServiceRecords.resx">
|
||||
<DependentUpon>OverlappingServiceRecords.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Quittierungsbeleg.resx">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -243,6 +258,7 @@
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.5 KiB |
Reference in New Issue
Block a user