1063 lines
45 KiB
C#
1063 lines
45 KiB
C#
using System;
|
||
using BeWo.Report.ReportObjects;
|
||
using BeWo.Report;
|
||
using DevExpress.XtraReports.UI;
|
||
using System.Data;
|
||
using BeWo.Data.Access;
|
||
using System.Collections.Generic;
|
||
using System.Drawing;
|
||
using System.Drawing.Imaging;
|
||
using System.Linq;
|
||
using System.Xml.Schema;
|
||
using BeWo.Data.Entities;
|
||
using BeWo.Service.DCEntityMapper;
|
||
using BeWo.Service.Plugins;
|
||
using BeWo.Service.ServiceImplementations;
|
||
using BS.Shared;
|
||
using BS.Shared.Core;
|
||
using BS.Shared.Extensions;
|
||
using BS.Shared.Services;
|
||
using DevExpress.Xpo.DB;
|
||
using HphBersenbrueckFreizeitUndReisen.Abrechnung;
|
||
|
||
namespace HphBersenbrueckFreizeitUndReisen
|
||
{
|
||
[IDSpecificClass(Identifier = "AuswertungSelbstzahler")]
|
||
public partial class AuswertungSelbstzahler : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<QueryRO>
|
||
{
|
||
protected Dictionary<long, VarFieldDef> Oid2VarfieldDef { get; set; }
|
||
public AuswertungSelbstzahler()
|
||
{
|
||
InitializeComponent();
|
||
|
||
}
|
||
|
||
public void SetReportDataSource(QueryRO queryRo)
|
||
{
|
||
Oid2VarfieldDef = new Dictionary<long, VarFieldDef>();
|
||
var varFieldDefs = DAOFactory.GenericDAO.GetAllActive<VarFieldDef>();
|
||
|
||
foreach (var varFieldDef in varFieldDefs)
|
||
{
|
||
Oid2VarfieldDef.Add(varFieldDef.Oid.Value, varFieldDef);
|
||
}
|
||
var ro = CreateRo(queryRo);
|
||
|
||
|
||
//this.bindingSource1.DataSource = ro;
|
||
}
|
||
|
||
|
||
|
||
private AuswertungSelbstzahlerRO CreateRo(QueryRO queryRo)
|
||
{
|
||
AuswertungSelbstzahlerRO result = new AuswertungSelbstzahlerRO();
|
||
result.DetailList = new List<AuswertungSelbstzahlerDetailRO>();
|
||
|
||
long? serviceCategoryOid = null;
|
||
long? customerOid = null;
|
||
|
||
DateTime reportStart = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(-1);
|
||
DateTime reportEnde = reportStart.AddMonths(1).AddDays(-1);
|
||
|
||
|
||
if (queryRo.Rows.Count > 0)
|
||
{
|
||
if (queryRo.Rows[0].Field1 != null)
|
||
{
|
||
DateTime dtTemp = DateTime.Now;
|
||
|
||
if (DateTime.TryParse(queryRo.Rows[0].Field1.ToString(), out dtTemp) && dtTemp > new DateTime(1900, 1, 1))
|
||
{
|
||
reportStart = dtTemp;
|
||
}
|
||
}
|
||
if (queryRo.Rows[0].Field2 != null)
|
||
{
|
||
DateTime dtTemp = DateTime.Now;
|
||
if (DateTime.TryParse(queryRo.Rows[0].Field2.ToString(), out dtTemp) && dtTemp < new DateTime(9000, 1, 1))
|
||
{
|
||
reportEnde = dtTemp.AddDays(-1);
|
||
}
|
||
|
||
}
|
||
if (queryRo.Rows[0].Field3 != null)
|
||
{
|
||
long longTemp = 0;
|
||
if (Int64.TryParse(queryRo.Rows[0].Field3.ToString(), out longTemp) && longTemp > 0)
|
||
{
|
||
serviceCategoryOid = longTemp;
|
||
}
|
||
|
||
}
|
||
if (queryRo.Rows[0].Field4 != null)
|
||
{
|
||
long longTemp = 0;
|
||
if (Int64.TryParse(queryRo.Rows[0].Field4.ToString(), out longTemp) && longTemp > 0)
|
||
{
|
||
customerOid = longTemp;
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
Dictionary<String, bool> duplicateDict = new Dictionary<String, bool>();
|
||
|
||
var scList = DAOFactory.GenericDAO.GetAllActiveAndArchived<SupportConcept>();
|
||
//var scList = new List<SupportConcept>();
|
||
//scList = scList.Where(s => s.Customer.Person.LastName.Contains("Aaa")).ToList();
|
||
foreach (var sc in scList)
|
||
{
|
||
if (!customerOid.HasValue || customerOid == sc.Customer.Oid)
|
||
{
|
||
foreach (var c2s in sc.CostBearer2SupportConceptList)
|
||
{
|
||
foreach (var scap in c2s.ApprovalPeriodList)
|
||
{
|
||
if (scap.ServiceCategory != null &&
|
||
(!serviceCategoryOid.HasValue || serviceCategoryOid == scap.ServiceCategory.Oid))
|
||
{
|
||
if (serviceCategoryOid.HasValue || (!serviceCategoryOid.HasValue &&
|
||
!scap.ServiceCategory.Name.Contains("Eingliederungshilfe")))
|
||
{
|
||
String key = String.Format("{0}_{1}", c2s.Oid, scap.ServiceCategory.Oid);
|
||
|
||
if (!duplicateDict.ContainsKey(key))
|
||
{
|
||
var row = CreateRow(sc, c2s, scap, reportStart, reportEnde);
|
||
result.DetailList.Add(row);
|
||
|
||
duplicateDict.Add(key, true);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
result.DetailList = result.DetailList.OrderBy(d => d.KlientName).ToList();
|
||
|
||
var dict = CreateHeader(result, reportStart, reportEnde);
|
||
CreateDataRows(result, dict);
|
||
CreateSummenRows(result, dict, reportStart, reportEnde);
|
||
|
||
return result;
|
||
}
|
||
|
||
private void CreateSummenRows(AuswertungSelbstzahlerRO result, Dictionary<string, int> dict, DateTime reportStart, DateTime reportEnd)
|
||
{
|
||
for (int i = 4; i < xrTableRowDetail.Cells.Count; i++)
|
||
{
|
||
AddNewDataCell(xrTableRowGesamt, "", Color.Transparent);
|
||
}
|
||
|
||
xrTableGesamt.Width = xrTableRowGesamt.Cells.Count * 100;
|
||
|
||
for (int i = xrTableRowGesamt.Cells.Count - 1; i > 4; i--)
|
||
{
|
||
xrTableRowGesamt.Cells[i].Weight = (i * 100);
|
||
}
|
||
for (int i = 0; i < xrTableRowGesamt.Cells.Count; i++)
|
||
{
|
||
xrTableRowGesamt.Cells[i].Weight = 100;
|
||
}
|
||
xrTableRowGesamt.Cells[0].Width = 60;
|
||
|
||
//decimal gesamtStd = 0;
|
||
//decimal gesamtKontingent = 0;
|
||
//decimal gesamtVerbraucht = 0;
|
||
|
||
////foreach (var dro in result.DetailList)
|
||
////{
|
||
//// gesamtStd += dro.GesamtStunden;
|
||
//// gesamtKontingent += dro.Kontingent;
|
||
//// gesamtVerbraucht += dro.Bereitsverbraucht;
|
||
////}
|
||
|
||
//decimal nochOffen = gesamtKontingent - gesamtVerbraucht;
|
||
|
||
//if (xrTableRowGesamt.Cells.Count > 4)
|
||
//{
|
||
// xrTableRowGesamt.Cells[xrTableRowDetail.Cells.Count - 1].Text = String.Format("{0:0.00}", nochOffen);
|
||
// xrTableRowGesamt.Cells[xrTableRowDetail.Cells.Count - 2].Text =
|
||
// String.Format("{0:0.00}", gesamtVerbraucht);
|
||
// xrTableRowGesamt.Cells[xrTableRowDetail.Cells.Count - 3].Text =
|
||
// String.Format("{0:0.00}", gesamtKontingent);
|
||
// xrTableRowGesamt.Cells[xrTableRowDetail.Cells.Count - 4].Text = String.Format("{0:0.00}", gesamtStd);
|
||
//}
|
||
|
||
|
||
DateTime datum = reportStart;
|
||
int anzahlMonate = 0;
|
||
while (datum <= reportEnd)
|
||
{
|
||
anzahlMonate++;
|
||
datum = datum.AddMonths(1);
|
||
}
|
||
datum = reportStart;
|
||
int index = 0;
|
||
|
||
decimal stundenGesamtEb = 0;
|
||
decimal preisGesamtEb = 0;
|
||
decimal preisGesamtFrei = 0;
|
||
decimal preisGesamtFundA = 0;
|
||
decimal preisGesamtEbFreiFundA = 0;
|
||
decimal anzUebernachtungenGesamt = 0;
|
||
decimal preisGesamtKurzpflege = 0;
|
||
decimal anzTageReisenGesamt = 0;
|
||
decimal preisGesamtReise = 0;
|
||
|
||
while (datum <= reportEnd)
|
||
{
|
||
String key = String.Format("{0:yyyyMM}", datum);
|
||
|
||
|
||
if (index < xrTableRowGesamt.Cells.Count)
|
||
{
|
||
decimal gesamtEbnMonat = 0;
|
||
decimal gesamtEbhMonat = 0;
|
||
decimal gesamtFreiMonat = 0;
|
||
decimal gesamtFundAMonat = 0;
|
||
|
||
foreach (var dro in result.DetailList)
|
||
{
|
||
if (dro.EinzelbetreuungNormalMonat2Wert.ContainsKey(key))
|
||
{
|
||
gesamtEbnMonat += dro.EinzelbetreuungNormalMonat2Wert[key];
|
||
stundenGesamtEb += dro.EinzelbetreuungNormalMonat2Wert[key];
|
||
}
|
||
if (dro.EinzelbetreuungHauptamtlich2Monat2Wert.ContainsKey(key))
|
||
{
|
||
gesamtEbhMonat += dro.EinzelbetreuungHauptamtlich2Monat2Wert[key];
|
||
stundenGesamtEb += dro.EinzelbetreuungHauptamtlich2Monat2Wert[key];
|
||
}
|
||
if (dro.FreizeitAngeboteMonat2Wert.ContainsKey(key))
|
||
{
|
||
gesamtFreiMonat += dro.FreizeitAngeboteMonat2Wert[key];
|
||
}
|
||
if (dro.FreizeittreffAusflugMonat2Wert.ContainsKey(key))
|
||
{
|
||
gesamtFundAMonat += dro.FreizeittreffAusflugMonat2Wert[key];
|
||
}
|
||
|
||
if (index == 0)
|
||
{
|
||
preisGesamtEb += dro.EinzelbetreuungPreisGesamt ?? 0;
|
||
preisGesamtFrei += dro.GesamtPreisFreizeitangebot ?? 0;
|
||
preisGesamtFundA += dro.GesamtPreisFreizeittreff ?? 0;
|
||
preisGesamtEbFreiFundA += (dro.EinzelbetreuungPreisGesamt ?? 0) + (dro.GesamtPreisFreizeittreff ?? 0) + (dro.GesamtPreisFreizeitangebot ?? 0);
|
||
anzUebernachtungenGesamt += dro.KurzzeitpflegeAnzahlUebernachtungen ?? 0;
|
||
preisGesamtKurzpflege += dro.KurzzeitpflegeGesamtPreis ?? 0;
|
||
anzTageReisenGesamt += dro.ReisenAnzahlTage ?? 0;
|
||
preisGesamtReise += dro.ReisenGesamtPreis ?? 0;
|
||
}
|
||
}
|
||
|
||
xrTableRowGesamt.Cells[(index * 2) + 7].Text = String.Format("{0:0.00}", gesamtEbnMonat);
|
||
xrTableRowGesamt.Cells[(index * 2) + 8].Text = String.Format("{0:0.00}", gesamtEbhMonat);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 2) + index + 9].Text = String.Format("{0:0.00}", gesamtFreiMonat);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 3) + index + 11].Text = String.Format("{0:0.00}", gesamtFundAMonat);
|
||
}
|
||
index++;
|
||
datum = datum.AddMonths(1);
|
||
}
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 2) + 7].Text = String.Format("{0:0.00}", stundenGesamtEb);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 2) + 8].Text = String.Format("{0:c}", preisGesamtEb);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 3) + 10].Text = String.Format("{0:c}", preisGesamtFrei);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 4) + 12].Text = String.Format("{0:c}", preisGesamtFundA);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 4) + 13].Text = String.Format("{0:c}", preisGesamtEbFreiFundA);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 4) + 14].Text = String.Format("{0:0.##}", anzUebernachtungenGesamt);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 4) + 15].Text = String.Format("{0:c}", preisGesamtKurzpflege);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 4) + 16].Text = String.Format("{0:0.##}", anzTageReisenGesamt);
|
||
xrTableRowGesamt.Cells[(anzahlMonate * 4) + 19].Text = String.Format("{0:c}", preisGesamtReise);
|
||
}
|
||
|
||
private void CreateDataRows(AuswertungSelbstzahlerRO result, Dictionary<string, int> dict)
|
||
{
|
||
xrTableDetail.BeginInit();
|
||
xrTableDetail.Width = xrTableHeader.Width;
|
||
|
||
if (result.DetailList.Count == 0)
|
||
{
|
||
xrTableRowDetail.Visible = false;
|
||
}
|
||
else
|
||
{
|
||
int idx = 1;
|
||
foreach (var detail in result.DetailList)
|
||
{
|
||
XRTableRow row = null;
|
||
if (idx == 1)
|
||
{
|
||
row = xrTableRowDetail;
|
||
}
|
||
else
|
||
{
|
||
row = xrTableDetail.InsertRowBelow(xrTableDetail.Rows[xrTableDetail.Rows.Count - 1]);
|
||
}
|
||
idx++;
|
||
|
||
row.Cells.Clear();
|
||
|
||
CreateDataRowCells(detail, row, dict);
|
||
}
|
||
}
|
||
xrTableDetail.EndInit();
|
||
}
|
||
|
||
private void CreateDataRowCells(AuswertungSelbstzahlerDetailRO detail, XRTableRow row, Dictionary<string, int> dict)
|
||
{
|
||
AddNewDataCell(row, detail.Nummer, Color.Transparent);
|
||
AddNewDataCell(row, detail.KlientName, Color.Transparent);
|
||
AddNewDataCell(row, detail.Pflegegrad, Color.Transparent);
|
||
AddNewDataCell(row, detail.Pflegekasse, Color.Transparent);
|
||
AddNewDataCell(row, detail.Abtretungserklaerung, Color.Transparent);
|
||
AddNewDataCell(row, detail.Leistungskategorie, Color.Transparent);
|
||
AddNewDataCell(row, detail.Bemerkung, Color.Transparent);
|
||
|
||
foreach (var dictKey in dict.Keys)
|
||
{
|
||
var headerCell = xrTableRowHeader.Cells[dict[dictKey]];
|
||
|
||
String wert = GetWertForCell(detail, dictKey);
|
||
AddNewDataCell(row, wert, headerCell.BackColor);
|
||
}
|
||
for (int i = 0; i < row.Cells.Count; i++)
|
||
{
|
||
row.Cells[i].Width = xrTableRowHeader.Cells[i].Width;
|
||
}
|
||
}
|
||
|
||
private String GetWertForCell(AuswertungSelbstzahlerDetailRO detail, String key)
|
||
{
|
||
if (key.Contains("_"))
|
||
{
|
||
String[] split = key.Split('_');
|
||
String datumsKey = split[1];
|
||
|
||
if (split[0] == "EBN")
|
||
{
|
||
if (detail.EinzelbetreuungNormalMonat2Wert.ContainsKey(datumsKey))
|
||
{
|
||
return String.Format("{0:0.##}", detail.EinzelbetreuungNormalMonat2Wert[datumsKey]);
|
||
}
|
||
}
|
||
if (split[0] == "EBH")
|
||
{
|
||
if (detail.EinzelbetreuungHauptamtlich2Monat2Wert.ContainsKey(datumsKey))
|
||
{
|
||
return String.Format("{0:0.##}", detail.EinzelbetreuungHauptamtlich2Monat2Wert[datumsKey]);
|
||
}
|
||
}
|
||
else if (split[0] == "FREI")
|
||
{
|
||
if (detail.FreizeitAngeboteMonat2Wert.ContainsKey(datumsKey))
|
||
{
|
||
return String.Format("{0:0.##}", detail.FreizeitAngeboteMonat2Wert[datumsKey]);
|
||
}
|
||
}
|
||
else if (split[0] == "FA")
|
||
{
|
||
if (detail.FreizeittreffAusflugMonat2Wert.ContainsKey(datumsKey))
|
||
{
|
||
return String.Format("{0:0.##}", detail.FreizeittreffAusflugMonat2Wert[datumsKey]);
|
||
}
|
||
}
|
||
}
|
||
if (key == "EBSTDGESAMT")
|
||
{
|
||
decimal? gesamt = null;
|
||
|
||
foreach (var m2w in detail.EinzelbetreuungNormalMonat2Wert)
|
||
{
|
||
if (!gesamt.HasValue)
|
||
{
|
||
gesamt = 0;
|
||
}
|
||
gesamt += m2w.Value;
|
||
}
|
||
foreach (var m2w in detail.EinzelbetreuungHauptamtlich2Monat2Wert)
|
||
{
|
||
if (!gesamt.HasValue)
|
||
{
|
||
gesamt = 0;
|
||
}
|
||
gesamt += m2w.Value;
|
||
}
|
||
return String.Format("{0:0.##}", gesamt);
|
||
}
|
||
if (key == "EBPREISGESAMT")
|
||
{
|
||
return String.Format("{0:c}", detail.EinzelbetreuungPreisGesamt);
|
||
}
|
||
if (key == "FREITAGESSATZ")
|
||
{
|
||
return String.Format("{0:c}", detail.TagessatzFreizeitangebot);
|
||
}
|
||
if (key == "FREIPREISGESAMT")
|
||
{
|
||
return String.Format("{0:c}", detail.GesamtPreisFreizeitangebot);
|
||
}
|
||
|
||
if (key == "FUNDATAGESSATZ")
|
||
{
|
||
return String.Format("{0:c}", detail.TagessatzFreizeittreff);
|
||
}
|
||
if (key == "FUNDAPREISGESAMT")
|
||
{
|
||
return String.Format("{0:c}", detail.GesamtPreisFreizeittreff);
|
||
}
|
||
|
||
|
||
if (key == "ABFREIFUNDAPREISGESAMT")
|
||
{
|
||
decimal? gesamt = null;
|
||
|
||
if (detail.EinzelbetreuungPreisGesamt.HasValue)
|
||
{
|
||
gesamt = detail.EinzelbetreuungPreisGesamt;
|
||
}
|
||
if (detail.GesamtPreisFreizeitangebot.HasValue)
|
||
{
|
||
if (!gesamt.HasValue)
|
||
{
|
||
gesamt = 0;
|
||
}
|
||
gesamt += detail.GesamtPreisFreizeitangebot;
|
||
}
|
||
if (detail.GesamtPreisFreizeittreff.HasValue)
|
||
{
|
||
if (!gesamt.HasValue)
|
||
{
|
||
gesamt = 0;
|
||
}
|
||
gesamt += detail.GesamtPreisFreizeittreff;
|
||
}
|
||
return String.Format("{0:c}", gesamt);
|
||
}
|
||
if (key == "KURZUEBERNACHTUNGEN")
|
||
{
|
||
return String.Format("{0:0.##}", detail.KurzzeitpflegeAnzahlUebernachtungen);
|
||
}
|
||
if (key == "KURZPREISGESAMT")
|
||
{
|
||
return String.Format("{0:c}", detail.KurzzeitpflegeGesamtPreis);
|
||
}
|
||
if (key == "REISENTAGE")
|
||
{
|
||
return String.Format("{0:0.##}", detail.ReisenAnzahlTage);
|
||
}
|
||
if (key == "REISENTAGESSATZ")
|
||
{
|
||
return String.Format("{0:0.##}", detail.ReisenTagessatzProTag);
|
||
}
|
||
if (key == "REISEPREIS")
|
||
{
|
||
return String.Format("{0:c}", detail.ReisenGesamtPreis);
|
||
}
|
||
if (key == "REISEPREISGESAMT")
|
||
{
|
||
return String.Format("{0:c}", detail.ReisenGesamtPreis);
|
||
}
|
||
if (key == "RESTANSPRUCH")
|
||
{
|
||
return String.Format("{0:c}", detail.Restanspruch);
|
||
}
|
||
if (key == "KONTINGENT")
|
||
{
|
||
return String.Format("{0:c}", detail.Kontingent);
|
||
}
|
||
if (key == "BEREITSVERBRAUCHT")
|
||
{
|
||
return String.Format("{0:c}", detail.Bereitsverbraucht);
|
||
}
|
||
if (key == "NOCHOFFEN")
|
||
{
|
||
return String.Format("{0:c}", detail.NochOffen);
|
||
}
|
||
if (key == "ANZAHLBERATUNGSEINSAETZE")
|
||
{
|
||
return String.Format("{0:0.##}", detail.AnzahlBeratunseinsaetze);
|
||
}
|
||
|
||
return null;
|
||
|
||
}
|
||
|
||
private Dictionary<String, int> CreateHeader(AuswertungSelbstzahlerRO result, DateTime reportStart, DateTime reportEnde)
|
||
{
|
||
DateTime datum = reportStart;
|
||
Dictionary<String, int> headerDict = new Dictionary<String, int>();
|
||
|
||
List<String> ebnHeaders = new List<String>();
|
||
Dictionary<String, String> ebnHeader2Key = new Dictionary<String, String>();
|
||
List<String> ebhHeaders = new List<String>();
|
||
Dictionary<String, String> ebhHeader2Key = new Dictionary<String, String>();
|
||
List<String> freizeitAngeboteHeaders = new List<String>();
|
||
Dictionary<String, String> freizeitAngeboteHeader2Key = new Dictionary<String, String>();
|
||
List<String> fUndAHeaders = new List<String>();
|
||
Dictionary<String, String> fUndAHeader2Key = new Dictionary<String, String>();
|
||
|
||
while (datum <= reportEnde)
|
||
{
|
||
String key = String.Format("{0:yyyyMM}", datum);
|
||
ebnHeaders.Add(String.Format("EB Std. {0:MMM}", datum));
|
||
ebnHeader2Key.Add(String.Format("EB Std. {0:MMM}", datum), String.Format("EBN_{0}", key));
|
||
|
||
ebhHeaders.Add(String.Format("EB haupt Std. {0:MMM}", datum));
|
||
ebhHeader2Key.Add(String.Format("EB haupt Std. {0:MMM}", datum), String.Format("EBH_{0}", key));
|
||
|
||
freizeitAngeboteHeaders.Add(String.Format("Freizeit- angebote {0:MMM}", datum));
|
||
freizeitAngeboteHeader2Key.Add(String.Format("Freizeit- angebote {0:MMM}", datum), String.Format("FREI_{0}", key));
|
||
|
||
fUndAHeaders.Add(String.Format("F und A {0:MMM}", datum));
|
||
fUndAHeader2Key.Add(String.Format("F und A {0:MMM}", datum), String.Format("FA_{0}", key));
|
||
|
||
foreach (var ro in result.DetailList)
|
||
{
|
||
//if (ro.EinzelbetreuungMonat2Wert.ContainsKey(key))
|
||
//{
|
||
// ebHeaders.Add(String.Format("EB Std. {0:MMM}", datum));
|
||
//}
|
||
//if (ro.FreizeitAngeboteMonat2Wert.ContainsKey(key))
|
||
//{
|
||
// freizeitAngeboteHeaders.Add(String.Format("Freizeit- angebote {0:MMM}", datum));
|
||
//}
|
||
//if (ro.FreizeittreffAusflugMonat2Wert.ContainsKey(key))
|
||
//{
|
||
// fUndAHeaders.Add(String.Format("F und A {0:MMM}", datum));
|
||
//}
|
||
}
|
||
|
||
datum = datum.AddMonths(1);
|
||
}
|
||
|
||
for (int i = 0; i < ebnHeaders.Count; i++)
|
||
{
|
||
AddNewHeaderCell(ebnHeaders[i], Color.YellowGreen, headerDict, ebnHeader2Key[ebnHeaders[i]]);
|
||
AddNewHeaderCell(ebhHeaders[i], Color.YellowGreen, headerDict, ebhHeader2Key[ebhHeaders[i]]);
|
||
}
|
||
//foreach (var header in ebnHeaders)
|
||
//{
|
||
// AddNewHeaderCell(header, Color.YellowGreen, headerDict, ebnHeader2Key[header]);
|
||
//}
|
||
if (ebnHeaders.Count > 0 || ebhHeaders.Count > 0)
|
||
{
|
||
AddNewHeaderCell("Std. Gesamt", Color.YellowGreen, headerDict, "EBSTDGESAMT");
|
||
AddNewHeaderCell("Preis Gesamt", Color.YellowGreen, headerDict, "EBPREISGESAMT");
|
||
}
|
||
foreach (var header in freizeitAngeboteHeaders)
|
||
{
|
||
AddNewHeaderCell(header, Color.DeepSkyBlue, headerDict, freizeitAngeboteHeader2Key[header]);
|
||
}
|
||
if (freizeitAngeboteHeaders.Count > 0)
|
||
{
|
||
AddNewHeaderCell("Tagessatz", Color.DeepSkyBlue, headerDict, "FREITAGESSATZ");
|
||
AddNewHeaderCell("Preis Freizeit Gesamt", Color.DeepSkyBlue, headerDict, "FREIPREISGESAMT");
|
||
}
|
||
foreach (var header in fUndAHeaders)
|
||
{
|
||
AddNewHeaderCell(header, Color.Pink, headerDict, fUndAHeader2Key[header]);
|
||
}
|
||
if (fUndAHeaders.Count > 0)
|
||
{
|
||
AddNewHeaderCell("Tagessatz", Color.Pink, headerDict, "FUNDATAGESSATZ");
|
||
AddNewHeaderCell("Preis F und A Gesamt", Color.Pink, headerDict, "FUNDAPREISGESAMT");
|
||
}
|
||
|
||
AddNewHeaderCell("Preis insgesamt Einzelbetreuung /Freizeitangebote/Ausfl<66>ge ", Color.Yellow, headerDict, "ABFREIFUNDAPREISGESAMT");
|
||
|
||
AddNewHeaderCell("Kurzzeitpflege Anzahl der <20>bernachtungen", Color.Firebrick, headerDict, "KURZUEBERNACHTUNGEN");
|
||
AddNewHeaderCell("Preis Gesamt Kurzzeitpflege", Color.Firebrick, headerDict, "KURZPREISGESAMT");
|
||
|
||
AddNewHeaderCell("Reisen Anzahl der Tage", Color.Orange, headerDict, "REISENTAGE");
|
||
AddNewHeaderCell("Tagessatz pro Reisetag", Color.Orange, headerDict, "REISENTAGESSATZ");
|
||
AddNewHeaderCell("Preis Reise", Color.Orange, headerDict, "REISEPREIS");
|
||
AddNewHeaderCell("Preis insgesamt", Color.Yellow, headerDict, "REISEPREISGESAMT");
|
||
|
||
AddNewHeaderCell(String.Format("Restanspruch {0:yyyy}", reportStart.AddYears(-1)), Color.LightGray, headerDict, "RESTANSPRUCH");
|
||
|
||
AddNewHeaderCell("Kontingent", Color.White, headerDict, "KONTINGENT");
|
||
AddNewHeaderCell("bereits verbraucht", Color.White, headerDict, "BEREITSVERBRAUCHT");
|
||
AddNewHeaderCell("noch offen", Color.White, headerDict, "NOCHOFFEN");
|
||
|
||
AddNewHeaderCell("Anzah Beratungseins<6E>tze pro Monat", Color.MediumPurple, headerDict, "ANZAHLBERATUNGSEINSAETZE");
|
||
|
||
|
||
xrTableHeader.Width = xrTableRowHeader.Cells.Count * 100;
|
||
if (xrTableHeader.Width > this.PageWidth - 100)
|
||
{
|
||
this.PageWidth = xrTableHeader.Width + 100;
|
||
}
|
||
for (int i = xrTableRowHeader.Cells.Count - 1; i > 4; i--)
|
||
{
|
||
xrTableRowHeader.Cells[i].Weight = (i * 100);
|
||
}
|
||
for (int i = 0; i < xrTableRowHeader.Cells.Count; i++)
|
||
{
|
||
xrTableRowHeader.Cells[i].Weight = 100;
|
||
}
|
||
xrTableRowHeader.Cells[0].Width = 60;
|
||
return headerDict;
|
||
}
|
||
|
||
private void AddNewHeaderCell(string text, Color color, Dictionary<String, int> headers, String key)
|
||
{
|
||
var cells = xrTableHeader.InsertColumnToRight(xrTableRowHeader.Cells[xrTableRowHeader.Cells.Count - 1]);
|
||
if (cells != null && cells.Length > 0)
|
||
{
|
||
cells[0].Text = text;
|
||
cells[0].BackColor = color;
|
||
|
||
headers.Add(key, xrTableRowHeader.Cells.Count - 1);
|
||
}
|
||
}
|
||
|
||
private void AddNewDataCell(XRTableRow row, string text, Color color)
|
||
{
|
||
var cell = new XRTableCell();
|
||
row.Cells.AddRange(new[] { cell });
|
||
|
||
cell.Text = text;
|
||
cell.BackColor = color;
|
||
}
|
||
|
||
private void ConfigureHeaderCell(XRTableCell[] cells, String text)
|
||
{
|
||
if (cells != null && cells.Length > 0)
|
||
{
|
||
cells[0].Text = text;
|
||
}
|
||
}
|
||
|
||
private AuswertungSelbstzahlerDetailRO CreateRow(SupportConcept sc, CostBearer2SupportConcept c2S, SupportConceptApprovalPeriod scap, DateTime reportStart, DateTime reportEnd)
|
||
{
|
||
AuswertungSelbstzahlerDetailRO ro = new AuswertungSelbstzahlerDetailRO();
|
||
ro.EinzelbetreuungNormalMonat2Wert = new Dictionary<string, decimal>();
|
||
ro.EinzelbetreuungHauptamtlich2Monat2Wert = new Dictionary<string, decimal>();
|
||
ro.FreizeitAngeboteMonat2Wert = new Dictionary<string, int>();
|
||
ro.FreizeittreffAusflugMonat2Wert = new Dictionary<string, int>();
|
||
|
||
|
||
//Nummer = Aktenzeichen bei Kostentr<74>ger
|
||
|
||
//Pflegekasse und Abtretungserkl<6B>rung = VarFields
|
||
ro.Nummer = c2S.CustomerReferenceNumber;
|
||
ro.KlientName = String.Format("{0}, {1}", sc.Customer.Person.LastName, sc.Customer.Person.FirstName);
|
||
ro.Pflegegrad = GetPflegegrad(sc.Customer);
|
||
ro.Restanspruch = scap.MonthlyPayment;
|
||
|
||
foreach (var vv in sc.Customer.VarFieldValueList)
|
||
{
|
||
var varFieldValue = Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
|
||
|
||
SetzePflegekasse(ro, vv, varFieldValue);
|
||
SetzeAbtretungserklaerung(ro, vv, varFieldValue);
|
||
}
|
||
|
||
ro.Leistungskategorie = scap.ServiceCategory.Name;
|
||
ro.Bemerkung = sc.Notice;
|
||
|
||
|
||
DateTimeSpan span = new DateTimeSpan();
|
||
span.StartDate = reportStart;
|
||
span.EndDate = reportEnd.AddDays(1).AddTicks(-1);
|
||
|
||
//var serviceRecords = DAOFactory.SearchDAO.FindCustomerServiceRecords(sc.Customer.Oid.Value, span, null, null, true);
|
||
var serviceRecords = c2S.ServiceRecords;
|
||
|
||
|
||
|
||
//Eingliederungshilfe Einzelbetreuung
|
||
//Eingliederungshilfe Einzelbetreuung (hauptl)
|
||
//F<>hrungszeugnisauszahlung F<>hrungszeugnisauszahlung
|
||
|
||
//Helferentgelt Freizeithelfer
|
||
//Helferentgelt Reisehelfer
|
||
//Helferentgelt Reiseleitung
|
||
|
||
//Interne Dokumentation Aktenvermerk
|
||
//Selbstzahler Einzelbetreuung
|
||
//Selbstzahler Einzelbetreuung(hauptamtl.)
|
||
//Selbstzahler Freizzeitangebote
|
||
//Selbstzahler Freizzeittreff + Ausfl<66>ge
|
||
//Selbstzahler Kurzurlaub
|
||
//Selbstzahler Reisen
|
||
//Stadt Salzgitter Eingliederungshilfe Freizeittreff + Ausfl<66>ge
|
||
//Umwandlung Pflegesachleistung Einzelbetreuung
|
||
//Umwandlung Pflegesachleistung Einzelbetreuung(hauptl)
|
||
//Umwandlung Pflegesachleistung Freizeittreff + Ausfl<66>ge
|
||
//Umwandlung Pflegesachleistung Freizzeitangebote
|
||
//Umwandlung Pflegesachleistung Reisen
|
||
//Wirtschaftliche Jugendhilfe Freizeittreff + Ausfl<66>ge
|
||
//<2F> 42 Kurzzeitpflege Kurzurlaub
|
||
//<2F> 45b Entlastungsbetrag Einzelbetreuung
|
||
//<2F> 45b Entlastungsbetrag Einzelbetreuung(hauptamtl.)
|
||
//<2F> 45b Entlastungsbetrag Freizeitangebote
|
||
//<2F> 45b Entlastungsbetrag Freizzeittreff + Ausfl<66>ge
|
||
//<2F> 45b Entlastungsbetrag Kurzzurlaub
|
||
//<2F> 45b Entlastungsbetrag Reisen
|
||
//<2F>39 Verhinderungspflege Einzelbetreuung
|
||
//<2F>39 Verhinderungspflege Einzelbetreuung(hauptamtl)
|
||
//<2F>39 Verhinderungspflege Freizzeitangebote
|
||
//<2F>39 Verhinderungspflege Freizzeitreff + Ausfl<66>ge
|
||
//<2F>39 Verhinderungspflege Kurzurlaub
|
||
//<2F>39 Verhinderungspflege Reisen
|
||
Dictionary<string, Dictionary<String, bool>> key2TagesDict = new Dictionary<string, Dictionary<String, bool>>();
|
||
|
||
foreach (var sr in serviceRecords)
|
||
{
|
||
String leistung = sr.ServiceDescription.ServiceCategory.Name.ToLower().Trim();
|
||
if (!key2TagesDict.ContainsKey(leistung))
|
||
{
|
||
key2TagesDict[leistung] = new Dictionary<String, bool>();
|
||
}
|
||
|
||
if (sr.ServiceDescription.Name == "Kurzurlaub")
|
||
{
|
||
DateTime start = sr.Start.Value;
|
||
DateTime end = sr.End.Value;
|
||
|
||
while (start <= end)
|
||
{
|
||
String key = String.Format("{0:dd.MM.yyyy}", start);
|
||
|
||
if (!key2TagesDict[leistung].ContainsKey(key))
|
||
{
|
||
key2TagesDict[leistung].Add(key, true);
|
||
}
|
||
start = start.AddDays(1);
|
||
}
|
||
}
|
||
}
|
||
decimal? summeKurzurlaub = null;
|
||
decimal? summeReisen = null;
|
||
decimal? preisFreizeitangebot = null;
|
||
decimal? preisFreizeittreff = null;
|
||
decimal? gesamtPreisFreizeitangebot = null;
|
||
decimal? gesamtPreisFreizeittreff = null;
|
||
decimal? tagessatzReisen = null;
|
||
decimal? tageKurzurlaub = null;
|
||
decimal verbrauchtVorBericht = 0;
|
||
|
||
int? tageReisen = null;
|
||
|
||
foreach (var sr in serviceRecords)
|
||
{
|
||
if (sr.Start.HasValue && (scap.ServiceCategory == null || scap.ServiceCategory.Name == sr.ServiceDescription.ServiceCategory.Name))
|
||
{
|
||
bool liegtImBerichtszeitraun = (reportStart <= sr.Start && sr.Start.Value.Date <= reportEnd.Date);
|
||
|
||
String key = String.Format("{0:yyyyMM}", sr.Start);
|
||
|
||
if (sr.ServiceDescription.Name.Contains("Einzelbetreuung"))
|
||
{
|
||
if (!ro.EinzelbetreuungPreisGesamt.HasValue)
|
||
{
|
||
ro.EinzelbetreuungPreisGesamt = 0;
|
||
}
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
if (!ro.EinzelbetreuungHauptamtlich2Monat2Wert.ContainsKey(key))
|
||
{
|
||
ro.EinzelbetreuungHauptamtlich2Monat2Wert.Add(key, 0);
|
||
}
|
||
if (!ro.EinzelbetreuungNormalMonat2Wert.ContainsKey(key))
|
||
{
|
||
ro.EinzelbetreuungNormalMonat2Wert.Add(key, 0);
|
||
}
|
||
}
|
||
decimal preis = 0;
|
||
if (sr.ServiceDescription.Name.Contains("hauptamt"))
|
||
{
|
||
preis = AbrechnungsInfo.GetPreisForEinzelbetreuungHauptamtlich(sr.Start.Value);
|
||
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
ro.EinzelbetreuungHauptamtlich2Monat2Wert[key] += sr.RoundedDuration / 60;
|
||
}
|
||
|
||
}
|
||
else
|
||
{
|
||
preis = AbrechnungsInfo.GetPreisForEinzelbetreuungEhrenamtlich(sr.Start.Value);
|
||
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
ro.EinzelbetreuungNormalMonat2Wert[key] += sr.RoundedDuration / 60;
|
||
}
|
||
}
|
||
preis *= (sr.RoundedDuration / 60);
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
ro.EinzelbetreuungPreisGesamt += preis;
|
||
}
|
||
else
|
||
{
|
||
verbrauchtVorBericht += preis;
|
||
}
|
||
}
|
||
else if (sr.ServiceDescription.Name.Contains("Freizeitangebote"))
|
||
{
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
if (!ro.FreizeitAngeboteMonat2Wert.ContainsKey(key))
|
||
{
|
||
ro.FreizeitAngeboteMonat2Wert.Add(key, 0);
|
||
}
|
||
ro.FreizeitAngeboteMonat2Wert[key] += 1;
|
||
}
|
||
preisFreizeitangebot = AbrechnungsInfo.GetPreisForFreizeitangebot(sc.Customer.Pflegegrad, sr.Start.Value);
|
||
if (!gesamtPreisFreizeitangebot.HasValue)
|
||
{
|
||
gesamtPreisFreizeitangebot = 0;
|
||
}
|
||
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
gesamtPreisFreizeitangebot += preisFreizeitangebot;
|
||
}
|
||
else
|
||
{
|
||
verbrauchtVorBericht += preisFreizeitangebot ?? 0;
|
||
}
|
||
|
||
}
|
||
else if (sr.ServiceDescription.Name.Contains("Freizeittreff"))
|
||
{
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
if (!ro.FreizeittreffAusflugMonat2Wert.ContainsKey(key))
|
||
{
|
||
ro.FreizeittreffAusflugMonat2Wert.Add(key, 0);
|
||
}
|
||
ro.FreizeittreffAusflugMonat2Wert[key] += 1;
|
||
}
|
||
preisFreizeittreff = AbrechnungsInfo.GetPreisForAusflugFreizeittreff(sc.Customer.Pflegegrad, sr.Start.Value);
|
||
if (!gesamtPreisFreizeittreff.HasValue)
|
||
{
|
||
gesamtPreisFreizeittreff = 0;
|
||
}
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
gesamtPreisFreizeittreff += preisFreizeittreff;
|
||
}
|
||
else
|
||
{
|
||
verbrauchtVorBericht += preisFreizeittreff ?? 0;
|
||
}
|
||
|
||
}
|
||
else if (sr.ServiceDescription.Name.Contains("Kurzurlaub") || sr.ServiceDescription.Name.Contains("Reisen"))
|
||
{
|
||
DateTime start = sr.Start.Value;
|
||
DateTime end = sr.End.Value;
|
||
|
||
while (start <= end)
|
||
{
|
||
if (sr.ServiceDescription.Name.Contains("Reisen"))
|
||
{
|
||
var preis = AbrechnungsInfo.GetPreisForReisen(sc.Customer.Pflegegrad, start);
|
||
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
if (!summeReisen.HasValue)
|
||
summeReisen = 0;
|
||
summeReisen += preis;
|
||
if (!tagessatzReisen.HasValue)
|
||
{
|
||
tagessatzReisen = preis;
|
||
}
|
||
if (!tageReisen.HasValue)
|
||
tageReisen = 0;
|
||
tageReisen++;
|
||
}
|
||
else
|
||
{
|
||
verbrauchtVorBericht += preis;
|
||
}
|
||
|
||
}
|
||
else
|
||
{
|
||
var key2Date = key2TagesDict[sr.ServiceDescription.ServiceCategory.Name.ToLower().Trim()];
|
||
|
||
var preisFuerEineNacht = AbrechnungsInfo.GetPreisForKurzurlaub(sc.Customer.Pflegegrad, null, start);
|
||
var preisFuerDiesenTag = AbrechnungsInfo.GetPreisForKurzurlaub(sc.Customer.Pflegegrad, key2Date, start);
|
||
|
||
if (liegtImBerichtszeitraun)
|
||
{
|
||
if (!summeKurzurlaub.HasValue)
|
||
summeKurzurlaub = 0;
|
||
summeKurzurlaub += preisFuerDiesenTag;
|
||
if (!tageKurzurlaub.HasValue)
|
||
tageKurzurlaub = 0;
|
||
|
||
tageKurzurlaub += preisFuerDiesenTag / preisFuerEineNacht;
|
||
}
|
||
else
|
||
{
|
||
verbrauchtVorBericht += preisFuerDiesenTag;
|
||
}
|
||
}
|
||
|
||
start = start.AddDays(1);
|
||
}
|
||
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
ro.TagessatzFreizeitangebot = preisFreizeitangebot;
|
||
ro.GesamtPreisFreizeitangebot = gesamtPreisFreizeitangebot;
|
||
ro.TagessatzFreizeittreff = preisFreizeittreff;
|
||
ro.GesamtPreisFreizeittreff = gesamtPreisFreizeittreff;
|
||
ro.KurzzeitpflegeAnzahlUebernachtungen = tageKurzurlaub;
|
||
ro.KurzzeitpflegeGesamtPreis = summeKurzurlaub;
|
||
ro.ReisenAnzahlTage = tageReisen;
|
||
ro.ReisenGesamtPreis = summeReisen;
|
||
ro.ReisenTagessatzProTag = tagessatzReisen;
|
||
|
||
ro.Kontingent = BerechneBewilligungsBetrag(scap);
|
||
ro.Bereitsverbraucht = (ro.EinzelbetreuungPreisGesamt ?? 0) + (ro.GesamtPreisFreizeitangebot ?? 0) + (ro.GesamtPreisFreizeittreff ?? 0) + (ro.KurzzeitpflegeGesamtPreis ?? 0) + (ro.ReisenGesamtPreis ?? 0) + verbrauchtVorBericht;
|
||
ro.NochOffen = (ro.Kontingent ?? 0) - (ro.Bereitsverbraucht ?? 0);
|
||
return ro;
|
||
}
|
||
|
||
private String GetPflegegrad(Customer c)
|
||
{
|
||
if (c.Pflegegrad.HasValue)
|
||
{
|
||
switch (c.Pflegegrad.Value)
|
||
{
|
||
case Pflegegrad.KeinGrad:
|
||
return "ohne";
|
||
break;
|
||
case Pflegegrad.PflegegradBeantragt:
|
||
return "beantragt";
|
||
break;
|
||
case Pflegegrad.Grad1:
|
||
return "1";
|
||
break;
|
||
case Pflegegrad.Grad2:
|
||
return "2";
|
||
break;
|
||
case Pflegegrad.Grad3:
|
||
return "3";
|
||
break;
|
||
case Pflegegrad.Grad4:
|
||
return "4";
|
||
break;
|
||
case Pflegegrad.Grad5:
|
||
return "5";
|
||
break;
|
||
|
||
}
|
||
}
|
||
|
||
return "";
|
||
}
|
||
|
||
private void SetzeAbtretungserklaerung(AuswertungSelbstzahlerDetailRO ro, VarFieldValue vv, object varFieldValue)
|
||
{
|
||
if (vv.VarFieldDefOid == 9)
|
||
{
|
||
if (varFieldValue != null)
|
||
{
|
||
bool wert = (bool) varFieldValue;
|
||
|
||
if (wert)
|
||
{
|
||
ro.Abtretungserklaerung = "AE";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
private void SetzePflegekasse(AuswertungSelbstzahlerDetailRO ro, VarFieldValue vv, object varFieldValue)
|
||
{
|
||
if (vv.VarFieldDefOid == 1)
|
||
{
|
||
String wert = varFieldValue as string;
|
||
|
||
ro.Pflegekasse = wert;
|
||
|
||
}
|
||
}
|
||
|
||
private decimal? GetPreisVonServiceDescription(ServiceDescription serviceDescription, DateTime monat)
|
||
{
|
||
if (serviceDescription != null && serviceDescription.CostRatePeriods != null)
|
||
{
|
||
var crpDcList = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(serviceDescription.CostRatePeriods);
|
||
|
||
var crp = crpDcList.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, monat);
|
||
|
||
if (crp != null)
|
||
{
|
||
return crp.CostRateValue;
|
||
}
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
private decimal? BerechneBewilligungsBetrag(SupportConceptApprovalPeriod scap)
|
||
{
|
||
decimal monate = 0;
|
||
decimal tage = 0;
|
||
if (scap != null && scap.StartDate.HasValue && scap.EndDate.HasValue)
|
||
{
|
||
DateTime start = scap.StartDate.Value;
|
||
|
||
while (start < scap.EndDate.Value)
|
||
{
|
||
monate++;
|
||
start = start.AddMonths(1);
|
||
}
|
||
tage = (decimal)scap.EndDate.Value.Subtract(scap.StartDate.Value).TotalDays + 1;
|
||
}
|
||
var fixedAmountApprovedTotal = scap.ApprovedFixedAmount;
|
||
var fixedAmountApprovedPerInterval = fixedAmountApprovedTotal;
|
||
|
||
if (scap.ApprovedFixedAmountInterval.HasValue)
|
||
{
|
||
switch (scap.ApprovedFixedAmountInterval.Value)
|
||
{
|
||
case SupportConceptApprovalInterval.Daily:
|
||
fixedAmountApprovedPerInterval *= 30;
|
||
fixedAmountApprovedTotal = tage * fixedAmountApprovedPerInterval;
|
||
break;
|
||
case SupportConceptApprovalInterval.Weekly:
|
||
fixedAmountApprovedPerInterval *= 4.34m;
|
||
fixedAmountApprovedTotal = fixedAmountApprovedPerInterval * monate;
|
||
break;
|
||
case SupportConceptApprovalInterval.Fortnightly:
|
||
fixedAmountApprovedPerInterval *= (4.34m / 2);
|
||
fixedAmountApprovedTotal = fixedAmountApprovedPerInterval * monate;
|
||
break;
|
||
case SupportConceptApprovalInterval.Monthly:
|
||
fixedAmountApprovedTotal = fixedAmountApprovedPerInterval * monate;
|
||
break;
|
||
case SupportConceptApprovalInterval.Quarterly:
|
||
fixedAmountApprovedPerInterval /= 3;
|
||
fixedAmountApprovedTotal = fixedAmountApprovedPerInterval * monate;
|
||
break;
|
||
case SupportConceptApprovalInterval.HalfYearly:
|
||
fixedAmountApprovedPerInterval /= 6;
|
||
fixedAmountApprovedTotal = fixedAmountApprovedPerInterval * monate;
|
||
break;
|
||
case SupportConceptApprovalInterval.Yearly:
|
||
fixedAmountApprovedPerInterval /= 12;
|
||
fixedAmountApprovedTotal = fixedAmountApprovedPerInterval * monate;
|
||
break;
|
||
}
|
||
}
|
||
|
||
return fixedAmountApprovedTotal;
|
||
}
|
||
}
|
||
}
|