KontaktUndKrisenhilfeReports/Budgetnachweis - Fehlkontakte diverse Fehler korrigiert
This commit is contained in:
@@ -57,8 +57,31 @@ namespace KontaktUndKrisenhilfeReports
|
||||
if (!String.IsNullOrEmpty(pRO.SenderContactPersonMail))
|
||||
pRO.SenderContactPersonMail = pRO.SenderContactPersonMail.Replace("E-Mail:", "").Trim();
|
||||
|
||||
//// quick and DIRTY:
|
||||
//decimal RecFLS = 0;
|
||||
//foreach (var ii in pRO.InvoiceItems)
|
||||
//{
|
||||
// if (ii.RateFactor == 0)
|
||||
// {
|
||||
// RecFLS += (decimal)ii.UnitCount / 80 * 100;
|
||||
// }
|
||||
//}
|
||||
|
||||
//if (Convert.ToDouble(RecFLS) > pRO.RecordedFLSTotal)
|
||||
//{
|
||||
// string temp = pRO.ApprovedFLS.Replace(" FLS", "");
|
||||
// decimal appFLS = Convert.ToDecimal(pRO.ApprovedFLS);
|
||||
// if (appFLS >= RecFLS)
|
||||
// {
|
||||
// pRO.RecordedFLSTotal = (double)RecFLS;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// pRO.RecordedFLSTotal = (double)appFLS;
|
||||
// }
|
||||
//}
|
||||
|
||||
bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Budgetnachweis));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Budgetnachweis2));
|
||||
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.xrPanel1 = new DevExpress.XtraReports.UI.XRPanel();
|
||||
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
@@ -49,12 +49,12 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
|
||||
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
|
||||
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.xrRichText3 = new DevExpress.XtraReports.UI.XRRichText();
|
||||
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
// Detail
|
||||
@@ -76,8 +76,8 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
//
|
||||
// xrPanel1
|
||||
//
|
||||
this.xrPanel1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Right)
|
||||
this.xrPanel1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrPanel1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrLabel15,
|
||||
@@ -104,7 +104,7 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
this.xrLabel15.StylePriority.UseBorders = false;
|
||||
this.xrLabel15.StylePriority.UseFont = false;
|
||||
this.xrLabel15.StylePriority.UsePadding = false;
|
||||
this.xrLabel15.Text = "[CustomerName], [CustomerStreet], [CustomerPostalCode] [CustomerTown]";
|
||||
this.xrLabel15.Text = "[CustomerName], [CostCenter]";
|
||||
this.xrLabel15.WordWrap = false;
|
||||
//
|
||||
// lblAktenzeichen
|
||||
@@ -121,8 +121,8 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
this.lblAktenzeichen.StylePriority.UseBorders = false;
|
||||
this.lblAktenzeichen.StylePriority.UseFont = false;
|
||||
this.lblAktenzeichen.StylePriority.UsePadding = false;
|
||||
this.lblAktenzeichen.Text = "Aktenzeichen: [CustomerReferenceNumber] Geburtsdatum: [CustomerBirthdayStr" +
|
||||
"ing]";
|
||||
this.lblAktenzeichen.Text = "Aktenzeichen: [CustomerReferenceNumber] Geburtsdatum: [CustomerBirthday!dd" +
|
||||
".MM.yyyy]";
|
||||
this.lblAktenzeichen.WordWrap = false;
|
||||
//
|
||||
// xrLabel7
|
||||
@@ -158,13 +158,13 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
// xrLabel3
|
||||
//
|
||||
this.xrLabel3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Right)
|
||||
this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrLabel3.BorderWidth = 2F;
|
||||
this.xrLabel3.CanShrink = true;
|
||||
this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "RecordedFLSTotal", "{0:0.00}")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "RecordedFlsTotal", "{0:0.00}")});
|
||||
this.xrLabel3.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold);
|
||||
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(561.38F, 132F);
|
||||
this.xrLabel3.Multiline = true;
|
||||
@@ -297,25 +297,6 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
this.GroupHeader1.Name = "GroupHeader1";
|
||||
this.GroupHeader1.StylePriority.UseFont = false;
|
||||
//
|
||||
// xrLabel8
|
||||
//
|
||||
this.xrLabel8.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
|
||||
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 276.2917F);
|
||||
this.xrLabel8.Multiline = true;
|
||||
this.xrLabel8.Name = "xrLabel8";
|
||||
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel8.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel8.SizeF = new System.Drawing.SizeF(673.319F, 40.00003F);
|
||||
this.xrLabel8.StylePriority.UseFont = false;
|
||||
this.xrLabel8.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel8.Text = "Budgetnachweis\r\nüber die Abrechnung von Fachleistungsstunden im Rahmen der Eingli" +
|
||||
"ederungshilfe";
|
||||
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SettlementRO);
|
||||
//
|
||||
// xrRichText3
|
||||
//
|
||||
this.xrRichText3.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold);
|
||||
@@ -333,7 +314,26 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
this.xrPictureBox3.SizeF = new System.Drawing.SizeF(175F, 100F);
|
||||
this.xrPictureBox3.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// Spitzabrechnung
|
||||
// xrLabel8
|
||||
//
|
||||
this.xrLabel8.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold);
|
||||
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 276.2917F);
|
||||
this.xrLabel8.Multiline = true;
|
||||
this.xrLabel8.Name = "xrLabel8";
|
||||
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel8.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel8.SizeF = new System.Drawing.SizeF(673.319F, 40.00003F);
|
||||
this.xrLabel8.StylePriority.UseFont = false;
|
||||
this.xrLabel8.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel8.Text = "Budgetnachweis\r\nüber die Abrechnung von Fachleistungsstunden im Rahmen der Eingli" +
|
||||
"ederungshilfe";
|
||||
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.Settlement2RO);
|
||||
//
|
||||
// Budgetnachweis2
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
this.Detail,
|
||||
@@ -349,8 +349,8 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
this.PageWidth = 827;
|
||||
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
|
||||
this.Version = "17.1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using BeWo.Report.ReportObjects;
|
||||
using BeWo.Report;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
|
||||
namespace KontaktUndKrisenhilfeReports.Neu
|
||||
{
|
||||
@@ -34,8 +35,31 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
}
|
||||
|
||||
|
||||
var ib = DAOFactory.GenericDAO.LoadByID<InvoiceBase>(pRO.InvoiceBaseOid.Value);
|
||||
var c = ib.CostBearer2SupportConcept.SupportConcept.Customer;
|
||||
pRO.CostCenter = c.Person.Address.Street + ", " + c.Person.Address.PostalCode + " " + c.Person.Address.Town;
|
||||
|
||||
xrCheckBox2.Checked = true;
|
||||
|
||||
// Kann ab Release Aug 2023 wieder raus - war nur BugFix im Settlement2RO
|
||||
List<Customer> customerList = new List<Customer>();
|
||||
if (pRO.CustomerBirthday.HasValue)
|
||||
customerList = DAOFactory.SearchDAO.FindCustomer(pRO.CustomerFirstName, pRO.CustomerLastName, pRO.CustomerBirthday.Value).ToList();
|
||||
else
|
||||
customerList = DAOFactory.SearchDAO.FindCustomer(pRO.CustomerFirstName, pRO.CustomerLastName, pRO.CustomerReferenceNumber).ToList();
|
||||
|
||||
if (customerList.Count > 0)
|
||||
{
|
||||
var customer = MapperFactory.CustomerDC_Customer.MapToNewDC(customerList[0]);
|
||||
if (customer.TerminationDate.HasValue)
|
||||
{
|
||||
xrCheckBox1.Text = String.Format(" Die Betreuung wurde beendet am {0:dd.MM.yyyy}", c.TerminationDate);
|
||||
xrCheckBox2.Checked = false;
|
||||
xrCheckBox1.Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (pRO.TerminationDate.HasValue)
|
||||
{
|
||||
xrCheckBox1.Text = String.Format(" Die Betreuung wurde beendet am {0:dd.MM.yyyy}",
|
||||
@@ -51,9 +75,38 @@ namespace KontaktUndKrisenhilfeReports.Neu
|
||||
|
||||
if (!String.IsNullOrEmpty(pRO.SenderContactPersonMail))
|
||||
pRO.SenderContactPersonMail = pRO.SenderContactPersonMail.Replace("E-Mail:", "").Trim();
|
||||
|
||||
// quick and DIRTY - solange Berechnung S2RO gemäß LVR noch die Stunden und nicht den Preis rundet
|
||||
decimal RecFLS = 0;
|
||||
bool Fehlkontakt = false;
|
||||
foreach (var ii in pRO.InvoiceItems)
|
||||
{
|
||||
if (ii.RateFactor == 0)
|
||||
{
|
||||
Fehlkontakt = true;
|
||||
RecFLS += (decimal)ii.UnitCount / 80 * 100;
|
||||
ii.UnitCount = ii.UnitCount / 80 * 100;
|
||||
ii.AmountPerUnit = ii.AmountPerUnit * 80 / 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
RecFLS += (decimal)ii.UnitCount;
|
||||
}
|
||||
}
|
||||
|
||||
if (Fehlkontakt && RecFLS > pRO.RecordedFlsTotal)
|
||||
{
|
||||
//if (pRO.ApprovedFLSTotal >= RecFLS)
|
||||
//{
|
||||
pRO.RecordedFlsTotal = RecFLS;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// pRO.RecordedFlsTotal = pRO.ApprovedFLSTotal;
|
||||
//}
|
||||
}
|
||||
|
||||
bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace KontaktUndKrisenhilfe.Invoicing
|
||||
[IDSpecificClass(Identifier = "LWLMaxAmount")]
|
||||
class KuKLWLSettlementInvoiceCreation : SettlementInvoiceCreation
|
||||
{
|
||||
public override bool CheckMaxApprovedHours()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//public override decimal? CalculateMaxAmount(Settlement2DC si)
|
||||
//{
|
||||
// decimal approvedCurrentHourlyRate = 0;
|
||||
@@ -479,8 +484,8 @@ namespace KontaktUndKrisenhilfe.Invoicing
|
||||
var countMitFactor = Math.Round((ii.UnitCount ?? 0) * rf, 2, MidpointRounding.AwayFromZero);
|
||||
|
||||
|
||||
if (maxApprovedFls < countMitFactor)
|
||||
countMitFactor = maxApprovedFls;
|
||||
//if (maxApprovedFls < countMitFactor)
|
||||
// countMitFactor = maxApprovedFls;
|
||||
|
||||
maxApprovedFls -= countMitFactor;
|
||||
|
||||
|
||||
@@ -70,9 +70,15 @@ namespace KontaktUndKrisenhilfeReports.Reporting
|
||||
}
|
||||
else
|
||||
{
|
||||
var seite1 = new KontaktUndKrisenhilfeReports.Neu.Budgetnachweis2();
|
||||
seite1.SetReportDataSource(Settlement2RO.Create(lSettlementDC));
|
||||
seite1.CreateDocument();
|
||||
|
||||
//var sdc = SettlementRO.Create(lSettlementDC);
|
||||
//InitRO(sdc, lSettlementDC);
|
||||
|
||||
//var seite1 = new Budgetnachweis();
|
||||
//seite1.SetReportDataSource(sdc);
|
||||
var seite1 = new KontaktUndKrisenhilfeReports.Neu.Budgetnachweis2();
|
||||
seite1.SetReportDataSource(Settlement2RO.Create(lSettlementDC));
|
||||
seite1.CreateDocument();
|
||||
|
||||
var seite2 = new BeWo.KontaktUndKrisenhilfeReports.Neu.Spitzabrechnung();
|
||||
seite2.SetReportDataSource(Settlement2RO.Create(lSettlementDC));
|
||||
|
||||
Reference in New Issue
Block a user