Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -178,8 +178,8 @@ namespace AlphaEv
|
||||
this.xrLabel10.StylePriority.UseFont = false;
|
||||
this.xrLabel10.StylePriority.UseForeColor = false;
|
||||
this.xrLabel10.StylePriority.UsePadding = false;
|
||||
this.xrLabel10.Text = "Ihr Ansprechpartner:\r\nFrau Howe-Jakob\r\nFon: 0 21 96 - 72 63 - 16\r\nFax: 0 21 96 - " +
|
||||
"72 63 - 32\r\njakob@alphaev.de\r\nwww.alphaev.de";
|
||||
this.xrLabel10.Text = "Ihr Ansprechpartner:\r\n[SenderFirstName] [SenderLastName]\r\n[SenderPhone]\r\n[SenderF" +
|
||||
"ax]\r\n[SenderMail]\r\nwww.alphaev.de";
|
||||
//
|
||||
// xrLabel1
|
||||
//
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace AlphaEv
|
||||
Int32.TryParse(rfStr, out rfInt);
|
||||
|
||||
rateFactor = (100m + rfInt)/100m;
|
||||
i.RateFactor = string.Format("0:0.00", rateFactor);
|
||||
i.RateFactor = string.Format("{0:0.00}", rateFactor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
21
ReportImp/AlphaEv/ServiceInvoiceReport.Designer.cs
generated
21
ReportImp/AlphaEv/ServiceInvoiceReport.Designer.cs
generated
@@ -30,6 +30,7 @@ namespace AlphaEv
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ServiceInvoiceReport));
|
||||
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
|
||||
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.xrRichText2 = new DevExpress.XtraReports.UI.XRRichText();
|
||||
@@ -52,7 +53,6 @@ namespace AlphaEv
|
||||
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
|
||||
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
|
||||
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand();
|
||||
@@ -79,12 +79,13 @@ namespace AlphaEv
|
||||
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
// Detail
|
||||
@@ -208,8 +209,8 @@ namespace AlphaEv
|
||||
this.xrLabel10.StylePriority.UseFont = false;
|
||||
this.xrLabel10.StylePriority.UseForeColor = false;
|
||||
this.xrLabel10.StylePriority.UsePadding = false;
|
||||
this.xrLabel10.Text = "Ihr Ansprechpartner:\r\nFrau Howe-Jakob\r\nFon: 0 21 96 - 72 63 - 16\r\nFax: 0 21 96 - " +
|
||||
"72 63 - 32\r\njakob@alphaev.de\r\nwww.alphaev.de";
|
||||
this.xrLabel10.Text = "Ihr Ansprechpartner:\r\n[SenderContactPerson]\r\n[SenderContactPersonPhone]\r\n[SenderC" +
|
||||
"ontactPersonFax]\r\n[SenderContactPersonMail]\r\nwww.alphaev.de";
|
||||
//
|
||||
// xrLabel9
|
||||
//
|
||||
@@ -338,10 +339,6 @@ namespace AlphaEv
|
||||
this.xrRichText1.SerializableRtfString = resources.GetString("xrRichText1.SerializableRtfString");
|
||||
this.xrRichText1.SizeF = new System.Drawing.SizeF(170.25F, 156.8542F);
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
|
||||
//
|
||||
// DetailReport
|
||||
//
|
||||
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -633,6 +630,10 @@ namespace AlphaEv
|
||||
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
this.xrTableCell13.Weight = 0.030769235304504289D;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
|
||||
//
|
||||
// ServiceInvoiceReport
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -654,12 +655,14 @@ namespace AlphaEv
|
||||
this.PageWidth = 827;
|
||||
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
|
||||
this.Version = "23.2";
|
||||
xrWatermark1.Id = "Watermark1";
|
||||
this.Watermarks.Add(xrWatermark1);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace Mittelpunkt
|
||||
@@ -9,7 +10,7 @@ namespace Mittelpunkt
|
||||
{
|
||||
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||
{
|
||||
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
|
||||
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false);
|
||||
|
||||
if (lROs.Count > 0)
|
||||
{
|
||||
@@ -80,11 +81,14 @@ namespace Mittelpunkt
|
||||
|
||||
if (ro.Services != null)
|
||||
{
|
||||
if (ro.Services.Count == 0)
|
||||
ro.Services.Add(new ServicesOverviewRO.ServiceDetail());
|
||||
|
||||
foreach (ServicesOverviewRO.ServiceDetail s in ro.Services)
|
||||
{
|
||||
ServicesOverviewRO.CreateSignatureString(s);
|
||||
|
||||
if (s.ServiceCategory.ToLower().Contains("assistenz"))
|
||||
if (!s.ServiceCategory.IsNullOrEmpty() && s.ServiceCategory.ToLower().Contains("assistenz"))
|
||||
{
|
||||
assiRo.Services.Add(s);
|
||||
}
|
||||
|
||||
61
ReportImp/Mittelpunkt/Invoicing/CustomInvoiceCreation.cs
Normal file
61
ReportImp/Mittelpunkt/Invoicing/CustomInvoiceCreation.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Mittelpunkt.Invoicing
|
||||
{
|
||||
public class CustomInvoiceCreation : InvoiceCreation
|
||||
{
|
||||
public override IList<InvoiceItem> CreateInvoiceItems(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
if (!scap.ApprovedBETotal.HasValue)
|
||||
return base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc);
|
||||
|
||||
var crpWithRateFactor = scap.CostBearer2SupportConcept.CostBearer.CostRatePeriods.FirstOrDefault(crp => crp.CostRateType == BS.Shared.CostRatePeriodType.RateFactor);
|
||||
var ratefactor = crpWithRateFactor != null ? (100 + crpWithRateFactor.CostRateValue.Value) / 100: 1m;
|
||||
|
||||
var offeneBewilligteStunden = scap.ApprovedBETotal.Value;
|
||||
|
||||
var list = new List<InvoiceItem>();
|
||||
foreach (ServiceRecordDC iServiceRecord in serviceRecordsInPeriod)
|
||||
{
|
||||
if (iServiceRecord.ServiceDescription.Category.IsBillable)
|
||||
{
|
||||
if (!iServiceRecord.AlreadyAccounted)
|
||||
{
|
||||
var differenz = offeneBewilligteStunden - iServiceRecord.RoundedDuration * ratefactor / 60 ;
|
||||
if (differenz < 0)
|
||||
{
|
||||
iServiceRecord.RoundedDuration += differenz / 1.2m * 60; // += weil die Zahl ja negativ ist
|
||||
if (iServiceRecord.End.HasValue)
|
||||
iServiceRecord.End.Value.AddMinutes(Convert.ToDouble(differenz));
|
||||
}
|
||||
|
||||
InvoiceItem invoiceItem = CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
if (invoiceItem != null)
|
||||
{
|
||||
list.Add(invoiceItem);
|
||||
}
|
||||
iServiceRecord.AlreadyAccounted = true;
|
||||
offeneBewilligteStunden -= iServiceRecord.RoundedDuration * ratefactor / 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc);
|
||||
}
|
||||
|
||||
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
return base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
ReportImp/Mittelpunkt/Invoicing/CustomInvoiceFactory.cs
Normal file
19
ReportImp/Mittelpunkt/Invoicing/CustomInvoiceFactory.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Mittelpunkt.Invoicing
|
||||
{
|
||||
public class CustomInvoiceFactory : InvoiceFactory
|
||||
{
|
||||
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
||||
{
|
||||
return new CustomInvoiceCreation();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,8 @@
|
||||
<Compile Include="CustomMitarbeiterstundenkontoBerechnung.cs" />
|
||||
<Compile Include="CustomMitarbeiterstundenkontoBerechnungMonate.cs" />
|
||||
<Compile Include="CustomReportCreator.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
|
||||
<Compile Include="Mitarbeiterarbeitszeitkonto.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Text.RegularExpressions;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace Mittelpunkt
|
||||
@@ -32,7 +33,7 @@ namespace Mittelpunkt
|
||||
|
||||
foreach (var sd in pRO.Services)
|
||||
{
|
||||
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
|
||||
if (!sd.ServiceDescription.IsNullOrEmpty() && (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt")))
|
||||
{
|
||||
ServicesOverviewRO.CreateSignatureString(sd);
|
||||
|
||||
@@ -42,7 +43,7 @@ namespace Mittelpunkt
|
||||
sd.Notice5 = "GR";
|
||||
hatGruppen = true;
|
||||
}
|
||||
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
|
||||
if (!sd.ServiceDescription.IsNullOrEmpty() && (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt")))
|
||||
{
|
||||
sd.Notice5 = "F";
|
||||
totalFK += sd.Minutes;
|
||||
|
||||
Reference in New Issue
Block a user