PerspektivenEV/ Nacharbeiten
This commit is contained in:
@@ -48,19 +48,18 @@ namespace PerspektivenEV.Export
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("Kontonummer;Umsatz;Gegenkonto;Belegdatum;Kost1;Belegfeld1;Buchungstext;Festschreibung");
|
||||
|
||||
//var s = GetMonatlicheRechnungenString(date);
|
||||
//if (!String.IsNullOrWhiteSpace(s))
|
||||
// sb.Append(s);
|
||||
var s = GetMonatlicheRechnungenString(date, rechnungsDatumVon, rechnungsDatumBis);
|
||||
if (!String.IsNullOrWhiteSpace(s))
|
||||
sb.Append(s);
|
||||
|
||||
var sAllg = GetMonatlicheAllgRechnungenString(date, rechnungsDatumVon, rechnungsDatumBis);
|
||||
if (!String.IsNullOrWhiteSpace(sAllg))
|
||||
{
|
||||
if (sb.Length > 0)
|
||||
sb.AppendLine();
|
||||
|
||||
//var sAllg = GetMonatlicheAllgRechnungenString(date);
|
||||
//if (!String.IsNullOrWhiteSpace(sAllg))
|
||||
//{
|
||||
// if (sb.Length > 0)
|
||||
// sb.AppendLine();
|
||||
|
||||
// sb.Append(sAllg);
|
||||
//}
|
||||
sb.Append(sAllg);
|
||||
}
|
||||
|
||||
var sLWV = GetMonatlicheSammelRechnungString(date, rechnungsDatumVon, rechnungsDatumBis);
|
||||
if (!String.IsNullOrWhiteSpace(sLWV))
|
||||
@@ -105,17 +104,17 @@ namespace PerspektivenEV.Export
|
||||
{
|
||||
String orgaName = "";
|
||||
String itemDescription = "";
|
||||
String unitDescription = "";
|
||||
String scapOid = "";
|
||||
String isApproved = "";
|
||||
|
||||
if (row[8] != null)
|
||||
orgaName = row[8].ToString();
|
||||
|
||||
if (row[9] != null )
|
||||
itemDescription = row[9].ToString();
|
||||
if (row[9] != null && row[10] != null)
|
||||
itemDescription = row[9].ToString() + " " + row[10].ToString();
|
||||
|
||||
if (row[10] != null)
|
||||
unitDescription = row[10].ToString();
|
||||
if (row[11] != null)
|
||||
scapOid = row[11].ToString();
|
||||
|
||||
if (row[12] != null)
|
||||
isApproved = row[12].ToString();
|
||||
@@ -135,7 +134,7 @@ namespace PerspektivenEV.Export
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0:ddMM}", lastDate));
|
||||
sb.Append(";");
|
||||
var kostenstelle = GetKostenstelle(itemDescription, unitDescription, orgaName);
|
||||
var kostenstelle = GetKostenstelle(itemDescription, orgaName, scapOid);
|
||||
sb.Append(kostenstelle); //Kostenstelle - Auffang/Fehlerkostenstelle 999
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0}", row[3]));
|
||||
@@ -152,6 +151,10 @@ namespace PerspektivenEV.Export
|
||||
}
|
||||
sb.Append(buchungstext);
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0}", itemDescription));
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0}", orgaName));
|
||||
sb.Append(";");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
@@ -278,7 +281,6 @@ namespace PerspektivenEV.Export
|
||||
String orgaName = "";
|
||||
String cName = "";
|
||||
String itemDescription = "";
|
||||
String unitDescription = "";
|
||||
String isApproved = "";
|
||||
long scApprovalPeriodOid = 0;
|
||||
SupportConceptApprovalPeriod approvalPeriod = null;
|
||||
@@ -350,7 +352,7 @@ namespace PerspektivenEV.Export
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0:ddMM}", lastDate));
|
||||
sb.Append(";");
|
||||
var kostenstelle = GetKostenstelle(itemDescription, unitDescription, orgaName);
|
||||
var kostenstelle = GetKostenstelle(itemDescription, orgaName, "");
|
||||
sb.Append(kostenstelle); //Kostenstelle - Auffang/Fehlerkostenstelle 999
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0}", row[3]));
|
||||
@@ -359,6 +361,10 @@ namespace PerspektivenEV.Export
|
||||
buchungstext = String.Format("{0} {1:dd}/{1:MM}", cName, lastDate);
|
||||
sb.Append(buchungstext);
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0}", itemDescription));
|
||||
sb.Append(";");
|
||||
sb.Append(String.Format("{0}", orgaName));
|
||||
sb.Append(";");
|
||||
|
||||
}
|
||||
|
||||
@@ -367,14 +373,13 @@ namespace PerspektivenEV.Export
|
||||
|
||||
private static String GetErloeskonto(String itemDesc, String orgaName, String isApproved, bool isSammel)
|
||||
{
|
||||
if (itemDesc.Contains("Handgeld"))
|
||||
return "496101";
|
||||
|
||||
else if (orgaName == "SELBSTZAHLER")
|
||||
if (orgaName == "SELBSTZAHLER")
|
||||
{
|
||||
if (itemDesc.Contains("FLS BW"))
|
||||
if (itemDesc.Contains("Anfahrt") || itemDesc.Contains("Fahr"))
|
||||
return "496100";
|
||||
else if (itemDesc.Contains("BW"))
|
||||
return "495805";
|
||||
else if (itemDesc.Contains("Tagesstätte"))
|
||||
else if (itemDesc.Contains("Tagesstätte") || itemDesc.Contains("TS"))
|
||||
return "467601";
|
||||
else
|
||||
return "999999";
|
||||
@@ -382,24 +387,31 @@ namespace PerspektivenEV.Export
|
||||
|
||||
else if (isSammel)
|
||||
{
|
||||
if (isApproved == "false")
|
||||
if (orgaName.Contains("LWV") || orgaName.Contains("Landeswohlfahrtsverband Hessen"))
|
||||
{
|
||||
//ToDo
|
||||
if (itemDesc.Contains("FLS BW") || itemDesc.Contains("Betreutes Wohnen"))
|
||||
return "495804";
|
||||
else if (itemDesc.ToLower().Contains("fls pfk"))
|
||||
return "496202";
|
||||
if (itemDesc.Contains("Anfahrt") || itemDesc.Contains("Fahr"))
|
||||
return "496100";
|
||||
else if (itemDesc.Contains("ieH HTK"))
|
||||
return "495800";
|
||||
else if (itemDesc.Contains("ieH FFM"))
|
||||
return "495801";
|
||||
else if (itemDesc.Contains("ieH KB"))
|
||||
return "495802";
|
||||
else if (itemDesc.Contains("TS"))
|
||||
return "467600";
|
||||
else
|
||||
return "999999";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (itemDesc.Contains("ieH FFM"))
|
||||
return "495801";
|
||||
else if (itemDesc.Contains("ieH HTK"))
|
||||
return "495800";
|
||||
else if (itemDesc.Contains("ieH KB"))
|
||||
return "495802";
|
||||
if (itemDesc.Contains("Anfahrt") || itemDesc.Contains("Fahr"))
|
||||
return "496100";
|
||||
else if (itemDesc.Contains("ieH FFM") || itemDesc.Contains("BW FFM"))
|
||||
return "495806";
|
||||
else if (itemDesc.Contains("ieH HTK") || itemDesc.Contains("BW HTK"))
|
||||
return "495803";
|
||||
else if (itemDesc.Contains("ieH KB") || itemDesc.Contains("BW KB"))
|
||||
return "495803";
|
||||
else if (itemDesc.Contains("TS"))
|
||||
return "467600";
|
||||
else
|
||||
@@ -412,29 +424,38 @@ namespace PerspektivenEV.Export
|
||||
}
|
||||
}
|
||||
|
||||
private static String GetKostenstelle(String itemDesc, String unitDesc, String orgaName)
|
||||
private static String GetKostenstelle(String itemDesc, String orgaName, string scapOid)
|
||||
{
|
||||
if (itemDesc.Contains("Fahrtzeitenpauschale") && scapOid != "")
|
||||
{
|
||||
long oid = long.Parse(scapOid);
|
||||
var scapEnt = DAOFactory.GenericDAO.LoadByID<SupportConceptApprovalPeriod>(oid);
|
||||
if (scapEnt.ServiceCategory.Abbreviation.Contains(""))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
if (itemDesc == "Beratung")
|
||||
return "350";
|
||||
else if (itemDesc.Contains("ieH FFM"))
|
||||
return "158";
|
||||
else if (itemDesc.Contains("ieH HTK"))
|
||||
return "150";
|
||||
else if (itemDesc.Contains("ieH KB") )
|
||||
else if (itemDesc.Contains("ieH KB"))
|
||||
return "150";
|
||||
else if (unitDesc.ToLower().Contains("pfk"))
|
||||
return "300";
|
||||
else if (itemDesc.Contains("TS HTK Kö"))
|
||||
return "202";
|
||||
else if (itemDesc.Contains("ieH FFM"))
|
||||
return "158";
|
||||
else if (itemDesc.Contains("TS HTK OU"))
|
||||
return "200";
|
||||
else if (itemDesc.Contains("TS HTK Stb"))
|
||||
return "201";
|
||||
else if (itemDesc.Contains("TS HTK OU"))
|
||||
return "200";
|
||||
else if (unitDesc.Contains("Traumberatung As"))
|
||||
else if (itemDesc.Contains("TS HTK Kö"))
|
||||
return "202";
|
||||
else if (itemDesc.ToLower().Contains("pfk"))
|
||||
return "300";
|
||||
else if (itemDesc.Contains("Traumberatung As"))
|
||||
return "360";
|
||||
else if (unitDesc.Contains("Traumberatung PnT"))
|
||||
else if (itemDesc.Contains("Traumberatung PnT"))
|
||||
return "361";
|
||||
if (unitDesc.Contains("Handgeld")) // implementieren 150,158,200,201
|
||||
if (itemDesc.Contains("Handgeld")) // implementieren 150,158,200,201
|
||||
return "150";
|
||||
else
|
||||
return "999";
|
||||
@@ -460,17 +481,17 @@ namespace PerspektivenEV.Export
|
||||
ii.AmountPerUnit,
|
||||
ii.UnitCount,
|
||||
ii.AmountTotal
|
||||
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 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
|
||||
inner join invoiceitem ii on ii.serviceinvoiceperiodoid = sip.oid
|
||||
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 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
|
||||
inner join invoiceitem ii on ii.serviceinvoiceperiodoid = sip.oid
|
||||
WHERE ib.`AccountingPeriodEnd` >= ':MonatAbrechnung_Start' AND ib.`AccountingPeriodEnd` < ':MonatAbrechnung_End' and ib.IsActive = 1
|
||||
AND ib.`InvoiceDate` >= ':Monat_Start' AND ib.`InvoiceDate` < ':Monat_End' AND ib.InvoiceId <> 'SammelrechnungBthg'
|
||||
AND ib.`InvoiceDate` >= ':Monat_Start' AND ib.`InvoiceDate` < ':Monat_End'
|
||||
ORDER BY invoiceoid, ii.ItemDescription
|
||||
";
|
||||
|
||||
@@ -501,7 +522,7 @@ namespace PerspektivenEV.Export
|
||||
invoicebase ib
|
||||
inner join invoiceitem ii on ii.InvoiceBaseOid = ib.Oid
|
||||
WHERE ib.`AccountingPeriodEnd` >= ':MonatAbrechnung_Start' AND ib.`AccountingPeriodEnd` < ':MonatAbrechnung_End' and ib.IsActive = 1
|
||||
AND ib.`InvoiceDate` >= ':Monat_Start' AND ib.`InvoiceDate` < ':Monat_End'
|
||||
AND ib.`InvoiceDate` >= ':Monat_Start' AND ib.`InvoiceDate` < ':Monat_End'
|
||||
ORDER BY invoiceoid, ii.ItemDescription
|
||||
";
|
||||
|
||||
|
||||
@@ -13,22 +13,35 @@ namespace PerspektivenEV.Invoicing
|
||||
{
|
||||
foreach (var list in supportConcepts2ServiceRecords.Values)
|
||||
{
|
||||
foreach (var sr in list)
|
||||
if (list != null && list.Count > 0)
|
||||
{
|
||||
if (sr.CostBearer != null)
|
||||
foreach (var sr in list)
|
||||
{
|
||||
if (sr.CostBearer.Name.Contains("SELBSTZAHLER") || sr.CostBearer.Name.Contains("EIGENANTEIL") || (!sr.CostBearer.Function.IsNullOrEmpty() && sr.CostBearer.Function.ToLower().Contains("pfk")))
|
||||
if (sr.CostBearer != null)
|
||||
{
|
||||
if (sr.CostBearer.Name.Contains("SELBSTZAHLER") || sr.CostBearer.Name.Contains("EIGENANTEIL") || (!sr.CostBearer.Function.IsNullOrEmpty() && sr.CostBearer.Function.ToLower().Contains("pfk")))
|
||||
{
|
||||
return new CustomInvoiceCreation();
|
||||
}
|
||||
else if (sr.CostBearer.OrganisationOid == 198 || (!sr.CostBearer.Function.IsNullOrEmpty() && sr.CostBearer.Function.ToLower().Contains("bthg")))
|
||||
{
|
||||
return new CollectiveInvoiceCreationBthg();
|
||||
}
|
||||
else if (sr.CostBearer.Name.Contains("LWV Hessen") || sr.CostBearer.Name.Contains("Landeswohlfahrtsverband Hessen"))
|
||||
{
|
||||
return new CollectiveInvoiceCreation();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in supportConcepts2ServiceRecords.Keys)
|
||||
{
|
||||
if (item.CostBearerList[0].OrganisationName.Contains("SELBSTZAHLER") || item.CostBearerList[0].OrganisationName.Contains("EIGENANTEIL") || item.CostBearerList[0].Organisation.Function.ToLower().Contains("pfk"))
|
||||
{
|
||||
return new CustomInvoiceCreation();
|
||||
}
|
||||
else if (sr.CostBearer.OrganisationOid == 198 || (!sr.CostBearer.Function.IsNullOrEmpty() && sr.CostBearer.Function.ToLower().Contains("bthg")))
|
||||
{
|
||||
return new CollectiveInvoiceCreationBthg();
|
||||
}
|
||||
else if (sr.CostBearer.Name.Contains("LWV Hessen") || sr.CostBearer.Name.Contains("Landeswohlfahrtsverband Hessen"))
|
||||
{
|
||||
return new CollectiveInvoiceCreation();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace PerspektivenEV
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QuittierungsbelegPfk));
|
||||
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
|
||||
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
|
||||
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
|
||||
@@ -63,6 +63,7 @@ namespace PerspektivenEV
|
||||
this.xrTableRow12 = new DevExpress.XtraReports.UI.XRTableRow();
|
||||
this.xrTableCell38 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell39 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
this.formattingRuleServiceDesc = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.formattingRuleCostBearer = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.formattingRuleEmployeeName = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
@@ -76,7 +77,6 @@ namespace PerspektivenEV
|
||||
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.HoursQualified = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
@@ -430,6 +430,14 @@ namespace PerspektivenEV
|
||||
this.xrTableCell39.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell39.Weight = 2.1706346784319193D;
|
||||
//
|
||||
// xrPictureBox3
|
||||
//
|
||||
this.xrPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox3.Image")));
|
||||
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.xrPictureBox3.Name = "xrPictureBox3";
|
||||
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(231.4583F, 58.33333F);
|
||||
this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// formattingRuleServiceDesc
|
||||
//
|
||||
this.formattingRuleServiceDesc.Condition = "[StartDate2] < [StartDate]";
|
||||
@@ -551,14 +559,6 @@ namespace PerspektivenEV
|
||||
this.HoursQualified.Expression = "[Minutes]/60";
|
||||
this.HoursQualified.Name = "HoursQualified";
|
||||
//
|
||||
// xrPictureBox3
|
||||
//
|
||||
this.xrPictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox3.Image")));
|
||||
this.xrPictureBox3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.xrPictureBox3.Name = "xrPictureBox3";
|
||||
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(231.4583F, 58.33333F);
|
||||
this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// QuittierungsbelegPfk
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -580,9 +580,9 @@ namespace PerspektivenEV
|
||||
this.formattingRuleEmployeeName});
|
||||
this.Landscape = true;
|
||||
this.Margins = new System.Drawing.Printing.Margins(70, 69, 20, 30);
|
||||
this.PageHeight = 1169;
|
||||
this.PageWidth = 827;
|
||||
this.PaperKind = System.Drawing.Printing.PaperKind.A4Rotated;
|
||||
this.PageHeight = 827;
|
||||
this.PageWidth = 1169;
|
||||
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
|
||||
this.Version = "17.1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace PerspektivenEV
|
||||
{
|
||||
foreach (var i in p.ServiceInvoiceItems)
|
||||
{
|
||||
if (i.ServiceDescription != null)
|
||||
if (i.ServiceDescription != null && !i.ServiceDescription.StartsWith("Rechnungsdifferenz"))
|
||||
{
|
||||
if (bthg) // Stand ab Juli 2023 ohne PFK
|
||||
{
|
||||
@@ -220,16 +220,27 @@ namespace PerspektivenEV
|
||||
string bic = null;
|
||||
|
||||
Customer c = null;
|
||||
if (pRO.ServiceInvoicePeriods.Count > 0)
|
||||
if (pRO.ServiceInvoicePeriods.Count > 0 && pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept != null)
|
||||
{
|
||||
var c2s = pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept;
|
||||
c = c2s.SupportConcept.Customer;
|
||||
if (c2s.SupportConcept.Customer != null)
|
||||
{
|
||||
c = c2s.SupportConcept.Customer;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pRO.InvoiceBase.SupportConceptOid != null)
|
||||
{
|
||||
var sc = DAOFactory.GenericDAO.LoadByID<SupportConcept>(pRO.InvoiceBase.SupportConceptOid.Value);
|
||||
c = DAOFactory.GenericDAO.LoadByID<Customer>(sc.Customer.Oid.Value);
|
||||
}
|
||||
}
|
||||
if (c == null && customerOid != null)
|
||||
{
|
||||
c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid.Value);
|
||||
c = DAOFactory.GenericDAO.LoadByID<Customer>(customerOid.Value);
|
||||
}
|
||||
if (c != null)
|
||||
if (c != null && c.VarFieldValueList.Count != 0)
|
||||
{
|
||||
foreach (var vv in c.VarFieldValueList)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user