Zuverdienst
This commit is contained in:
@@ -40,6 +40,8 @@ namespace DomizielAnsbach
|
||||
|
||||
if (qro.Rows.Count > 0)
|
||||
{
|
||||
DateTime dt = DateTime.Now;
|
||||
DateTime.TryParse(qro.Rows[0].Field1.ToString(), out dt);
|
||||
//DateTime monat = DateTime.Parse(qro.Rows[0].Field1.ToString());
|
||||
|
||||
long? customerOid = null;
|
||||
|
||||
@@ -10,7 +10,7 @@ using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
|
||||
using DomizielAnsbach.Service;
|
||||
|
||||
namespace DomizielAnsbach.Invoicing
|
||||
{
|
||||
@@ -32,29 +32,86 @@ namespace DomizielAnsbach.Invoicing
|
||||
Address address = costBearer.Organisation.InvoiceAddress;
|
||||
|
||||
if (address == null)
|
||||
{
|
||||
address = costBearer.Organisation.Address;
|
||||
}
|
||||
|
||||
if (address == null)
|
||||
{
|
||||
if (serviceInvoice.InvoiceBase.CostBearer2SupportConcept != null)
|
||||
{
|
||||
var c = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.SupportConcept.Customer;
|
||||
|
||||
address = c.Person.InvoiceAddress;
|
||||
|
||||
if (address == null)
|
||||
{
|
||||
address = c.Person.Address;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (address != null)
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientAddress = address.CopyToNew();
|
||||
}
|
||||
}
|
||||
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
var invoiceItem = new InvoiceItem();
|
||||
BillingData bd = calc.GetBillingData(iServiceRecord);
|
||||
|
||||
if (scap != null)
|
||||
invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid;
|
||||
|
||||
if (scap != null && scap.ServiceCategory != null && scap.ServiceCategory.Name.Contains("Zuverdienst - Arbeitszeit")
|
||||
&& !iServiceRecord.ServiceDescription.Name.Contains("Anleitungszeit"))
|
||||
{
|
||||
var c = scap.CostBearer2SupportConcept.SupportConcept.Customer;
|
||||
var cbOid = scap.CostBearer2SupportConcept.CostBearer.Oid ?? 0;
|
||||
var pausch = ZuverdienstHelper.GetPauschalen(cbOid, c, DateTime.Today);
|
||||
//var tage = ZuverdienstHelper.SetArbeitszeiten(pRO, cbOid, c);
|
||||
|
||||
DateTime start = (DateTime)scap.StartDate;
|
||||
if (iServiceRecord.Start > start)
|
||||
start = (DateTime)iServiceRecord.Start;
|
||||
decimal pauschale = 0;
|
||||
|
||||
var crList = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(scap.ServiceCategory.CostRatePeriods);
|
||||
var cr = new CostRatePeriodDC();
|
||||
cr.CostRatePeriodOid = 1;
|
||||
cr.CostRateType = BS.Shared.CostRatePeriodType.AmountOfMoney;
|
||||
if (pausch.dateMotZuwend1 != DateTime.MinValue)
|
||||
cr.StartDate = pausch.dateMotZuwend1;
|
||||
else
|
||||
cr.StartDate = scap.StartDate;
|
||||
if (pausch.dateMotZuwend2 != DateTime.MinValue)
|
||||
cr.EndDate = pausch.dateMotZuwend2;
|
||||
else
|
||||
cr.EndDate = scap.EndDate;
|
||||
cr.CostRateValue = pausch.motZuwend1;
|
||||
crList.Add(cr);
|
||||
|
||||
var mot = crList.GetCostRatePeriodForDate(BS.Shared.CostRatePeriodType.AmountOfMoney, start);
|
||||
if (iServiceRecord.ServiceDescription.Name.Contains("Pause"))
|
||||
{
|
||||
invoiceItem.AmountPerUnit = pausch.motZuwend1;
|
||||
invoiceItem.UnitCount = -bd.UnitCount;
|
||||
invoiceItem.AmountTotal = -bd.UnitCount * pausch.motZuwend1;
|
||||
invoiceItem.GrossAmountTotal = -bd.UnitCount * pausch.motZuwend1;
|
||||
}
|
||||
else
|
||||
{
|
||||
invoiceItem.AmountPerUnit = pausch.motZuwend1;
|
||||
invoiceItem.UnitCount = bd.UnitCount;
|
||||
invoiceItem.AmountTotal = bd.UnitCount * pausch.motZuwend1;
|
||||
invoiceItem.GrossAmountTotal = bd.UnitCount * pausch.motZuwend1;
|
||||
}
|
||||
}
|
||||
|
||||
invoiceItem.ItemPeriodStart = bd.BillingPeriodStart;
|
||||
invoiceItem.ItemPeriodEnd = bd.BillingPeriodEnd;
|
||||
invoiceItem.UnitDescription = "Std.";
|
||||
invoiceItem.RateFactor = bd.RateFactor;
|
||||
invoiceItem.AccountingInterval = bd.AccountingInterval;
|
||||
invoiceItem.ItemDescription = "geleistete Gesamt-Stunden";
|
||||
invoiceItem.ServiceRecord = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(iServiceRecord.ServiceRecordOid.Value);
|
||||
|
||||
return invoiceItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
68
ReportImp/DomizielAnsbach/RechnungZV.Designer.cs
generated
68
ReportImp/DomizielAnsbach/RechnungZV.Designer.cs
generated
@@ -44,6 +44,7 @@ namespace DomizielAnsbach
|
||||
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
|
||||
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
|
||||
this.GroupFooter = new DevExpress.XtraReports.UI.GroupFooterBand();
|
||||
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
|
||||
this.xrTableRow8 = new DevExpress.XtraReports.UI.XRTableRow();
|
||||
this.xrTableCell24 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
@@ -122,11 +123,11 @@ namespace DomizielAnsbach
|
||||
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand();
|
||||
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrPictureBox4 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable12)).BeginInit();
|
||||
@@ -169,14 +170,32 @@ namespace DomizielAnsbach
|
||||
//
|
||||
// GroupFooter
|
||||
//
|
||||
this.GroupFooter.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Double;
|
||||
this.GroupFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrLabel7,
|
||||
this.xrTable1,
|
||||
this.xrTable4});
|
||||
this.GroupFooter.HeightF = 110.7085F;
|
||||
this.GroupFooter.Name = "GroupFooter";
|
||||
this.GroupFooter.StylePriority.UseBorderDashStyle = false;
|
||||
this.GroupFooter.SubBands.AddRange(new DevExpress.XtraReports.UI.SubBand[] {
|
||||
this.SubBand1});
|
||||
//
|
||||
// xrLabel7
|
||||
//
|
||||
this.xrLabel7.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid;
|
||||
this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.Top;
|
||||
this.xrLabel7.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(575.83F, 52.45997F);
|
||||
this.xrLabel7.Name = "xrLabel7";
|
||||
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel7.SizeF = new System.Drawing.SizeF(107.088F, 10.62501F);
|
||||
this.xrLabel7.StylePriority.UseBorderDashStyle = false;
|
||||
this.xrLabel7.StylePriority.UseBorders = false;
|
||||
this.xrLabel7.StylePriority.UseFont = false;
|
||||
this.xrLabel7.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
//
|
||||
// xrTable1
|
||||
//
|
||||
this.xrTable1.BackColor = System.Drawing.Color.Transparent;
|
||||
@@ -324,12 +343,13 @@ namespace DomizielAnsbach
|
||||
this.xrTableCell12.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell12.Text = "Betrag";
|
||||
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell12.Weight = 0.738039467667585D;
|
||||
this.xrTableCell12.Weight = 0.598668471493347D;
|
||||
//
|
||||
// xrTableCell13
|
||||
//
|
||||
this.xrTableCell13.BorderColor = System.Drawing.Color.Black;
|
||||
this.xrTableCell13.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrTableCell13.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid;
|
||||
this.xrTableCell13.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
|
||||
this.xrTableCell13.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "GrossClaim")});
|
||||
this.xrTableCell13.Font = new System.Drawing.Font("Arial", 11F);
|
||||
@@ -337,13 +357,14 @@ namespace DomizielAnsbach
|
||||
this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
|
||||
this.xrTableCell13.StylePriority.UseBackColor = false;
|
||||
this.xrTableCell13.StylePriority.UseBorderColor = false;
|
||||
this.xrTableCell13.StylePriority.UseBorderDashStyle = false;
|
||||
this.xrTableCell13.StylePriority.UseBorders = false;
|
||||
this.xrTableCell13.StylePriority.UseFont = false;
|
||||
this.xrTableCell13.StylePriority.UsePadding = false;
|
||||
this.xrTableCell13.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell13.Text = "Gesamtkosten";
|
||||
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.xrTableCell13.Weight = 0.3730047523096115D;
|
||||
this.xrTableCell13.Weight = 0.51237574848384948D;
|
||||
//
|
||||
// SubBand1
|
||||
//
|
||||
@@ -613,7 +634,7 @@ namespace DomizielAnsbach
|
||||
xrSummary6.Func = DevExpress.XtraReports.UI.SummaryFunc.RecordNumber;
|
||||
this.lblAbrechnungsinterval.Summary = xrSummary6;
|
||||
this.lblAbrechnungsinterval.Text = "Monat";
|
||||
this.lblAbrechnungsinterval.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
this.lblAbrechnungsinterval.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
this.lblAbrechnungsinterval.Weight = 0.4611729383933455D;
|
||||
//
|
||||
// xrTable8
|
||||
@@ -1018,7 +1039,7 @@ namespace DomizielAnsbach
|
||||
this.xrTableCell46.BorderColor = System.Drawing.Color.DarkGray;
|
||||
this.xrTableCell46.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrTableCell46.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.HourlyRate", "{0:0.00}")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.HourlyRate", "{0:0.00} €")});
|
||||
this.xrTableCell46.Font = new System.Drawing.Font("Arial", 11F);
|
||||
this.xrTableCell46.Name = "xrTableCell46";
|
||||
this.xrTableCell46.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
|
||||
@@ -1187,6 +1208,23 @@ namespace DomizielAnsbach
|
||||
this.PageFooter.HeightF = 90.00003F;
|
||||
this.PageFooter.Name = "PageFooter";
|
||||
//
|
||||
// xrLabel4
|
||||
//
|
||||
this.xrLabel4.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
|
||||
this.xrLabel4.Font = new System.Drawing.Font("Arial", 9F);
|
||||
this.xrLabel4.ForeColor = System.Drawing.Color.White;
|
||||
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0.000890096F, 0F);
|
||||
this.xrLabel4.Name = "xrLabel4";
|
||||
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel4.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel4.SizeF = new System.Drawing.SizeF(627.0835F, 9.999974F);
|
||||
this.xrLabel4.StylePriority.UseBorders = false;
|
||||
this.xrLabel4.StylePriority.UseFont = false;
|
||||
this.xrLabel4.StylePriority.UseForeColor = false;
|
||||
this.xrLabel4.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel4.Text = "LEER";
|
||||
this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
|
||||
//
|
||||
// xrLabel1
|
||||
//
|
||||
this.xrLabel1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
@@ -1228,23 +1266,6 @@ namespace DomizielAnsbach
|
||||
this.xrPictureBox4.SizeF = new System.Drawing.SizeF(153.8335F, 47.4584F);
|
||||
this.xrPictureBox4.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// xrLabel4
|
||||
//
|
||||
this.xrLabel4.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
|
||||
this.xrLabel4.Font = new System.Drawing.Font("Arial", 9F);
|
||||
this.xrLabel4.ForeColor = System.Drawing.Color.White;
|
||||
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0.000890096F, 0F);
|
||||
this.xrLabel4.Name = "xrLabel4";
|
||||
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel4.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
|
||||
this.xrLabel4.SizeF = new System.Drawing.SizeF(627.0835F, 9.999974F);
|
||||
this.xrLabel4.StylePriority.UseBorders = false;
|
||||
this.xrLabel4.StylePriority.UseFont = false;
|
||||
this.xrLabel4.StylePriority.UseForeColor = false;
|
||||
this.xrLabel4.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel4.Text = "LEER";
|
||||
this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
|
||||
//
|
||||
// RechnungZV
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -1374,5 +1395,6 @@ namespace DomizielAnsbach
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
|
||||
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox4;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
|
||||
}
|
||||
}
|
||||
|
||||
992
ReportImp/DomizielAnsbach/RechnungZVTN.Designer.cs
generated
992
ReportImp/DomizielAnsbach/RechnungZVTN.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -10697,7 +10697,7 @@ namespace DomizielAnsbach
|
||||
this.xrLabel12.BackColor = System.Drawing.Color.White;
|
||||
this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrLabel12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Customer.CostBearers.CostBearer.Name")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Occupation")});
|
||||
this.xrLabel12.Font = new System.Drawing.Font("Arial", 9F);
|
||||
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(121.3542F, 124.25F);
|
||||
this.xrLabel12.Name = "xrLabel12";
|
||||
@@ -11686,7 +11686,7 @@ namespace DomizielAnsbach
|
||||
this.xrLabel7.BackColor = System.Drawing.Color.White;
|
||||
this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrLabel7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Customer.CostBearers.CostBearer.Name")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Occupation")});
|
||||
this.xrLabel7.Font = new System.Drawing.Font("Arial", 9F);
|
||||
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(121.3543F, 124.25F);
|
||||
this.xrLabel7.Name = "xrLabel7";
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace DomizielAnsbach
|
||||
if (o2p.RelationRole.DisplayName.Contains("Zuverdienst"))
|
||||
{
|
||||
cbOid = o2p.Organisation.CostBearerOid ?? 0;
|
||||
pRO.Occupation = o2p.Organisation.Name;
|
||||
var anleiterin = DAOFactory.GenericDAO.LoadByID<Person>(o2p.Person.PersonOid);
|
||||
if (lblAnleiter.Text == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user