Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo into master

This commit is contained in:
2023-09-15 15:02:54 +02:00
29 changed files with 40598 additions and 385 deletions

View File

@@ -51,6 +51,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="CustomMitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="CustomMitarbeiterstundenkontoBerechnungMonate.cs" />
<Compile Include="CustomReportCreator.cs" />
@@ -79,7 +81,7 @@
<DependentUpon>EmployeeKilometerauswertungsReport.cs</DependentUpon>
</Compile>
<Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\DatevExporter.cs" />
<Compile Include="Export\ExactExporter.cs" />
<Compile Include="KilometerauswertungsListReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -136,6 +138,12 @@
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServiceInvoiceReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ServiceInvoiceReport.Designer.cs">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="Service\ServiceRecordDurationCalculator.cs" />
<Compile Include="Teamstundenkonto.cs">
@@ -209,6 +217,10 @@
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="ServiceInvoiceReport.resx">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Teamstundenkonto.resx">
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
</EmbeddedResource>

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Akgg;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
@@ -9,6 +10,7 @@ using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using DevExpress.XtraReports.Design;
using DevExpress.XtraReports.UI;
@@ -344,5 +346,58 @@ namespace AkggMid
return report as XtraReport;
}
private XtraReport CreateInvoiceReport(List<ServiceInvoiceDC> invoices)
{
XtraReport allReports = null;
foreach (var iDC in invoices)
{
XtraReport invoiceReport = null;
if (iDC.InvoiceBase.InvoiceTypeText != null && iDC.InvoiceBase.InvoiceTypeText == "Abrechnung Schulbegleitender Dienst"
&& iDC.ServiceInvoicePeriods.Count > 0 && iDC.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod.ServiceCategory != null)
{
XtraReport masterReport = new XtraReport();
masterReport.CreateDocument();
var seite1 = new ServiceInvoiceReport();
var ro = ServiceInvoiceRO.Create(iDC);
seite1.SetReportDataSource(ro);
seite1.CreateDocument();
int month = iDC.InvoiceBase.AccountingPeriodStart.Value.Month;
int year = iDC.InvoiceBase.AccountingPeriodStart.Value.Year;
long cOid = iDC.InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer.CustomerOid;
long oOid = iDC.InvoiceBase.RecipientOrganisationOid ?? 0;
var qb = CreateServiceOverviewSingleCustomerReport(cOid, month, year, oOid, 0, null, 1, DateTime.DaysInMonth(year, month));
qb.CreateDocument();
masterReport.Pages.AddRange(seite1.Pages);
masterReport.Pages.AddRange(qb.Pages);
invoiceReport = masterReport;
}
else
{
IBeWoReport<ServiceInvoiceRO> singleReport = FindReportImp<ServiceInvoiceRO>(iDC.InvoiceBase.InvoiceId);
var ro = ServiceInvoiceRO.Create(iDC);
singleReport.SetReportDataSource(ro);
((XtraReport)singleReport).CreateDocument();
invoiceReport = singleReport as XtraReport;
}
if (allReports == null)
allReports = invoiceReport;
else
((XtraReport)allReports).Pages.AddRange(invoiceReport.Pages);
}
return allReports as XtraReport;
}
}
}

View File

@@ -12,7 +12,7 @@ namespace AkggMid.Export
{
public override QueryDC CreateQuery(QueryDC query)
{
return DatevExporter.CreateQuery(query);
return ExactExporter.CreateQuery(query);
}
}
}

View File

@@ -1,249 +0,0 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace AkggMid.Export
{
public class DatevExporter
{
public static QueryDC CreateQuery(QueryDC query)
{
DateTime dt = DateTime.Now;
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
query.FileName = String.Format("Exact Export {0:yyyyMM}.csv", dt);
query.QueryResult = GetAbrechnungenString(dt);
return query;
}
public static String GetAbrechnungenString(DateTime date)
{
StringBuilder sb = new StringBuilder();
//sb.AppendLine("Betrag;Konto;Gegenkonto;Belegdatum;Rechnungsnummer;Buchungstext;Kostenstelle");
//sb.AppendLine("Datum;Konto;Gegenkonto;Buchungstext;Belegfeld1;Umsatz Soll;Kostenstelle");
sb.AppendLine("regelnummer; dagb_type; dagbknr; periode; bkjrcode; bkstnr; oms25; Date; Empty; debnr; crdnr; Empty; bedrag; drbk_in_val; " +
"valcode; koers; kredbep; bdrkredbep; vervdatfak; vervdatkrd; Empty; Empty; weeknummer; betaalref; betwijze; grek_bdr; Empty; Empty; Empty; Empty; Empty; storno; " +
"Empty; Empty; Empty; Empty; Empty; Empty; Empty; Empty");
sb.AppendLine("Line number; Type of journal; Journal; Period; Financial year; Entry number; Description; Date; -; Debtor; Creditor number; -; Amount; Journalize in FC; " +
"Currency; Exchange rate; Payment charge / Payment discount; Amount Payment charge / Payment discount; Due date invoice; Due date payment charge / payment discount; -; -; Week number; Payment reference; Payment method; Amount blocked account; -; -; -; -; -; Reversal entry; " +
"-; -; -; -; -; -; -; -");
var s = GetMonatlicheRechnungenString(date);
if (!String.IsNullOrWhiteSpace(s))
{
s += "-; -; -; -; -; -; -; -";
sb.Append(s);
}
s = GetMonatlicheBetraegeString(date);
if (!String.IsNullOrWhiteSpace(s))
{
if (sb.Length > 0)
sb.AppendLine();
sb.Append(s);
}
return sb.ToString();
}
public static String GetMonatlicheRechnungenString(DateTime date)
{
var sql = GetMonatlicheRechnungenSql(date);
var dt = ExecuteQuery(sql, date);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
if (sb.Length > 0)
{
sb.AppendLine();
}
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
sb.Append(String.Format("{0:ddMM}", lastDate));
sb.Append(";");
sb.Append(String.Format("{0}", row[1]));
sb.Append(";");
sb.Append(String.Format("{0}", row[7]));
sb.Append(";");
String buchungstext = "";
long? c2sOid = (long?)row[5];
if (c2sOid.HasValue)
{
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(c2sOid.Value);
var c = c2s.SupportConcept.Customer;
buchungstext = String.Format("{0}, {1}", c.Person.LastName, c.Person.FirstName);
}
sb.Append(buchungstext);
sb.Append(";");
sb.Append(String.Format("{0}", row[3]));
sb.Append(";");
sb.Append(String.Format("{0:0.00}", row[0]));
sb.Append(";");
sb.Append(String.Format("{0}", row[4]));
}
return sb.ToString();
}
public static String GetMonatlicheBetraegeString(DateTime date)
{
var sql = GetMonatlicheBetraegeLvrSql(date);
/*
'Betrag',
c.DebitorNumber,
c.CostCenter,
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
cb2sc.Oid
*/
//"Datum;Konto;Gegenkonto;Buchungstext;Belegfeld1;Umsatz Soll;Kostenstelle"
var dt = ExecuteQuery(sql, date);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
if (sb.Length > 0)
{
sb.AppendLine();
}
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
sb.Append(String.Format("{0:ddMM}", lastDate));
sb.Append(";");
sb.Append(String.Format("{0}", row[1]));
sb.Append(";");
sb.Append("8010"); // Erlöskonto
sb.Append(";");
sb.Append(String.Format("{0}", row[3]));
sb.Append(";");
//sb.Append(""); // Rechnungsnummer leer
sb.Append(";");
sb.Append(String.Format("{0:0.00}", row[0]));
sb.Append(";");
sb.Append("3010");
}
return sb.ToString();
}
private static Dictionary<long, decimal> CreateHourlyRateDict(List<long> catOids, DateTime date)
{
Dictionary<long, decimal> dict = new Dictionary<long, decimal>();
foreach (var oid in catOids)
{
var cat = DAOFactory.GenericDAO.LoadByID<ServiceCategory>(oid);
var crps = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(cat.CostRatePeriods);
var cp = crps.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, date);
if (cp != null && cp.CostRateValue.HasValue)
dict.Add(oid, cp.CostRateValue.Value);
}
return dict;
}
private static String GetMonatlicheRechnungenSql(DateTime date)
{
String sql = @"
select
sip.Claim,
c.DebitorNumber,
ib.InvoiceDate,
ib.invoicenumber,
c.CostCenter,
c2s.Oid,
ib.InvoiceId,
org.DebitorNumber
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 ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1
order by ib.invoicenumber
";
return sql;
}
private static String GetMonatlicheBetraegeLvrSql(DateTime date)
{
String sql = @"
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,
CONCAT(p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
cb2sc.Oid
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 GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1
and (sr.`GeleisteteFLM` is not null)
and org.Name = 'LVR'
ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
";
return sql;
}
public static DataTable ExecuteQuery(String sql, DateTime dt)
{
var newsql = sql;
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:dd.MM.yyyy}", dt));
newsql = newsql.Replace(":Belegnr", String.Format("{0:yyMM}", dt));
newsql = newsql.Replace(":Monat_MM", String.Format("{0:MM}", dt));
newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt));
dt = dt.AddMonths(1);
newsql = newsql.Replace(":Monat_End", String.Format("{0:yyyy-MM}-01", dt));
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
}
}
}

View File

@@ -0,0 +1,258 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace AkggMid.Export
{
public class ExactExporter
{
public static QueryDC CreateQuery(QueryDC query)
{
DateTime dt = DateTime.Now;
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
query.FileName = String.Format("Exact Export {0:yyyyMM}.csv", dt);
query.QueryResult = GetAbrechnungenString(dt);
return query;
}
public static String GetAbrechnungenString(DateTime date)
{
StringBuilder sb = new StringBuilder();
//Überschriften sind nicht nötig
//sb.AppendLine("regelnumber, fakt_code, debnr, refer, refer1, refer2, refer3, ordernr, orddat, magcode, ex_artcode, verteg, kstplcode, selcode, inv_in_vv, " +
// "nettoprijs, valcode, koers, betcond, levwijze, vrachtkost, orderkost, fakt_kort, tot_bdr, colli, bruto_gew, netto_gew, afldat, adr_code, -, " +
// "bruto / netto, -, -, -, -, -, -, -, -, -, -, fak_soort, ord_fakt, deb_id, fiattering, fakdebnr, -, faknr, kstplcode");
//sb.AppendLine("regelnumber,-,-,-,-,-,-,-,-,magcode,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,afldat,afl_week,artcode,ar_soort,oms45,aantal," +
// "btw_code,prijslijst,korting,prijs,prijs_n,kstdrcode,text,reknr,-,-,-,-,-,kstplcode,-,");
var s = GetMonatlicheRechnungenString(date);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
}
return sb.ToString();
}
public static String GetMonatlicheRechnungenString(DateTime date)
{
var sql = GetMonatlicheRechnungenSql(date);
/*
sip.Claim,
c.DebitorNumber,
ib.InvoiceDate,
ib.invoicenumber,
ib.Oid AS InvoiceBaseOid,
c.CostCenter,
c2s.Oid,
ib.InvoiceId,
org.DebitorNumber
*/
// 0, 111, 281001, , , , , , , , , , , , , , EUR, 1, , , , , , 130.00, , , , 20220531, , , , Hans Werner 05 / 15, , , , , , , , , , , , , , , , ,
// 1, 111, 281001, , , , , , , , , , , , , , EUR, 1, , , , , , +76.00, , , , 20220531, , , , Hans Werner 05 / 15, , , , , , , , , , , , , , , , ,
//"Datum;Konto;Gegenkonto;Buchungstext;Belegfeld1;Umsatz Soll;Kostenstelle"
var dt = ExecuteQuery(sql, date, null);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
//sb.Append(String.Format("{0:ddMM}", lastDate));
sb.Append("0,V,111,");
sb.Append(String.Format("{0}", row[1])); //Debitornr.
sb.Append(", , , , , , , , , , , , , , EUR, 1, , , , , , ");
sb.Append(String.Format("{0:0.00}", row[0].ToString().Replace(",", ".")));
sb.Append(", , , ,");
sb.Append(String.Format("{0:yyyyMMdd}", lastDate));
sb.Append(", , , ,");
sb.Append(String.Format("{0} {1} {2:MM} / {2:yyyy}", row[2], row[3], lastDate));
sb.Append(", , , , , , , , , , , , , , , , ,");
if (sb.Length > 0)
{
sb.AppendLine();
}
string ibOid = String.Format("{0}", row[6]);
string sipOid = String.Format("{0}", row[7]);
if (!String.IsNullOrWhiteSpace(ibOid))
{
sql = GetInvoiceItems();
var sdt = ExecuteQuery(sql, date, ibOid);
if (sdt.Rows.Count != 0)
{
//foreach (DataRow srow in sdt.Rows)
for (int i = 0; i < sdt.Rows.Count; i++)
{
DataRow srow = sdt.Rows[i];
if (!srow[0].ToString().StartsWith("0,00"))
{
sb.Append(i + 1);
sb.Append(",111,");
sb.Append(String.Format("{0}", row[1])); //Debitornr.
sb.Append(", , , , , , , , , , , , , , EUR, 1, , , , , ,");
sb.Append(String.Format("{0:0.00}", srow[2].ToString().Replace(",", ".")));
sb.Append(", , , ,");
sb.Append(String.Format("{0:yyyyMMdd}", lastDate));
sb.Append(", , , ,");
sb.Append(String.Format("{0} {1} {2:MM} / {2:yyyy},", row[2], row[3], lastDate));
sb.Append(String.Format("{0:0.00}", srow[0].ToString().Replace(",", ".")));
sb.Append(", , , ,");
sb.Append(String.Format("{0:0.00}", srow[1].ToString().Replace(",", ".")));
sb.Append(", , , , , , , , , , , ,");
if (sb.Length > 0)
{
sb.AppendLine();
}
}
}
}
else
{
if (!String.IsNullOrWhiteSpace(sipOid))
{
sql = GetInvoiceItemsSIP();
sdt = ExecuteQuery(sql, date, sipOid);
if (sdt.Rows.Count != 0)
{
for (int i = 0; i < sdt.Rows.Count; i++)
{
DataRow srow = sdt.Rows[i];
if (!srow[0].ToString().StartsWith("0,00"))
{
sb.Append(i + 1);
sb.Append(",111,");
sb.Append(String.Format("{0}", row[1])); //Debitornr.
sb.Append(", , , , , , , , , , , , , , EUR, 1, , , , , ,");
sb.Append(String.Format("+{0:0.00}", srow[2].ToString().Replace(",", ".")));
sb.Append(", , , ,");
sb.Append(String.Format("{0:yyyyMMdd}", lastDate));
sb.Append(", , , ,");
sb.Append(String.Format("{0} {1} {2:MM} / {2:yyyy},", row[2], row[3], lastDate));
sb.Append(String.Format("{0:0.00}", srow[0].ToString().Replace(",", ".")));
sb.Append(", , , ,");
sb.Append(String.Format("{0:0.00}", srow[1].ToString().Replace(",", ".")));
sb.Append(", , , , , , , , , , , ,");
if (sb.Length > 0)
{
sb.AppendLine();
}
}
}
}
}
}
}
}
return sb.ToString();
}
private static Dictionary<long, decimal> CreateHourlyRateDict(List<long> catOids, DateTime date)
{
Dictionary<long, decimal> dict = new Dictionary<long, decimal>();
foreach (var oid in catOids)
{
var cat = DAOFactory.GenericDAO.LoadByID<ServiceCategory>(oid);
var crps = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(cat.CostRatePeriods);
var cp = crps.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, date);
if (cp != null && cp.CostRateValue.HasValue)
dict.Add(oid, cp.CostRateValue.Value);
}
return dict;
}
private static String GetMonatlicheRechnungenSql(DateTime date)
{
String sql = @"
select
Round(sip.Claim, 2),
c.DebitorNumber,
p.FirstName,
p.LastName,
ib.InvoiceDate,
ib.invoicenumber,
ib.Oid AS InvoiceBaseOid,
sip.Oid AS sipOID,
c.CostCenter,
c2s.Oid,
ib.InvoiceId,
org.DebitorNumber
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 ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1
order by ib.invoicenumber
";
return sql;
}
private static String GetInvoiceItems()
{
String sql = @"
SELECT
Round(UnitCount, 2),
Round(AmountPerUnit, 2),
Round(AmountTotal, 2)
FROM
invoiceitem
WHERE invoicebaseoid = ':ibOid'
";
return sql;
}
private static String GetInvoiceItemsSIP()
{
String sql = @"
SELECT
Round(UnitCount, 2),
Round(AmountPerUnit, 2),
Round(AmountTotal, 2)
FROM
invoiceitem
WHERE serviceinvoiceperiodoid = ':ibOid'
";
return sql;
}
public static DataTable ExecuteQuery(String sql, DateTime dt, String ibOid)
{
var newsql = sql;
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:dd.MM.yyyy}", dt));
newsql = newsql.Replace(":Belegnr", String.Format("{0:yyMM}", dt));
newsql = newsql.Replace(":Monat_MM", String.Format("{0:MM}", dt));
newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt));
dt = dt.AddMonths(1);
newsql = newsql.Replace(":Monat_End", String.Format("{0:yyyy-MM}-01", dt));
newsql = newsql.Replace(":ibOid", ibOid);
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
}
}
}

View File

@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Services;
using Service.Invoicing;
namespace AkggMid.Invoicing
{
public class CustomInvoiceCreation : SbdDefaultInvoiceCreation
{
public override IList<InvoiceItem> CreateSbdInvoiceItems(Customer customer, List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
{
//Klassisch nur ohne StundenplanItems
IList<InvoiceItem> result = new List<InvoiceItem>();
//var stundenplanItems = ErstelleStundenplanItems(customer, invoicePeriod.StartDate, invoicePeriod.EndDate);
IList<InvoiceItem> srList = new List<InvoiceItem>();
foreach (ServiceRecordDC iServiceRecord in serviceRecordsInPeriod)
{
if (iServiceRecord.ServiceDescription.Category.IsBillable)
{
if (!iServiceRecord.AlreadyAccounted)
{
var invoiceItem = CreateInvoiceItem(iServiceRecord, scap, calc);
invoiceItem.ItemDescription = String.Format("{0} {1}", iServiceRecord.Employee.FirstName, iServiceRecord.Employee.LastName);
srList.Add(invoiceItem);
iServiceRecord.AlreadyAccounted = true;
}
}
}
Dictionary<String, bool> dayDict = new Dictionary<String, bool>();
foreach (var item in srList)
{
String key = String.Format("{0:dd.MM.yyyy}", item.ItemPeriodStart);
if (!dayDict.ContainsKey(key))
{
dayDict.Add(key, true);
}
result.Add(item);
}
//foreach (var ii in stundenplanItems)
//{
// String key = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodStart);
// if (!dayDict.ContainsKey(key))
// {
// ii.ItemDescription = GetHauptbetreuer(customer);
// result.Add(ii);
// }
//}
var newList = result.Where(i => i.UnitCount.HasValue && i.UnitCount.Value > 0).OrderBy(i => i.ItemPeriodStart).ToList();
return CreateSummaryInvoiceItems(newList, invoicePeriod, scap, calc);
}
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
{
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
if (iServiceRecord.ServiceDescription.CategoryName.Contains("Klassenfahrt"))
{
ii.ItemDescription = "Klassenfahrt";
}
else
{
ii.ItemDescription = "Betreuungsstunden - Schulassistenz";
}
return ii;
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace AkggMid.Invoicing
{
public class CustomInvoiceFactory : InvoiceFactory
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
return new CustomInvoiceCreation();
}
}
}

View File

@@ -0,0 +1,935 @@
using BeWo.Report.ReportObjects;
namespace Akgg
{
partial class ServiceInvoiceReport
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ServiceInvoiceReport));
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.xrLabel22 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.lblKategorie = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable5 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow23 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell37 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell33 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell36 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell34 = new DevExpress.XtraReports.UI.XRTableCell();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.xrLabel33 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel31 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel32 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel29 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel30 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel28 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel27 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel25 = new DevExpress.XtraReports.UI.XRLabel();
this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrLabel19 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel21 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel20 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAbrechnungszeitraum = new DevExpress.XtraReports.UI.XRLabel();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.DetailReport2 = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail3 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable6 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow25 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell42 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell44 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell45 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
//
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel11,
this.xrLabel22,
this.xrLabel3,
this.lblKategorie,
this.xrTable5});
this.Detail.HeightF = 178.125F;
this.Detail.Name = "Detail";
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel22
//
this.xrLabel22.Font = new System.Drawing.Font("Lato", 9F);
this.xrLabel22.LocationFloat = new DevExpress.Utils.PointFloat(0F, 141.4167F);
this.xrLabel22.Multiline = true;
this.xrLabel22.Name = "xrLabel22";
this.xrLabel22.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel22.SizeF = new System.Drawing.SizeF(300.33F, 20F);
this.xrLabel22.StylePriority.UseFont = false;
this.xrLabel22.Text = "Zeitraum: [AccountingPeriod]";
//
// xrLabel3
//
this.xrLabel3.Font = new System.Drawing.Font("Lato", 9F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 87.87492F);
this.xrLabel3.Multiline = true;
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(402.1667F, 20F);
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Teilhabeassistenz für [CustomerName], geb. [CustomerBirthdate!dd.MM.yyyy]";
//
// lblKategorie
//
this.lblKategorie.Font = new System.Drawing.Font("Lato", 9F);
this.lblKategorie.LocationFloat = new DevExpress.Utils.PointFloat(0F, 36.49998F);
this.lblKategorie.Multiline = true;
this.lblKategorie.Name = "lblKategorie";
this.lblKategorie.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblKategorie.SizeF = new System.Drawing.SizeF(402.1667F, 35.62501F);
this.lblKategorie.StylePriority.UseFont = false;
this.lblKategorie.Text = "Im Rahmen der Eingliederungshilfe gem. §112 Abs.1 Satz 1 Nr. 1 SGB IX berechnen w" +
"ir Ihnen die erbrachten Leistungen";
//
// xrTable5
//
this.xrTable5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable5.Name = "xrTable5";
this.xrTable5.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow23});
this.xrTable5.SizeF = new System.Drawing.SizeF(705.0001F, 25F);
//
// xrTableRow23
//
this.xrTableRow23.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell37,
this.xrTableCell33,
this.xrTableCell36,
this.xrTableCell34});
this.xrTableRow23.Name = "xrTableRow23";
this.xrTableRow23.Weight = 1D;
//
// xrTableCell37
//
this.xrTableCell37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(211)))), ((int)(((byte)(214)))));
this.xrTableCell37.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell37.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell37.Font = new System.Drawing.Font("Lato", 9F, System.Drawing.FontStyle.Bold);
this.xrTableCell37.Name = "xrTableCell37";
this.xrTableCell37.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell37.StylePriority.UseBackColor = false;
this.xrTableCell37.StylePriority.UseBorderColor = false;
this.xrTableCell37.StylePriority.UseBorders = false;
this.xrTableCell37.StylePriority.UseFont = false;
this.xrTableCell37.StylePriority.UsePadding = false;
this.xrTableCell37.StylePriority.UseTextAlignment = false;
this.xrTableCell37.Text = "Bezeichnung";
this.xrTableCell37.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell37.Weight = 2.0683166089455085D;
//
// xrTableCell33
//
this.xrTableCell33.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(211)))), ((int)(((byte)(214)))));
this.xrTableCell33.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell33.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell33.Font = new System.Drawing.Font("Lato", 9F, System.Drawing.FontStyle.Bold);
this.xrTableCell33.Name = "xrTableCell33";
this.xrTableCell33.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell33.StylePriority.UseBackColor = false;
this.xrTableCell33.StylePriority.UseBorderColor = false;
this.xrTableCell33.StylePriority.UseBorders = false;
this.xrTableCell33.StylePriority.UseFont = false;
this.xrTableCell33.StylePriority.UsePadding = false;
this.xrTableCell33.StylePriority.UseTextAlignment = false;
this.xrTableCell33.Text = "Menge";
this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell33.Weight = 0.29155612887648841D;
//
// xrTableCell36
//
this.xrTableCell36.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(211)))), ((int)(((byte)(214)))));
this.xrTableCell36.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell36.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell36.Font = new System.Drawing.Font("Lato", 9F, System.Drawing.FontStyle.Bold);
this.xrTableCell36.Name = "xrTableCell36";
this.xrTableCell36.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell36.StylePriority.UseBackColor = false;
this.xrTableCell36.StylePriority.UseBorderColor = false;
this.xrTableCell36.StylePriority.UseBorders = false;
this.xrTableCell36.StylePriority.UseFont = false;
this.xrTableCell36.StylePriority.UsePadding = false;
this.xrTableCell36.StylePriority.UseTextAlignment = false;
this.xrTableCell36.Text = "Einzelpreis";
this.xrTableCell36.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell36.Weight = 0.33936287237182938D;
//
// xrTableCell34
//
this.xrTableCell34.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(211)))), ((int)(((byte)(214)))));
this.xrTableCell34.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell34.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell34.Font = new System.Drawing.Font("Lato", 9F, System.Drawing.FontStyle.Bold);
this.xrTableCell34.Name = "xrTableCell34";
this.xrTableCell34.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell34.StylePriority.UseBackColor = false;
this.xrTableCell34.StylePriority.UseBorderColor = false;
this.xrTableCell34.StylePriority.UseBorders = false;
this.xrTableCell34.StylePriority.UseFont = false;
this.xrTableCell34.StylePriority.UsePadding = false;
this.xrTableCell34.StylePriority.UseTextAlignment = false;
this.xrTableCell34.Text = "Gesamtbetrag";
this.xrTableCell34.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell34.Weight = 0.42484168483036422D;
//
// ReportHeader
//
this.ReportHeader.Font = new System.Drawing.Font("Verdana", 10F);
this.ReportHeader.HeightF = 0F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False;
this.ruleRateFactorNull.Name = "ruleRateFactorNull";
//
// topMarginBand1
//
this.topMarginBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel6,
this.xrPictureBox1});
this.topMarginBand1.HeightF = 188F;
this.topMarginBand1.Name = "topMarginBand1";
//
// xrLabel6
//
this.xrLabel6.Font = new System.Drawing.Font("Lato", 9F, System.Drawing.FontStyle.Bold);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(489.0831F, 136.9583F);
this.xrLabel6.Multiline = true;
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(166.9165F, 51.04167F);
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.StylePriority.UseTextAlignment = false;
this.xrLabel6.Text = "Fachbereich Beckoffice\r\nBuchhaltung";
this.xrLabel6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrPictureBox1
//
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 56.125F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(189.8332F, 99.75002F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// bottomMarginBand1
//
this.bottomMarginBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel15,
this.xrLabel1,
this.xrLabel9,
this.xrLabel14,
this.xrPageInfo2,
this.xrPictureBox3,
this.xrPictureBox2,
this.xrLabel12,
this.xrLabel33,
this.xrLabel31,
this.xrLabel32,
this.xrLabel29,
this.xrLabel30,
this.xrLabel28,
this.xrLabel27,
this.xrLabel25});
this.bottomMarginBand1.HeightF = 227F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// xrLabel33
//
this.xrLabel33.Font = new System.Drawing.Font("Lato", 7F);
this.xrLabel33.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel33.LocationFloat = new DevExpress.Utils.PointFloat(422.7525F, 157.0835F);
this.xrLabel33.Multiline = true;
this.xrLabel33.Name = "xrLabel33";
this.xrLabel33.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel33.SizeF = new System.Drawing.SizeF(139.4999F, 31.70839F);
this.xrLabel33.StylePriority.UseFont = false;
this.xrLabel33.StylePriority.UseForeColor = false;
this.xrLabel33.Text = "DE42 3702 0500 0007 6000 05\r\nBFSWDE33XXX\r\n";
//
// xrLabel31
//
this.xrLabel31.Font = new System.Drawing.Font("Lato", 7F);
this.xrLabel31.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel31.LocationFloat = new DevExpress.Utils.PointFloat(387.8563F, 142.0833F);
this.xrLabel31.Multiline = true;
this.xrLabel31.Name = "xrLabel31";
this.xrLabel31.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel31.SizeF = new System.Drawing.SizeF(174.3961F, 15F);
this.xrLabel31.StylePriority.UseFont = false;
this.xrLabel31.StylePriority.UseForeColor = false;
this.xrLabel31.Text = "Bank für Sozialwirtschaft";
//
// xrLabel32
//
this.xrLabel32.Font = new System.Drawing.Font("Lato", 7F);
this.xrLabel32.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel32.LocationFloat = new DevExpress.Utils.PointFloat(387.8562F, 157.0835F);
this.xrLabel32.Multiline = true;
this.xrLabel32.Name = "xrLabel32";
this.xrLabel32.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel32.SizeF = new System.Drawing.SizeF(34.89639F, 31.7084F);
this.xrLabel32.StylePriority.UseFont = false;
this.xrLabel32.StylePriority.UseForeColor = false;
this.xrLabel32.Text = "IBAN\r\nBIC \r\n";
//
// xrLabel29
//
this.xrLabel29.Font = new System.Drawing.Font("Lato", 7F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))));
this.xrLabel29.ForeColor = System.Drawing.Color.Gray;
this.xrLabel29.LocationFloat = new DevExpress.Utils.PointFloat(162.6875F, 127.0834F);
this.xrLabel29.Multiline = true;
this.xrLabel29.Name = "xrLabel29";
this.xrLabel29.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel29.SizeF = new System.Drawing.SizeF(188.44F, 15F);
this.xrLabel29.StylePriority.UseFont = false;
this.xrLabel29.StylePriority.UseForeColor = false;
this.xrLabel29.Text = "Backoffice";
//
// xrLabel30
//
this.xrLabel30.Font = new System.Drawing.Font("Lato", 7F, System.Drawing.FontStyle.Italic);
this.xrLabel30.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel30.LocationFloat = new DevExpress.Utils.PointFloat(162.6875F, 142.0834F);
this.xrLabel30.Multiline = true;
this.xrLabel30.Name = "xrLabel30";
this.xrLabel30.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel30.SizeF = new System.Drawing.SizeF(188.4375F, 50.66668F);
this.xrLabel30.StylePriority.UseFont = false;
this.xrLabel30.StylePriority.UseForeColor = false;
this.xrLabel30.Text = "Treppenstraße 4, 34117 Kassel\r\nTelefon +49 561 8 16 44 00\r\nTelefax +49 561 8 16 4" +
"4 490";
//
// xrLabel28
//
this.xrLabel28.Font = new System.Drawing.Font("Lato", 7F, System.Drawing.FontStyle.Italic);
this.xrLabel28.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel28.LocationFloat = new DevExpress.Utils.PointFloat(0F, 142.0833F);
this.xrLabel28.Multiline = true;
this.xrLabel28.Name = "xrLabel28";
this.xrLabel28.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel28.SizeF = new System.Drawing.SizeF(138.875F, 50.66668F);
this.xrLabel28.StylePriority.UseFont = false;
this.xrLabel28.StylePriority.UseForeColor = false;
this.xrLabel28.Text = "Claudia Baer, Søren Link\r\nHRB 16045\r\nwww.viva-stiftung.de";
//
// xrLabel27
//
this.xrLabel27.Font = new System.Drawing.Font("Lato", 7F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))));
this.xrLabel27.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel27.LocationFloat = new DevExpress.Utils.PointFloat(0F, 127.0834F);
this.xrLabel27.Multiline = true;
this.xrLabel27.Name = "xrLabel27";
this.xrLabel27.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel27.SizeF = new System.Drawing.SizeF(138.88F, 15F);
this.xrLabel27.StylePriority.UseFont = false;
this.xrLabel27.StylePriority.UseForeColor = false;
this.xrLabel27.Text = "Geschäftsführung:";
//
// xrLabel25
//
this.xrLabel25.Font = new System.Drawing.Font("Lato", 7F, System.Drawing.FontStyle.Bold);
this.xrLabel25.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel25.LocationFloat = new DevExpress.Utils.PointFloat(0F, 112.0832F);
this.xrLabel25.Multiline = true;
this.xrLabel25.Name = "xrLabel25";
this.xrLabel25.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel25.SizeF = new System.Drawing.SizeF(138.88F, 15F);
this.xrLabel25.StylePriority.UseFont = false;
this.xrLabel25.StylePriority.UseForeColor = false;
this.xrLabel25.Text = "VIVA Stiftung gGmbH";
//
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel7,
this.xrLabel4,
this.xrLabel2,
this.xrLabel19,
this.xrLabel21,
this.xrLabel17,
this.xrLabel18,
this.xrLabel20,
this.xrLabel16,
this.xrLabel10,
this.lblAdresse,
this.xrLabel5,
this.xrLabel8,
this.lblAbrechnungszeitraum});
this.Page1.Font = new System.Drawing.Font("Verdana", 10F);
this.Page1.HeightF = 288.75F;
this.Page1.Name = "Page1";
this.Page1.StylePriority.UseFont = false;
//
// xrLabel19
//
this.xrLabel19.Font = new System.Drawing.Font("Lato", 10F, System.Drawing.FontStyle.Italic);
this.xrLabel19.LocationFloat = new DevExpress.Utils.PointFloat(532.5446F, 185.0417F);
this.xrLabel19.Name = "xrLabel19";
this.xrLabel19.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel19.SizeF = new System.Drawing.SizeF(51.58301F, 23F);
this.xrLabel19.StylePriority.UseFont = false;
this.xrLabel19.StylePriority.UseTextAlignment = false;
this.xrLabel19.Text = "Datum";
this.xrLabel19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel21
//
this.xrLabel21.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel21.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "DebitorNumber")});
this.xrLabel21.Font = new System.Drawing.Font("Lato", 8.5F, System.Drawing.FontStyle.Italic);
this.xrLabel21.LocationFloat = new DevExpress.Utils.PointFloat(584.1273F, 103.7492F);
this.xrLabel21.Multiline = true;
this.xrLabel21.Name = "xrLabel21";
this.xrLabel21.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel21.SizeF = new System.Drawing.SizeF(118.7073F, 18.23F);
this.xrLabel21.StylePriority.UseBorders = false;
this.xrLabel21.StylePriority.UseFont = false;
this.xrLabel21.StylePriority.UseTextAlignment = false;
this.xrLabel21.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel17
//
this.xrLabel17.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel17.Font = new System.Drawing.Font("Lato", 8.5F, System.Drawing.FontStyle.Italic);
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(489.0829F, 121.9792F);
this.xrLabel17.Multiline = true;
this.xrLabel17.Name = "xrLabel17";
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel17.SizeF = new System.Drawing.SizeF(213.9186F, 18.45834F);
this.xrLabel17.StylePriority.UseBorders = false;
this.xrLabel17.StylePriority.UseFont = false;
this.xrLabel17.StylePriority.UseTextAlignment = false;
this.xrLabel17.Text = "Bei Zahlung bitte stets angeben!";
this.xrLabel17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel18
//
this.xrLabel18.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel18.Font = new System.Drawing.Font("Lato", 8.5F, System.Drawing.FontStyle.Italic);
this.xrLabel18.LocationFloat = new DevExpress.Utils.PointFloat(489.0829F, 85.52087F);
this.xrLabel18.Multiline = true;
this.xrLabel18.Name = "xrLabel18";
this.xrLabel18.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel18.SizeF = new System.Drawing.SizeF(95.04443F, 36.45837F);
this.xrLabel18.StylePriority.UseBorders = false;
this.xrLabel18.StylePriority.UseFont = false;
this.xrLabel18.StylePriority.UseTextAlignment = false;
this.xrLabel18.Text = "Rechnung Nr.\r\nKunden-Nr.\r\n";
this.xrLabel18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel20
//
this.xrLabel20.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceNumber")});
this.xrLabel20.Font = new System.Drawing.Font("Lato", 8.5F, System.Drawing.FontStyle.Italic);
this.xrLabel20.LocationFloat = new DevExpress.Utils.PointFloat(584.1273F, 85.52087F);
this.xrLabel20.Multiline = true;
this.xrLabel20.Name = "xrLabel20";
this.xrLabel20.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel20.SizeF = new System.Drawing.SizeF(118.8726F, 18.22837F);
this.xrLabel20.StylePriority.UseBorders = false;
this.xrLabel20.StylePriority.UseFont = false;
this.xrLabel20.StylePriority.UseTextAlignment = false;
this.xrLabel20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel16
//
this.xrLabel16.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel16.Font = new System.Drawing.Font("Lato", 7.5F, System.Drawing.FontStyle.Italic);
this.xrLabel16.ForeColor = System.Drawing.Color.Gray;
this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(489.0831F, 0F);
this.xrLabel16.Multiline = true;
this.xrLabel16.Name = "xrLabel16";
this.xrLabel16.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel16.SizeF = new System.Drawing.SizeF(190.2913F, 36.45833F);
this.xrLabel16.StylePriority.UseBorders = false;
this.xrLabel16.StylePriority.UseFont = false;
this.xrLabel16.StylePriority.UseForeColor = false;
this.xrLabel16.StylePriority.UseTextAlignment = false;
this.xrLabel16.Text = "Treppenstr. 4, 34117 Kassel\r\nTelefon +49 561 8 16 44 410";
this.xrLabel16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel10
//
this.xrLabel10.Font = new System.Drawing.Font("Lato", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(317F, 17F);
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.Text = "Viva Stiftung gGmbH| Teppenstraße 4 | 34117 Kassel";
//
// lblAdresse
//
this.lblAdresse.Font = new System.Drawing.Font("Lato", 10F);
this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25.29163F);
this.lblAdresse.Multiline = true;
this.lblAdresse.Name = "lblAdresse";
this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAdresse.SizeF = new System.Drawing.SizeF(317F, 111.5F);
this.lblAdresse.StylePriority.UseFont = false;
//
// xrLabel5
//
this.xrLabel5.Font = new System.Drawing.Font("Lato", 10F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 234.2501F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(317F, 17F);
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.Text = "Sehr geehrte Damen und Herren,";
//
// xrLabel8
//
this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDate")});
this.xrLabel8.Font = new System.Drawing.Font("Lato", 10F, System.Drawing.FontStyle.Italic);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(584.1278F, 185.0417F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(91.04114F, 23F);
this.xrLabel8.StylePriority.UseFont = false;
this.xrLabel8.StylePriority.UseTextAlignment = false;
this.xrLabel8.Text = "xrLabel8";
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// lblAbrechnungszeitraum
//
this.lblAbrechnungszeitraum.Font = new System.Drawing.Font("Lato", 10F);
this.lblAbrechnungszeitraum.LocationFloat = new DevExpress.Utils.PointFloat(0F, 267.5833F);
this.lblAbrechnungszeitraum.Multiline = true;
this.lblAbrechnungszeitraum.Name = "lblAbrechnungszeitraum";
this.lblAbrechnungszeitraum.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(642F, 21.16666F);
this.lblAbrechnungszeitraum.StylePriority.UseFont = false;
this.lblAbrechnungszeitraum.Text = "vielen Dank für Ihr Vertrauen! Wir stellen Ihnen hiermit folgende Leistungen in R" +
"echnung:\r\n\r\n";
//
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail1,
this.DetailReport2});
this.DetailReport.DataMember = "ServiceInvoicePeriods";
this.DetailReport.DataSource = this.bindingSource1;
this.DetailReport.Level = 0;
this.DetailReport.Name = "DetailReport";
//
// Detail1
//
this.Detail1.HeightF = 0F;
this.Detail1.Name = "Detail1";
//
// DetailReport2
//
this.DetailReport2.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail3});
this.DetailReport2.DataMember = "ServiceInvoicePeriods.ServiceInvoiceItems";
this.DetailReport2.DataSource = this.bindingSource1;
this.DetailReport2.Level = 0;
this.DetailReport2.Name = "DetailReport2";
//
// Detail3
//
this.Detail3.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable6});
this.Detail3.HeightF = 18F;
this.Detail3.Name = "Detail3";
//
// xrTable6
//
this.xrTable6.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTable6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable6.Name = "xrTable6";
this.xrTable6.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow25});
this.xrTable6.SizeF = new System.Drawing.SizeF(705.0001F, 18F);
this.xrTable6.StylePriority.UseFont = false;
//
// xrTableRow25
//
this.xrTableRow25.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell42,
this.xrTableCell44,
this.xrTableCell45,
this.xrTableCell47});
this.xrTableRow25.Name = "xrTableRow25";
this.xrTableRow25.Weight = 0.72000000000000008D;
//
// xrTableCell42
//
this.xrTableCell42.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell42.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell42.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.ServiceDescription", "{0}")});
this.xrTableCell42.Font = new System.Drawing.Font("Lato", 9F);
this.xrTableCell42.Name = "xrTableCell42";
this.xrTableCell42.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell42.StylePriority.UseBorderColor = false;
this.xrTableCell42.StylePriority.UseBorders = false;
this.xrTableCell42.StylePriority.UseFont = false;
this.xrTableCell42.StylePriority.UsePadding = false;
this.xrTableCell42.StylePriority.UseTextAlignment = false;
this.xrTableCell42.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell42.Weight = 2.0683167779867575D;
//
// xrTableCell44
//
this.xrTableCell44.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell44.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell44.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.Hours", "{0:0.00}")});
this.xrTableCell44.Font = new System.Drawing.Font("Lato", 9F);
this.xrTableCell44.Name = "xrTableCell44";
this.xrTableCell44.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell44.StylePriority.UseBorderColor = false;
this.xrTableCell44.StylePriority.UseBorders = false;
this.xrTableCell44.StylePriority.UseFont = false;
this.xrTableCell44.StylePriority.UsePadding = false;
this.xrTableCell44.StylePriority.UseTextAlignment = false;
this.xrTableCell44.Text = "xrTableCell44";
this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell44.Weight = 0.29155609506823849D;
//
// xrTableCell45
//
this.xrTableCell45.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell45.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell45.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.HourlyRate", "{0:0.00} €")});
this.xrTableCell45.Font = new System.Drawing.Font("Lato", 9F);
this.xrTableCell45.Name = "xrTableCell45";
this.xrTableCell45.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell45.StylePriority.UseBorderColor = false;
this.xrTableCell45.StylePriority.UseBorders = false;
this.xrTableCell45.StylePriority.UseFont = false;
this.xrTableCell45.StylePriority.UsePadding = false;
this.xrTableCell45.StylePriority.UseTextAlignment = false;
this.xrTableCell45.Text = "xrTableCell45";
this.xrTableCell45.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell45.Weight = 0.33936260190583034D;
//
// xrTableCell47
//
this.xrTableCell47.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell47.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell47.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.GrossAmount")});
this.xrTableCell47.Font = new System.Drawing.Font("Lato", 9F);
this.xrTableCell47.Name = "xrTableCell47";
this.xrTableCell47.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell47.StylePriority.UseBorderColor = false;
this.xrTableCell47.StylePriority.UseBorders = false;
this.xrTableCell47.StylePriority.UseFont = false;
this.xrTableCell47.StylePriority.UsePadding = false;
this.xrTableCell47.StylePriority.UseTextAlignment = false;
this.xrTableCell47.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell47.Weight = 0.42484182006336368D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// xrLabel1
//
this.xrLabel1.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Dash;
this.xrLabel1.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "GrossClaim")});
this.xrLabel1.Font = new System.Drawing.Font("Lato", 9F, System.Drawing.FontStyle.Bold);
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(612.375F, 0F);
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(92.625F, 25F);
this.xrLabel1.StylePriority.UseBorderDashStyle = false;
this.xrLabel1.StylePriority.UseBorders = false;
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.StylePriority.UsePadding = false;
this.xrLabel1.StylePriority.UseTextAlignment = false;
this.xrLabel1.Text = "xrLabel1";
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
//
// xrLabel15
//
this.xrLabel15.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Dash;
this.xrLabel15.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.xrLabel15.Font = new System.Drawing.Font("Verdana", 10F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(612.375F, 29.25014F);
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(90.62494F, 9.708344F);
this.xrLabel15.StylePriority.UseBorderDashStyle = false;
this.xrLabel15.StylePriority.UseBorders = false;
this.xrLabel15.StylePriority.UseFont = false;
//
// xrLabel2
//
this.xrLabel2.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel2.Font = new System.Drawing.Font("Lato", 7.5F, System.Drawing.FontStyle.Italic);
this.xrLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(0)))), ((int)(((byte)(121)))));
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(489.0831F, 36.45833F);
this.xrLabel2.Multiline = true;
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(190.2913F, 16.66667F);
this.xrLabel2.StylePriority.UseBorders = false;
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.StylePriority.UseForeColor = false;
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.Text = "info@viva-stiftung.de";
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel4
//
this.xrLabel4.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel4.Font = new System.Drawing.Font("Lato", 8.5F, System.Drawing.FontStyle.Italic);
this.xrLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(72)))), ((int)(((byte)(73)))));
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(489.0831F, 64.68754F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(213.9184F, 20.83334F);
this.xrLabel4.StylePriority.UseBorders = false;
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.StylePriority.UseForeColor = false;
this.xrLabel4.StylePriority.UseTextAlignment = false;
this.xrLabel4.Text = "Ansprechpartner: Malte Zimmermann";
this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel7
//
this.xrLabel7.Font = new System.Drawing.Font("Lato", 11.5F, System.Drawing.FontStyle.Bold);
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 180.04F);
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(317F, 17F);
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.Text = "Rechnung Nr. \t[InvoiceNumber]";
//
// xrLabel11
//
this.xrLabel11.Font = new System.Drawing.Font("Lato", 9F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(0F, 107.8749F);
this.xrLabel11.Multiline = true;
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(300.33F, 20F);
this.xrLabel11.StylePriority.UseFont = false;
this.xrLabel11.Text = "[CustomerReferenceNumber]";
//
// xrLabel12
//
this.xrLabel12.Font = new System.Drawing.Font("Lato", 7F);
this.xrLabel12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(387.8563F, 127.0834F);
this.xrLabel12.Multiline = true;
this.xrLabel12.Name = "xrLabel12";
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel12.SizeF = new System.Drawing.SizeF(174.3961F, 15.00001F);
this.xrLabel12.StylePriority.UseFont = false;
this.xrLabel12.StylePriority.UseForeColor = false;
this.xrLabel12.Text = "Kontoverbindung";
//
// xrPictureBox2
//
this.xrPictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox2.Image")));
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(605F, 116.08F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(48F, 48F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrPictureBox3
//
this.xrPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox3.Image")));
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(670.67F, 115.08F);
this.xrPictureBox3.Name = "xrPictureBox3";
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(56.33051F, 45.58335F);
this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrLabel9
//
this.xrLabel9.Font = new System.Drawing.Font("Lato", 7.5F, System.Drawing.FontStyle.Bold);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(0F, 9.999974F);
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(511.7883F, 20F);
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.Text = "Zahlung innerhalb von 14 Tagen ab Rechnungseingang ohne Abzüge";
//
// xrLabel14
//
this.xrLabel14.Font = new System.Drawing.Font("Lato", 7.5F);
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(0F, 81.24981F);
this.xrLabel14.Multiline = true;
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel14.SizeF = new System.Drawing.SizeF(317F, 20.00002F);
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.Text = "Steuernummer 02625071135; Finanzamt Kassel I";
//
// xrPageInfo2
//
this.xrPageInfo2.Font = new System.Drawing.Font("Lato", 10F);
this.xrPageInfo2.Format = "Seite {0}";
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(631.9585F, 81.24981F);
this.xrPageInfo2.Name = "xrPageInfo2";
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(85.04144F, 20.00002F);
this.xrPageInfo2.StylePriority.UseFont = false;
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// ServiceInvoiceReport
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail,
this.ReportHeader,
this.topMarginBand1,
this.bottomMarginBand1,
this.Page1,
this.DetailReport});
this.DataSource = this.bindingSource1;
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
this.Font = new System.Drawing.Font("Verdana", 10F);
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new System.Drawing.Printing.Margins(65, 35, 188, 227);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
this.Version = "17.1";
this.Watermark.Image = ((System.Drawing.Image)(resources.GetObject("ServiceInvoiceReport.Watermark.Image")));
this.Watermark.ImageTransparency = 117;
this.Watermark.ShowBehind = false;
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
private DevExpress.XtraReports.UI.DetailBand Detail;
private System.Windows.Forms.BindingSource bindingSource1;
private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull;
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.GroupHeaderBand Page1;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
private DevExpress.XtraReports.UI.XRLabel lblAbrechnungszeitraum;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
private DevExpress.XtraReports.UI.DetailBand Detail1;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport2;
private DevExpress.XtraReports.UI.DetailBand Detail3;
private DevExpress.XtraReports.UI.XRTable xrTable6;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow25;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell42;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell44;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell45;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell47;
private DevExpress.XtraReports.UI.XRLabel lblAdresse;
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRLabel xrLabel19;
private DevExpress.XtraReports.UI.XRLabel xrLabel21;
private DevExpress.XtraReports.UI.XRLabel xrLabel17;
private DevExpress.XtraReports.UI.XRLabel xrLabel18;
private DevExpress.XtraReports.UI.XRLabel xrLabel20;
private DevExpress.XtraReports.UI.XRLabel xrLabel16;
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
private DevExpress.XtraReports.UI.XRLabel xrLabel33;
private DevExpress.XtraReports.UI.XRLabel xrLabel31;
private DevExpress.XtraReports.UI.XRLabel xrLabel32;
private DevExpress.XtraReports.UI.XRLabel xrLabel29;
private DevExpress.XtraReports.UI.XRLabel xrLabel30;
private DevExpress.XtraReports.UI.XRLabel xrLabel28;
private DevExpress.XtraReports.UI.XRLabel xrLabel27;
private DevExpress.XtraReports.UI.XRLabel xrLabel25;
private DevExpress.XtraReports.UI.XRLabel xrLabel22;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRLabel lblKategorie;
private DevExpress.XtraReports.UI.XRTable xrTable5;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow23;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell37;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell33;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell36;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell34;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
private DevExpress.XtraReports.UI.XRLabel xrLabel15;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRLabel xrLabel9;
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox3;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
private DevExpress.XtraReports.UI.XRLabel xrLabel12;
}
}

View File

@@ -0,0 +1,58 @@
using System;
using System.Text;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
namespace Akgg
{
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public ServiceInvoiceReport()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
DateTime start = pRO.AccountingPeriodStart;
DateTime end = pRO.AccountingPeriodEnd;
if (start.Month == end.Month && start.Year == end.Year)
{
pRO.AccountingPeriod = String.Format("{0:MMMM yyyy}", start);
}
else
{
pRO.AccountingPeriod = String.Format("{0:MMMM yyyy} - {1:MMMM yyyy}", start, end);
}
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation != "Selbstzahler")
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation != "SELBSTZAHLER")
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine("");
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAdresse.Text = sb.ToString();
this.bindingSource1.DataSource = pRO;
}
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -74,6 +74,7 @@
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomAccountingService.cs" />
<Compile Include="Service\CustomSaveInterceptor.cs" />
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
@@ -19,12 +20,74 @@ namespace Alloheim.Export
DateTime dt = DateTime.Now;
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
query.FileName = String.Format("1192_{0:yyyyMMdd}_{0:hhmmss}_FIBU.TXT", DateTime.Now);
query.QueryResult = GetAbrechnungenString(dt);
if (query.Title == "SAP Export Stammdaten")
{
query.FileName = String.Format("1192_{0:yyyyMMdd}_{0:hhmmss}_DEBSB.TXT", DateTime.Now);
query.QueryResult = GetDebitorenString(dt);
}
else
{
query.FileName = String.Format("1192_{0:yyyyMMdd}_{0:hhmmss}_FIBU.TXT", DateTime.Now);
query.QueryResult = GetAbrechnungenString(dt);
}
return query;
}
public static String GetDebitorenString(DateTime date)
{
var dt = ExecuteQuery(GetDebitorenSql(date), date);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
if (sb.Length > 0)
{
sb.AppendLine();
}
for (int i = 0; i < row.ItemArray.Length; i++)
{
if (i > 0)
{
sb.Append("\t");
}
var item = row[i];
if (i == 15 && item != null)
{
var oid = (long)row[i];
var p = DAOFactory.GenericDAO.LoadByID<Person>(oid);
string telefon = null;
var contact = p.Contacts.FirstOrDefault(c => c.Type == ContactType.business_MobilePhone);
contact = p.Contacts.FirstOrDefault(c => c.Type == ContactType.business_Phone);
if (contact != null)
{
telefon = contact.Value;
}
sb.Append(telefon);
}
else if (i == 2 && item != null)
{
var sex = row[i].ToString();
if(sex == "0")
{
sb.Append("Herr");
}
else
{
sb.Append("Frau");
}
}
else
{
sb.Append(item);
}
}
}
return sb.ToString();
}
public static String GetAbrechnungenString(DateTime date)
{
StringBuilder sb = new StringBuilder();
@@ -57,6 +120,7 @@ namespace Alloheim.Export
var sql = GetMonatlicheBetraegeSql(date);
var dt = ExecuteQuery(sql, date);
int counter = 0;
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
@@ -75,13 +139,14 @@ namespace Alloheim.Export
*/
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
lastDate = lastDate.AddMonths(1).AddDays(-1);
counter += 1;
sb.Append("1192\t"); // Buchungskreis 1192
sb.Append("DR\t"); // Beleg DR für Rechnung / DG für Gutschrift
sb.Append(String.Format("{0:ddMMyyyy} \t", lastDate));
sb.Append(String.Format("{0:ddMMyyyy} \t", lastDate));
sb.Append("EUR\t");
sb.Append(String.Format("1192{0:ddMMyyyy} \t", lastDate));// Profitcenter + Rechnungs - Nr.VN
sb.Append(String.Format("1192{0:ddMMyyyy}{1} \t", lastDate, counter));// Profitcenter + Rechnungs - Nr.VN
sb.Append("1192\t"); // Belegkopftext 1192
sb.Append("D\t"); // D = Debitorenposition / zweite Zeile: S = Sachkontenposition
sb.Append("01\t"); // Kontoart D: S=01 H=11 / zweite Zeile: Kontoart S: S=40 H=50
@@ -99,7 +164,7 @@ namespace Alloheim.Export
sb.Append(String.Format("{0:ddMMyyyy} \t", lastDate));
sb.Append(String.Format("{0:ddMMyyyy} \t", lastDate));
sb.Append("EUR\t");
sb.Append(String.Format("1192{0:ddMMyyyy} \t", lastDate));// Profitcenter + Rechnungs - Nr.VN
sb.Append(String.Format("1192{0:ddMMyyyy}{1} \t", lastDate, counter));// Profitcenter + Rechnungs - Nr.VN
sb.Append("1192\t"); // Belegkopftext 1192
sb.Append("S\t"); // S = Sachkontenposition
sb.Append("50\t"); // Kontoart Kontoart S: S=40 H=50
@@ -221,25 +286,41 @@ ib.AccountingPeriodEnd
//string key = String.Format("{0}_{1}", row[2], row[1]); //Dictionary, damit erste Zeile nur einmal geschrieben wird
//if (!key2Value.ContainsKey(key))
//{
//key2Value.Add(key, key);
//key2Value.Add(key, key);
String betrag = String.Format("{0:0.00}", row[0]); // Betrag
if (betrag.Contains("-")) // Storno
{
betrag = betrag.Replace("-", "");
storno = true;
}
// Erste Linie - Rechnung
sb.Append("1192\t"); // Buchungskreis 1192
sb.Append("DR\t"); // Beleg DR für Rechnung / DG für Gutschrift
if (storno)
{
sb.Append("DG\t"); // DG für Gutschrift
}
else
{
sb.Append("DR\t"); // Beleg DR für Rechnung / DG für Gutschrift
}
sb.Append(String.Format("{0:ddMMyyyy}\t", row[3]));
sb.Append(String.Format("{0:ddMMyyyy}\t", row[3]));
sb.Append("EUR\t");
sb.Append(String.Format("{0}\t", row[1])); // Rechnungs - Nr.VN (Profitcenter ist in Rechnungsnr. enthalten)
sb.Append("1192\t"); // Belegkopftext 1192
sb.Append("D\t"); // D = Debitorenposition / zweite Zeile: S = Sachkontenposition
sb.Append("01\t"); // Kontoart D: S=01 H=11 / zweite Zeile: Kontoart S: S=40 H=50
sb.Append(String.Format("1192{0}\t", row[6])); //DebitorNumber Kostenträger / zweite Zeile: Sachkonto SAP
String betrag = String.Format("{0:0.00}", row[0]); // Betrag
if (betrag.Contains("-")) // Storno
if (storno)
{
storno = true;
sb.Append("11\t"); // Kontoart D: S=01 H=11 / zweite Zeile: Kontoart S: S=40 H=50
}
sb.Append(String.Format("{0:0.00}\t", row[0])); //Betrag
else
{
sb.Append("01\t"); // Kontoart D: S=01 H=11 / zweite Zeile: Kontoart S: S=40 H=50
}
sb.Append(String.Format("1192{0}\t", row[6])); //DebitorNumber Kostenträger / zweite Zeile: Sachkonto SAP
sb.Append(String.Format("{0:0.00}\t", betrag)); //Betrag
sb.Append("00\t"); // Umsatzsteuerschlüssel
if (storno)
{
@@ -279,7 +360,7 @@ ib.AccountingPeriodEnd
sb.Append("50\t"); // Kontoart Kontoart S: S=40 H=50
}
sb.Append("409600\t"); // zweite Zeile: Sachkonto SAP
sb.Append(String.Format("{0:0.00}\t", row[0])); //Betrag
sb.Append(String.Format("{0:0.00}\t", betrag)); //Betrag
sb.Append("00\t"); // Umsatzsteuerschlüssel
if (storno)
{
@@ -329,7 +410,52 @@ ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
return sql;
}
public static DataTable ExecuteQuery(String sql, DateTime dt)
private static String GetDebitorenSql(DateTime date)
{
String sql = @"
SELECT
distinct
CONCAT('1192', c.DebitorNumber),
null,
p.Sex,
CONCAT(p.`LastName`, ' ', p.`FirstName`),
CONCAT(p.`LastName`, ' ', p.`FirstName`),
null,
null,
null,
a.Street,
null,
a.Town,
a.PostalCode,
null,
null,
'D',
p.oid,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
'1192'
FROM `customer` c
INNER JOIN `person` p ON p.`Oid` = c.`PersonOid`
INNER JOIN supportconcept sc on sc.CustomerOID = c.Oid
INNER JOIN costbearer2supportconcept cb2sc on cb2sc.SupportConceptOID = sc.Oid
LEFT JOIN Address a on p.addressOid = a.oid
WHERE c.isactive=1 AND c.Insts >= ':Monat_Start' AND c.Insts < ':Monat_End'
order by p.`LastName`, p.FirstName
";
return sql;
}
public static DataTable ExecuteQuery(String sql, DateTime dt)
{
var newsql = sql;
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:dd.MM.yyyy}", dt));

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Services;
namespace Alloheim.Service
{
public class CustomSaveInterceptor : SaveInterceptor
{
public override string AllowSaveCustomer(CustomerDC c)
{
if (String.IsNullOrWhiteSpace(c.DebitorNumber))
{
int newNummer = 1;
var result = DAOFactory.SearchDAO.GetSqlResult("SELECT Max(CONVERT(DebitorNumber, UNSIGNED INTEGER)) FROM customer");
//
//update customer set debitornumber = '5' + debitornumber where debitornumber is not null
if (result.Count > 0)
{
var test = result[0];
int p = 0;
if (test != null && Int32.TryParse(test.ToString(), out p))
{
if (p < 150000)
{
p = 150000;
}
newNummer = p + 1;
}
}
c.DebitorNumber = newNummer.ToString();
}
return base.AllowSaveCustomer(c);
}
}
}

View File

@@ -35,20 +35,16 @@ namespace PZDDuesseldorf
if (item.ServiceDescription.ServiceCategory.IsBillable && (cat.StartsWith("fachleistung") || kurz == "fl"))
{
emp.Custom1 += duration / 60;
emp.Custom1 += duration;
}
else if (item.ServiceDescription.ServiceCategory.IsBillable && (cat.StartsWith("assistenz") || kurz == "as"))
{
emp.Custom2 += duration / 60;
emp.Custom2 += duration;
}
else if (item.ServiceDescription.ServiceCategory.IsBillable && (cat.StartsWith("arbeitszeit") || kurz == "az"))
{
emp.Custom3 += duration / 60;
emp.Custom3 += duration;
}
emp.Custom1 = Math.Round(emp.Custom1 / totalDuration, 2);
emp.Custom2 = Math.Round(emp.Custom2 / totalDuration, 2);
emp.Custom3 = Math.Round(emp.Custom3 / totalDuration, 2);
}
}

View File

@@ -20,8 +20,17 @@ namespace PZDDuesseldorf
var msb = new CustomMitarbeiterstundenkontoBerechnung();
msb.CreateReport(pRO);
foreach (var ed in pRO.EmployeeDetailList)
{
if (ed.StundenGesamtIst > 0)
{
ed.Custom1 = Math.Round(ed.Custom1 / 60 / ed.StundenGesamtIst, 4);
ed.Custom2 = Math.Round(ed.Custom2 / 60 / ed.StundenGesamtIst, 4);
ed.Custom3 = Math.Round(ed.Custom3 / 60 / ed.StundenGesamtIst, 4);
}
}
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -43,6 +43,8 @@ namespace PZDDuesseldorf
this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell24 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -58,7 +60,9 @@ namespace PZDDuesseldorf
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -77,6 +81,8 @@ namespace PZDDuesseldorf
this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell48 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell51 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell30 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.lblMonat = new DevExpress.XtraReports.UI.XRLabel();
@@ -90,12 +96,6 @@ namespace PZDDuesseldorf
this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell30 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
@@ -226,9 +226,25 @@ namespace PZDDuesseldorf
//
// xrTableCell21
//
this.xrTableCell21.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Custom1", "{0:0.00%}")});
this.xrTableCell21.Name = "xrTableCell21";
this.xrTableCell21.Weight = 0.063119927862939629D;
//
// xrTableCell6
//
this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Custom2", "{0:0.00%}")});
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Weight = 0.063119927862939587D;
//
// xrTableCell17
//
this.xrTableCell17.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Custom3", "{0:0.00%}")});
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.Weight = 0.063119927862939587D;
//
// xrTableCell25
//
this.xrTableCell25.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
@@ -372,6 +388,13 @@ namespace PZDDuesseldorf
this.xrTableCell11.Text = "Gesamt-\r\nstunden lfd. Monat";
this.xrTableCell11.Weight = 0.063119927721024011D;
//
// xrTableCell1
//
this.xrTableCell1.KeepTogether = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Anteil FLS an Gesamt-stunden";
this.xrTableCell1.Weight = 0.063119928687401475D;
//
// xrTableCell12
//
this.xrTableCell12.KeepTogether = true;
@@ -379,6 +402,12 @@ namespace PZDDuesseldorf
this.xrTableCell12.Text = "Anteil Assistenz an Gesamt-stunden";
this.xrTableCell12.Weight = 0.063119928687401489D;
//
// xrTableCell18
//
this.xrTableCell18.Name = "xrTableCell18";
this.xrTableCell18.Text = "Anteil Arbeitszeit an Gesamt-stunden";
this.xrTableCell18.Weight = 0.063119928687401489D;
//
// xrTableCell13
//
this.xrTableCell13.KeepTogether = true;
@@ -526,6 +555,16 @@ namespace PZDDuesseldorf
this.xrTableCell51.Name = "xrTableCell51";
this.xrTableCell51.Weight = 0.063119927862939559D;
//
// xrTableCell29
//
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.Weight = 0.063119927862939559D;
//
// xrTableCell30
//
this.xrTableCell30.Name = "xrTableCell30";
this.xrTableCell30.Weight = 0.063119927862939559D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
@@ -635,39 +674,6 @@ namespace PZDDuesseldorf
this.bottomMarginBand1.HeightF = 31.99997F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// xrTableCell1
//
this.xrTableCell1.KeepTogether = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Anteil FLS an Gesamt-stunden";
this.xrTableCell1.Weight = 0.063119928687401475D;
//
// xrTableCell6
//
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Weight = 0.063119927862939587D;
//
// xrTableCell17
//
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.Weight = 0.063119927862939587D;
//
// xrTableCell18
//
this.xrTableCell18.Name = "xrTableCell18";
this.xrTableCell18.Text = "Anteil Arbeitszeit an Gesamt-stunden";
this.xrTableCell18.Weight = 0.063119928687401489D;
//
// xrTableCell29
//
this.xrTableCell29.Name = "xrTableCell29";
this.xrTableCell29.Weight = 0.063119927862939559D;
//
// xrTableCell30
//
this.xrTableCell30.Name = "xrTableCell30";
this.xrTableCell30.Weight = 0.063119927862939559D;
//
// Mitarbeiterstundenkonto
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {

View File

@@ -9,6 +9,8 @@ using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using System.IO;
using System.Text.RegularExpressions;
namespace PetraWagnerMatthes
{
@@ -29,6 +31,7 @@ namespace PetraWagnerMatthes
var serviceRecord = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(s.ServiceRecordOid);
var srDc = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(serviceRecord);
ServicesOverviewRO.CreateSignatureString(s);
s.GoalList = String.Empty;
s.ServiceCategoryAbbr = String.Empty;
@@ -56,5 +59,31 @@ namespace PetraWagnerMatthes
this.bindingSource1.DataSource = pRO;
}
private void picSignature_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
XRPictureBox xrBox = sender as XRPictureBox;
//var test = this.GetCurrent
string base64String = xrBox.Tag as string;
if (!String.IsNullOrWhiteSpace(base64String))
{
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
var binData = Convert.FromBase64String(base64Data);
System.Drawing.Image img = ByteArrayToImage(binData);
xrBox.Image = Utils.CropImage(img);
}
else
{
xrBox.Image = null;
}
}
public System.Drawing.Image ByteArrayToImage(byte[] byteArrayIn)
{
using (var memoryStream = new MemoryStream(byteArrayIn))
{
return System.Drawing.Image.FromStream(memoryStream);
}
}
}
}

View File

@@ -42,6 +42,7 @@ namespace PetraWagnerMatthes
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
@@ -53,7 +54,10 @@ namespace PetraWagnerMatthes
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.picSignature = new DevExpress.XtraReports.UI.XRPictureBox();
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleServiceDesc = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleCostBearer = new DevExpress.XtraReports.UI.FormattingRule();
@@ -79,13 +83,14 @@ namespace PetraWagnerMatthes
this.fieldGroup = new DevExpress.XtraReports.UI.CalculatedField();
this.Hours = new DevExpress.XtraReports.UI.CalculatedField();
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -110,7 +115,7 @@ namespace PetraWagnerMatthes
this.xrTableServiceRecords1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableServiceRecords1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(1099F, 40F);
this.xrTableServiceRecords1.SizeF = new System.Drawing.SizeF(1109F, 40F);
this.xrTableServiceRecords1.StylePriority.UseBackColor = false;
this.xrTableServiceRecords1.StylePriority.UseBorders = false;
this.xrTableServiceRecords1.StylePriority.UseFont = false;
@@ -126,7 +131,8 @@ namespace PetraWagnerMatthes
this.xrTableCell1,
this.xrTableCell16,
this.xrTableCell19,
this.xrTableCell14});
this.xrTableCell14,
this.xrTableCell7});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableRow2.StylePriority.UseTextAlignment = false;
@@ -170,7 +176,7 @@ namespace PetraWagnerMatthes
this.xrTableCell6.StylePriority.UseTextAlignment = false;
this.xrTableCell6.Text = "Datum";
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell6.Weight = 0.41456053747137822D;
this.xrTableCell6.Weight = 0.30533198640837617D;
//
// xrTableCell1
//
@@ -182,7 +188,7 @@ namespace PetraWagnerMatthes
this.xrTableCell1.StylePriority.UseTextAlignment = false;
this.xrTableCell1.Text = "Zeit";
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell1.Weight = 0.3337835396484421D;
this.xrTableCell1.Weight = 0.27281875311591675D;
//
// xrTableCell16
//
@@ -194,7 +200,7 @@ namespace PetraWagnerMatthes
this.xrTableCell16.StylePriority.UseTextAlignment = false;
this.xrTableCell16.Text = "Dauer";
this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell16.Weight = 0.21109154321586676D;
this.xrTableCell16.Weight = 0.1425061581723234D;
//
// xrTableCell19
//
@@ -206,7 +212,7 @@ namespace PetraWagnerMatthes
this.xrTableCell19.StylePriority.UseTextAlignment = false;
this.xrTableCell19.Text = "Mitarbeiter/-in";
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell19.Weight = 0.3436892894050082D;
this.xrTableCell19.Weight = 0.35639031147528522D;
//
// xrTableCell14
//
@@ -218,7 +224,20 @@ namespace PetraWagnerMatthes
this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.Text = "Inhalte";
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell14.Weight = 1.0334522686272807D;
this.xrTableCell14.Weight = 0.94200524083412729D;
//
// xrTableCell7
//
this.xrTableCell7.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrTableCell7.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold);
this.xrTableCell7.Multiline = true;
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.StylePriority.UseBorders = false;
this.xrTableCell7.StylePriority.UseFont = false;
this.xrTableCell7.StylePriority.UseTextAlignment = false;
this.xrTableCell7.Text = "Unterschrift\r\n";
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell7.Weight = 0.34191035974677464D;
//
// DetailReport
//
@@ -237,7 +256,7 @@ namespace PetraWagnerMatthes
this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable3});
this.Detail1.Font = new System.Drawing.Font("Arial", 11F);
this.Detail1.HeightF = 20F;
this.Detail1.HeightF = 30F;
this.Detail1.Name = "Detail1";
this.Detail1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail1.StylePriority.UseFont = false;
@@ -253,7 +272,7 @@ namespace PetraWagnerMatthes
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow6});
this.xrTable3.SizeF = new System.Drawing.SizeF(1099F, 20F);
this.xrTable3.SizeF = new System.Drawing.SizeF(1109F, 30F);
this.xrTable3.StylePriority.UseFont = false;
this.xrTable3.StylePriority.UseTextAlignment = false;
this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
@@ -267,19 +286,20 @@ namespace PetraWagnerMatthes
this.xrTableCell12,
this.xrTableCell10,
this.xrTableCell20,
this.xrTableCell18});
this.xrTableCell18,
this.xrTableCell5});
this.xrTableRow6.Name = "xrTableRow6";
this.xrTableRow6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.xrTableRow6.StylePriority.UseTextAlignment = false;
this.xrTableRow6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableRow6.Weight = 1D;
this.xrTableRow6.Weight = 1.5D;
//
// xrTableCell4
//
this.xrTableCell4.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell4.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell4.StylePriority.UseBorders = false;
this.xrTableCell4.StylePriority.UseFont = false;
this.xrTableCell4.StylePriority.UsePadding = false;
@@ -288,7 +308,7 @@ namespace PetraWagnerMatthes
xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Report;
this.xrTableCell4.Summary = xrSummary1;
this.xrTableCell4.Text = "1";
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell4.Weight = 0.049978928896614996D;
//
// xrTableCell13
@@ -296,13 +316,13 @@ namespace PetraWagnerMatthes
this.xrTableCell13.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell13.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell13.StylePriority.UseBorders = false;
this.xrTableCell13.StylePriority.UseFont = false;
this.xrTableCell13.StylePriority.UsePadding = false;
this.xrTableCell13.StylePriority.UseTextAlignment = false;
this.xrTableCell13.Text = "Kontakt (Sozio)";
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell13.Weight = 0.12784094661944451D;
//
// xrTableCell15
@@ -310,26 +330,28 @@ namespace PetraWagnerMatthes
this.xrTableCell15.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell15.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 5, 0, 0, 100F);
this.xrTableCell15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell15.StylePriority.UseBorders = false;
this.xrTableCell15.StylePriority.UseFont = false;
this.xrTableCell15.StylePriority.UsePadding = false;
this.xrTableCell15.StylePriority.UseTextAlignment = false;
this.xrTableCell15.Text = "[StartDate!dd.MM.yyyy] (KW[KW])";
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell15.Weight = 0.21464641885687252D;
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell15.Weight = 0.15809129068746414D;
//
// xrTableCell12
//
this.xrTableCell12.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell12.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell12.StylePriority.UseBorders = false;
this.xrTableCell12.StylePriority.UseFont = false;
this.xrTableCell12.StylePriority.UsePadding = false;
this.xrTableCell12.StylePriority.UseTextAlignment = false;
this.xrTableCell12.Text = "[StartDate!HH:mm] - [EndDate!HH:mm] Uhr";
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell12.Weight = 0.172822682105718D;
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell12.Weight = 0.14125702200725576D;
//
// xrTableCell10
//
@@ -338,11 +360,13 @@ namespace PetraWagnerMatthes
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Minutes", "{0} Min.")});
this.xrTableCell10.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell10.StylePriority.UseBorders = false;
this.xrTableCell10.StylePriority.UseFont = false;
this.xrTableCell10.StylePriority.UsePadding = false;
this.xrTableCell10.StylePriority.UseTextAlignment = false;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell10.Weight = 0.10929659933369805D;
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell10.Weight = 0.07378523236632413D;
//
// xrTableCell20
//
@@ -351,12 +375,14 @@ namespace PetraWagnerMatthes
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeFullname")});
this.xrTableCell20.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell20.Name = "xrTableCell20";
this.xrTableCell20.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell20.StylePriority.UseBorders = false;
this.xrTableCell20.StylePriority.UseFont = false;
this.xrTableCell20.StylePriority.UsePadding = false;
this.xrTableCell20.StylePriority.UseTextAlignment = false;
this.xrTableCell20.Text = "xrTableCell20";
this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell20.Weight = 0.17795156086715877D;
this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell20.Weight = 0.18452775266892482D;
//
// xrTableCell18
//
@@ -365,12 +391,38 @@ namespace PetraWagnerMatthes
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Notice")});
this.xrTableCell18.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell18.Name = "xrTableCell18";
this.xrTableCell18.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell18.StylePriority.UseBorders = false;
this.xrTableCell18.StylePriority.UseFont = false;
this.xrTableCell18.StylePriority.UsePadding = false;
this.xrTableCell18.StylePriority.UseTextAlignment = false;
this.xrTableCell18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell18.Weight = 0.53508930903630614D;
this.xrTableCell18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrTableCell18.Weight = 0.48774088547830519D;
//
// xrTableCell5
//
this.xrTableCell5.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell5.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.picSignature});
this.xrTableCell5.Font = new System.Drawing.Font("Arial", 9F);
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.StylePriority.UseBorders = false;
this.xrTableCell5.StylePriority.UseFont = false;
this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
this.xrTableCell5.Weight = 0.17703044908553284D;
//
// picSignature
//
this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")});
this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.picSignature.Name = "picSignature";
this.picSignature.SizeF = new System.Drawing.SizeF(140.2083F, 29.99999F);
this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.picSignature.StylePriority.UseBorders = false;
this.picSignature.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.picSignature_BeforePrint);
//
// GroupHeader1
//
@@ -382,6 +434,10 @@ namespace PetraWagnerMatthes
this.GroupHeader1.RepeatEveryPage = true;
this.GroupHeader1.StylePriority.UseFont = false;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -484,7 +540,7 @@ namespace PetraWagnerMatthes
// xrLabel3
//
this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CostBearer2SupportConceptList.CustomerReferenceNumber")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CostBearer2SupportConceptList.SupportConcept.Customer.InsuranceNumber")});
this.xrLabel3.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(598.1255F, 82.54169F);
this.xrLabel3.Name = "xrLabel3";
@@ -600,6 +656,8 @@ namespace PetraWagnerMatthes
//
this.ReportFooter.BorderWidth = 2F;
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrPictureBox2,
this.xrLabel18,
this.xrLabel10,
this.xrLabel7,
this.xrLabel4,
@@ -612,6 +670,39 @@ namespace PetraWagnerMatthes
this.ReportFooter.StylePriority.UseBorderWidth = false;
this.ReportFooter.StylePriority.UseFont = false;
//
// xrPictureBox2
//
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Image", null, "CustomerSignature")});
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(140.8333F, 76.68756F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrLabel18
//
this.xrLabel18.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel18.Font = new System.Drawing.Font("Arial", 9F);
this.xrLabel18.LocationFloat = new DevExpress.Utils.PointFloat(3.499985F, 76.68756F);
this.xrLabel18.Name = "xrLabel18";
this.xrLabel18.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel18.SizeF = new System.Drawing.SizeF(137.3333F, 35.50002F);
this.xrLabel18.StylePriority.UseFont = false;
this.xrLabel18.StylePriority.UseTextAlignment = false;
this.xrLabel18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
//
// xrLabel10
//
this.xrLabel10.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel10.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(355.1046F, 112.1876F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(122.9167F, 25F);
this.xrLabel10.StylePriority.UseBorders = false;
this.xrLabel10.StylePriority.UseFont = false;
//
// xrLabel7
//
this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.None;
@@ -689,21 +780,6 @@ namespace PetraWagnerMatthes
this.xrLabel6.Text = "Datum, Unterschrift Klient";
this.xrLabel6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// xrLabel10
//
this.xrLabel10.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel10.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(355.1046F, 112.1876F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(122.9167F, 25F);
this.xrLabel10.StylePriority.UseBorders = false;
this.xrLabel10.StylePriority.UseFont = false;
//
// LeistungsnachweisSoziotherapie
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -794,7 +870,12 @@ namespace PetraWagnerMatthes
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel xrLabel9;
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRPictureBox picSignature;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
private DevExpress.XtraReports.UI.XRLabel xrLabel18;
private DevExpress.XtraReports.UI.XRLabel xrLabel9;
}
}

View File

@@ -63,7 +63,7 @@ namespace PetraWagnerMatthes
this.lblAnrede = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel();
this.xrRichText2 = new DevExpress.XtraReports.UI.XRRichText();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
@@ -195,7 +195,7 @@ namespace PetraWagnerMatthes
this.lblAnrede,
this.xrLabel13,
this.xrRichText2,
this.xrLabel7});
this.lblAdresse});
this.Page1.Font = new System.Drawing.Font("Arial", 10F);
this.Page1.HeightF = 568.0722F;
this.Page1.Name = "Page1";
@@ -554,17 +554,15 @@ namespace PetraWagnerMatthes
this.xrRichText2.SerializableRtfString = resources.GetString("xrRichText2.SerializableRtfString");
this.xrRichText2.SizeF = new System.Drawing.SizeF(328.7499F, 21.95832F);
//
// xrLabel7
// lblAdresse
//
this.xrLabel7.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 21.95832F);
this.xrLabel7.Multiline = true;
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(317F, 111.5F);
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.Text = "[RecipientOrganisation]\r\n[RecipientDivision]\r\n[RecipientContactPerson]\r\n[Recipien" +
"tStreet]\r\n[RecipientPostCodeAndTown]";
this.lblAdresse.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 21.95832F);
this.lblAdresse.Multiline = true;
this.lblAdresse.Name = "lblAdresse";
this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAdresse.SizeF = new System.Drawing.SizeF(317F, 111.5F);
this.lblAdresse.StylePriority.UseFont = false;
//
// ReportFooter
//
@@ -1012,7 +1010,7 @@ namespace PetraWagnerMatthes
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.GroupHeaderBand Page1;
private DevExpress.XtraReports.UI.ReportFooterBand ReportFooter;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel lblAdresse;
private DevExpress.XtraReports.UI.XRRichText xrRichText2;
private DevExpress.XtraReports.UI.XRLabel xrLabel13;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport;

View File

@@ -5,6 +5,7 @@ using BS.Shared;
using BS.Shared.Core;
using DevExpress.XtraReports.UI;
using System;
using System.Text;
namespace PetraWagnerMatthes
{
@@ -18,7 +19,57 @@ namespace PetraWagnerMatthes
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
decimal hours = 0;
string poBox = null;
if (pRO.InvoiceBase.RecipientContactInformations.Count > 0)
{
foreach (var i in pRO.InvoiceBase.RecipientContactInformations)
{
if (i.ContactType == BS.Shared.ContactType.private_POBox)
poBox = i.ContactValue;
}
}
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1))
{
sb.AppendLine(pRO.RecipientAddressLine1);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(poBox))
{
sb.AppendLine(poBox);
}
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("");
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAdresse.Text = sb.ToString();
decimal hours = 0;
if (pRO.ServiceInvoicePeriods != null)
{
foreach (var sip in pRO.ServiceInvoicePeriods)

View File

@@ -99,9 +99,6 @@ namespace BeWo.SprungbrettReports
newRow.Cells[1].Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodEnd);
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{
// quick and dirty: Vergütung und Anzahl anpassen, solange LWL und LVR anders rechnen
//newRow.Cells[2].Text = String.Format("{0:0.00}", ii.AmountPerUnit * 80 / 100);
//newRow.Cells[4].Text = String.Format("{0:0.00}", ii.UnitCount / 80 * 100);
newRow.Cells[2].Text = String.Format("{0:0.00}", ii.AmountPerUnit);
newRow.Cells[4].Text = String.Format("{0:0.00}", ii.UnitCount);
sumFk += ii.UnitCount; // / 80 * 100;

View File

@@ -31,9 +31,6 @@ namespace BeWo.SprungbrettReports
Zwischensumme.Visible = true;
if (!ii.ItemDescription.IsNullOrEmpty())
{
// quick and dirty, solange LWL und LVR anders rechnen
//ii.UnitCount = ii.UnitCount / 80 * 100;
//ii.AmountPerUnit = ii.AmountPerUnit * 80 / 100;
ii.ItemDescription = String.Format("{0:dd.MM.yyyy} - {1:dd.MM.yyyy}: {2:0.00} h x {3:c}", ii.ItemPeriodStart,
ii.ItemPeriodEnd, ii.UnitCount, ii.AmountPerUnit);
}

View File

@@ -422,7 +422,7 @@ namespace Service.Invoicing
return invoiceItem;
}
private decimal GetCostRateValue(List<CostRatePeriodDC> crList, CostRatePeriodType t, DateTime date)
public decimal GetCostRateValue(List<CostRatePeriodDC> crList, CostRatePeriodType t, DateTime date)
{
var cp = crList.GetCostRatePeriodForDate(t, date);

View File

@@ -752,11 +752,15 @@ namespace BeWo.Service.Invoicing
ii.MaxApprovedUnitCount = accountingPeriod.MaxApprovedUnitCount;
ii.ApprovedPerUnit = accountingPeriod.ApprovedPerUnit;
ii.ApprovalUnit = accountingPeriod.ApprovalUnit;
ii.ProzentAbrechenbar = accountingPeriod.ProzentAbrechenbar;
if (accountingPeriod.ServiceCategory != null)
ii.ItemDescription = accountingPeriod.ServiceCategory.Name;
if (!String.IsNullOrEmpty(accountingPeriod.Notice))
{
ii.ItemDescription = accountingPeriod.Notice;
}
if (accountingPeriod.AccountingInterval == AccountingIntervalType.FlatRate)
{
ii.UnitCount = accountingPeriod.ServiceRecordsInPeriod.Count;
@@ -771,12 +775,15 @@ namespace BeWo.Service.Invoicing
{
foreach (var ar in accountingPeriod.ServiceRecordsInPeriod)
{
minutesTotal += ar.RoundedDuration;
var prozent = ar.ServiceDescription.Category.Percentage;
if (ar.ServiceDescription.ProzentAbrechnung.HasValue)
{
prozent = ar.ServiceDescription.ProzentAbrechnung.Value;
}
minutesTotal += (ar.RoundedDuration * prozent) / 100;
ii.ProzentAbrechenbar = prozent;
prozent = ar.ServiceDescription.Category.ProzentBudget ?? 100;
if (ar.ServiceDescription.ProzentBudget.HasValue)
@@ -872,7 +879,11 @@ namespace BeWo.Service.Invoicing
ii.UnitCount = Math.Round(uc, 2, MidpointRounding.AwayFromZero);
if (ii.AmountPerUnit.HasValue)
{
ii.AmountTotal = Math.Round(ii.UnitCount.Value*ii.AmountPerUnit.Value, 2,
if (!String.IsNullOrEmpty(ii.ItemDescription) && ii.ItemDescription == "Fehlkontakte")
{
ii.AmountPerUnit = ii.AmountPerUnit * ii.ProzentAbrechenbar / 100;
}
ii.AmountTotal = Math.Round(ii.UnitCount.Value*ii.AmountPerUnit.Value, 2,
MidpointRounding.AwayFromZero);
if (ii.RateFactor.HasValue && ii.RateFactor.Value != 0)
ii.GrossAmountTotal = Math.Round(ii.AmountTotal.Value*((100m + ii.RateFactor.Value)/100m), 2,
@@ -903,7 +914,11 @@ namespace BeWo.Service.Invoicing
}
if (ii.AmountPerUnit.HasValue)
{
ii.AmountTotal = ii.UnitCount.Value * ii.AmountPerUnit.Value;
if (!String.IsNullOrEmpty(ii.ItemDescription) && ii.ItemDescription == "Fehlkontakte")
{
ii.AmountPerUnit = ii.AmountPerUnit * ii.ProzentAbrechenbar / 100;
}
ii.AmountTotal = ii.UnitCount.Value * ii.AmountPerUnit.Value;
if (ii.RateFactor.HasValue && ii.RateFactor.Value != 0)
ii.GrossAmountTotal = Math.Round(ii.AmountTotal.Value * ((100m + ii.RateFactor.Value) / 100m), 2,
MidpointRounding.AwayFromZero);

View File

@@ -35,6 +35,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public decimal? RateFactor { get; set; }
[DataMember]
public decimal? ProzentAbrechenbar { get; set; }
[DataMember]
public decimal? UnitCount { get; set; }

View File

@@ -36,12 +36,16 @@ namespace BS.Shared.Services
public SupportConceptApprovalPeriodDC SupportConceptApprovalPeriod { get; set; }
public String Notice { get; set; }
public List<ServiceRecordDC> ServiceRecordsInPeriod
{
get { return serviceRecords ?? (serviceRecords = new List<ServiceRecordDC>()); }
set { serviceRecords = value; }
}
public decimal? ProzentAbrechenbar { get; set; }
public override bool Equals(object obj)
{
AccountingPeriod ap = obj as AccountingPeriod;

View File

@@ -948,13 +948,20 @@ namespace BS.Shared.Services
if (hourlyRate == null)
hourlyRate = this.GetHourlyRatePeriodForServiceRecord(record);
decimal rdMinutes = this.GetBillableDurationInMinutes(record, true);
decimal rdMinutes = this.GetBillableDurationInMinutes(record, false);
data.UnitCount = rdMinutes / 60m;
if (hourlyRate != null)
data.AmountPerUnit = hourlyRate.CostRateValue;
{
var prozent = record.ServiceDescription.Category.Percentage;
if (record.ServiceDescription.ProzentAbrechnung.HasValue)
{
prozent = record.ServiceDescription.ProzentAbrechnung.Value;
}
data.AmountPerUnit = hourlyRate.CostRateValue * prozent / 100 ;
}
data.AmountTotal = data.AmountPerUnit * data.UnitCount;
data.AccountingInterval = AccountingIntervalType.Hourly;
@@ -1720,6 +1727,7 @@ namespace BS.Shared.Services
if (sr.ServiceDescription.Name.ToLower().Contains("fehlkontakt") || (sr.ServiceDescription.ProzentAbrechnung.HasValue && sr.ServiceDescription.ProzentAbrechnung.Value < 100))
{
ap.Notice = "Fehlkontakte";
ap.RateFactor = 0;
}
return ap;