Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo

This commit is contained in:
2026-04-17 13:17:25 +02:00
48 changed files with 1627 additions and 276 deletions

View File

@@ -151,7 +151,11 @@
<Compile Include="ViewModel\AiConfigVM.cs" />
<Compile Include="ViewModel\AiPromptbausteinFolderVM.cs" />
<Compile Include="ViewModel\AiPromptbausteinPromptVM.cs" />
<Compile Include="ViewModel\AiPromptroutineStepVM.cs" />
<Compile Include="ViewModel\AiPromptroutineVM.cs" />
<Compile Include="ViewModel\AiUserSettingVM.cs" />
<Compile Include="ViewModel\ListViewModel\AiPromptroutineListVM.cs" />
<Compile Include="ViewModel\ListViewModel\AiPromptroutineStepListVM.cs" />
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinPromptListVM.cs" />
<Compile Include="ViewModel\ListViewModel\AiPromptbausteinFolderListVM.cs" />
<Compile Include="ViewModel\ListViewModel\TextModuleListVM.cs" />

View File

@@ -0,0 +1,54 @@
using System;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.ViewModel
{
public class AiPromptroutineStepVM : AbstractDCMapperVM<AiPromptroutineStepDC>
{
private int _Position;
private AiPromptbausteinPromptDC _PromptReference;
private long _ReferenceVersion;
public AiPromptroutineStepVM(AiPromptroutineStepDC dc) : base(dc, dc.Oid)
{
}
public int Position
{
get => _Position;
set => SetProperty(ref _Position, value, nameof(Position), () => DataContract.Position);
}
public AiPromptbausteinPromptDC PromptReference
{
get => _PromptReference;
set => SetProperty(ref _PromptReference, value, nameof(PromptReference), () => DataContract.PromptReference);
}
public long ReferenceVersion
{
get => _ReferenceVersion;
set => SetProperty(ref _ReferenceVersion, value, nameof(ReferenceVersion), () => DataContract.ReferenceVersion);
}
protected override void InitByDataContract(AiPromptroutineStepDC pDataContract)
{
_Position = pDataContract.Position;
_PromptReference = pDataContract.PromptReference;
_ReferenceVersion = pDataContract.ReferenceVersion;
}
protected override AiPromptroutineStepDC MapToDataContract(AiPromptroutineStepDC pDataContract, bool doCommit)
{
pDataContract.Position = _Position;
pDataContract.PromptReference = _PromptReference;
pDataContract.ReferenceVersion = _ReferenceVersion;
return pDataContract;
}
}
}

View File

@@ -0,0 +1,120 @@
using System;
using BeWo.ViewModel.ListViewModel;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.ViewModel
{
public class AiPromptroutineVM : AbstractDCMapperVM<AiPromptroutineDC>
{
private string _Title;
private string _Description;
private long? _ParentFolderOid;
private CompactEmployeeDC _Creator;
private bool _IsPublic;
private int _Position;
private bool _IsFavorite;
private AiActionType _ActionType;
private bool _CanEdit;
private AiPromptroutineStepListVM _Steps;
public AiPromptroutineVM(AiPromptroutineDC dc) : base(dc, dc.Oid)
{
}
public string Title
{
get => _Title;
set => SetProperty(ref _Title, value, nameof(Title), () => DataContract.Title);
}
public string Description
{
get => _Description;
set => SetProperty(ref _Description, value, nameof(Description), () => DataContract.Description);
}
public long? ParentFolderOid
{
get => _ParentFolderOid;
set => SetProperty(ref _ParentFolderOid, value, nameof(ParentFolderOid), () => DataContract.ParentFolderOid);
}
public CompactEmployeeDC Creator
{
get => _Creator;
set => SetProperty(ref _Creator, value, nameof(Creator), () => DataContract.Creator);
}
public bool IsPublic
{
get => _IsPublic;
set => SetProperty(ref _IsPublic, value, nameof(IsPublic), () => DataContract.IsPublic);
}
public int Position
{
get => _Position;
set => SetProperty(ref _Position, value, nameof(Position), () => DataContract.Position);
}
public bool IsFavorite
{
get => _IsFavorite;
set => SetProperty(ref _IsFavorite, value, nameof(IsFavorite), () => DataContract.IsFavorite);
}
public AiActionType ActionType
{
get => _ActionType;
set => SetProperty(ref _ActionType, value, nameof(ActionType), () => DataContract.ActionType);
}
public bool CanEdit
{
get => _CanEdit;
set => SetProperty(ref _CanEdit, value, nameof(CanEdit), () => DataContract.CanEdit);
}
public AiPromptroutineStepListVM Steps
{
get => _Steps;
set => SetProperty(ref _Steps, value, nameof(Steps));
}
protected override void InitByDataContract(AiPromptroutineDC pDataContract)
{
_Title = pDataContract.Title;
_Description = pDataContract.Description;
_ParentFolderOid = pDataContract.ParentFolderOid;
_Creator = pDataContract.Creator;
_IsPublic = pDataContract.IsPublic;
_Position = pDataContract.Position;
_IsFavorite = pDataContract.IsFavorite;
_ActionType = pDataContract.ActionType;
_CanEdit = pDataContract.CanEdit;
_Steps = new AiPromptroutineStepListVM(pDataContract.Steps);
}
protected override AiPromptroutineDC MapToDataContract(AiPromptroutineDC pDataContract, bool doCommit)
{
pDataContract.Title = _Title;
pDataContract.Description = _Description;
pDataContract.ParentFolderOid = _ParentFolderOid;
pDataContract.Creator = _Creator;
pDataContract.IsPublic = _IsPublic;
pDataContract.Position = _Position;
pDataContract.IsFavorite = _IsFavorite;
pDataContract.ActionType = _ActionType;
pDataContract.CanEdit = _CanEdit;
pDataContract.Steps = _Steps.CopyToDCList(doCommit);
return pDataContract;
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.ViewModel.ListViewModel
{
public class AiPromptroutineListVM : AbstractDCListMapperVM<AiPromptroutineDC, AiPromptroutineVM>
{
public AiPromptroutineListVM(IEnumerable<AiPromptroutineDC> pDataContracts = null) : base(pDataContracts)
{
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.ViewModel.ListViewModel
{
public class AiPromptroutineStepListVM : AbstractDCListMapperVM<AiPromptroutineStepDC, AiPromptroutineStepVM>
{
public AiPromptroutineStepListVM(IEnumerable<AiPromptroutineStepDC> pDataContracts = null) : base(pDataContracts)
{
}
}
}

View File

@@ -234,6 +234,8 @@
<Compile Include="Access\UserDAO.cs" />
<Compile Include="ASPHibernateSessionManager.cs" />
<Compile Include="DefaultHibernateSessionManager.cs" />
<Compile Include="Entities\AiPromptroutine.cs" />
<Compile Include="Entities\AiPromptroutineStep.cs" />
<Compile Include="Entities\AiUserSetting.cs" />
<Compile Include="Entities\AiVoiceData.cs" />
<Compile Include="Entities\OvertimeHistory.cs" />

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.Data.Entities
{
public class AiPromptroutine : BeWoEntityBase
{
public AiPromptroutine()
{
_Tid = TableID.AiPromptroutine;
}
public virtual string Title { get; set; }
public virtual string Description { get; set; }
public virtual long? ParentFolderOid { get; set; }
public virtual long CreatorOid { get; set; }
public virtual bool IsPublic { get; set; }
public virtual int Position { get; set; }
public virtual bool IsFavorite { get; set; }
public virtual AiActionType ActionType { get; set; }
public virtual bool CanEdit { get; set; }
public virtual List<AiPromptroutineStep> Steps { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using BS.Shared;
using BS.Shared.Core;
namespace BeWo.Data.Entities
{
public class AiPromptroutineStep : BeWoEntityBase
{
public AiPromptroutineStep()
{
_Tid = TableID.AiPromptroutineStep;
}
public virtual int Position { get; set; }
public virtual AiPromptbausteinPrompt PromptReference { get; set; }
public virtual long ReferenceVersion { get; set; }
}
}

View File

@@ -0,0 +1,42 @@
INSERT INTO `.executedscripts`
VALUES ('Changes_2026-04-17 AiPromptroutine', CURDATE());
CREATE TABLE `aipromptroutinestep` (
`Oid` bigint NOT NULL AUTO_INCREMENT,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`Tid` int DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`Version` bigint DEFAULT NULL,
`IsActive` tinyint DEFAULT NULL,
`SystemEntryID` int DEFAULT NULL,
`Position` int,
`PromptReferenceOid` bigint DEFAULT NULL,
`PromptReferenceVersion` bigint,
PRIMARY KEY (`Oid`),
CONSTRAINT `FK_AIPROMPTROUTINESTEP_PROMPT` FOREIGN KEY (`PromptReferenceOid`) REFERENCES `aipromptbausteinprompt` (`Oid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
CREATE TABLE `aipromptroutine` (
`Oid` bigint NOT NULL AUTO_INCREMENT,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`Tid` int DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`Version` bigint DEFAULT NULL,
`IsActive` tinyint DEFAULT NULL,
`SystemEntryID` int DEFAULT NULL,
`Title` varchar(255),
`Description` varchar(255),
`ParentFolderOid` bigint DEFAULT NULL,
`CreatorOid` bigint,
`IsPublic` tinyint,
`Position` int,
`IsFavorite` tinyint,
`ActionType` int,
PRIMARY KEY (`Oid`),
CONSTRAINT `FK_AIPROMPTROUTINE_EMPLOYEE` FOREIGN KEY (`CreatorOid`) REFERENCES `employee` (`Oid`),
CONSTRAINT `FK_AIPROMPTROUTINE_PARENT` FOREIGN KEY (`ParentFolderOid`) REFERENCES `aipromptbausteinfolder` (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;

View File

@@ -79,16 +79,37 @@ namespace AwoIntegrationsGGmbH.Invoicing
public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List<ServiceRecordDC> serviceRecords)
{
var i = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, supportConcept, serviceRecords);
if (i != null)
if (supportConcept.IsApproved || !supportConcept.IsDeleted && !supportConcept.IsArchived) // auch nicht bewilligte abgerechnet werden
{
var claim = i.GetTotalClaim();
if (!claim.HasValue || claim.Value == 0)
var invoice = new ServiceInvoice();
var supportConceptList = new List<CompactSupportConceptDC> { supportConcept };
SetSenderInformation(invoice);
SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList);
SetSingleInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConcept);
SetRecipientInformation(invoice, costBearer);
SetServiceInvoicePeriods(invoice, invoice.InvoiceBase.CostBearer2SupportConcept, invoicePeriod,
serviceRecords);
SetServiceInvoicePeriodAmounts(invoice);
// Spitzabrechnung
if (invoicePeriod == null)
{
return null;
SetAmountAdvancePayments(invoice);
SetAmountEquityContribution(invoice);
}
if (invoice != null)
{
var claim = invoice.GetTotalClaim();
if (!claim.HasValue || claim.Value == 0)
{
return null;
}
}
return invoice;
}
return i;
return null;
}
public override void SetInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod,
@@ -116,11 +137,10 @@ namespace AwoIntegrationsGGmbH.Invoicing
{
SupportConceptApprovalPeriodDC approvalPeriodDC = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(iPeriod);
if (approvalPeriodDC.Span.EndDateTime < invoiceAccountingPeriodSpan.StartDateTime || approvalPeriodDC.Span.StartDateTime > invoiceAccountingPeriodSpan.EndDate)
{
continue;
}
//if (approvalPeriodDC.Span.EndDateTime < invoiceAccountingPeriodSpan.StartDateTime || approvalPeriodDC.Span.StartDateTime > invoiceAccountingPeriodSpan.EndDate)
//{
// continue;
//}
ServiceInvoicePeriod serviceInvoicePeriod = CreateServiceInvoicePeriod(approvalPeriodDC, invoiceAccountingPeriodSpan);
serviceInvoicePeriod.SupportConceptApprovalPeriod = iPeriod;
@@ -139,6 +159,69 @@ namespace AwoIntegrationsGGmbH.Invoicing
}
}
public override ServiceInvoicePeriod CreateServiceInvoicePeriod(SupportConceptApprovalPeriodDC approvalPeriodDC, DateTimeSpan invoiceAccountingPeriodSpan)
{
var sip = new ServiceInvoicePeriod
{
Start = invoiceAccountingPeriodSpan.StartDateTime,
End = invoiceAccountingPeriodSpan.EndDateTime,
};
return sip;
}
public override void SetInvoiceItems(ServiceInvoice invoice, ServiceInvoicePeriod serviceInvoicePeriod, SupportConceptApprovalPeriodDC supportConceptApprovalPeriod,
CostBearer2SupportConcept cb2sc, DateTimeSpan invoicePeriod, List<ServiceRecordDC> serviceRecords)
{
BS.Shared.Services.Calculations calc = PluginLoader.FindClass<BS.Shared.Services.Calculations>(_SpecificID) ?? BS.Shared.Services.Calculations.GetInstance(_SpecificID);
if (ShouldCreateFixedAmounts(serviceInvoicePeriod, supportConceptApprovalPeriod, cb2sc))
{
CreateFixedAmounts(serviceInvoicePeriod, supportConceptApprovalPeriod, cb2sc);
}
else
{
List<ServiceRecordDC> serviceRecordsInPeriod = serviceRecords.Where(
i =>
{
bool valid = i.Start.Value.InBetween(serviceInvoicePeriod.Start.Value,
serviceInvoicePeriod.End.Value, true);
if (valid && serviceInvoicePeriod.SupportConceptApprovalPeriod != null && serviceInvoicePeriod.SupportConceptApprovalPeriod.ServiceCategory != null)
valid = serviceInvoicePeriod.SupportConceptApprovalPeriod.ServiceCategory.Oid ==
i.ServiceDescription.Category.ServiceCategoryOid;
return valid;
}).ToList();
if (serviceRecordsInPeriod.Count > 0)
{
//var approvalPeriodDC = DAOFactory.GenericDAO
// .LoadByID<SupportConceptApprovalPeriod>(serviceInvoicePeriod.SupportConceptApprovalPeriodOid.Value)
// .MapToNewDC();
//Dictionary<DateTimeSpan, decimal> span2HoursTest = cb2sc.SupportConcept.Customer.GetAbsencesTimesNotBillableWholeWeeks();
var absenceTimes = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(cb2sc.SupportConcept.Customer.AbsenceTimes);
Dictionary<DateTimeSpan, decimal> span2Hours = calc.GetAbsencesTimesNotBillable(absenceTimes);
serviceInvoicePeriod.HoursNotBillableAbsence +=
calc.GetHoursNotBillableDueToAbsenceTimes(supportConceptApprovalPeriod,
cb2sc.CostBearer.CostRatePeriods.MapToNewDCs(),
serviceRecordsInPeriod,
span2Hours,
true, true);
//serviceInvoicePeriod.HoursNotBillableNotApproved +=
// calc.GetHoursNotBillableDueToMoreThanApproved(supportConceptApprovalPeriod,
// cb2sc.CostBearer.CostRatePeriods.MapToNewDCs(),
// serviceRecordsInPeriod,
// true, true);
var itemList = CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, serviceInvoicePeriod.SupportConceptApprovalPeriod, calc);
serviceInvoicePeriod.InvoiceItemList.AddRange(itemList);
}
}
}
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc)
{

View File

@@ -31,8 +31,8 @@ namespace BeWo.Report.DefaultReports
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Quittierungsbeleg));
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRSummary xrSummary2 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
@@ -54,7 +54,6 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel34 = new DevExpress.XtraReports.UI.XRLabel();
@@ -81,13 +80,16 @@ namespace BeWo.Report.DefaultReports
this.xrPictureBox3 = new DevExpress.XtraReports.UI.XRPictureBox();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.lblUnterschriftMitarbeiter = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.MinutesAlsStunden = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -146,6 +148,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell7,
this.xrTableCell8,
this.xrTableCell11,
this.xrTableCell14,
this.xrTableCell9});
this.xrTableRow6.Name = "xrTableRow6";
this.xrTableRow6.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
@@ -234,7 +237,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell11.StylePriority.UseTextAlignment = false;
this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell11.TextFormatString = "{0:0.00}";
this.xrTableCell11.Weight = 0.099981150966827373D;
this.xrTableCell11.Weight = 0.099981152943429047D;
//
// xrTableCell9
//
@@ -250,7 +253,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell9.StylePriority.UsePadding = false;
this.xrTableCell9.StylePriority.UseTextAlignment = false;
this.xrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell9.Weight = 0.60606054470377224D;
this.xrTableCell9.Weight = 0.44383758922642275D;
//
// GroupHeader1
//
@@ -285,6 +288,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell4,
this.xrTableCell5,
this.xrTableCell10,
this.xrTableCell12,
this.xrTableCell6});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
@@ -364,7 +368,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell10.StylePriority.UseTextAlignment = false;
this.xrTableCell10.Text = "Arbeitszeit";
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell10.Weight = 0.099981150966827359D;
this.xrTableCell10.Weight = 0.0999811426295713D;
//
// xrTableCell6
//
@@ -379,11 +383,7 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell6.StylePriority.UseTextAlignment = false;
this.xrTableCell6.Text = "Bemerkung";
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell6.Weight = 0.60606054470377235D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
this.xrTableCell6.Weight = 0.44383759954028063D;
//
// formattingRuleStartDate
//
@@ -648,6 +648,24 @@ namespace BeWo.Report.DefaultReports
this.GroupFooter1.KeepTogether = true;
this.GroupFooter1.Name = "GroupFooter1";
//
// xrLabel3
//
this.xrLabel3.BackColor = System.Drawing.Color.Transparent;
this.xrLabel3.Borders = DevExpress.XtraPrinting.BorderSide.Right;
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(224.725F, 20F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UsePadding = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0.00}";
this.xrLabel3.Summary = xrSummary1;
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrLabel17
//
this.xrLabel17.BackColor = System.Drawing.Color.Transparent;
@@ -722,23 +740,40 @@ namespace BeWo.Report.DefaultReports
this.MinutesAlsStunden.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.MinutesAlsStunden.Name = "MinutesAlsStunden";
//
// xrLabel3
// xrTableCell12
//
this.xrLabel3.BackColor = System.Drawing.Color.Transparent;
this.xrLabel3.Borders = DevExpress.XtraPrinting.BorderSide.Right;
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(224.725F, 20F);
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseBorders = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.StylePriority.UsePadding = false;
this.xrLabel3.StylePriority.UseTextAlignment = false;
xrSummary1.FormatString = "{0:0.00}";
this.xrLabel3.Summary = xrSummary1;
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell12.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableCell12.Multiline = true;
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
this.xrTableCell12.StylePriority.UseBorders = false;
this.xrTableCell12.StylePriority.UseFont = false;
this.xrTableCell12.StylePriority.UsePadding = false;
this.xrTableCell12.StylePriority.UseTextAlignment = false;
this.xrTableCell12.Text = "Mitarbeiter/in";
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell12.Weight = 0.16222295350074778D;
//
// xrTableCell14
//
this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeLastName")});
this.xrTableCell14.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableCell14.Multiline = true;
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
this.xrTableCell14.StylePriority.UseBorders = false;
this.xrTableCell14.StylePriority.UseFont = false;
this.xrTableCell14.StylePriority.UsePadding = false;
this.xrTableCell14.StylePriority.UseTextAlignment = false;
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
this.xrTableCell14.Weight = 0.16222295350074778D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// Quittierungsbeleg
//
@@ -829,5 +864,7 @@ namespace BeWo.Report.DefaultReports
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRLabel lblUnterschriftMitarbeiter;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -82,6 +82,12 @@
</Compile>
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="Service\ServiceRecordDurationCalculator.cs" />
<Compile Include="TeamuebersichtKA.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TeamuebersichtKA.designer.cs">
<DependentUpon>TeamuebersichtKA.cs</DependentUpon>
</Compile>
<Compile Include="Teamuebersicht.cs">
<SubType>Component</SubType>
</Compile>
@@ -127,6 +133,10 @@
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="TeamuebersichtKA.resx">
<DependentUpon>TeamuebersichtKA.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Teamuebersicht.resx">
<DependentUpon>Teamuebersicht.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -59,11 +59,9 @@ namespace BeWoDarmstadt
{
foreach (var sr in scRo.ServiceRecords)
{
if (sr.GroupRoundedDuration != null && sr.GroupRoundedDuration != 0 &&
sr.Start >= pRO.ReportStartDate.Value && sr.Start.Value.Date <= end)
if (sr.GroupRoundedDuration != null && sr.GroupRoundedDuration != 0 && sr.Start >= pRO.ReportStartDate.Value && sr.Start.Value.Date <= end)
scRo.AmountPaid += sr.RoundedDuration / 60;
if (sr.ServiceDescription != null && sr.ServiceDescription.Name == "ZwR" &&
sr.Start >= pRO.ReportStartDate.Value && sr.Start.Value.Date <= end)
if (sr.ServiceDescription != null && sr.ServiceDescription.Name == "ZwR" && sr.Start >= pRO.ReportStartDate.Value && sr.Start.Value.Date <= end)
scRo.AmountTotal += sr.RoundedDuration / 60;
if (sr.Start >= monthStart && sr.Start.Value.Date <= end)
{

View File

@@ -115,7 +115,7 @@ namespace BetreuWoWesel
// Endet ein Vertrag mitten im Monat endet, wird in base.CreateEmployeeDetails() das SollProTag auf 0 gesetzt. Dadurch werden hier folgend die
// Abwesenheiten nicht mehr dargestellt, weil "stundenDurchAbwesenheiten" 0 bleibt.
var c = ed.Employee.GetValidContractForDate(start);
if (c != null && c.WeeklyTotalHours.HasValue && c.WeeklyDays.HasValue)
if (c != null && c.WeeklyTotalHours.HasValue && c.WeeklyDays.HasValue && c.WeeklyDays.Value > 0)
{
var sonderfallSoll = c.WeeklyTotalHours.Value / c.WeeklyDays.Value;
if (sollProTag == 0 && sonderfallSoll > 0)

View File

@@ -57,6 +57,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Export\CustomDataExporter.cs" />
<Compile Include="Export\DiamantExporter.cs" />
<Compile Include="Reporting\InvoiceCustomerReport.cs">
<SubType>Component</SubType>
</Compile>

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using BeWo.Service.Core;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using Utils = BS.Shared.Core.Utils;
namespace CaritasverbandDuerenJuelichEV.Export
{
public class SkmDataExporter : DataExporter
{
public override string CreateExportString(string pFileID, string[] pHeaderCaption, string[][] pContent)
{
if (pHeaderCaption != null && pHeaderCaption.Length > 0 && pHeaderCaption[0].Contains("Diamant"))
{
return DiamantExporter.CreateExportString(pHeaderCaption, pContent);
}
return base.CreateExportString(pFileID, pHeaderCaption, pContent);
}
public override QueryDC CreateQuery(QueryDC query)
{
var q = DiamantExporter.CreateQuery(query);
CreateBuchungsExportProtokollEintrag(q);
return q;
}
}
}

View File

@@ -0,0 +1,629 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.DefaultReports;
using BeWo.Report.ReportObjects;
using BeWo.Service.Plugins;
using BS.Shared.DataContracts;
namespace CaritasverbandDuerenJuelichEV.Export
{
public class DiamantExporter
{
public static QueryDC CreateQuery(QueryDC query)
{
DateTime dt = DateTime.Now;
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
if (query.Title == "Diamant Export Stammdaten")
{
query.FileName = String.Format("005S{0:yyMM}.er2", dt);
query.QueryResult = GetDebitorenString(dt);
}
else
{
long? customerOid = null;
if (query.Parameter.Count > 1)
{
if (query.Parameter[1].Value != null)
{
long oid = 0;
if (Int64.TryParse(query.Parameter[1].Value.ToString(), out oid))
{
customerOid = oid;
}
}
}
if (query.Title == "Diamant Korrektur")
{
query.FileName = String.Format("005F{0:yyMM}.er2", dt);
query.QueryResult = GetKorrekturString(dt, customerOid);
}
else
{
query.FileName = String.Format("005F{0:yyyyMM}.er2", dt);
var dtAbgrenzungen = ExecuteQuery(GetAbgrenzungsLvrLwlSql(), dt);
Dictionary<string, string> oid2InvoiceNumbers;
query.QueryResult = GetAbrechnungenString(dt, customerOid, dtAbgrenzungen, out oid2InvoiceNumbers);
query.Attachments = CreateAttachmentFile(dt, dtAbgrenzungen, oid2InvoiceNumbers);
}
}
return query;
}
public static string CreateExportString(string[] pHeaderCaption, string[][] pContent)
{
if (pHeaderCaption != null && pHeaderCaption.Length > 1 && pHeaderCaption[0].Contains("Diamant"))
{
DateTime dt = DateTime.Now;
DateTime.TryParse(pHeaderCaption[1], out dt);
return GetAbrechnungenString(dt, null);
}
return null;
}
private static string GetKorrekturString(DateTime dt, long? customerOid)
{
var exports = DAOFactory.GenericDAO.GetAllActive<BuchungsExport>();
foreach (var exp in exports)
{
if (exp.Name == "Diamant Export Buchungssätze")
{
if (exp.Parameter.Contains(String.Format("Monat={0:dd.MM.yyyy}", dt)))
{
return GetKorrekturString(exp, customerOid);
}
}
}
return "";
}
private static string GetKorrekturString(BuchungsExport exp, long? customerOid)
{
StringBuilder sb = new StringBuilder();
var lines = exp.Export.Split(new string[] {"F,0,005,,,AR,"}, StringSplitOptions.RemoveEmptyEntries);
foreach (var line in lines)
{
if (!customerOid.HasValue)
{
sb.Append("F,0,005,,,AG,");
sb.Append(line);
}
else
{
var cust = DAOFactory.GenericDAO.LoadByID<Customer>(customerOid.Value);
String name = String.Format("{0}, {1}", cust.Person.LastName, cust.Person.FirstName);
String contains = String.Format("\"{0}\"", name);
if (line.Contains(contains))
{
sb.Append("F,0,005,,,AG,");
sb.Append(line);
}
}
}
return sb.ToString();
}
public static String GetDebitorenString(DateTime date)
{
var dt = ExecuteQuery(GetDebitorenSql(date), date);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
{
if (sb.Length > 0)
{
sb.AppendLine();
}
for (int i = 0; i < row.ItemArray.Length; i++)
{
if (i > 0)
{
sb.Append(",");
}
var item = row[i];
bool quote = i == 4 || i == 5 || i == 6 || i > 24;
if (quote)
{
sb.Append('"');
sb.Append(item);
sb.Append('"');
}
else
{
sb.Append(item);
}
}
}
//Debitorenstamm
//S,0, D,200001,,"Bezeichnung1","Bezeichnung2",,,1200,,,,,,,,,,,,,,,,,"Name1","Name2", "Name3","Straße","PLZ","Ort"
return sb.ToString();
}
public static String GetAbrechnungenString(DateTime date, long? customerOid, DataTable dtAbgrenzungen = null)
{
Dictionary<string, string> _;
return GetAbrechnungenString(date, customerOid, dtAbgrenzungen, out _);
}
public static String GetAbrechnungenString(DateTime date, long? customerOid, DataTable dtAbgrenzungen, out Dictionary<string, string> oid2InvoiceNumbers)
{
StringBuilder sb = new StringBuilder();
// 1. Monatliche Abrechnungen
var s = GetMonatlicheAbrechnungString(date, customerOid);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
}
// 2. Spitzabrechnungen
s = GetSpitzabrechnungString(date, customerOid);
if (!String.IsNullOrWhiteSpace(s))
{
if (sb.Length > 0)
sb.AppendLine();
sb.Append(s);
}
// 3. Abgrenzungsbuchungen LVR/LWL
// DataTable wird von außen übergeben (aus CreateQuery), um doppelte SQL-Ausführung zu vermeiden.
// Falls nicht übergeben (z.B. aus CreateExportString), wird die SQL hier ausgeführt.
var abgrenzungenTable = dtAbgrenzungen ?? ExecuteQuery(GetAbgrenzungsLvrLwlSql(), date);
s = GetAbgrenzungsString(abgrenzungenTable, out oid2InvoiceNumbers);
if (!String.IsNullOrWhiteSpace(s))
{
if (sb.Length > 0)
sb.AppendLine();
sb.Append(s);
}
if (sb.Length > 0)
sb.AppendLine();
return sb.ToString();
}
public static String GetMonatlicheAbrechnungString(DateTime date, long? customerOid)
{
// Export enthält Rechnungsangaben Zeilen (Zeile F) und Kostenstellen/Rechnungspositionsangaben (Zeile K) in zwei Zeilen
// Kommen aus Export in einer Zeile und werden hier getrennt, aber nur falls die Rechnung mehrere Positionen hat
// Systemrechnungsnummern (ib.InvoiceNumber) werden direkt verwendet, kein Generator
var dt = ExecuteQuery(GetMonatlicheAbrechnungSql(), date);
return BuildDiamantLines(dt, null);
}
public static String GetSpitzabrechnungString(DateTime date, long? customerOid)
{
// Systemrechnungsnummern (ib.InvoiceNumber) werden direkt verwendet, kein Generator
var dt = ExecuteQuery(GetSpitzabrechnungSql(), date);
return BuildDiamantLines(dt, null);
}
public static String GetAbgrenzungsString(DataTable dt, out Dictionary<string, string> oid2GeneratedNumber)
{
// Abgrenzungsbuchungen für LVR/LWL haben keine Systemrechnungsnummern → pro Buchung (Zeile) eine Rechnungsnummer über den Generator vergeben
var generator = PluginLoader.FindClass<InvoiceNumberGenerator>();
var invoiceNumberDC = generator.LoadInvoiceNumber();
oid2GeneratedNumber = new Dictionary<string, string>();
int invoiceCount = 0;
if (invoiceNumberDC != null && invoiceNumberDC.Use)
{
foreach (DataRow row in dt.Rows)
{
string oid = row[0].ToString();
if (!oid2GeneratedNumber.ContainsKey(oid))
{
invoiceCount++;
// id = leer, da kein bestehender Bezug zur InvoiceNumber
oid2GeneratedNumber[oid] = generator.GetNextInvoiceNumber(invoiceCount, String.Empty);
}
}
}
string result = BuildDiamantLines(dt, oid2GeneratedNumber);
// Rechnungsnummern-Zähler in der DB hochschreiben
if (invoiceCount > 0)
{
generator.IncreaseInvoiceNumber(invoiceCount, new List<SettlementInvoice>());
}
return result;
}
// Gemeinsame Schleife für alle Buchungsarten im Diamant-Format.
// Spalte 0: OID (zur Deduplizierung bei mehreren Positionen pro Rechnung).
// Spalten 1-33: F-Zeile (Rechnungskopf). Ab Spalte 34 (stopIdx): K-Zeile (Kostenstelle/Position).
// Wenn oid2GeneratedNumber != null und die OID enthält, wird Spalte 10 (Rechnungsnummer) durch die generierte Nummer ersetzt. Andernfalls wird der DB-Wert verwendet.
private static String BuildDiamantLines(DataTable dt, Dictionary<string, string> oid2GeneratedNumber)
{
const int startIdx = 1;
const int stopIdx = 34; // ab da beginnen Angaben zu Kostenstelle → zweite Zeile
StringBuilder sb = new StringBuilder();
Dictionary<string, DataRow> oid2Row = new Dictionary<string, DataRow>();
foreach (DataRow row in dt.Rows)
{
string oid = row[0].ToString();
if (!oid2Row.ContainsKey(oid))
{
// Erste Zeile für diese OID: F-Zeile + erste K-Zeile
oid2Row.Add(oid, row);
if (sb.Length > 0)
sb.AppendLine();
for (int i = startIdx; i < row.ItemArray.Length; i++)
{
var item = row[i];
if (i == 10 && oid2GeneratedNumber != null && oid2GeneratedNumber.ContainsKey(oid))
{
// Generierte Rechnungsnummer statt DB-Wert
sb.Append(oid2GeneratedNumber[oid]);
sb.Append(";");
}
else if (i == 15 || i == 42)
{
sb.Append(String.Format("{0}", item.ToString().Replace(",", ".")));
sb.Append(";");
}
else if (i == 16)
{
sb.Append('"');
sb.Append(item);
sb.Append('"');
}
else if (i == stopIdx)
{
sb.AppendLine();
sb.Append(item);
sb.Append(";");
}
else if (i == 12 || i == 44)
{
string konto = SetKonto(item);
sb.Append(String.Format("{0}", konto));
sb.Append(";");
}
else
{
sb.Append(item);
sb.Append(";");
}
}
}
else
{
// Weitere Zeile für dieselbe OID: nur zusätzliche K-Zeile ausgeben
if (sb.Length > 0)
sb.AppendLine();
for (int i = startIdx; i < row.ItemArray.Length; i++)
{
var item = row[i];
// F-Zeilen-Spalten überspringen, nur Kostenstellen ausgeben
if (i == stopIdx)
{
sb.Append(item);
sb.Append(";");
}
else if (i == 42)
{
sb.Append(String.Format("{0}", item.ToString().Replace(",", ".")));
sb.Append(";");
}
else if (i == 44)
{
string konto = SetKonto(item);
sb.Append(String.Format("{0}", konto));
sb.Append(";");
}
else if (i > stopIdx)
{
sb.Append(item);
sb.Append(";");
}
}
}
}
return sb.ToString();
}
private static string SetKonto(object item)
{
string konto = "84190"; // eigentlich alles außer Selbstzahler
if (item != null)
{
if (item.ToString().ToLower().Contains("selbstzahler"))
{
konto = "84191";
}
}
return konto;
}
private static String GetDebitorenSql(DateTime date)
{
String sql = @"
SELECT
distinct
'S',
'0',
'D',
c.DebitorNumber,
CONCAT(p.`LastName`, ' ', p.`FirstName`),
CONCAT(p.`LastName`, ' ', p.`FirstName`),
cb2sc.CustomerRefenrenceNumber,
null,
null,
null,
null,
null,
null,
null,
'D',
'30 Tage netto',
null,
null,
null,
null,
null,
null,
null,
null,
null,
p.`FirstName`,
p.`LastName`,
'',
'',
a.Street,
a.PostalCode,
a.Town
FROM `customer` c
INNER JOIN `person` p ON p.`Oid` = c.`PersonOid`
INNER JOIN supportconcept sc on sc.CustomerOID = c.Oid
INNER JOIN costbearer2supportconcept cb2sc on cb2sc.SupportConceptOID = sc.Oid
LEFT JOIN Address a on p.addressOid = a.oid
WHERE c.isactive=1
order by p.`LastName`, p.FirstName
";
return sql;
}
private static String GetMonatlicheAbrechnungSql()
{
String sql = @"
SELECT
CONCAT(cb2sc.Oid, ib.InvoiceNumber, Round(sip.Claim, 0)) AS OID,
'F',
'0',
'99',
null,
null,
'AR',
':Abrechnungsmonat',
':Periode',
null,
ib.InvoiceNumber,
c.DebitorNumber,
CONCAT(ii.ItemDescription, ' ', org.Name),
null,
null,
Round(sip.Claim, 2) AS 'Betrag',
CONCAT('Re. ', p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
null, null, null, 'EUR',
null, null, null, '14', null, null, null, null, null, null, null, null, null,
'K', 0, c.CostCenter, null, 'V', null, null, null, Round(ii.AmountTotal * -1, 2), null, CONCAT(ii.ItemDescription, ' ', org.Name), null, null, null, null, null, null
FROM
person p
INNER JOIN customer c on c.personoid = p.oid
INNER JOIN supportconcept sc on sc.customeroid = c.oid
INNER JOIN costbearer2supportconcept cb2sc on cb2sc.supportconceptoid = sc.oid
INNER JOIN costbearer cb on cb2sc.costbeareroid = cb.oid
INNER JOIN organisation org on org.costbeareroid = cb.oid
INNER JOIN invoicebase ib on ib.costbearer2supportconceptoid = cb2sc.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 c.`IsActive` = 1 AND sc.`IsActive` = 1 and ib.isactive = 1 and ib.type <> 1
and ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodStart` < ':Monat_End'
ORDER BY ib.invoicenumber
";
return sql;
}
private static String GetSpitzabrechnungSql()
{
String sql = @"
SELECT
CONCAT(cb2sc.Oid, ib.InvoiceNumber) AS OID,
'F',
'0',
'99',
null,
null,
'AR',
':Abrechnungsmonat',
':Periode',
null,
ib.InvoiceNumber,
c.DebitorNumber,
CONCAT('Spitzabrechnung ', org.Name),
null,
null,
Round(si.Claim, 2) AS 'Betrag',
CONCAT('Re. ', p.`LastName`, ', ', p.`FirstName`) as 'Verwendung',
null, null, null, 'EUR',
null, null, null, '14', null, null, null, null, null, null, null, null, null,
'K', 0, c.CostCenter, null, 'V', null, null, null, Round(si.Claim * -1, 2), null, CONCAT('Spitzabrechnung ', org.Name), null, null, null, null, null, null
FROM person p
INNER JOIN customer c on c.personoid = p.oid
INNER JOIN supportconcept sc on sc.customeroid = c.oid
INNER JOIN costbearer2supportconcept cb2sc on cb2sc.supportconceptoid = sc.oid
INNER JOIN costbearer cb on cb2sc.costbeareroid = cb.oid
INNER JOIN organisation org on org.costbeareroid = cb.oid
INNER JOIN invoicebase ib on ib.costbearer2supportconceptoid = cb2sc.oid
INNER JOIN settlementinvoice si on si.invoicebaseoid = ib.oid
WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 and ib.isactive = 1
AND ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodStart` < ':Monat_End'
ORDER BY ib.invoicenumber
";
return sql;
}
private static String GetAbgrenzungsLvrLwlSql()
{
String sql = @"
SELECT
CAST(stunden.cb2sc_oid AS CHAR) AS OID,
'F',
'0',
'99',
null,
null,
'AR',
':Abrechnungsmonat',
':Periode',
null,
null AS InvoiceNumber,
stunden.DebitorNumber,
CONCAT('Abgrenzung ', stunden.OrgName),
null,
null,
ROUND(stunden.Stunden * stunden.Stundensatz, 2) AS Betrag,
CONCAT('Abgr. ', stunden.LastName, ', ', stunden.FirstName) as Verwendung,
null, null, null, 'EUR',
null, null, null, '14', null, null, null, null, null, null, null, null, null,
'K', 0, stunden.CostCenter, null, 'V', null, null, null,
ROUND(stunden.Stunden * stunden.Stundensatz * -1, 2),
null,
CONCAT('Abgrenzung ', stunden.OrgName),
null, null, null, null, null, null
FROM (
SELECT
cb2sc.Oid AS cb2sc_oid,
c.DebitorNumber,
org.Name AS OrgName,
p.LastName,
p.FirstName,
SUM(sr.roundedduration / IF(sr.GroupEmployeeCount IS NULL, 1, sr.GroupEmployeeCount)) / 60 AS Stunden,
(SELECT crp.CostRateValue
FROM costrateperiod crp
WHERE crp.ObjectTid = 22 AND crp.CostRateType = 0 AND crp.ObjectOid = cb2sc.CostBearerOid
AND (crp.EndDate IS NULL OR crp.EndDate > ':Monat_Start')
ORDER BY IF(crp.EndDate IS NULL, MAKEDATE(9999,365), crp.EndDate) LIMIT 1) AS Stundensatz,
c.CostCenter
FROM supportconcept sc
INNER JOIN costbearer2supportconcept cb2sc ON sc.Oid = cb2sc.SupportConceptOid
INNER JOIN costbearer cb ON cb2sc.CostBearerOid = cb.Oid
INNER JOIN organisation org ON org.CostBearerOid = cb.Oid
INNER JOIN customer c ON sc.CustomerOid = c.Oid
INNER JOIN person p ON c.PersonOid = p.Oid
INNER JOIN servicerecord sr ON sr.CostBearer2SupportConceptOid = cb2sc.Oid
INNER JOIN servicedescription sd ON sr.ServiceDescriptionOid = sd.Oid
INNER JOIN servicecategory scat ON sd.ServiceCategoryOid = scat.Oid
WHERE c.IsActive = 1 AND sc.IsActive = 1
AND (org.Name = 'LVR' OR org.Name = 'LWL')
AND sr.StartDate >= ':Monat_Start' AND sr.StartDate < ':Monat_End'
AND scat.Billable = 1
GROUP BY cb2sc.Oid, c.DebitorNumber, org.Name, p.LastName, p.FirstName, c.CostCenter
HAVING SUM(sr.roundedduration) > 0
) AS stunden
ORDER BY stunden.LastName, stunden.FirstName
";
return sql;
}
private static List<FileAttachmentDC> CreateAttachmentFile(DateTime date, DataTable dtAbgrenzungen, Dictionary<string, string> oid2GeneratedNumber)
{
try
{
// Spalten aus der bereits ausgeführten Abgrenzungs-DataTable verwenden:
// 0 = OID, 11 = DebitorNumber, 12 = 'Abgrenzung OrgName', 15 = Betrag, 16 = 'Abgr. Nachname, Vorname'
DataTable table = new DataTable();
string[] spalten = { "Rechnungsnr.", "Empfänger", "Debitornr.", "Erlöskonto", "Kostenstelle", "Verwendung", "Betrag" };
foreach (var spalte in spalten)
table.Columns.Add(spalte, typeof(string));
foreach (DataRow booking in dtAbgrenzungen.Rows)
{
string oid = booking[0].ToString();
string invoiceNumber = String.Empty;
if (oid2GeneratedNumber != null && oid2GeneratedNumber.ContainsKey(oid))
invoiceNumber = oid2GeneratedNumber[oid];
string erloeskonto = SetKonto(booking[12]);
DataRow row = table.NewRow();
row[0] = invoiceNumber;
row[1] = booking[12].ToString().Replace("Abgrenzung ", "");
row[2] = booking[11];
row[3] = erloeskonto;
row[4] = booking[36]; // c.CostCenter
row[5] = booking[16].ToString().Replace("Abgr. ", "");
row[6] = String.Format("{0:0.00}", booking[15]);
table.Rows.Add(row);
}
var queryReportObject = QueryRO.Create(new Query() { Title = "Export" }, table);
queryReportObject.Name = String.Format("Abgrenzungsbuchungen {0:MMMM yyyy}", date);
var queryReport = new Bericht();
queryReport.SetReportDataSource(queryReportObject);
queryReport.CreateDocument();
var pdf = new FileAttachmentDC();
pdf.FileName = String.Format("Abgrenzungsbuchungen{0:MMyyyy}.pdf", date);
using (var ms = new MemoryStream())
{
queryReport.ExportToPdf(ms);
pdf.BinaryData = ms.ToArray();
}
return new List<FileAttachmentDC> { pdf };
}
catch (Exception)
{
return null;
}
}
public static DataTable ExecuteQuery(String sql, DateTime dt)
{
var newsql = sql;
newsql = newsql.Replace(":PeriodeSlash", String.Format("{0:MM/yyyy}", dt));
newsql = newsql.Replace(":Periode", String.Format("{0:MMyyyy}", dt));
newsql = newsql.Replace(":Abrechnungsmonat", String.Format("{0:ddMMyyyy}", dt));
newsql = newsql.Replace(":Monat_Start", String.Format("{0:yyyy-MM}-01", dt));
dt = dt.AddMonths(1);
newsql = newsql.Replace(":Monat_End", String.Format("{0:yyyy-MM}-01", dt));
return DAOFactory.AdoDAO.ExecuteQuery(newsql).Tables[0];
}
}
}

View File

@@ -20,8 +20,7 @@ namespace LyvieKupfer.Invoicing
if (!ii.RateFactor.HasValue)
{
var rateFactor = iServiceRecord.CostBearer.CostRatePeriods.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, iServiceRecord.Start.Value);
if (rateFactor != null && rateFactor.CostRateValue.HasValue
&& !(iServiceRecord.ServiceDescription.Name.ToLower().Contains("fehlkontakt") || (iServiceRecord.ServiceDescription.ProzentAbrechnung.HasValue && iServiceRecord.ServiceDescription.ProzentAbrechnung.Value < 100)))
if (rateFactor != null && rateFactor.CostRateValue.HasValue)
{
ii.RateFactor = rateFactor.CostRateValue;
//ii.UnitCount = ii.UnitCount.Value * ((100 + ii.RateFactor.Value) / 100);

View File

@@ -45,6 +45,7 @@ namespace Ruhrstern
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -61,6 +62,7 @@ namespace Ruhrstern
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -106,12 +108,10 @@ namespace Ruhrstern
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.fieldRelationGesamt = new DevExpress.XtraReports.UI.CalculatedField();
this.ausfallFaktor = new DevExpress.XtraReports.UI.CalculatedField();
this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell();
this.calculatedField1 = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
@@ -200,6 +200,15 @@ namespace Ruhrstern
this.xrTableCell28.Text = "xrTableCell28";
this.xrTableCell28.Weight = 0.056209364894545658D;
//
// xrTableCell32
//
this.xrTableCell32.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.StundenSollOhneUrlaubKrankheit")});
this.xrTableCell32.Multiline = true;
this.xrTableCell32.Name = "xrTableCell32";
this.xrTableCell32.TextFormatString = "{0:0.00}";
this.xrTableCell32.Weight = 0.051437428053343032D;
//
// xrTableCell29
//
this.xrTableCell29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
@@ -350,6 +359,13 @@ namespace Ruhrstern
this.xrTableCell9.Text = "Stunden aus Feier-tagen";
this.xrTableCell9.Weight = 0.056209368959342643D;
//
// xrTableCell31
//
this.xrTableCell31.Multiline = true;
this.xrTableCell31.Name = "xrTableCell31";
this.xrTableCell31.Text = "Tatsäch-liche SOLL Stunden";
this.xrTableCell31.Weight = 0.051437439140044339D;
//
// xrTableCell18
//
this.xrTableCell18.Multiline = true;
@@ -743,6 +759,10 @@ namespace Ruhrstern
this.GroupFooter2.HeightF = 25F;
this.GroupFooter2.Name = "GroupFooter2";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoMonateRO);
//
// fieldRelationGesamt
//
this.fieldRelationGesamt.DataMember = "EmployeeInfoList.EmployeeDetails";
@@ -757,31 +777,11 @@ namespace Ruhrstern
" *100\n";
this.ausfallFaktor.Name = "ausfallFaktor";
//
// xrTableCell31
//
this.xrTableCell31.Multiline = true;
this.xrTableCell31.Name = "xrTableCell31";
this.xrTableCell31.Text = "Tatsäch-liche SOLL Stunden";
this.xrTableCell31.Weight = 0.051437439140044339D;
//
// xrTableCell32
//
this.xrTableCell32.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeInfoList.EmployeeDetails.EmployeeDetail.StundenSollOhneUrlaubKrankheit")});
this.xrTableCell32.Multiline = true;
this.xrTableCell32.Name = "xrTableCell32";
this.xrTableCell32.TextFormatString = "{0:0.00}";
this.xrTableCell32.Weight = 0.051437428053343032D;
//
// calculatedField1
//
this.calculatedField1.DataMember = "EmployeeInfoList";
this.calculatedField1.Name = "calculatedField1";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoMonateRO);
//
// MitarbeiterstundenkontoJahr
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {

View File

@@ -20,7 +20,25 @@ namespace Ruhrstern
var msb = PluginLoader.FindClass<MitarbeiterstundenkontoBerechnung>();
msb.CreateReport(pRO);
bindingSource1.DataSource = pRO;
}
// Für den Ausfallfaktor brauche ich die um die Feiertage korrigierten Summen der Sollzeiten
decimal sollOhneGes = 0;
decimal sollMaxGes = 0;
foreach (var td in pRO.TeamDetailList)
{
decimal sollOhne = 0;
decimal sollMax = 0;
foreach (var ed in td.EmployeeDetailList)
{
sollOhne += ed.Custom3;
sollMax += ed.Custom4;
}
td.MittelbarIst = (1 - (sollOhne) / sollMax) * 100;
sollMaxGes += sollMax;
sollOhneGes += sollOhne;
}
pRO.MittelbarIst = (1 - (sollOhneGes) / sollMaxGes) * 100;
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -36,7 +36,9 @@ namespace Ruhrstern
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -45,6 +47,7 @@ namespace Ruhrstern
this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell24 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell59 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell35 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -52,6 +55,7 @@ namespace Ruhrstern
this.xrTableCell38 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell39 = new DevExpress.XtraReports.UI.XRTableCell();
this.cellSollGesamt = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell60 = new DevExpress.XtraReports.UI.XRTableCell();
this.cellFLSSollGesamt = new DevExpress.XtraReports.UI.XRTableCell();
this.cellFLSIstGesamt = new DevExpress.XtraReports.UI.XRTableCell();
this.cellFLSPlusMinusGesamt = new DevExpress.XtraReports.UI.XRTableCell();
@@ -79,21 +83,6 @@ namespace Ruhrstern
this.DetailReport2 = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail3 = new DevExpress.XtraReports.UI.DetailBand();
this.GroupHeader2 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportFooter1 = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrTable4 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -111,15 +100,26 @@ namespace Ruhrstern
this.xrTableCell54 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell55 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell56 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell59 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell60 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportFooter1 = new DevExpress.XtraReports.UI.ReportFooterBand();
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -197,6 +197,15 @@ namespace Ruhrstern
this.xrTableCell20.Text = "xrTableCell20";
this.xrTableCell20.Weight = 0.063901139337592991D;
//
// xrTableCell57
//
this.xrTableCell57.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.EmployeeDetailList.Custom2")});
this.xrTableCell57.Multiline = true;
this.xrTableCell57.Name = "xrTableCell57";
this.xrTableCell57.TextFormatString = "{0:0.00}";
this.xrTableCell57.Weight = 0.056000251185259795D;
//
// xrTableCell28
//
this.xrTableCell28.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
@@ -205,6 +214,15 @@ namespace Ruhrstern
this.xrTableCell28.Text = "xrTableCell28";
this.xrTableCell28.Weight = 0.051245961993314645D;
//
// xrTableCell58
//
this.xrTableCell58.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.EmployeeDetailList.Custom1")});
this.xrTableCell58.Multiline = true;
this.xrTableCell58.Name = "xrTableCell58";
this.xrTableCell58.TextFormatString = "{0:0.00}";
this.xrTableCell58.Weight = 0.054950903298298021D;
//
// xrTableCell16
//
this.xrTableCell16.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
@@ -269,6 +287,15 @@ namespace Ruhrstern
this.xrTableCell26.Text = "xrTableCell26";
this.xrTableCell26.Weight = 0.062885088357332045D;
//
// xrTableCell59
//
this.xrTableCell59.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.EmployeeDetailList.Resturlaub")});
this.xrTableCell59.Multiline = true;
this.xrTableCell59.Name = "xrTableCell59";
this.xrTableCell59.TextFormatString = "{0:0.00}";
this.xrTableCell59.Weight = 0.062885088357332045D;
//
// xrTable1
//
this.xrTable1.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
@@ -339,6 +366,15 @@ namespace Ruhrstern
this.cellSollGesamt.Text = "cellSollGesamt";
this.cellSollGesamt.Weight = 0.051245893198052866D;
//
// xrTableCell60
//
this.xrTableCell60.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "MittelbarIst")});
this.xrTableCell60.Multiline = true;
this.xrTableCell60.Name = "xrTableCell60";
this.xrTableCell60.TextFormatString = "{0:0.00}";
this.xrTableCell60.Weight = 0.05495106840692629D;
//
// cellFLSSollGesamt
//
this.cellFLSSollGesamt.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
@@ -571,130 +607,6 @@ namespace Ruhrstern
this.GroupHeader2.HeightF = 69.99998F;
this.GroupHeader2.Name = "GroupHeader2";
//
// GroupFooter2
//
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable3});
this.GroupFooter2.HeightF = 52.08333F;
this.GroupFooter2.Name = "GroupFooter2";
//
// xrTable3
//
this.xrTable3.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable3.Name = "xrTable3";
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow3});
this.xrTable3.SizeF = new System.Drawing.SizeF(1005F, 25F);
this.xrTable3.StylePriority.UseBorders = false;
this.xrTable3.StylePriority.UseFont = false;
this.xrTable3.StylePriority.UsePadding = false;
this.xrTable3.StylePriority.UseTextAlignment = false;
this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrTableRow3
//
this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1,
this.xrTableCell7,
this.xrTableCell8,
this.xrTableCell9,
this.xrTableCell10,
this.xrTableCell11,
this.xrTableCell12,
this.xrTableCell13,
this.xrTableCell14,
this.xrTableCell15});
this.xrTableRow3.Name = "xrTableRow3";
this.xrTableRow3.Weight = 1D;
//
// xrTableCell1
//
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UsePadding = false;
this.xrTableCell1.StylePriority.UseTextAlignment = false;
this.xrTableCell1.Text = "Gesamt [TeamDetailList.TeamName]";
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell1.Weight = 0.36763827407327837D;
//
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.SollGesamt", "{0:0.00}")});
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "xrTableCell7";
this.xrTableCell7.Weight = 0.054950903298297958D;
//
// xrTableCell8
//
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.FlsSollGesamt", "{0:0.00}")});
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Text = "xrTableCell8";
this.xrTableCell8.Weight = 0.052425979600498759D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.FlsIstGesamt", "{0:0.00}")});
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Text = "xrTableCell9";
this.xrTableCell9.Weight = 0.050524285938204488D;
//
// xrTableCell10
//
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.FlsDiffGesamt", "{0:0.00}")});
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Text = "xrTableCell10";
this.xrTableCell10.Weight = 0.062885088357332058D;
//
// xrTableCell11
//
this.xrTableCell11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.StundenGesamt", "{0:0.00}")});
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.Text = "xrTableCell11";
this.xrTableCell11.Weight = 0.0628849782849132D;
//
// xrTableCell12
//
this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.RelationFlsZuMittelbar", "{0:0.00}")});
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Text = "xrTableCell12";
this.xrTableCell12.Weight = 0.06288486821249438D;
//
// xrTableCell13
//
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Weight = 0.065787587969877145D;
//
// xrTableCell14
//
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.Weight = 0.063119927862939587D;
//
// xrTableCell15
//
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.Weight = 0.063119927862939573D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
//
// ReportFooter1
//
this.ReportFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.ReportFooter1.HeightF = 60F;
this.ReportFooter1.Name = "ReportFooter1";
//
// xrTable4
//
this.xrTable4.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
@@ -839,38 +751,129 @@ namespace Ruhrstern
this.xrTableCell56.Text = "Resturlaub";
this.xrTableCell56.Weight = 0.0631199213956443D;
//
// xrTableCell57
// GroupFooter2
//
this.xrTableCell57.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.EmployeeDetailList.Custom2")});
this.xrTableCell57.Multiline = true;
this.xrTableCell57.Name = "xrTableCell57";
this.xrTableCell57.TextFormatString = "{0:0.00}";
this.xrTableCell57.Weight = 0.056000251185259795D;
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable3});
this.GroupFooter2.HeightF = 52.08333F;
this.GroupFooter2.Name = "GroupFooter2";
//
// xrTableCell58
// xrTable3
//
this.xrTableCell58.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.EmployeeDetailList.Custom1")});
this.xrTableCell58.Multiline = true;
this.xrTableCell58.Name = "xrTableCell58";
this.xrTableCell58.TextFormatString = "{0:0.00}";
this.xrTableCell58.Weight = 0.054950903298298021D;
this.xrTable3.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable3.Name = "xrTable3";
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow3});
this.xrTable3.SizeF = new System.Drawing.SizeF(1005F, 25F);
this.xrTable3.StylePriority.UseBorders = false;
this.xrTable3.StylePriority.UseFont = false;
this.xrTable3.StylePriority.UsePadding = false;
this.xrTable3.StylePriority.UseTextAlignment = false;
this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// xrTableCell59
// xrTableRow3
//
this.xrTableCell59.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.EmployeeDetailList.Resturlaub")});
this.xrTableCell59.Multiline = true;
this.xrTableCell59.Name = "xrTableCell59";
this.xrTableCell59.TextFormatString = "{0:0.00}";
this.xrTableCell59.Weight = 0.062885088357332045D;
this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1,
this.xrTableCell7,
this.xrTableCell8,
this.xrTableCell9,
this.xrTableCell10,
this.xrTableCell11,
this.xrTableCell12,
this.xrTableCell13,
this.xrTableCell14,
this.xrTableCell15});
this.xrTableRow3.Name = "xrTableRow3";
this.xrTableRow3.Weight = 1D;
//
// xrTableCell60
// xrTableCell1
//
this.xrTableCell60.Multiline = true;
this.xrTableCell60.Name = "xrTableCell60";
this.xrTableCell60.Weight = 0.05495106840692629D;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UsePadding = false;
this.xrTableCell1.StylePriority.UseTextAlignment = false;
this.xrTableCell1.Text = "Gesamt [TeamDetailList.TeamName]";
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell1.Weight = 0.36763827407327837D;
//
// xrTableCell7
//
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.MittelbarIst", "{0:0.00}")});
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "xrTableCell7";
this.xrTableCell7.Weight = 0.054950903298297958D;
//
// xrTableCell8
//
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.FlsSollGesamt", "{0:0.00}")});
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Text = "xrTableCell8";
this.xrTableCell8.Weight = 0.052425979600498759D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.FlsIstGesamt", "{0:0.00}")});
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Text = "xrTableCell9";
this.xrTableCell9.Weight = 0.050524285938204488D;
//
// xrTableCell10
//
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.FlsDiffGesamt", "{0:0.00}")});
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Text = "xrTableCell10";
this.xrTableCell10.Weight = 0.062885088357332058D;
//
// xrTableCell11
//
this.xrTableCell11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.StundenGesamt", "{0:0.00}")});
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.Text = "xrTableCell11";
this.xrTableCell11.Weight = 0.0628849782849132D;
//
// xrTableCell12
//
this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "TeamDetailList.RelationFlsZuMittelbar", "{0:0.00}")});
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Text = "xrTableCell12";
this.xrTableCell12.Weight = 0.06288486821249438D;
//
// xrTableCell13
//
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Weight = 0.065787587969877145D;
//
// xrTableCell14
//
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.Weight = 0.063119927862939587D;
//
// xrTableCell15
//
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.Weight = 0.063119927862939573D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO);
//
// ReportFooter1
//
this.ReportFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable1});
this.ReportFooter1.HeightF = 60.625F;
this.ReportFooter1.Name = "ReportFooter1";
//
// Teamstundenkonto
//
@@ -898,9 +901,9 @@ namespace Ruhrstern
this.Version = "23.2";
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C1FED668-ADB9-47E0-B589-1389618E1B6E}</ProjectGuid>
<ProjectGuid>{BD841D90-CD90-44B6-8B3C-5C7D05225842}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SamanthaRiegerIntegrationspraxis</RootNamespace>

View File

@@ -90,7 +90,7 @@ namespace SehtMuenster.Export
sb.Append(String.Format("{0:0.00}", row[0])); // Betrag
sb.Append(";");
sb.Append("8520");
sb.Append("48288");
sb.Append(";");
sb.Append(String.Format("{0}", minBelegnummer++)); // Belegnummer
sb.Append(";");
@@ -103,9 +103,9 @@ namespace SehtMuenster.Export
sb.Append(String.Format("{0}", row[2])); // Debitor
sb.Append(";");
sb.Append(String.Format("{0}", row[3])); // Text
sb.Append(String.Format("{0} {1:MM.yy}", row[3], lastDate)); // Text
sb.Append(";");
sb.Append(String.Format("{0}", row[4])); // Kostenstelle
sb.Append(String.Format("{0}", "118200")); // Kostenstelle derzeit fest - row[4]
sb.Append(";");

View File

@@ -30,7 +30,7 @@ namespace SpitalstiftungKonstanz
//if (pRO == null)
// return;
if (pRO.Services != null)
if (pRO.Services != null && pRO.Services.Count > 0)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();

View File

@@ -33,7 +33,7 @@ namespace BeWo.Service.DCEntityMapper
public override AiPromptbausteinFolder MergeWithEntity(AiPromptbausteinFolderDC pDataContract, AiPromptbausteinFolder pEntity)
{
base.MergeWithDC(pEntity, pDataContract);
base.MergeWithEntity(pDataContract, pEntity);
pEntity.Title = pDataContract.Title;
pEntity.Description = pDataContract.Description;

View File

@@ -42,7 +42,7 @@ namespace BeWo.Service.DCEntityMapper
public override AiPromptbausteinPrompt MergeWithEntity(AiPromptbausteinPromptDC pDataContract, AiPromptbausteinPrompt pEntity)
{
base.MergeWithDC(pEntity, pDataContract);
base.MergeWithEntity(pDataContract, pEntity);
pEntity.Title = pDataContract.Title;
pEntity.Description = pDataContract.Description;

View File

@@ -0,0 +1,59 @@
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.ServiceImplementations;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.Service.DCEntityMapper
{
public class AiPromptroutineDC_AiPromptroutine : BeWoDataContract_BeWoEntityBase<AiPromptroutine, AiPromptroutineDC>
{
public override AiPromptroutineDC MergeWithDC(AiPromptroutine pEntity, AiPromptroutineDC pDataContract)
{
base.MergeWithDC(pEntity, pDataContract);
pDataContract.Title = pEntity.Title;
pDataContract.Description = pEntity.Description;
pDataContract.ParentFolderOid = pEntity.ParentFolderOid;
pDataContract.IsPublic = pEntity.IsPublic;
pDataContract.Position = pEntity.Position;
pDataContract.IsFavorite = pEntity.IsFavorite;
pDataContract.ActionType = pEntity.ActionType;
pDataContract.CanEdit = pEntity.CanEdit;
pDataContract.Steps = MapperFactory.AiPromptroutineStep.MapToNewDCs(pEntity.Steps);
if (pEntity.CreatorOid is long oid)
pDataContract.Creator = new EmployeeServiceImp().GetActiveCompactEmployeeWithOid(oid);
return pDataContract;
}
public override AiPromptroutine MergeWithEntity(AiPromptroutineDC pDataContract, AiPromptroutine pEntity)
{
base.MergeWithEntity(pDataContract, pEntity);
pEntity.Title = pDataContract.Title;
pEntity.Description = pDataContract.Description;
pEntity.ParentFolderOid = pDataContract.ParentFolderOid;
pEntity.CreatorOid = pDataContract.Creator.EmployeeOid;
pEntity.IsPublic = pDataContract.IsPublic;
pEntity.Position = pDataContract.Position;
pEntity.IsFavorite = pDataContract.IsFavorite;
pEntity.ActionType = pDataContract.ActionType;
pEntity.CanEdit = pDataContract.CanEdit;
pEntity.Steps = DAOFactory.GenericDAO.LoadByIDs<AiPromptroutineStep>(pDataContract.Steps.Select(x => x.Oid.Value));
if (pDataContract.ParentFolderOid is long oid && oid >= 0)
pEntity.ParentFolderOid = pDataContract.ParentFolderOid;
return pEntity;
}
}
}

View File

@@ -0,0 +1,38 @@
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.Service.DCEntityMapper
{
public class AiPromptroutineStepDC_AiPromptroutineStep : BeWoDataContract_BeWoEntityBase<AiPromptroutineStep, AiPromptroutineStepDC>
{
public override AiPromptroutineStepDC MergeWithDC(AiPromptroutineStep pEntity, AiPromptroutineStepDC pDataContract)
{
base.MergeWithDC(pEntity, pDataContract);
pDataContract.Position = pEntity.Position;
pDataContract.PromptReference = MapperFactory.AiPromptbausteinPrompt.MapToNewDC(pEntity.PromptReference);
pDataContract.ReferenceVersion = pEntity.ReferenceVersion;
return pDataContract;
}
public override AiPromptroutineStep MergeWithEntity(AiPromptroutineStepDC pDataContract, AiPromptroutineStep pEntity)
{
base.MergeWithEntity(pDataContract, pEntity);
pEntity.Position = pDataContract.Position;
pEntity.PromptReference = DAOFactory.GenericDAO.LoadByID<AiPromptbausteinPrompt>(pDataContract.PromptReference.Oid.Value);
pEntity.ReferenceVersion = pDataContract.ReferenceVersion;
return pEntity;
}
}
}

View File

@@ -24,7 +24,7 @@ namespace BeWo.Service.DCEntityMapper
public override AiUserSetting MergeWithEntity(AiUserSettingDC pDataContract, AiUserSetting pEntity)
{
base.MergeWithDC(pEntity, pDataContract);
base.MergeWithEntity(pDataContract, pEntity);
pEntity.ApplicationUser = UserRightHelper.GetLoggedInUser();
pEntity.AutoStartRecording = pDataContract.AutoStartRecording;

View File

@@ -26,8 +26,8 @@ namespace BeWo.Service.DCEntityMapper
{
ConcurrencyCheck(pDataContract.Version, pEntity);
pEntity.Oid = pDataContract.Oid;
pEntity.Version = pDataContract.Version;
//pEntity.Oid = pDataContract.Oid;
//pEntity.Version = pDataContract.Version;
pEntity.Notice = pDataContract.Notice;
return pEntity;

View File

@@ -814,6 +814,8 @@ namespace BeWo.Service.DCEntityMapper
public static AiConfigDC_AiConfig AiConfig { get; } = new AiConfigDC_AiConfig();
public static AiPromptbausteinFolderDC_AiPromptbausteinFolder AiPromptbausteinFolder { get; } = new AiPromptbausteinFolderDC_AiPromptbausteinFolder();
public static AiPromptbausteinPromptDC_AiPromptbausteinPrompt AiPromptbausteinPrompt { get; } = new AiPromptbausteinPromptDC_AiPromptbausteinPrompt();
public static AiPromptroutineDC_AiPromptroutine AiPromptroutine { get; } = new AiPromptroutineDC_AiPromptroutine();
public static AiPromptroutineStepDC_AiPromptroutineStep AiPromptroutineStep { get; } = new AiPromptroutineStepDC_AiPromptroutineStep();
public static AiUserSettingDC_AiUserSetting AiUserSetting { get; } = new AiUserSettingDC_AiUserSetting();
public static AddressDC_Address Address { get; } = new AddressDC_Address();
public static GkvAbrechnungLightDC_GkvAbrechnungLight GkvAbrechnungLight { get; } = new GkvAbrechnungLightDC_GkvAbrechnungLight();

View File

@@ -29,7 +29,7 @@ namespace BeWo.Service.DCEntityMapper
public override StoredFile MergeWithEntity(StoredFileDC pDataContract, StoredFile pEntity)
{
base.MergeWithDC(pEntity, pDataContract);
base.MergeWithEntity(pDataContract, pEntity);
pEntity.FileName = pDataContract.FileName;
pEntity.FilePath = pDataContract.FilePath;

View File

@@ -264,7 +264,8 @@ namespace BeWo.Service.Plugins
//t = "7114701269"; // Die Brücke Hilfe und Halt
//t = "6447060239"; // Empathie Fachassistenz
//t = "6919016656"; // Leben und Wohnen Christian Wilke
//t = "8281327384"; // Caritasverband Düren-Jülich e.V. (Eingliederungshilfe)
//t = "8281327384"; // Caritasverband Düren-Jülich e.V. (Jugendhilfe - Hr Freuen)
//t = "4512933309"; // Caritasverband Düren-Jülich e.V. (BeWo - Eingliederungshilfe)
//t = "6023735102"; // Kölner BeWo (Selbstbestimmt Leben)
//t = "2998118179"; // BeWo Plus
//t = "9254115251"; // Praunheimer Werkstätten 2.DB

View File

@@ -247,6 +247,8 @@
<Compile Include="DCEntityMapper\AiConfigDC_AiConfig.cs" />
<Compile Include="DCEntityMapper\AiModelDC_AiModel.cs" />
<Compile Include="DCEntityMapper\AiPromptbausteinFolderDC_AiPromptbausteinFolder.cs" />
<Compile Include="DCEntityMapper\AiPromptroutineDC_AiPromptroutine.cs" />
<Compile Include="DCEntityMapper\AiPromptroutineStepDC_AiPromptroutineStep.cs" />
<Compile Include="DCEntityMapper\AiUserSettingDC_AiUserSetting.cs" />
<Compile Include="DCEntityMapper\AiPromptbausteinPromptDC_AiPromptbausteinPrompt.cs" />
<Compile Include="DCEntityMapper\BankAccountDC_BankAccount.cs" />

View File

@@ -199,7 +199,9 @@ namespace BS.Shared
AiVoiceData = 186,
AiPromptbausteinPrompt = 187,
AiPromptbausteinFolder = 188,
AiUserSetting = 189
AiUserSetting = 189,
AiPromptroutine = 190,
AiPromptroutineStep = 191,
}
public enum SystemEntryID

View File

@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Instrumentation;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.DataContracts.Feature.AI
{
//[DataContract]
//public class AiPromptbausteinFolderStructureDC : IDataContract
//{
// public AiPromptbausteinFolderDC MyProperty { get; set; }
//}
}

View File

@@ -0,0 +1,28 @@
using BS.Shared.DataContracts.Compact;
using BS.Shared.Interface.Feature.AICore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.DataContracts.Feature.AI
{
public class AiPromptroutineDC : BeWoDataContract, IAiPromptroutine
{
[DataMember] public string Title { get; set; }
[DataMember] public string Description { get; set; }
[DataMember] public long? ParentFolderOid { get; set; }
[DataMember] public CompactEmployeeDC Creator { get; set; }
[DataMember] public bool IsPublic { get; set; }
[DataMember] public int Position { get; set; }
[DataMember] public bool IsFavorite { get; set; }
[DataMember] public AiActionType ActionType { get; set; }
[DataMember] public bool CanEdit { get; set; }
[DataMember] public List<AiPromptroutineStepDC> Steps { get; set; } = new List<AiPromptroutineStepDC> { };
List<IAiPromptroutineStep> IAiPromptroutine.Steps => this.Steps.Select(x => x as IAiPromptroutineStep).ToList();
}
}

View File

@@ -0,0 +1,21 @@
using BS.Shared.DataContracts.Compact;
using BS.Shared.Interface;
using BS.Shared.Interface.Feature.AICore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.DataContracts.Feature.AI
{
public class AiPromptroutineStepDC : BeWoDataContract, IAiPromptroutineStep
{
[DataMember] public int Position { get; set; }
[DataMember] public AiPromptbausteinPromptDC PromptReference { get; set; }
[DataMember] public long ReferenceVersion { get; set; }
public IAiPromptbausteinPrompt Reference => PromptReference;
}
}

View File

@@ -0,0 +1,31 @@
using BS.Shared.Interface.Feature.AICore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Extensions
{
public static class AiPromptroutineExtensions
{
public static bool CanExecuteRoutine(this IAiPromptroutine routine)
{
if (routine?.Steps is null || !routine.Steps.Any())
return false;
foreach (var step in routine.Steps)
{
// Delete
if (step.Reference is null)
return false;
// Update
if (step.Reference.Version != step.ReferenceVersion)
return false;
}
return true;
}
}
}

View File

@@ -8,6 +8,7 @@ namespace BS.Shared.Interface
{
public interface IAiPromptbausteinPrompt
{
string Prompt { get; set; }
long? Version { get; }
string Prompt { get; }
}
}

View File

@@ -0,0 +1,25 @@
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Feature.AI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Interface.Feature.AICore
{
public interface IAiPromptroutine
{
string Title { get; }
string Description { get; }
long? ParentFolderOid { get; }
bool IsPublic { get; }
int Position { get; }
bool IsFavorite { get; }
AiActionType ActionType { get; }
bool CanEdit { get; }
List<IAiPromptroutineStep> Steps { get; }
}
}

View File

@@ -0,0 +1,17 @@
using BS.Shared.DataContracts.Feature.AI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Interface.Feature.AICore
{
public interface IAiPromptroutineStep
{
int Position { get; }
IAiPromptbausteinPrompt Reference { get; }
long ReferenceVersion { get; }
}
}

View File

@@ -194,11 +194,12 @@
<Compile Include="DataContracts\AdminService\AdminServiceSumResponseDetailDC.cs" />
<Compile Include="DataContracts\AdminService\IAdminServiceDC.cs" />
<Compile Include="DataContracts\AdminService\AdminServiceSumReqDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptroutineDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptroutineStepDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiUserSettingDC.cs" />
<Compile Include="DataContracts\IAbsenceTime.cs" />
<Compile Include="DataContracts\AiVoiceDataDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinFolderDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinFolderStructureDC.cs" />
<Compile Include="DataContracts\Feature\AI\AiPromptbausteinPromptDC.cs" />
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberRequestDC.cs" />
<Compile Include="DataContracts\Invoicing\GkvAbrechnung\GkvServerGetNumberResponseDC.cs" />
@@ -419,6 +420,7 @@
<Compile Include="Exceptions\BeWoNotImplementedException.cs" />
<Compile Include="Exceptions\BeWoInvalidOperationException.cs" />
<Compile Include="Exceptions\GkvException.cs" />
<Compile Include="Extensions\AiPromptroutineExtensions.cs" />
<Compile Include="Extensions\ApiResponseExtension.cs" />
<Compile Include="Extensions\BoolExtensions.cs" />
<Compile Include="Extensions\ContactExtensions.cs" />
@@ -433,8 +435,10 @@
<Compile Include="Extensions\TimeIntervalExtensions.cs" />
<Compile Include="Interface\Abstract\IAddressable.cs" />
<Compile Include="Interface\Feature\AICore\IAiConversationMessage.cs" />
<Compile Include="Interface\IAiPromptbaustein.cs" />
<Compile Include="Interface\IAiPromptbausteinPrompt.cs" />
<Compile Include="Interface\Feature\AICore\IAiPromptbaustein.cs" />
<Compile Include="Interface\Feature\AICore\IAiPromptbausteinPrompt.cs" />
<Compile Include="Interface\Feature\AICore\IAiPromptroutine.cs" />
<Compile Include="Interface\Feature\AICore\IAiPromptroutineStep.cs" />
<Compile Include="Interface\IApiErrorExtractor.cs" />
<Compile Include="Interface\IContact.cs" />
<Compile Include="Interface\IFileStorageDAO.cs" />

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Root Type="DevExpress.CodeRush.Foundation.CodePlaces.Options.FavoritesListContainer">
<Options Language="Neutral">
<Groups />
</Options>
</Root>

View File

@@ -17,6 +17,7 @@
<appender name="logFile" type="log4net.Appender.RollingFileAppender,log4net">
<param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
<param name="File" value="logs\log_" />
<param name="Encoding" value="utf-8" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Composite" />
<param name="DatePattern" value="yyyy.MM.dd'.log'" />

View File

@@ -24,8 +24,10 @@ namespace BeWoLogCleaner
static void ReadConfig()
{
var path = "clean_config.json";
var json = File.ReadAllText(path);
var path = AppDomain.CurrentDomain.BaseDirectory;
var file = "clean_config.json";
var path2 = Path.Combine(path, file);
var json = File.ReadAllText(path2);
var json_obj = JsonSerializer.Deserialize<CleanerConfig>(json);
Config = json_obj;
}