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

This commit is contained in:
2025-03-31 12:10:05 +02:00
54 changed files with 4067 additions and 3060 deletions

View File

@@ -128,9 +128,12 @@
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="3" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigBis, UpdateSourceTrigger=PropertyChanged}"/>
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" Orientation="Horizontal">
<Button Content="{markup:Translate Neuen Arbeitstag hinzufügen}" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0" />
<Button Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Content="{markup:Translate Gesamte Arbeitszeiten kopieren}" HorizontalAlignment="Left" Click="CopyArbeitszeit_Click" Height="23" Margin="10,10,0,0" />
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="Neuen Arbeitstag hinzufügen" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0"/>
</StackPanel>
<controls:PopupNonTopmost Name="popup_newArbeitszeitEintrag" Placement="MousePoint" StaysOpen="True" >
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox Name="groupbox_newArbeistzeit" Header="Neuen Eintrag hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">

View File

@@ -176,6 +176,34 @@ namespace BeWo.View
grid_ArbeitszeitEintrag.RefreshData();
}
private void CopyArbeitszeit_Click(object sender, RoutedEventArgs e)
{
var arbeitszeit = tabcontrol_Arbeitszeit.SelectedItem as ArbeitszeitVM;
var dc = new ArbeitszeitDC();
if (arbeitszeit.GueltigBis.HasValue)
{
dc.GueltigVon = arbeitszeit.GueltigBis.Value.AddDays(1);
}
dc.Eintraege = new List<ArbeitszeitEintragDC>();
foreach (var ae in arbeitszeit.ArbeitszeitEintraege.VMList)
{
var copy = new ArbeitszeitEintragDC();
copy.Tag = ae.Tag;
copy.UhrzeitVon = ae.UhrzeitVon;
copy.UhrzeitBis = ae.UhrzeitBis;
copy.Notice = ae.Notice;
copy.Customer = ae.CompactCustomer;
dc.Eintraege.Add(copy);
}
var copyVm = new ArbeitszeitVM(dc);
ViewModel.Arbeitszeiten.VMList.Add(copyVm);
tabcontrol_Arbeitszeit.SelectedIndex = tabcontrol_Arbeitszeit.Items.Count - 1;
}
private void GridControl_OnCustomColumnSort(object sender, CustomColumnSortEventArgs e)
{
var comparer = new WochentagComparerClass();

View File

@@ -181,8 +181,8 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.3.0.3\lib\net462\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.0.4.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.3.0.4\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0\lib\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
@@ -210,15 +210,15 @@
<HintPath>..\packages\RestSharp.106.13.0\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.Entity" />
<Reference Include="System.Drawing" />
<Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll</HintPath>
<Reference Include="System.Memory, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.6.2\lib\net462\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -231,15 +231,15 @@
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll</HintPath>
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.1\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.ServiceModel" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.2\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />

View File

@@ -118,7 +118,7 @@ function hasEmptyRequiredFields(form) {
var count = 0;
form.each(function() {
var requiredElements = $(this, "input, textarea, select").find("[required]");
const requiredElements = $(this, "input, textarea, select").find("[required]");
requiredElements.each(function(index, element) {
if ($(element).val().length === 0) {
@@ -132,7 +132,7 @@ function hasEmptyRequiredFields(form) {
function showAboutPopup() {
// Auf deutsch?
var text = "SignaturePad:<br/>Copyright (c) 2018 Szymon Nowak<br/><br/>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights<br/>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<br/>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<br/>THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.";
const text = "SignaturePad:<br/>Copyright (c) 2018 Szymon Nowak<br/><br/>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights<br/>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:<br/>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.<br/>THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.";
$("#message-popup-ok-btn").unbind();
$("#message-popup-close-btn").unbind();
@@ -152,8 +152,8 @@ function showAboutPopup() {
}
function cloneCanvas(oldCanvas) {
var newCanvas = document.createElement("canvas");
var context = newCanvas.getContext("2d", {willReadFrequently: true});
const newCanvas = document.createElement("canvas");
const context = newCanvas.getContext("2d", {willReadFrequently: true});
newCanvas.width = oldCanvas.width;
newCanvas.height = oldCanvas.height;
@@ -237,15 +237,15 @@ function isUndefinedOrNull(obj) {
}
function areUndefinedOrNull(array) {
if (array == null) {
if(array == null) {
return true;
}
if (!Array.isArray(array)) {
if(!Array.isArray(array)) {
return true;
}
for (var i = 0; i < array.length; i++) {
for(let i = 0; i < array.length; i++) {
if(array[i] != null) {
return false;
}
@@ -255,64 +255,45 @@ function areUndefinedOrNull(array) {
}
function cardHeaderClick(chevronId, cardBodyId) {
try {
$(cardBodyId).toggle();
toggleChevron(chevronId, cardBodyId);
}
catch(error) {
showErrorPopup(error);
}
$(cardBodyId).collapse("toggle");
toggleChevron(chevronId, cardBodyId);
}
function cardHeaderClick2(element, callback) {
try {
if(element === undefined || element === null) {
console.logWarning("element is undefined or null!");
return;
}
if(element === undefined || element === null) {
console.logWarning("element is undefined or null!");
return;
}
const chevronDown = $(element).find(".fa-chevron-down");
const chevronUp = $(element).find(".fa-chevron-up");
const chevronDown = $(element).find(".fa-chevron-down");
const chevronUp = $(element).find(".fa-chevron-up");
chevronDown.removeClass("fa-chevron-down").addClass("fa-chevron-up");
chevronDown.removeClass("fa-chevron-down").addClass("fa-chevron-up");
chevronUp.removeClass("fa-chevron-up").addClass("fa-chevron-down");
chevronUp.removeClass("fa-chevron-up").addClass("fa-chevron-down");
$(element).next(".collapse").collapse("toggle");
$(element).next(".collapse").collapse("toggle");
if(typeof callback === "function") {
callback();
}
} catch (error) {
window.showErrorPopup(error);
if(typeof callback === "function") {
callback();
}
}
// Muss manuell im onclick-Event des Buttons aufgerufen werden
function cardHeaderButtonClick(cardBodyId) {
try {
$(cardBodyId).toggle();
}
catch(error) {
showErrorPopup(error);
}
$(cardBodyId).collapse("toggle");
}
// ToDo: Hier am 21.08.2023 weitermachen!
function toggleChevron(chevronId, cardBodyId) {
try {
var isDown = $(cardBodyId).css("display") !== "none";
var chevron = $(chevronId);
var iconToRemove = isDown ? "fa-chevron-down" : "fa-chevron-up";
var iconToAdd = isDown ? "fa-chevron-up" : "fa-chevron-down";
const isDown = $(cardBodyId).css("display") !== "none";
const chevron = $(chevronId);
const iconToRemove = isDown ? "fa-chevron-down" : "fa-chevron-up";
const iconToAdd = isDown ? "fa-chevron-up" : "fa-chevron-down";
chevron.removeClass(iconToRemove);
chevron.addClass(iconToAdd);
} catch (error) {
showErrorPopup(error);
}
chevron.removeClass(iconToRemove);
chevron.addClass(iconToAdd);
}
function validateNonEmptyString(stringValue) {
@@ -320,108 +301,92 @@ function validateNonEmptyString(stringValue) {
}
function showCollapsable(collapsableElement) {
try {
if (collapsableElement === null || collapsableElement === undefined) {
return;
}
if(collapsableElement === null || collapsableElement === undefined) {
return;
}
if (!collapsableElement.hasClass("show")) {
collapsableElement.addClass("show");
}
} catch (error) {
showErrorPopup(error);
if(!collapsableElement.hasClass("show")) {
collapsableElement.addClass("show");
}
}
function hideCollapsable(collapsableElement) {
try {
if (collapsableElement === null || collapsableElement === undefined) {
return;
}
if (collapsableElement === null || collapsableElement === undefined) {
return;
}
if (collapsableElement.hasClass("show")) {
collapsableElement.removeClass("show");
}
} catch (error) {
showErrorPopup(error);
if (collapsableElement.hasClass("show")) {
collapsableElement.removeClass("show");
}
}
function treeSearchOnChange(searchInputId, textClass, cardClass, nameLabelClass, itemListClass) {
try {
var text = $("#" + searchInputId).val().toLowerCase();
var text = $(`#${searchInputId}`).val().toLowerCase();
var entries = $("." + textClass);
const entries = $(`.${textClass}`);
if(text.length === 0 || !text.replace(/\s\g/, '').length) {
resetTreeSearch(searchInputId, textClass, cardClass);
return;
if(text.length === 0 || !text.replace(/\s\g/, "").length) {
resetTreeSearch(searchInputId, textClass, cardClass);
return;
}
$.each(entries, function (index, entry) {
const checkbox = $(entry);
const treeCard = checkbox.closest(`.${cardClass}`);
const header = treeCard.find(".tree-card-header");
const list = treeCard.find(".collapse");
const treeItemName = checkbox.find(`.${nameLabelClass}`).text().toLowerCase();
const includesText = treeItemName.includes(text) || header.html().toLowerCase().includes(text);
if (includesText) {
checkbox.show();
treeCard.show();
showCollapsable($(list));
} else {
checkbox.hide();
}
});
const lists = $(`.${itemListClass}`);
var cardsToHide = [];
$.each(lists, function (index, item) {
const children = $(item).children();
var hasAtLeastOneVisibleChild = false;
const card = $(item).parent().parent();
for(let i = 0; i < children.length; i++) {
const child = children[i];
hasAtLeastOneVisibleChild = $(child).css("display") === "block";
if(hasAtLeastOneVisibleChild === true) {
break;
}
}
$.each(entries, function (index, entry) {
var checkbox = $(entry);
var treeCard = checkbox.closest("." + cardClass);
var header = treeCard.find(".tree-card-header");
var list = treeCard.find(".collapse");
var treeItemName = checkbox.find("." + nameLabelClass).text().toLowerCase();
var includesText = treeItemName.includes(text) || header.html().toLowerCase().includes(text);
if(hasAtLeastOneVisibleChild === false) {
cardsToHide.push(card);
}
});
if (includesText) {
checkbox.show();
treeCard.show();
showCollapsable($(list));
} else {
checkbox.hide();
}
});
var lists = $("." + itemListClass);
var cardsToHide = [];
$.each(lists, function (index, item) {
var children = $(item).children();
var hasAtLeastOneVisibleChild = false;
var card = $(item).parent().parent();
for(var i = 0; i < children.length; i++) {
var child = children[i];
hasAtLeastOneVisibleChild = $(child).css("display") === "block";
if(hasAtLeastOneVisibleChild === true) {
break;
}
}
if(hasAtLeastOneVisibleChild === false) {
cardsToHide.push(card);
}
});
$.each(cardsToHide, function (index, item) {
$(item).hide();
});
} catch (error) {
showErrorPopup(error);
}
$.each(cardsToHide, function (index, item) {
$(item).hide();
});
}
function resetTreeSearch(searchInputId, textClass, cardClass) {
try {
$("#" + searchInputId).val("");
$(`#${searchInputId}`).val("");
var entries = $("." + textClass);
var treeCard = $("." + cardClass);
var collapsable = treeCard.find(".collapse");
const entries = $(`.${textClass}`);
const treeCard = $(`.${cardClass}`);
const collapsable = treeCard.find(".collapse");
entries.show();
treeCard.show();
entries.show();
treeCard.show();
hideCollapsable(collapsable);
} catch (error) {
showErrorPopup(error);
}
hideCollapsable(collapsable);
}
function showMessagePopupWithHtmlAndCallback(title, messageAsHtml, hasCloseButton, callback, executeCallbackByBothButtons) {
@@ -472,22 +437,22 @@ function parseJason(jsonToParse) {
return $.parseJSON(jsonToParse);
} catch (error) {
if(stringContainsDoctype(jsonToParse)) {
showErrorPopup(error, jsonToParse);
window.showErrorPopup(error, jsonToParse);
} else {
showErrorPopup(error);
window.showErrorPopup(error);
}
}
}
function getCurrentTimeStamp() {
var now = new Date(Date.now());
const now = new Date(Date.now());
var date = String(2).padStart(2, now.getDate().toString());
var month = String(2).padStart(2, now.getMonth().toString());
var hours = String(2).padStart(2, now.getHours().toString());
var minutes = String(2).padStart(2, now.getMinutes().toString());
var seconds = String(2).padStart(2, now.getSeconds().toString());
var milliseconds = String(3).padStart(3, now.getMilliseconds().toString());
const date = String(2).padStart(2, now.getDate().toString());
const month = String(2).padStart(2, now.getMonth().toString());
const hours = String(2).padStart(2, now.getHours().toString());
const minutes = String(2).padStart(2, now.getMinutes().toString());
const seconds = String(2).padStart(2, now.getSeconds().toString());
const milliseconds = String(3).padStart(3, now.getMilliseconds().toString());
return `${date}.${month}.${now.getFullYear()} ${hours}:${minutes}:${seconds}.${milliseconds}`;
}

View File

@@ -1,21 +1,21 @@
function parseTimeInputToIntegerArray(timeString) {
var hoursToMinutes = timeString.split(":");
var hours = parseInt(hoursToMinutes[0]);
var minutes = parseInt(hoursToMinutes[1]);
const hoursToMinutes = timeString.split(":");
const hours = parseInt(hoursToMinutes[0]);
const minutes = parseInt(hoursToMinutes[1]);
return [hours, minutes];
}
function getDateFromPicker(pickerId) {
try {
var picker = $("#" + pickerId);
const picker = $(`#${pickerId}`);
if(picker.length > 0) {
picker.datetimepicker("show");
picker.datetimepicker("hide");
var unixTime = picker.datetimepicker("date");
var targetDate = new Date(unixTime);
const unixTime = picker.datetimepicker("date");
const targetDate = new Date(unixTime);
if(isValidDate(targetDate)) {
return targetDate;
@@ -24,36 +24,36 @@ function getDateFromPicker(pickerId) {
return new Date();
} catch(error) {
showErrorPopup(error);
window.showErrorPopup(error);
} finally {
return new Date();
}
}
function getTimeFromPicker(pickerId) {
var result = new Date();
const result = new Date();
try {
var picker = $("#" + pickerId);
const picker = $(`#${pickerId}`);
if (picker.length > 0) {
var timeString = picker.val();
const timeString = picker.val();
if (timeString.length === 5) {
var hours = timeString.substring(0, 2);
var minutes = timeString.substring(3);
const hours = timeString.substring(0, 2);
const minutes = timeString.substring(3);
result.setHours(hours);
result.setMinutes(minutes);
var date = result.getDate();
var month = result.getMonth();
var year = result.getYear();
const date = result.getDate();
const month = result.getMonth();
const year = result.getYear();
return new Date(year, month, date, hours, minutes, 0, 0);
}
}
} catch (error) {
showErrorPopup(error);
window.showErrorPopup(error);
} finally {
return result;
}
@@ -61,37 +61,37 @@ function getTimeFromPicker(pickerId) {
function dateToShortDateString(date) {
try {
logInfo2("Konvertiere Datum zu kurzem Datum: " + date);
logInfo2(`Konvertiere Datum zu kurzem Datum: ${date}`);
if (isValidDate(date)) {
var ddNum = date.getDate();
var mmNum = date.getMonth();
var yyyyNum = date.getFullYear();
const ddNum = date.getDate();
const mmNum = date.getMonth();
const yyyyNum = date.getFullYear();
var dd = ddNum.toString();
var mm = mmNum.toString();
var yyyy = yyyyNum.toString();
let dd = ddNum.toString();
let mm = mmNum.toString();
let yyyy = yyyyNum.toString();
if (ddNum < 10) {
dd = "0" + dd;
dd = `0${dd}`;
}
if (mmNum < 10) {
mm = "0" + mm;
mm = `0${mm}`;
}
if (yyyyNum < 10) {
yyyy = "000" + yyyyNum;
yyyy = `000${yyyyNum}`;
} else if (yyyyNum < 100) {
yyyy = "00" + yyyyNum;
yyyy = `00${yyyyNum}`;
} else if (yyyyNum < 1000) {
yyyy = "0" + yyyyNum;
yyyy = `0${yyyyNum}`;
}
return dd + "." + mm + "." + yyyy;
}
} catch (error) {
showErrorPopup(error);
window.showErrorPopup(error);
}
}
@@ -100,16 +100,16 @@ function mergeDateAndTime(date, time) {
try {
if (isValidDate(date) && isValidDate(time)) {
var day = date.getDate();
var month = date.getMonth();
var year = date.getFullYear();
var hours = time.getHours();
var minutes = time.getMinutes();
const day = date.getDate();
const month = date.getMonth();
const year = date.getFullYear();
const hours = time.getHours();
const minutes = time.getMinutes();
result = new Date(year, month, day, hours, minutes, 0, 0);
}
} catch (error) {
showErrorPopup(error);
window.showErrorPopup(error);
} finally {
return result;
}
@@ -120,21 +120,20 @@ function isValidDate(date) {
return Object.prototype.toString.call(date) === "[object Date]" && !isNaN(date);
}
function ddMMyyyyToyyyyMMdd(dateString)
{
function ddMMyyyyToyyyyMMdd(dateString) {
if (dateString === undefined || dateString === null || typeof dateString != "string" || dateString.length !== 10) {
return null;
}
var dayMonthYear = dateString.split(".");
const dayMonthYear = dateString.split(".");
if(dayMonthYear.length !== 3) {
return null;
}
var dd = dayMonthYear[0];
var mm = dayMonthYear[1];
var yyyy = dayMonthYear[2];
const dd = dayMonthYear[0];
const mm = dayMonthYear[1];
const yyyy = dayMonthYear[2];
return `${yyyy}-${mm}-${dd}`;
}

View File

@@ -2,7 +2,7 @@
var result = true;
if (a1 !== null && a2 !== null && Array.isArray(a1) && Array.isArray(a2)) {
for (var i = 0; i < a2.length; i++) {
for (let i = 0; i < a2.length; i++) {
if (!a1.includes(a2[i])) {
result = false;
break;
@@ -28,13 +28,13 @@ function isInArray(value, array) {
return false;
}
var intValue = parseInt(value, 10);
const intValue = parseInt(value, 10);
if (isNaN(intValue)) {
return false;
}
for (var i = 0; i < array.length; i++) {
for (let i = 0; i < array.length; i++) {
if (array[i] === intValue) {
return true;
}

View File

@@ -1,5 +1,5 @@
function calculateTimeWithDuration(timeInputValue, timeElement, startDate, duration, hoursMinutesDropdownBtnId) {
var isInMin = getIsZeiterfassungseinheitInMinutes();
var isInMin = window.getIsZeiterfassungseinheitInMinutes();
const hoursToMinutes = parseTimeInputToIntegerArray(timeInputValue);
const hours = parseInt(hoursToMinutes[0]);
@@ -86,13 +86,13 @@ function onDurationChange(startTimeId, endTimeId, startDateId, endDateId, durati
// ToDo: Erst Dauer, dann Start- oder Endzeit führt dazu, dass die Dauer in Stunden benutzt wird!
function calculateDuration(isInvocatedByHoursMinutesButton, startTimeId, endTimeId, durationId, hoursMinutesDropdownBtnId, startDatePickerId, endDatePickerId, isInvokedByStartElement, isInvokedByEndElement) {
var startTime = $("#" + startTimeId).val();
var endTime = $("#" + endTimeId).val();
var duration = $("#" + durationId).val();
var startTime = $(`#${startTimeId}`).val();
var endTime = $(`#${endTimeId}`).val();
var duration = $(`#${durationId}`).val();
var hoursMinutesDropdownButton = $("#" + hoursMinutesDropdownBtnId);
var isInMin = getIsZeiterfassungseinheitInMinutes();
var isInMin = window.getIsZeiterfassungseinheitInMinutes();
if(hoursMinutesDropdownButton.length) {
isInMin = hoursMinutesDropdownButton.text().replaceAll(/\s/g, "") === "Minuten";
@@ -188,4 +188,10 @@ function calculateDuration(isInvocatedByHoursMinutesButton, startTimeId, endTime
$(`#${durationId}`).val(durationNumber);
}
}
}
function calcTimeWithDuration() {
}

View File

@@ -334,6 +334,8 @@
<hr />
</div>
</div>
@* ----- Einzelbuchung: Startdatum und gegebenenfalls Enddatum ----- *@
<div class="form-row">

View File

@@ -169,7 +169,7 @@
<add assembly="BeWo.Service, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=5.3.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
@@ -257,11 +257,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
<bindingRedirect oldVersion="0.0.0.0-4.1.6.0" newVersion="4.1.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
@@ -285,15 +285,43 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
<bindingRedirect oldVersion="0.0.0.0-4.2.3.0" newVersion="4.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
<bindingRedirect oldVersion="0.0.0.0-6.0.2.0" newVersion="6.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.2" newVersion="9.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.2" newVersion="9.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.2" newVersion="9.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Composition.AttributedModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.2" newVersion="9.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Composition.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.2" newVersion="9.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Composition.TypedParts" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.2" newVersion="9.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Composition.Hosting" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.2" newVersion="9.0.0.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>

View File

@@ -7,7 +7,7 @@
<package id="jQuery" version="3.7.1" targetFramework="net472" />
<package id="jQuery.UI.Combined" version="1.14.1" targetFramework="net472" />
<package id="jQuery.Validation" version="1.21.0" targetFramework="net472" />
<package id="log4net" version="3.0.3" targetFramework="net472" />
<package id="log4net" version="3.0.4" targetFramework="net472" />
<package id="Microsoft.AspNet.Mvc" version="5.3.0" targetFramework="net472" />
<package id="Microsoft.AspNet.Providers.Core" version="2.0.0" targetFramework="net472" />
<package id="Microsoft.AspNet.Razor" version="3.3.0" targetFramework="net472" />
@@ -32,10 +32,10 @@
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
<package id="Newtonsoft.Json.Bson" version="1.0.3" targetFramework="net472" />
<package id="RestSharp" version="106.13.0" targetFramework="net472" />
<package id="System.Buffers" version="4.6.0" targetFramework="net472" />
<package id="System.Memory" version="4.6.0" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.6.0" targetFramework="net472" />
<package id="System.Buffers" version="4.6.1" targetFramework="net472" />
<package id="System.Memory" version="4.6.2" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.1" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.6.2" targetFramework="net472" />
<package id="WebGrease" version="1.6.0" targetFramework="net472" />
</packages>

View File

@@ -1,204 +1,204 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BFEE49FD-BCFB-4B6D-BE98-0019A568DE85}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BeWoFuerDich</RootNamespace>
<AssemblyName>2331203795_Reports</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CustomMitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="CustomMitarbeiterstundenkontoBerechnungMonate.cs" />
<Compile Include="CustomReportCreator.cs" />
<Compile Include="InvoiceCustomerReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="InvoiceCustomerReport.Designer.cs">
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
</Compile>
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\SoziotherapieInvoiceCreation.cs" />
<Compile Include="LeistungsnachweisSoziotherapie.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="LeistungsnachweisSoziotherapie.designer.cs">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</Compile>
<Compile Include="Mitarbeiterarbeitszeitkonto.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Mitarbeiterarbeitszeitkonto.designer.cs">
<DependentUpon>Mitarbeiterarbeitszeitkonto.cs</DependentUpon>
</Compile>
<Compile Include="Mitarbeiterstundenkonto.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Mitarbeiterstundenkonto.designer.cs">
<DependentUpon>Mitarbeiterstundenkonto.cs</DependentUpon>
</Compile>
<Compile Include="MitarbeiterstundenkontoJahr.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MitarbeiterstundenkontoJahr.designer.cs">
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="LeistungsnachweisJugendamt.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="LeistungsnachweisJugendamt.Designer.cs">
<DependentUpon>LeistungsnachweisJugendamt.cs</DependentUpon>
</Compile>
<Compile Include="Quittierungsbeleg.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
</Compile>
<Compile Include="ServiceInvoiceReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ServiceInvoiceReport.Designer.cs">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport.Designer.cs">
<DependentUpon>SettlementReport.cs</DependentUpon>
</Compile>
<Compile Include="SoziotherapieRechnung.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SoziotherapieRechnung.Designer.cs">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
</Compile>
<Compile Include="Teamstundenkonto.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Teamstundenkonto.designer.cs">
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="InvoiceCustomerReport.resx">
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="LeistungsnachweisSoziotherapie.resx">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Mitarbeiterarbeitszeitkonto.resx">
<DependentUpon>Mitarbeiterarbeitszeitkonto.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Mitarbeiterstundenkonto.resx">
<DependentUpon>Mitarbeiterstundenkonto.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MitarbeiterstundenkontoJahr.resx">
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="LeistungsnachweisJugendamt.resx">
<DependentUpon>LeistungsnachweisJugendamt.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Quittierungsbeleg.resx">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ServiceInvoiceReport.resx">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport.resx">
<DependentUpon>SettlementReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SoziotherapieRechnung.resx">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Teamstundenkonto.resx">
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\Report\Report.csproj">
<Project>{40D8B312-EA64-49E3-A31A-5E57ED4D5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331C3-ECEE-4C89-BBFD-4C9DED89F0EF}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BFEE49FD-BCFB-4B6D-BE98-0019A568DE85}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BeWoFuerDich</RootNamespace>
<AssemblyName>2331203795_Reports</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\CustomerDlls\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Drawing.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Office.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v23.2.Export, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Data.Desktop.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Charts.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraCharts.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CustomMitarbeiterstundenkontoBerechnung.cs" />
<Compile Include="CustomMitarbeiterstundenkontoBerechnungMonate.cs" />
<Compile Include="CustomReportCreator.cs" />
<Compile Include="InvoiceCustomerReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="InvoiceCustomerReport.Designer.cs">
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
</Compile>
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
<Compile Include="Invoicing\CustomSoziotherapieInvoiceCreation.cs" />
<Compile Include="LeistungsnachweisSoziotherapie.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="LeistungsnachweisSoziotherapie.designer.cs">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</Compile>
<Compile Include="Mitarbeiterarbeitszeitkonto.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Mitarbeiterarbeitszeitkonto.designer.cs">
<DependentUpon>Mitarbeiterarbeitszeitkonto.cs</DependentUpon>
</Compile>
<Compile Include="Mitarbeiterstundenkonto.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Mitarbeiterstundenkonto.designer.cs">
<DependentUpon>Mitarbeiterstundenkonto.cs</DependentUpon>
</Compile>
<Compile Include="MitarbeiterstundenkontoJahr.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="MitarbeiterstundenkontoJahr.designer.cs">
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="LeistungsnachweisJugendamt.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="LeistungsnachweisJugendamt.Designer.cs">
<DependentUpon>LeistungsnachweisJugendamt.cs</DependentUpon>
</Compile>
<Compile Include="Quittierungsbeleg.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Quittierungsbeleg.Designer.cs">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
</Compile>
<Compile Include="ServiceInvoiceReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ServiceInvoiceReport.Designer.cs">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport.Designer.cs">
<DependentUpon>SettlementReport.cs</DependentUpon>
</Compile>
<Compile Include="SoziotherapieRechnung.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SoziotherapieRechnung.Designer.cs">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
</Compile>
<Compile Include="Teamstundenkonto.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Teamstundenkonto.designer.cs">
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="InvoiceCustomerReport.resx">
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="LeistungsnachweisSoziotherapie.resx">
<DependentUpon>LeistungsnachweisSoziotherapie.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Mitarbeiterarbeitszeitkonto.resx">
<DependentUpon>Mitarbeiterarbeitszeitkonto.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Mitarbeiterstundenkonto.resx">
<DependentUpon>Mitarbeiterstundenkonto.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MitarbeiterstundenkontoJahr.resx">
<DependentUpon>MitarbeiterstundenkontoJahr.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="LeistungsnachweisJugendamt.resx">
<DependentUpon>LeistungsnachweisJugendamt.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Quittierungsbeleg.resx">
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ServiceInvoiceReport.resx">
<DependentUpon>ServiceInvoiceReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport.resx">
<DependentUpon>SettlementReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SoziotherapieRechnung.resx">
<DependentUpon>SoziotherapieRechnung.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Teamstundenkonto.resx">
<DependentUpon>Teamstundenkonto.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
<Name>Data</Name>
</ProjectReference>
<ProjectReference Include="..\..\Report\Report.csproj">
<Project>{40D8B312-EA64-49E3-A31A-5E57ED4D5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331C3-ECEE-4C89-BBFD-4C9DED89F0EF}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
@@ -20,7 +18,7 @@ namespace BeWoFuerDich.Invoicing
{
if (!String.IsNullOrEmpty(sr.ServiceDescription.Category.Name) && sr.ServiceDescription.Category.Name.Contains("Soziotherapie"))
{
return new SoziotherapieInvoiceCreation();
return new CustomSoziotherapieInvoiceCreation();
}
}
}

View File

@@ -0,0 +1,59 @@
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
using BS.Shared.Services;
namespace BeWoFuerDich.Invoicing
{
public class CustomSoziotherapieInvoiceCreation : SoziotherapieInvoiceCreation
{
protected override string ErmittleGPosNummer(ServiceRecordDC serviceRecord, string sozioLeistung)
{
string unitDescription = "";
var duration = serviceRecord.RoundedDuration;
if (sozioLeistung.Contains("gruppe"))
{
if (duration <= 45)
unitDescription = "GPos: 2002678";
else if (duration <= 60)
unitDescription = "GPos: 2002677";
else
unitDescription = "GPos: 2002672"; // 90 min, 2-5 Personen
}
else
{
if (sozioLeistung.Contains("probe"))
unitDescription = "GPos: 2001607";
else if (sozioLeistung.Contains("video"))
{
if (duration <= 30)
unitDescription = "GPos: 2001616";
else if (duration > 30)
unitDescription = "GPos: 2001615";
}
else if (sozioLeistung.Contains("telefon"))
{
if (duration <= 30)
unitDescription = "GPos: 2001618";
else if (duration > 30)
unitDescription = "GPos: 2001617";
}
else if (sozioLeistung.Contains("aufsuchend") || sozioLeistung.Contains("einrichtung"))
{
if (duration <= 10)
unitDescription = "GPos: 2001613";
else if (duration <= 30)
unitDescription = "GPos: 2001612";
else if (duration <= 45)
unitDescription = "GPos: 2001611";
else
unitDescription = "GPos: 2001610";
}
}
return unitDescription;
}
}
}

View File

@@ -1,164 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
namespace BeWoFuerDich.Invoicing
{
public class SoziotherapieInvoiceCreation : InvoiceCreation
{
public override void SetInvoiceId(ServiceInvoice invoice)
{
invoice.InvoiceBase.InvoiceId = "RechnungSoziotherapie";
invoice.InvoiceBase.InvoiceTypeText = "Soziotherapie";
}
public override IList<InvoiceItem> CreateInvoiceItems(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap,
Calculations calc)
{
var list = base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc);
var ii = CreateHausbesuchspauschale(serviceRecordsInPeriod, invoicePeriod, scap);
list.AddRange(ii);
return list;
}
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
{
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
ii.ItemDescription = iServiceRecord.ServiceDescription.Name;
if (ii.ItemDescription.ToLower().Contains("probe"))
{
ii.UnitDescription = "GPos: 2001607";
}
else if (ii.ItemDescription.ToLower().Contains("gruppentherapie"))
{
ii.UnitDescription = "GPos: 2002672";
}
else if (ii.ItemDescription.ToLower().Contains("video"))
{
if (iServiceRecord.RoundedDuration <= 30 || ii.ItemDescription.ToLower().Contains("30"))
{
ii.UnitDescription = "GPos: 2001616";
}
else if (iServiceRecord.RoundedDuration > 30 || ii.ItemDescription.ToLower().Contains("60"))
{
ii.UnitDescription = "GPos: 2001615";
}
}
else if (ii.ItemDescription.ToLower().Contains("telefon"))
{
if (iServiceRecord.RoundedDuration <= 30)
{
ii.UnitDescription = "GPos: 2001618";
}
else if (iServiceRecord.RoundedDuration > 30)
{
ii.UnitDescription = "GPos: 2001617";
}
}
else
{
if (iServiceRecord.RoundedDuration <= 30)
{
ii.UnitDescription = "GPos: 2001612";
}
else if (iServiceRecord.RoundedDuration > 30)
{
ii.UnitDescription = "GPos: 2001610";
}
}
return ii;
}
public virtual IList<InvoiceItem> CreateHausbesuchspauschale(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap)
{
IList<InvoiceItem> items = new List<InvoiceItem>();
decimal hausbesuchspauschale = 7.98m;
var preise = DAOFactory.GenericDAO.GetAllActive<Preis>();
// Gibt 2 Preise, einmal für Funktion Primärkasse und einmal für Funktion Ersatzkasse. Preise heißen Hausbesuchspauschale Primärkasse und Hausbesuchspauschale Ersatzkassen
if (scap.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && scap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value.ToLower().Contains("primärkasse"))
hausbesuchspauschale = GetPreis(preise, "Hausbesuchspauschale Primärkasse", invoicePeriod.StartDate);
else if (scap.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && scap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value.ToLower().Contains("ersatzkasse"))
hausbesuchspauschale = GetPreis(preise, "Hausbesuchspauschale Ersatzkasse", invoicePeriod.StartDate);
int countHausbesuch = 0;
foreach (var sr in serviceRecordsInPeriod)
{
if (sr.ServiceDescription.Name.ToLower().Contains("hausbesuch") || sr.ServiceDescription.Name.ToLower().Contains("aufsuchend"))
{
countHausbesuch++;
}
}
if (countHausbesuch > 0)
{
var invoiceItem = new InvoiceItem();
decimal anzahlHausbesuche = countHausbesuch;
invoiceItem.AmountPerUnit = hausbesuchspauschale;
invoiceItem.UnitCount = anzahlHausbesuche;
invoiceItem.AmountTotal = anzahlHausbesuche * hausbesuchspauschale;
invoiceItem.ItemPeriodStart = invoicePeriod.StartDate;
invoiceItem.ItemPeriodEnd = invoicePeriod.EndDate;
invoiceItem.RateFactor = null;
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
invoiceItem.ItemDescription = "Hausbesuchspauschale";
invoiceItem.UnitDescription = "GPos: 2009690";
if (scap != null)
invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid;
items.Add(invoiceItem);
}
return items;
}
private static decimal GetPreis(IList<Preis> allePreise, String name, DateTime datum)
{
var tagessatz = allePreise.Where(p => p.Name.Contains(name)).FirstOrDefault();
if (tagessatz != null)
{
var crlist = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(tagessatz.CostRatePeriods);
var cr = crlist.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, datum);
if (cr != null && cr.CostRateValue.HasValue)
{
return cr.CostRateValue.Value;
}
}
return 0;
}
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth, bool addRateFactorToUnitCount)
{
return base.CreateSummaryInvoiceItems(itemList, invoicePeriod, scap, calc, true, true);
}
public override string GetSummaryItemKey(SupportConceptApprovalPeriod scap, InvoiceItem iitem, bool summaryPerMonth)
{
String key = String.Format("{0}_{1}_{2}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemDescription);
if (summaryPerMonth)
{
key = String.Format("{0}_{1}_{2:yyyyMM}_{3}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart, iitem.ItemDescription);
}
return key;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,3 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;

View File

@@ -1,124 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="xrLabel13.Text" xml:space="preserve">
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="xrLabel13.Text" xml:space="preserve">
<value>für unsere Tätigkeit in der Soziotherapie berechnen wir Ihnen auf der Grundlage der vertraglich festgelegten Vergütungssätze und anhand der beigefügten datenschutz-gerechten Dokumentation / Leistungsnachweise folgende aufgeführte Leistungen:
</value>
</data>
</value>
</data>
</root>

View File

@@ -6,12 +6,14 @@ using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
using ChristopherusHausMID.Reporting;
using Service.Invoicing;
namespace ChristopherusHausMID.Invoicing
@@ -23,6 +25,21 @@ namespace ChristopherusHausMID.Invoicing
// //invoice.InvoiceBase.InvoiceId = "SBD";
// //invoice.InvoiceBase.InvoiceTypeText = "";
//}
private IList<ServiceDescription> allDescriptions = null;
public IList<ServiceDescription> AllDescriptions
{
get
{
if (allDescriptions == null)
{
allDescriptions = DAOFactory.GenericDAO.GetAllActiveAndArchived<ServiceDescription>();
}
return allDescriptions;
}
}
public bool BerechnePoolKinder { get; set; }
public override List<ServiceInvoiceDC> GenerateServiceInvoices(long costBearerOid,
DateTimeSpan invoicePeriod,
@@ -53,77 +70,319 @@ namespace ChristopherusHausMID.Invoicing
public override IList<InvoiceItem> CreateInvoiceItems(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
{
var items = base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc);
var anzahlAbwesenheitsTage = GetAbwesenheitsTage(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod);
var berechnePoolItems = BerechnePoolItems(invoicePeriod, scap);
foreach (var item in items)
//Erstelle Quittierungsbeleg als Grundlage für die Rechnung
var qbelegRos = SbdStundenaufstellungRO.Create(scap.CostBearer2SupportConcept.SupportConcept.Customer.Oid.Value, invoicePeriod.StartDate.Month, invoicePeriod.StartDate.Year, 0, 0, 0, invoicePeriod.StartDate.Day, invoicePeriod.EndDate.Day, true, "nrw", false, false);
foreach (var ro in qbelegRos)
{
item.UnitDescription = "Faktor 1.0";
item.CustomNumber1 = anzahlAbwesenheitsTage;
PoolHelper.BerechnePoolFaktorenFuerQuittierungsbeleg(ro);
}
return items;
}
private IList<InvoiceItem> BerechnePoolItems(DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap)
{
//var items = base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc);
var fehltage = PoolHelper.GetAbwesenheitsTage(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod);
var items = new List<InvoiceItem>();
var mainCustomer = scap.CostBearer2SupportConcept.SupportConcept.Customer;
//Suche Hauptbetreuung
Employee hauptbetreuung = mainCustomer.Employee2CustomerList.FirstOrDefault(e2c => e2c.IsActive == ActivationTypeId.Active &&
(!e2c.StartDate.HasValue || e2c.StartDate.Value.Date <= invoicePeriod.EndDate) && (!e2c.EndDate.HasValue || e2c.EndDate.Value.Date >= invoicePeriod.StartDate) &&
e2c.ValueList.Any(b => b.Entry.Type.Equals(ValueListEntryType.StaffRoleType) && b.Entry.Value.ToLower().Contains("hauptbetreu")))?.Employee;
if (hauptbetreuung != null)
if (qbelegRos.Count > 0)
{
var allCustomer = hauptbetreuung.Employee2CustomerList.Select(e2c => e2c.Customer).ToList();
//Wenn mehrere Kinder betreut werden, dann ändert sich der pool Faktor
if (allCustomer.Count > 1)
foreach (var s in qbelegRos[0].Services)
{
var ii = new InvoiceItem();
foreach (var c in allCustomer)
InvoiceItem ii = CreateInvoiceItem(s, scap, calc);
if (ii != null && ii.UnitCount.HasValue && ii.UnitCount > 0)
{
if (c.Oid != mainCustomer.Oid)
{
}
items.Add(ii);
}
}
}
return items;
}
//IList<ServiceInvoice> poolRechnungen = null;
//if (BerechnePoolKinder)
//{
// poolRechnungen = ErstellePoolRechnungen(invoicePeriod, scap);
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
{
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
if (PoolHelper.GetAbsenceTime(scap.CostBearer2SupportConcept.SupportConcept.Customer, iServiceRecord.Start.Value) != null)
// //BerechnePoolFaktorenUndAbwesenheiten(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod, items, poolRechnungen);
//}
//if (poolRechnungen == null || poolRechnungen.Count == 0)
//{
// //items = base.CreateSummaryInvoiceItems
// //item.UnitDescription = "Faktor 1.0";
// //item.CustomNumber1 = anzahlAbwesenheitsTage;
//}
//return items;
var summaryItems = CreateSummaryInvoiceItems(items, invoicePeriod, scap, calc);
foreach (var item in summaryItems)
{
//Bei Abwesenheit darf nichts berechnet werden
return null;
item.CustomNumber1 = fehltage;
}
return ii;
return summaryItems;
}
private decimal GetAbwesenheitsTage(Customer customer, DateTimeSpan invoicePeriod)
private decimal GetPreisForServiceDescription(String cat, String desc, DateTime date)
{
int tage = 0;
var serviceDescription = AllDescriptions.Where(d => desc.Equals(d.Name)).FirstOrDefault();
foreach (var at in customer.AbsenceTimes)
if (serviceDescription != null)
{
if ((!at.Start.HasValue || at.Start.Value.Date <= invoicePeriod.EndDate) && (!at.End.HasValue || at.End.Value.Date >= invoicePeriod.StartDate))
var crpList = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(serviceDescription.CostRatePeriods);
CostRatePeriodDC crp = crpList.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, date);
if (crp != null && crp.CostRateValue.HasValue)
{
tage++;
return crp.CostRateValue.Value;
}
}
return tage;
return 0;
}
private InvoiceItem CreateInvoiceItem(SbdStundenaufstellungRO.SbdServiceDetail s, SupportConceptApprovalPeriod scap, Calculations calc)
{
var invoiceItem = new InvoiceItem();
if (s.Minutes > 0)
{
invoiceItem.AmountPerUnit = GetPreisForServiceDescription(s.ServiceCategory, s.ServiceDescription, s.StartDate);
invoiceItem.UnitCount = (decimal)s.Minutes / 60;
invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount;
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
invoiceItem.ItemPeriodStart = s.StartDate;
invoiceItem.ItemPeriodEnd = s.EndDate;
invoiceItem.RateFactor = null;
if (!String.IsNullOrEmpty(s.Notice5)) // In Notice5 wird der PoolFaktor gespeichert
{
invoiceItem.UnitDescription = String.Format("Faktor {0}", s.Notice5); // In Notice5 wird der PoolFaktor gespeichert
invoiceItem.UnitDescription = invoiceItem.UnitDescription.Replace(",", ".");
//invoiceItem.RateFactor = bd.RateFactor;
if (Decimal.TryParse(s.Notice5, out var rf))
{
invoiceItem.RateFactor = (rf * 100) - 100; //z.B. 1,2 muss in 20 umgewandelt werden, 1,3 in 30 etc.
}
}
invoiceItem.AccountingInterval = AccountingIntervalType.Hourly;
invoiceItem.ItemDescription = "";
if (scap != null)
invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid;
}
return invoiceItem;
}
//private void BerechnePoolFaktorenUndAbwesenheiten(Customer customer, DateTimeSpan invoicePeriod, IList<InvoiceItem> items, IList<ServiceInvoice> poolRechnungen)
//{
// decimal defaultPoolFaktor = 1;
// var poolKinder = PoolHelper.GetWeiterePoolKinder(customer, invoicePeriod.StartDate);
// //Wenn mehrere Kinder betreut werden, dann ändert sich der pool Faktor und die Kinder müssen mit aufgelistet werden
// if (poolKinder.Count > 0)
// {
// defaultPoolFaktor = (11 + poolKinder.Count) / 10m; //bei zwei Kindern Faktor 1,2, bei drei Kindern 1,3 etc.
// }
// DateTime datum = invoicePeriod.StartDate;
// while (datum <= invoicePeriod.EndDate)
// {
// var mainItem = items.Where(i => i.ItemPeriodStart.Value.Date == datum.Date).FirstOrDefault();
// var mainAt = PoolHelper.GetAbsenceTime(customer, datum);
// bool alleKrank = false;
// if (mainAt != null)
// {
// alleKrank = true;
// foreach (var kind in poolKinder)
// {
// var kindAt = PoolHelper.GetAbsenceTime(kind, datum);
// if (kindAt == null)
// {
// alleKrank = false;
// }
// }
// }
// var poolFaktor = PoolHelper.BerechnePoolFaktor(customer, poolKinder, datum, defaultPoolFaktor);
// if (mainItem != null)
// {
// if (alleKrank)
// {
// mainItem.UnitCount = 0;
// }
// mainItem.CustomNumber1 = poolFaktor;
// }
// datum = datum.AddDays(1);
// }
//}
//private IList<ServiceInvoice> ErstellePoolRechnungen(DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap)
//{
// var list = new List<ServiceInvoice>();
// var mainCustomer = scap.CostBearer2SupportConcept.SupportConcept.Customer;
// var poolKinder = PoolHelper.GetWeiterePoolKinder(mainCustomer, invoicePeriod.StartDate);
// if (poolKinder.Count > 0)
// {
// foreach (var c in poolKinder)
// {
// var i = BerechnePoolInvoice(c, invoicePeriod);
// list.Add(i);
// }
// }
// return list;
//}
//private ServiceInvoice BerechnePoolInvoice(Customer customer, DateTimeSpan invoicePeriod)
//{
// CostBearer2SupportConcept c2s = null;
// SupportConcept sc = null;
// foreach (var isc in customer.SupportConcepts)
// {
// foreach (var ic2s in isc.CostBearer2SupportConceptList)
// {
// if (ic2s.StartDate <= invoicePeriod.EndDate && ic2s.EndDate >= invoicePeriod.StartDate)
// {
// c2s = ic2s;
// sc = isc;
// }
// }
// }
// if (sc != null && c2s != null)
// {
// var cs = PluginLoader.FindClass<CustomerService>();
// var supportConcepts = cs.GetCompactSupportConcepts(sc.Oid.Value, null)
// .Where(i => i.CostBearerOids2CostBearerRelOids.ContainsKey(c2s.CostBearer.Oid.Value)).ToList();
// if (supportConcepts.Count > 0)
// {
// var creator = new CustomInvoiceCreation();
// creator.BerechnePoolKinder = false;
// var newSpan = new DateTimeSpan();
// newSpan.StartDateTime = invoicePeriod.StartDateTime.Date;
// newSpan.EndDateTime = invoicePeriod.EndDateTime.Date.AddDays(1).AddTicks(-1);
// var supportConcepts2ServiceRecords = supportConcepts.ToDictionary(
// i => i,
// i => MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(
// DAOFactory.SearchDAO.FindServiceRecordsInSpan(c2s.Oid.Value, newSpan)));
// var records = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(DAOFactory.SearchDAO.FindServiceRecordsInSpan(c2s.Oid.Value, newSpan));
// var invoice = creator.CreateSingleInvoice(0, c2s.CostBearer, invoicePeriod, supportConcepts[0], records);
// return invoice;
// }
// }
// return null;
//}
//public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
//{
// var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
// return ii;
//}
//public virtual string GetSummaryItemKey(SupportConceptApprovalPeriod scap, InvoiceItem iitem, bool summaryPerMonth)
//{
// String key = String.Format("{0:0.0000}_{1}", iitem.AmountPerUnit, iitem.RateFactor);
// if (summaryPerMonth)
// {
// key = String.Format("{0:0.0000}_{1}_{2:yyyyMM}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart);
// }
// return key;
//}
//public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth, bool addRateFactorToUnitCount)
//{
// //Fasse InvoiceItems mit gleichem PoolFaktor zusammen:
// var newlist = new List<InvoiceItem>();
// var rateToItem = new Dictionary<String, InvoiceItem>();
// foreach (InvoiceItem iitem in itemList)
// {
// InvoiceItem item;
// var key = String.Format("{0:0.0000}_{1}", iitem.AmountPerUnit, iitem.RateFactor);
// if (rateToItem.ContainsKey(key))
// {
// item = rateToItem[key];
// }
// else
// {
// item = new InvoiceItem();
// newlist.Add(item);
// item.AmountPerUnit = iitem.AmountPerUnit;
// if (invoicePeriod != null)
// {
// item.ItemPeriodStart = invoicePeriod.StartDate;
// item.ItemPeriodEnd = invoicePeriod.EndDate;
// }
// else
// {
// item.ItemPeriodStart = scap.StartDate;
// item.ItemPeriodEnd = scap.EndDate;
// }
// if (summaryPerMonth && iitem.ItemPeriodStart.HasValue)
// {
// DateTime start = new DateTime(iitem.ItemPeriodStart.Value.Year, iitem.ItemPeriodStart.Value.Month, 1);
// DateTime end = start.AddMonths(1).AddDays(-1);
// if (item.ItemPeriodStart < start)
// {
// item.ItemPeriodStart = start;
// }
// if (item.ItemPeriodEnd > end)
// {
// item.ItemPeriodEnd = end;
// }
// }
// item.RateFactor = iitem.RateFactor;
// item.AccountingInterval = iitem.AccountingInterval;
// item.ItemDescription = iitem.ItemDescription;
// item.UnitDescription = iitem.UnitDescription;
// item.SupportConceptApprovalPeriodOid = scap.Oid;
// rateToItem[key] = item;
// }
// if (!item.UnitCount.HasValue)
// {
// item.UnitCount = 0;
// }
// item.UnitCount += iitem.UnitCount ?? 0;
// }
// BerechneSummaryItemsSummen(newlist, addRateFactorToUnitCount);
// return newlist;
//}
}
}

View File

@@ -12,8 +12,11 @@ namespace ChristopherusHausMID.Invoicing
{
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
{
return new CustomInvoiceCreation();
var creator = new CustomInvoiceCreation();
creator.BerechnePoolKinder = true;
return creator;
}

View File

@@ -1,4 +1,10 @@
using BeWo.Data.Entities;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.Core;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -13,7 +19,7 @@ namespace ChristopherusHausMID.Invoicing
{
foreach (var at in customer.AbsenceTimes)
{
if ((!at.Start.HasValue || at.Start.Value.Date <= date) && (!at.End.HasValue || at.End.Value.Date >= date))
if ((!at.Start.HasValue || at.Start.Value.Date <= date.Date) && (!at.End.HasValue || at.End.Value.Date >= date.Date))
{
return at;
}
@@ -52,5 +58,261 @@ namespace ChristopherusHausMID.Invoicing
return null;
}
public static decimal GetAbwesenheitsTage(Customer customer, DateTimeSpan invoicePeriod)
{
int tage = 0;
var dt = invoicePeriod.StartDate;
while (dt <= invoicePeriod.EndDate.Date)
{
var at = GetAbsenceTime(customer, dt);
if (at != null)
{
tage++;
}
dt = dt.AddDays(1);
}
return tage;
}
public static decimal BerechnePoolFaktor(Customer mainCustomer, IList<Customer> weiterePoolKinder, DateTime datum, decimal defaultPoolFaktor)
{
//Bei Poolbetreuung ist der Poolfaktor 1,2 (bisher werden nur max. 2 Kinder gleichzeitig betreut)
//Wenn auf mehr als drei aufeinanderfolgenden Tagen ein Kind krank ist reduziert sich der Pool Faktor auf 1,0
int anzahlTageKrank = 0;
DateTime start = datum.AddDays(-3);
var alle = new List<Customer>();
alle.Add(mainCustomer);
alle.AddRange(weiterePoolKinder);
while (start <= datum)
{
bool istJemandKrank = false;
foreach (var customer in alle)
{
var at = GetAbsenceTime(customer, start);
if (at != null)
{
istJemandKrank = true;
}
}
if (istJemandKrank)
{
anzahlTageKrank++;
}
else
{
anzahlTageKrank = 0;
}
start = start.AddDays(1);
}
if (anzahlTageKrank > 3)
{
return 1;
}
return defaultPoolFaktor;
}
public static Employee GetHauptbetreuung(Customer customer, DateTime datum)
{
return customer.Employee2CustomerList.FirstOrDefault(e2c => e2c.IsActive == ActivationTypeId.Active &&
(!e2c.StartDate.HasValue || e2c.StartDate.Value.Date <= datum) && (!e2c.EndDate.HasValue || e2c.EndDate.Value.Date >= datum) &&
e2c.ValueList.Any(b => b.Entry.Type.Equals(ValueListEntryType.StaffRoleType) && b.Entry.Value.ToLower().Contains("hauptbetreu")))?.Employee;
}
public static void BerechnePoolFaktorenFuerQuittierungsbeleg(SbdStundenaufstellungRO pRO)
{
decimal defaultPoolFaktor = 1; // Faktor bei 1:1 Betreuung
Customer mainCustomer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
Organisation schulEntity = null;
if (pRO.Schule != null)
{
schulEntity = DAOFactory.GenericDAO.LoadByID<Organisation>(pRO.Schule.OrganisationOid);
}
var weiterePoolKinder = new List<Customer>();
if (pRO.EmployeeOid > 0)
{
var emp = DAOFactory.GenericDAO.LoadByID<Employee>(pRO.EmployeeOid);
var allCustomer = emp.Employee2CustomerList.Select(e2c => e2c.Customer).ToList();
//Wenn mehrere Kinder betreut werden, dann ändert sich der pool Faktor und die Kinder müssen mit aufgelistet werden
if (allCustomer.Count > 1)
{
defaultPoolFaktor = (10 + allCustomer.Count) / 10m; //bei zwei Kindern Faktor 1,2, bei drei Kindern 1,3 etc.
foreach (var c in allCustomer)
{
//Alle betreuten Kinder, für den der Beleg nicht gedruckt wurde, müssen mit Namen aufgeführt werden.
if (c.Oid != pRO.CustomerOid)
{
weiterePoolKinder.Add(c);
}
}
}
}
foreach (var item in pRO.Services)
{
if (item.ArbeitszeitEintraege != null && item.ArbeitszeitEintraege.Count > 0)
{
item.StundenplanUhrzeiten1 = String.Format(item.ArbeitszeitEintraege[0].UhrzeitVon);
item.StundenplanUhrzeiten2 = String.Format(item.ArbeitszeitEintraege[item.ArbeitszeitEintraege.Count - 1].UhrzeitBis);
}
if (item.ServiceRecordOid > 0)
{
item.IstUhrzeiten1 = String.Format("{0:HH:mm}", item.StartDate);
item.IstUhrzeiten2 = String.Format("{0:HH:mm}", item.EndDate);
}
if (!String.IsNullOrEmpty(item.EmployeeFullname) && item.EmployeeFullname != pRO.EmployeeName && item.Minutes > 0)
{
item.Notice = String.Format("Vertretung durch {0}", item.EmployeeFullname);
}
var at = PoolHelper.GetAbsenceTime(mainCustomer, item.StartDate);
if (weiterePoolKinder.Count > 0)
{
//Bei Poolbetreuung muss die Abwesenheit der anderen Kinder auch noch geprüft werden
foreach (var c in weiterePoolKinder)
{
var at2 = PoolHelper.GetAbsenceTime(c, item.StartDate);
if (at2 != null && at != null)
{
item.Notice = String.Format("{0} und {1} krank", mainCustomer.Person.FirstName, c.Person.FirstName);
item.Minutes = 0;
}
else if (at2 != null)
{
item.Notice = String.Format("{0} krank", c.Person.FirstName);
}
else if (at != null)
{
item.Notice = String.Format("{0} krank", mainCustomer.Person.FirstName);
//item.Minutes = 0;
}
}
}
else
{
if (at != null)
{
item.Notice = at.AbsenceReason.Description;
item.Minutes = 0;
}
}
var ft = PoolHelper.GetSchulfeiertag(schulEntity, item.StartDate);
if (ft != null)
{
item.Notice = ft.Name;
item.Minutes = 0;
}
var poolFaktor = defaultPoolFaktor;
if (weiterePoolKinder.Count > 0)
{
poolFaktor = PoolHelper.BerechnePoolFaktor(mainCustomer, weiterePoolKinder, item.StartDate, defaultPoolFaktor);
}
if (item.Minutes > 0)
{
item.Notice5 = String.Format("{0:0.0}", poolFaktor);
}
}
}
public static ServiceInvoice ErstelleRechnung(Customer customer, DateTime accountingPeriodStart, DateTime accountingPeriodEnd)
{
CostBearer2SupportConcept c2s = null;
SupportConcept sc = null;
foreach (var isc in customer.SupportConcepts)
{
foreach (var ic2s in isc.CostBearer2SupportConceptList)
{
if (ic2s.StartDate <= accountingPeriodEnd && ic2s.EndDate >= accountingPeriodStart)
{
c2s = ic2s;
sc = isc;
}
}
}
if (sc != null && c2s != null)
{
var cs = PluginLoader.FindClass<CustomerService>();
var supportConcepts = cs.GetCompactSupportConcepts(sc.Oid.Value, null)
.Where(i => i.CostBearerOids2CostBearerRelOids.ContainsKey(c2s.CostBearer.Oid.Value)).ToList();
if (supportConcepts.Count > 0)
{
var creator = new CustomInvoiceCreation();
creator.BerechnePoolKinder = false;
var newSpan = new DateTimeSpan();
newSpan.StartDateTime = accountingPeriodStart.Date;
newSpan.EndDateTime = accountingPeriodEnd.Date.AddDays(1).AddTicks(-1);
var supportConcepts2ServiceRecords = supportConcepts.ToDictionary(
i => i,
i => MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(
DAOFactory.SearchDAO.FindServiceRecordsInSpan(c2s.Oid.Value, newSpan)));
var records = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(DAOFactory.SearchDAO.FindServiceRecordsInSpan(c2s.Oid.Value, newSpan));
var invoicePeriod = new DateTimeSpan();
invoicePeriod.StartDateTime = accountingPeriodStart.Date;
invoicePeriod.EndDateTime = accountingPeriodEnd.Date;
var invoice = creator.CreateSingleInvoice(0, c2s.CostBearer, invoicePeriod, supportConcepts[0], records);
return invoice;
}
}
return null;
}
public static IList<Customer> GetWeiterePoolKinder(Customer customer, DateTime datum)
{
var list = new List<Customer>();
Employee hauptbetreuung = GetHauptbetreuung(customer, datum);
if (hauptbetreuung != null)
{
var allCustomer = hauptbetreuung.Employee2CustomerList.Select(e2c => e2c.Customer).ToList();
if (allCustomer.Count > 1)
{
var ii = new InvoiceItem();
foreach (var c in allCustomer)
{
if (c.Oid != customer.Oid)
{
list.Add(c);
}
}
}
}
return list;
}
}
}

View File

@@ -23,13 +23,14 @@ namespace ChristopherusHausMID
public void SetReportDataSource(SbdStundenaufstellungRO pRO)
{
cellDatum.Text = String.Format("{0:dd.MM.yyyy}", DateTime.Now);
decimal poolFaktor = 1; // Faktor bei 1:1 Betreuung
String klienten = "";
String klassen = "";
String bewilligungen = "";
Customer mainCustomer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
Customer mainCustomer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
var weiterePoolKinder = new List<Customer>();
if (pRO.EmployeeOid > 0)
{
var emp = DAOFactory.GenericDAO.LoadByID<Employee>(pRO.EmployeeOid);
@@ -43,16 +44,15 @@ namespace ChristopherusHausMID
bewilligungen = String.Format("{0:0.00}", pRO.ApprovedPerWeek);
var allCustomer = emp.Employee2CustomerList.Select(e2c => e2c.Customer).ToList();
//Wenn mehrere Kinder betreut werden, dann ändert sich der pool Faktor und die Kinder müssen mit aufgelistet werden
if (allCustomer.Count > 1)
{
poolFaktor = (10 + allCustomer.Count) / 10m; //bei zwei Kindern Faktor 1,2, bei drei Kindern 1,3 etc.
foreach (var c in allCustomer)
{
//Alle betreuten Kinder, für den der Beleg nicht gedruckt wurde, müssen mit Namen aufgeführt werden.
if (c.Oid != pRO.CustomerOid)
{
weiterePoolKinder.Add(c);
klienten += "\n";
klienten += c.Person.FirstNameLastName;
@@ -71,50 +71,11 @@ namespace ChristopherusHausMID
cellKlasse.Text = klassen;
cellBewilligung.Text = bewilligungen;
Organisation schulEntity = null;
if (pRO.Schule != null)
{
schulEntity = DAOFactory.GenericDAO.LoadByID<Organisation>(pRO.Schule.OrganisationOid);
}
foreach (var item in pRO.Services)
{
if (item.ArbeitszeitEintraege != null && item.ArbeitszeitEintraege.Count > 0)
{
item.StundenplanUhrzeiten1 = String.Format(item.ArbeitszeitEintraege[0].UhrzeitVon);
item.StundenplanUhrzeiten2 = String.Format(item.ArbeitszeitEintraege[item.ArbeitszeitEintraege.Count - 1].UhrzeitBis);
}
if (item.ServiceRecordOid > 0)
{
item.IstUhrzeiten1 = String.Format("{0:HH:mm}", item.StartDate);
item.IstUhrzeiten2 = String.Format("{0:HH:mm}", item.EndDate);
}
if (!String.IsNullOrEmpty(item.EmployeeFullname) && item.EmployeeFullname != pRO.EmployeeName && item.Minutes > 0)
{
item.Notice = String.Format("Vertretung durch {0}", item.EmployeeFullname);
}
PoolHelper.BerechnePoolFaktorenFuerQuittierungsbeleg(pRO);
var at = PoolHelper.GetAbsenceTime(mainCustomer, item.StartDate);
if (at != null)
{
item.Notice = at.AbsenceReason.Description;
item.Minutes = 0;
}
var ft = PoolHelper.GetSchulfeiertag(schulEntity, item.StartDate);
if (ft != null)
{
item.Notice = ft.Name;
item.Minutes = 0;
}
if (item.Minutes > 0)
{
item.Notice5 = String.Format("{0:0.0}", poolFaktor);
}
}
this.bindingSource1.DataSource = pRO;
}

View File

@@ -104,7 +104,6 @@ namespace ChristopherusHausMID
this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.fieldAnteilAnRechnung = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldSummeStunden = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldBetragAllerStunden = new DevExpress.XtraReports.UI.CalculatedField();
@@ -141,11 +140,12 @@ namespace ChristopherusHausMID
this.xrTableCell56 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.fieldAbweichungIstSoll = new DevExpress.XtraReports.UI.CalculatedField();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -343,7 +343,7 @@ namespace ChristopherusHausMID
this.xrTableCell32.StylePriority.UsePadding = false;
this.xrTableCell32.StylePriority.UseTextAlignment = false;
this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell32.TextFormatString = "{0:0.00}%";
this.xrTableCell32.TextFormatString = "{0:0}%";
this.xrTableCell32.Weight = 1.9334990413834123D;
//
// xrTableCell33
@@ -878,9 +878,8 @@ namespace ChristopherusHausMID
// xrLabel8
//
this.xrLabel8.BackColor = System.Drawing.Color.Transparent;
this.xrLabel8.CanShrink = true;
this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoice.InvoiceDateTime")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoice.AccountingPeriodStart")});
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(619.3317F, 39.99995F);
this.xrLabel8.Name = "xrLabel8";
@@ -1057,7 +1056,7 @@ namespace ChristopherusHausMID
this.xrTableCell16.StylePriority.UsePadding = false;
this.xrTableCell16.StylePriority.UseTextAlignment = false;
this.xrTableCell16.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell16.TextFormatString = "{0:0.00}";
this.xrTableCell16.TextFormatString = "{0:0.00} h";
this.xrTableCell16.Weight = 1.9334924156454902D;
//
// xrTableCell17
@@ -1098,7 +1097,7 @@ namespace ChristopherusHausMID
this.xrTableCell18.StylePriority.UsePadding = false;
this.xrTableCell18.StylePriority.UseTextAlignment = false;
this.xrTableCell18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell18.TextFormatString = "{0:0.00}%";
this.xrTableCell18.TextFormatString = "{0:0}%";
this.xrTableCell18.Weight = 1.9334990413834123D;
//
// xrTableCell19
@@ -1119,7 +1118,7 @@ namespace ChristopherusHausMID
this.xrTableCell19.StylePriority.UsePadding = false;
this.xrTableCell19.StylePriority.UseTextAlignment = false;
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell19.TextFormatString = "{0:C}";
this.xrTableCell19.TextFormatString = "{0:c}";
this.xrTableCell19.Weight = 1.6112490927924212D;
//
// xrTableCell20
@@ -1140,6 +1139,7 @@ namespace ChristopherusHausMID
this.xrTableCell20.StylePriority.UsePadding = false;
this.xrTableCell20.StylePriority.UseTextAlignment = false;
this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell20.TextFormatString = "{0:0.00} h";
this.xrTableCell20.Weight = 1.7401491722474813D;
//
// xrTableCell21
@@ -1180,8 +1180,8 @@ namespace ChristopherusHausMID
this.xrTableCell22.StylePriority.UseFont = false;
this.xrTableCell22.StylePriority.UsePadding = false;
this.xrTableCell22.StylePriority.UseTextAlignment = false;
this.xrTableCell22.Text = "0,00 h";
this.xrTableCell22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell22.TextFormatString = "{0:0.00} h";
this.xrTableCell22.Weight = 1.740149172247468D;
//
// xrTableCell23
@@ -1202,6 +1202,7 @@ namespace ChristopherusHausMID
this.xrTableCell23.StylePriority.UsePadding = false;
this.xrTableCell23.StylePriority.UseTextAlignment = false;
this.xrTableCell23.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell23.TextFormatString = "{0:0.00} h";
this.xrTableCell23.Weight = 1.7401491722474685D;
//
// xrTableCell24
@@ -1221,8 +1222,8 @@ namespace ChristopherusHausMID
this.xrTableCell24.StylePriority.UseFont = false;
this.xrTableCell24.StylePriority.UsePadding = false;
this.xrTableCell24.StylePriority.UseTextAlignment = false;
this.xrTableCell24.Text = "0,00 h";
this.xrTableCell24.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell24.TextFormatString = "{0:0.00} h";
this.xrTableCell24.Weight = 1.7401491722474678D;
//
// xrTableCell25
@@ -1242,8 +1243,8 @@ namespace ChristopherusHausMID
this.xrTableCell25.StylePriority.UseFont = false;
this.xrTableCell25.StylePriority.UsePadding = false;
this.xrTableCell25.StylePriority.UseTextAlignment = false;
this.xrTableCell25.Text = "0,00 h";
this.xrTableCell25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell25.TextFormatString = "{0:0.00} h";
this.xrTableCell25.Weight = 1.7401491722474418D;
//
// xrTableCell26
@@ -1263,8 +1264,8 @@ namespace ChristopherusHausMID
this.xrTableCell26.StylePriority.UseFont = false;
this.xrTableCell26.StylePriority.UsePadding = false;
this.xrTableCell26.StylePriority.UseTextAlignment = false;
this.xrTableCell26.Text = "0,00 h";
this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell26.TextFormatString = "{0:0.00} h";
this.xrTableCell26.Weight = 1.7401491722474416D;
//
// xrTableCell27
@@ -1285,6 +1286,7 @@ namespace ChristopherusHausMID
this.xrTableCell27.StylePriority.UsePadding = false;
this.xrTableCell27.StylePriority.UseTextAlignment = false;
this.xrTableCell27.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell27.TextFormatString = "{0:c} ";
this.xrTableCell27.Weight = 2.1388968897819165D;
//
// fieldAnteilAnRechnung
@@ -1873,7 +1875,7 @@ namespace ChristopherusHausMID
this.xrTableCell56.StylePriority.UseFont = false;
this.xrTableCell56.StylePriority.UsePadding = false;
this.xrTableCell56.StylePriority.UseTextAlignment = false;
this.xrTableCell56.Text = "[SummenPosition.GesamtStunden!0.00] h\r\n[SummenPosition.GesamtBetrag!0.00] €";
this.xrTableCell56.Text = "[SummenPosition.GesamtStunden!0.00] h\r\n[SummenPosition.GesamtBetrag!c]";
this.xrTableCell56.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell56.Weight = 2.1388971356390334D;
//
@@ -1891,6 +1893,10 @@ namespace ChristopherusHausMID
"cePeriods].[ApprovedHours]))/Sum([ServiceInvoicePeriods].[ApprovedHours]) * 100";
this.fieldAbweichungIstSoll.Name = "fieldAbweichungIstSoll";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(ChristopherusHausMID.RechnungRO);
//
// Rechnung
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -1928,8 +1934,8 @@ namespace ChristopherusHausMID
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}

View File

@@ -10,6 +10,7 @@ using BeWo.Data.Entities;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using ChristopherusHausMID.Invoicing;
namespace ChristopherusHausMID
{
@@ -38,79 +39,17 @@ namespace ChristopherusHausMID
ro.ServiceInvoice = pRO;
ro.WeitereRechnungspositionen = new List<RechnungsPositionRO>();
ro.SummenPosition = new RechnungsPositionRO();
ro.MainRechnungsposition = new RechnungsPositionRO();
foreach (var ip in pRO.ServiceInvoicePeriods)
{
foreach (var item in ip.ServiceInvoiceItems)
{
var pos = new RechnungsPositionRO();
if (!String.IsNullOrEmpty(item.UnitDescription))
{
if (item.UnitDescription == "Faktor 1.0")
{
pos.BetreuteStunden10 = item.UnitCount ?? 0;
pos.BetragStunden10 = item.NetAmount ?? 0;
}
else if (item.UnitDescription == "Faktor 1.1")
{
pos.BetreuteStunden11 = item.UnitCount ?? 0;
pos.BetragStunden11 = item.NetAmount ?? 0;
}
else if (item.UnitDescription == "Faktor 1.2")
{
pos.BetreuteStunden12 = item.UnitCount ?? 0;
pos.BetragStunden12 = item.NetAmount ?? 0;
}
else if (item.UnitDescription == "Faktor 1.3")
{
pos.BetreuteStunden13 = item.UnitCount ?? 0;
pos.BetragStunden13 = item.NetAmount ?? 0;
}
else if (item.UnitDescription == "Faktor 1.4")
{
pos.BetreuteStunden14 = item.UnitCount ?? 0;
pos.BetragStunden14 = item.NetAmount ?? 0;
}
else if (item.UnitDescription == "Faktor 1.5")
{
pos.BetreuteStunden15 = item.UnitCount ?? 0;
pos.BetragStunden15 = item.NetAmount ?? 0;
}
}
else
{
pos.BetreuteStunden10 = item.UnitCount ?? 0;
}
pos.GesamtStunden = item.UnitCount ?? 0;
pos.GesamtBetrag = item.NetAmount ?? 0;
pos.Stundensatz = item.AmountPerUnit ?? 0;
pos.Rechungsanteil = 100;
if (ip.SupportConceptApprovalPeriod != null)
{
pos.BewilligtProWoche = ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval ?? 0;
}
if (ip.Customer != null)
{
pos.CustomerName = String.Format("{0} {1}", ip.Customer.FirstName, ip.Customer.LastName);
}
var kind = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.InvoiceBase.CustomerOid);
if (ro.MainRechnungsposition == null)
{
ro.MainRechnungsposition = pos;
}
else
{
ro.WeitereRechnungspositionen.Add(pos);
}
}
BerechneRechnungsPositionSummen(kind, ro.MainRechnungsposition, pRO);
}
if (ro.MainRechnungsposition == null)
{
ro.MainRechnungsposition = new RechnungsPositionRO();
}
List<RechnungsPositionRO> poolPositionen = BerechnePoolKinderRechnungen(kind, pRO);
ro.WeitereRechnungspositionen.AddRange(poolPositionen);
ro.SummenPosition.Rechungsanteil = 100;
ro.SummenPosition.Stundensatz = ro.MainRechnungsposition.Stundensatz;
@@ -121,9 +60,129 @@ namespace ChristopherusHausMID
{
AddPositionZuGesamt(item, ro.SummenPosition);
}
//Berechne prozentuale Anteile
if (poolPositionen.Count > 0 && ro.SummenPosition.GesamtBetrag > 0)
{
ro.MainRechnungsposition.Rechungsanteil = (ro.MainRechnungsposition.GesamtBetrag / ro.SummenPosition.GesamtBetrag) * 100;
foreach (var pos in poolPositionen)
{
pos.Rechungsanteil = (pos.GesamtBetrag / ro.SummenPosition.GesamtBetrag) * 100;
}
}
return ro;
}
private void BerechneRechnungsPositionSummen(Customer customer, RechnungsPositionRO ro, ServiceInvoiceRO pRO)
{
foreach (var ip in pRO.ServiceInvoicePeriods)
{
foreach (var item in ip.ServiceInvoiceItems)
{
decimal betrag = 0;
if (!String.IsNullOrEmpty(item.GrossAmount))
{
if (Decimal.TryParse(item.GrossAmount.Replace("€", "").Trim(), out var b))
{
betrag = b;
}
}
if (!String.IsNullOrEmpty(item.UnitDescription))
{
if (item.UnitDescription == "Faktor 1.0")
{
ro.BetreuteStunden10 = item.UnitCount ?? 0;
ro.BetragStunden10 = betrag;
}
else if (item.UnitDescription == "Faktor 1.1")
{
ro.BetreuteStunden11 = item.UnitCount ?? 0;
ro.BetragStunden11 = betrag;
}
else if (item.UnitDescription == "Faktor 1.2")
{
ro.BetreuteStunden12 = item.UnitCount ?? 0;
ro.BetragStunden12 = betrag;
}
else if (item.UnitDescription == "Faktor 1.3")
{
ro.BetreuteStunden13 = item.UnitCount ?? 0;
ro.BetragStunden13 = betrag;
}
else if (item.UnitDescription == "Faktor 1.4")
{
ro.BetreuteStunden14 = item.UnitCount ?? 0;
ro.BetragStunden14 = betrag;
}
else if (item.UnitDescription == "Faktor 1.5")
{
ro.BetreuteStunden15 = item.UnitCount ?? 0;
ro.BetragStunden15 = betrag;
}
}
else
{
ro.BetreuteStunden10 = item.UnitCount ?? 0;
}
ro.GesamtStunden += item.UnitCount ?? 0;
ro.GesamtBetrag += betrag;
ro.Stundensatz = item.AmountPerUnit ?? 0;
ro.Rechungsanteil = 100;
if (ip.SupportConceptApprovalPeriod != null)
{
ro.BewilligtProWoche = ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval ?? 0;
}
if (ip.Customer != null)
{
ro.CustomerName = String.Format("{0} {1}", ip.Customer.FirstName, ip.Customer.LastName);
}
var span = new DateTimeSpan();
span.StartDate = pRO.AccountingPeriodStart;
span.EndDate = pRO.AccountingPeriodEnd;
var fehltage = PoolHelper.GetAbwesenheitsTage(customer, span);
ro.Fehltage = fehltage;
}
}
}
private List<RechnungsPositionRO> BerechnePoolKinderRechnungen(Customer customer, ServiceInvoiceRO pRO)
{
var positionen = new List<RechnungsPositionRO>();
if (pRO.InvoiceBase.CustomerOid > 0)
{
var poolKinder = PoolHelper.GetWeiterePoolKinder(customer, pRO.AccountingPeriodStart);
int position = 2;
foreach (var poolKind in poolKinder)
{
var invoice = PoolHelper.ErstelleRechnung(poolKind, pRO.AccountingPeriodStart, pRO.AccountingPeriodEnd);
if (invoice != null)
{
var ro = new RechnungsPositionRO();
positionen.Add(ro);
var newInvoiceRo = ServiceInvoiceRO.Create(MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(invoice));
BerechneRechnungsPositionSummen(poolKind, ro, newInvoiceRo);
ro.Position = position++;
}
}
}
return positionen;
}
private void AddPositionZuGesamt(RechnungsPositionRO item, RechnungsPositionRO summenPosition)
{
summenPosition.Stunden5Prozent10 += item.Stunden5Prozent10;

View File

@@ -86,21 +86,6 @@ namespace DiakonieKKKleve.Invoicing
return ii;
}
private decimal GetGruppenPreis(CostBearer2SupportConcept c2s, DateTime dt)
{
String preisName = "Gruppentherapie Primärkassen";
if (c2s.CostBearer.Organisation.Function != null)
{
if (c2s.CostBearer.Organisation.Function.Value.Contains("Ersatzkasse"))
{
preisName = "Gruppentherapie Ersatzkassen";
}
}
return base.GetPreis(preisName, dt);
}
public override IList<InvoiceItem> CreateHausbesuchspauschale(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap)
{
IList<InvoiceItem> items = new List<InvoiceItem>();

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

@@ -33,6 +33,8 @@ namespace ProfEggersStiftung
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.picLogoOrange = new DevExpress.XtraReports.UI.XRPictureBox();
this.picLogoBlau = new DevExpress.XtraReports.UI.XRPictureBox();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
@@ -89,10 +91,7 @@ namespace ProfEggersStiftung
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
this.picLogoOrange = new DevExpress.XtraReports.UI.XRPictureBox();
this.picAdresseOrange = new DevExpress.XtraReports.UI.XRPictureBox();
this.picLogoBlau = new DevExpress.XtraReports.UI.XRPictureBox();
this.picAdresseBlau = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -110,15 +109,30 @@ namespace ProfEggersStiftung
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.picLogoBlau,
this.picAdresseBlau,
this.xrLabel1,
this.picLogoOrange,
this.picAdresseOrange});
this.picLogoBlau});
this.ReportHeader.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
this.ReportHeader.HeightF = 200F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
// picLogoOrange
//
this.picLogoOrange.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("picLogoOrange.ImageSource"));
this.picLogoOrange.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.picLogoOrange.Name = "picLogoOrange";
this.picLogoOrange.SizeF = new System.Drawing.SizeF(652F, 200F);
this.picLogoOrange.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// picLogoBlau
//
this.picLogoBlau.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("picLogoBlau.ImageSource"));
this.picLogoBlau.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.picLogoBlau.Name = "picLogoBlau";
this.picLogoBlau.SizeF = new System.Drawing.SizeF(652F, 200F);
this.picLogoBlau.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
@@ -681,37 +695,11 @@ namespace ProfEggersStiftung
this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell19.Weight = 1.4552725679749761D;
//
// picLogoOrange
// xrLabel1
//
this.picLogoOrange.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("picLogoOrange.ImageSource"));
this.picLogoOrange.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.picLogoOrange.Name = "picLogoOrange";
this.picLogoOrange.SizeF = new System.Drawing.SizeF(652F, 150F);
this.picLogoOrange.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// picAdresseOrange
//
this.picAdresseOrange.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("picAdresseOrange.ImageSource"));
this.picAdresseOrange.LocationFloat = new DevExpress.Utils.PointFloat(0F, 169.9988F);
this.picAdresseOrange.Name = "picAdresseOrange";
this.picAdresseOrange.SizeF = new System.Drawing.SizeF(250F, 20.00122F);
this.picAdresseOrange.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// picLogoBlau
//
this.picLogoBlau.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("picLogoBlau.ImageSource"));
this.picLogoBlau.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.picLogoBlau.Name = "picLogoBlau";
this.picLogoBlau.SizeF = new System.Drawing.SizeF(652F, 150F);
this.picLogoBlau.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// picAdresseBlau
//
this.picAdresseBlau.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("picAdresseBlau.ImageSource"));
this.picAdresseBlau.LocationFloat = new DevExpress.Utils.PointFloat(0F, 169.9988F);
this.picAdresseBlau.Name = "picAdresseBlau";
this.picAdresseBlau.SizeF = new System.Drawing.SizeF(291.9999F, 20.00122F);
this.picAdresseBlau.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.SizeF = new System.Drawing.SizeF(651.9999F, 200F);
//
// RechnungPflege
//
@@ -807,8 +795,7 @@ namespace ProfEggersStiftung
private DevExpress.XtraReports.UI.XRTableCell xrTableCell21;
private DevExpress.XtraReports.UI.XRLabel lblUmzugTZ;
private DevExpress.XtraReports.UI.XRPictureBox picLogoOrange;
private DevExpress.XtraReports.UI.XRPictureBox picAdresseOrange;
private DevExpress.XtraReports.UI.XRPictureBox picLogoBlau;
private DevExpress.XtraReports.UI.XRPictureBox picAdresseBlau;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
}
}

View File

@@ -142,24 +142,11 @@ namespace ProfEggersStiftung
}
lblAbwesenheiten.Text = abwesenheiten;
String team = GetTeam(pRO);
if (team.ToLower().Contains("trialog"))
{
picAdresseBlau.Visible = false;
picLogoBlau.Visible = false;
picAdresseOrange.Visible = true;
picLogoOrange.Visible = true;
}
else
{
picAdresseBlau.Visible = true;
picLogoBlau.Visible = true;
picAdresseOrange.Visible = false;
picLogoOrange.Visible = false;
}
this.bindingSource1.DataSource = pRO;
CheckLogoVisibility(pRO);
this.bindingSource1.DataSource = pRO;
}
private string GetTeam(ServiceInvoiceRO pRO)
@@ -177,5 +164,56 @@ namespace ProfEggersStiftung
}
return team;
}
}
private void CheckLogoVisibility(ServiceInvoiceRO pRO)
{
bool showLogo = false;
if (pRO.InvoiceBase.CustomerOid > 0)
{
var c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.InvoiceBase.CustomerOid);
foreach (var vv in c.VarFieldValueList)
{
if (vv.VarFieldDefOid.Value == 9)
{
var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
if (varFieldValue != null)
{
var vfv = varFieldValue.ToString();
if (String.IsNullOrEmpty(vfv) || vfv == "True")
{
showLogo = true;
}
}
}
}
}
if (showLogo)
{
String team = GetTeam(pRO);
if (team.ToLower().Contains("trialog"))
{
picLogoBlau.Visible = false;
picLogoOrange.Visible = true;
}
else
{
picLogoBlau.Visible = true;
picLogoOrange.Visible = false;
}
}
else
{
picLogoBlau.Visible = false;
picLogoOrange.Visible = false;
if (Watermarks.Count > 0)
{
this.Watermarks[0].ImageSource = null;
}
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -33,6 +33,8 @@ namespace ProfEggersStiftung
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.picLogo = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
@@ -64,8 +66,6 @@ namespace ProfEggersStiftung
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
@@ -80,13 +80,29 @@ namespace ProfEggersStiftung
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrPictureBox2,
this.xrPictureBox1});
this.xrLabel5,
this.picLogo});
this.ReportHeader.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
this.ReportHeader.HeightF = 200F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
// picLogo
//
this.picLogo.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("picLogo.ImageSource"));
this.picLogo.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.picLogo.Name = "picLogo";
this.picLogo.SizeF = new System.Drawing.SizeF(652F, 200F);
this.picLogo.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrLabel5
//
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(650F, 200F);
this.xrLabel5.StylePriority.UseFont = false;
//
// ruleRateFactorNull
//
this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?";
@@ -395,22 +411,6 @@ namespace ProfEggersStiftung
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// xrPictureBox1
//
this.xrPictureBox1.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox1.ImageSource"));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(652F, 150F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrPictureBox2
//
this.xrPictureBox2.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox2.ImageSource"));
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 169.9988F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(291.9999F, 20.00122F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// ServiceInvoiceReport
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -477,7 +477,7 @@ namespace ProfEggersStiftung
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRPictureBox picLogo;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
}
}

View File

@@ -1,4 +1,6 @@
using System;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
@@ -62,8 +64,44 @@ namespace ProfEggersStiftung
pRO.SenderContactPersonPhone = "0201-8953322";
}
lblAbrechnungstext.Text = String.Format("{0:0.##} FLS x {1:c} = ", hours, hourlyRate);
CheckLogoVisibility(pRO);
this.bindingSource1.DataSource = pRO;
}
private void CheckLogoVisibility(ServiceInvoiceRO pRO)
{
bool showLogo = false;
if (pRO.InvoiceBase.CustomerOid > 0)
{
var c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.InvoiceBase.CustomerOid);
foreach (var vv in c.VarFieldValueList)
{
if (vv.VarFieldDefOid.Value == 9)
{
var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
if (varFieldValue != null)
{
var vfv = varFieldValue.ToString();
if (String.IsNullOrEmpty(vfv) || vfv == "True")
{
showLogo = true;
}
}
}
}
}
picLogo.Visible = showLogo;
if (Watermarks.Count > 0 && !showLogo)
{
this.Watermarks[0].ImageSource = null;
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -46,6 +46,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.cellMinutenDetail = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.picSignature = new DevExpress.XtraReports.UI.XRPictureBox();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -53,6 +54,10 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail2 = new DevExpress.XtraReports.UI.DetailBand();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable4 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -87,11 +92,8 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.picSignature = new DevExpress.XtraReports.UI.XRPictureBox();
this.lblBusinessPartnerId = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel24 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -299,6 +301,18 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.xrTableCell12.StylePriority.UseBorders = false;
this.xrTableCell12.Weight = 0.93516701325095841D;
//
// picSignature
//
this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")});
this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(33.13547F, 0F);
this.picSignature.Name = "picSignature";
this.picSignature.SizeF = new System.Drawing.SizeF(160F, 20F);
this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.picSignature.StylePriority.UseBorders = false;
this.picSignature.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.picSignature_BeforePrint);
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
@@ -376,6 +390,57 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.Detail2.StylePriority.UseFont = false;
this.Detail2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel11
//
this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(326.1138F, 118.2916F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(117.5416F, 24.04169F);
this.xrLabel11.StylePriority.UseBorders = false;
this.xrLabel11.StylePriority.UseTextAlignment = false;
this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
//
// xrPictureBox1
//
this.xrPictureBox1.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "EmployeeSignature")});
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(110F, 106.8332F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(176.4583F, 35.50002F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.xrPictureBox1.StylePriority.UseBorders = false;
//
// xrPictureBox2
//
this.xrPictureBox2.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")});
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(443.6554F, 106.8332F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(176.4583F, 35.5F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.xrPictureBox2.StylePriority.UseBorders = false;
//
// xrLabel17
//
this.xrLabel17.BackColor = System.Drawing.Color.Transparent;
this.xrLabel17.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel17.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeSignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(0.8366902F, 118.2916F);
this.xrLabel17.Name = "xrLabel17";
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel17.SizeF = new System.Drawing.SizeF(109.1633F, 24.04169F);
this.xrLabel17.StylePriority.UseBackColor = false;
this.xrLabel17.StylePriority.UseBorders = false;
this.xrLabel17.StylePriority.UseTextAlignment = false;
this.xrLabel17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
//
// xrTable4
//
this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(196.0416F, 32.00008F);
@@ -609,6 +674,8 @@ namespace BeWo.PsychosozialerTraegervereinReports
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel24,
this.lblBusinessPartnerId,
this.xrLabel9,
this.xrLabel6,
this.xrLabel1,
@@ -619,7 +686,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.xrLabel10,
this.xrLabel8});
this.ReportHeader.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.ReportHeader.HeightF = 243.125F;
this.ReportHeader.HeightF = 228.5417F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
@@ -637,7 +704,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
//
// xrLabel6
//
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(229.6544F, 100.125F);
this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(230.4911F, 88.04163F);
this.xrLabel6.Multiline = true;
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -654,7 +721,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.xrLabel1.Multiline = true;
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(667.0001F, 100.125F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(667.0001F, 76.04163F);
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.StylePriority.UseTextAlignment = false;
this.xrLabel1.Text = "Psychosozialer Trägerverein e.V.\r\n\r\nQuittierungsbeleg über direkte Betreuungsleis" +
@@ -677,7 +744,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
//
this.aktenzeichenLV.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ReferenceNumber")});
this.aktenzeichenLV.LocationFloat = new DevExpress.Utils.PointFloat(229.6544F, 148.2917F);
this.aktenzeichenLV.LocationFloat = new DevExpress.Utils.PointFloat(230.4911F, 136.2084F);
this.aktenzeichenLV.Multiline = true;
this.aktenzeichenLV.Name = "aktenzeichenLV";
this.aktenzeichenLV.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -688,7 +755,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
//
// xrLabel16
//
this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(229.6544F, 124.2084F);
this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(230.4911F, 112.125F);
this.xrLabel16.Multiline = true;
this.xrLabel16.Name = "xrLabel16";
this.xrLabel16.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -700,7 +767,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
//
// xrLabel15
//
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 148.2917F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0.8366902F, 136.2084F);
this.xrLabel15.Multiline = true;
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -712,7 +779,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
//
// xrLabel10
//
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 124.2084F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0.8366902F, 112.125F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -724,7 +791,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
//
// xrLabel8
//
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 100.125F);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0.8366902F, 88.04163F);
this.xrLabel8.Multiline = true;
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -771,68 +838,33 @@ namespace BeWo.PsychosozialerTraegervereinReports
this.fieldFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldFLS.Name = "fieldFLS";
//
// xrLabel11
// lblBusinessPartnerId
//
this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(326.1138F, 118.2916F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(117.5416F, 24.04169F);
this.xrLabel11.StylePriority.UseBorders = false;
this.xrLabel11.StylePriority.UseTextAlignment = false;
this.xrLabel11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
this.lblBusinessPartnerId.LocationFloat = new DevExpress.Utils.PointFloat(0.8366902F, 160.2917F);
this.lblBusinessPartnerId.Multiline = true;
this.lblBusinessPartnerId.Name = "lblBusinessPartnerId";
this.lblBusinessPartnerId.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblBusinessPartnerId.SizeF = new System.Drawing.SizeF(229.6544F, 24.08336F);
this.lblBusinessPartnerId.StylePriority.UseFont = false;
this.lblBusinessPartnerId.StylePriority.UseTextAlignment = false;
this.lblBusinessPartnerId.Text = "ZAD-Nummer:";
this.lblBusinessPartnerId.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrPictureBox1
// xrLabel24
//
this.xrPictureBox1.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "EmployeeSignature")});
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(110F, 106.8332F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(176.4583F, 35.50002F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.xrPictureBox1.StylePriority.UseBorders = false;
//
// xrPictureBox2
//
this.xrPictureBox2.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")});
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(443.6554F, 106.8332F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(176.4583F, 35.5F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.xrPictureBox2.StylePriority.UseBorders = false;
//
// xrLabel17
//
this.xrLabel17.BackColor = System.Drawing.Color.Transparent;
this.xrLabel17.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel17.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeSignatureDate", "{0:dd.MM.yyyy}")});
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(0.8366902F, 118.2916F);
this.xrLabel17.Name = "xrLabel17";
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel17.SizeF = new System.Drawing.SizeF(109.1633F, 24.04169F);
this.xrLabel17.StylePriority.UseBackColor = false;
this.xrLabel17.StylePriority.UseBorders = false;
this.xrLabel17.StylePriority.UseTextAlignment = false;
this.xrLabel17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter;
//
// picSignature
//
this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")});
this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(33.13547F, 0F);
this.picSignature.Name = "picSignature";
this.picSignature.SizeF = new System.Drawing.SizeF(160F, 20F);
this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.picSignature.StylePriority.UseBorders = false;
this.picSignature.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.picSignature_BeforePrint);
this.xrLabel24.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel24.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CostBearer2SupportConceptList.CostBearer.Organisation.BusinessPartnerId")});
this.xrLabel24.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel24.LocationFloat = new DevExpress.Utils.PointFloat(230.6544F, 160.2917F);
this.xrLabel24.Name = "xrLabel24";
this.xrLabel24.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel24.SizeF = new System.Drawing.SizeF(210.5415F, 22.625F);
this.xrLabel24.StylePriority.UseBorders = false;
this.xrLabel24.StylePriority.UseFont = false;
this.xrLabel24.StylePriority.UseTextAlignment = false;
this.xrLabel24.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrLabel24.TextFormatString = "{0}";
//
// Stundenzettel
//
@@ -931,5 +963,7 @@ namespace BeWo.PsychosozialerTraegervereinReports
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
private DevExpress.XtraReports.UI.XRLabel xrLabel17;
private DevExpress.XtraReports.UI.XRPictureBox picSignature;
private DevExpress.XtraReports.UI.XRLabel lblBusinessPartnerId;
private DevExpress.XtraReports.UI.XRLabel xrLabel24;
}
}

View File

@@ -81,6 +81,19 @@ namespace BeWo.PsychosozialerTraegervereinReports
summeStunden.Text = String.Format("{0:0.00}", abrechenbareStunden);
}
lblBusinessPartnerId.Text = "";
if (pRO.Costbearer != null)
{
if (pRO.Costbearer.ToLower().Contains("lvr"))
{
lblBusinessPartnerId.Text = "GP-Nummer:";
}
else if (pRO.Costbearer.ToLower().Contains("lwl"))
{
lblBusinessPartnerId.Text = "ZAD-Nummer:";
}
}
bindingSource1.DataSource = pRO;
}

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,11 @@ namespace BeWo.PsychosozialerTraegervereinReports.Alt
public void SetReportDataSource(SettlementRO pRO)
{
if (pRO.RecipientOrganisation != null && pRO.RecipientOrganisation.ToLower().Contains("lwl"))
{
lblBusinessPartnerId.Text = lblBusinessPartnerId.Text.Replace("GP-Nr", "ZAD-Nr");
}
if (pRO.DifferentHourlyRateCount == 3)
{
//Erbrachte Leistungen (FLS) - bis [HourlyRateOldEndDateString] à [HourlyRateOldString] €

View File

@@ -121,7 +121,4 @@
<value>anbei sende ich Ihnen die unterschriebenen Nachweise über die im Rahmen des Betreuten Wohnens für [Salutation2] [CustomerName] erbrachten Leistungen zu. Nach unserer Berechnung ergeben sich für den Betreuungszeitraum [AccountingPeriod] hieraus:
</value>
</data>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -32,8 +32,10 @@ namespace PsychosozialerTraegervereinReports
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Spitzabrechnung));
DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary();
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.rowErbrachteLeistung = new DevExpress.XtraReports.UI.XRTableRow();
@@ -58,7 +60,7 @@ namespace PsychosozialerTraegervereinReports
this.xrTableRow6 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow8 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.tableCellBusinessPartnerId = new DevExpress.XtraReports.UI.XRTableCell();
this.RecipientPostCodeAndTown = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel_RecipientStreet = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel_RecipientDivision = new DevExpress.XtraReports.UI.XRLabel();
@@ -102,7 +104,6 @@ namespace PsychosozialerTraegervereinReports
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow10 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrTable5 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow31 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -121,14 +122,14 @@ namespace PsychosozialerTraegervereinReports
this.xrTableRow37 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell59 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell60 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -142,11 +143,21 @@ namespace PsychosozialerTraegervereinReports
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel7});
this.ReportHeader.Font = new System.Drawing.Font("Verdana", 10F);
this.ReportHeader.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
this.ReportHeader.HeightF = 31.45835F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
// xrLabel7
//
this.xrLabel7.Font = new DevExpress.Drawing.DXFont("Tahoma", 8F, DevExpress.Drawing.DXFontStyle.Underline);
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F);
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(317F, 17F);
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.Text = "pst e.v. Friedrichstrasse 77 58636 Iserlohn";
//
// xrLabel8
//
this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
@@ -221,7 +232,8 @@ namespace PsychosozialerTraegervereinReports
//
this.xrLabel4.BackColor = System.Drawing.Color.Transparent;
this.xrLabel4.CanShrink = true;
this.xrLabel4.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 203.125F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
@@ -236,7 +248,8 @@ namespace PsychosozialerTraegervereinReports
//
this.xrLabel3.BackColor = System.Drawing.Color.Transparent;
this.xrLabel3.CanShrink = true;
this.xrLabel3.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 187.125F);
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -244,14 +257,15 @@ namespace PsychosozialerTraegervereinReports
this.xrLabel3.StylePriority.UseBackColor = false;
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Abrechnung Betreuungsleistungen für [Salutation2] [CustomerFirstName] [CustomerLa" +
"stName]";
"stName], geb. [CustomerBirthday!dd.MM.yyyy]";
this.xrLabel3.WordWrap = false;
//
// xrLabel2
//
this.xrLabel2.BackColor = System.Drawing.Color.Transparent;
this.xrLabel2.CanShrink = true;
this.xrLabel2.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 170.125F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -392,15 +406,20 @@ namespace PsychosozialerTraegervereinReports
// xrTableRow8
//
this.xrTableRow8.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell5});
this.tableCellBusinessPartnerId});
this.xrTableRow8.Name = "xrTableRow8";
this.xrTableRow8.Weight = 0.11258278145695365D;
//
// xrTableCell5
// tableCellBusinessPartnerId
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell5.Weight = 1D;
this.tableCellBusinessPartnerId.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "BusinessPartnerId")});
this.tableCellBusinessPartnerId.Name = "tableCellBusinessPartnerId";
this.tableCellBusinessPartnerId.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.tableCellBusinessPartnerId.StylePriority.UseTextAlignment = false;
this.tableCellBusinessPartnerId.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.tableCellBusinessPartnerId.TextFormatString = "GP-Nr.: {0}";
this.tableCellBusinessPartnerId.Weight = 1D;
//
// RecipientPostCodeAndTown
//
@@ -465,7 +484,8 @@ namespace PsychosozialerTraegervereinReports
this.xrLabel12,
this.xrLabel11,
this.lblNotice});
this.ReportFooter.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ReportFooter.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.ReportFooter.HeightF = 209F;
this.ReportFooter.KeepTogether = true;
this.ReportFooter.Name = "ReportFooter";
@@ -623,7 +643,8 @@ namespace PsychosozialerTraegervereinReports
// lblNotice
//
this.lblNotice.CanShrink = true;
this.lblNotice.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblNotice.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Italic, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.lblNotice.LocationFloat = new DevExpress.Utils.PointFloat(0F, 7.999992F);
this.lblNotice.Name = "lblNotice";
this.lblNotice.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -633,7 +654,6 @@ namespace PsychosozialerTraegervereinReports
//
// topMarginBand1
//
this.topMarginBand1.HeightF = 100F;
this.topMarginBand1.Name = "topMarginBand1";
//
// bottomMarginBand1
@@ -657,7 +677,8 @@ namespace PsychosozialerTraegervereinReports
this.xrLabel6,
this.xrTable1,
this.xrLabel8});
this.GroupHeader1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.GroupHeader1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.GroupHeader1.HeightF = 370.4583F;
this.GroupHeader1.Name = "GroupHeader1";
this.GroupHeader1.StylePriority.UseFont = false;
@@ -676,7 +697,8 @@ namespace PsychosozialerTraegervereinReports
this.Zwischensumme});
this.DetailReport.DataMember = "InvoiceItems";
this.DetailReport.DataSource = this.bindingSource1;
this.DetailReport.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.DetailReport.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.DetailReport.Level = 0;
this.DetailReport.Name = "DetailReport";
//
@@ -684,7 +706,8 @@ namespace PsychosozialerTraegervereinReports
//
this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable4});
this.Detail1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.Detail1.HeightF = 17F;
this.Detail1.Name = "Detail1";
this.Detail1.SortFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] {
@@ -780,7 +803,8 @@ namespace PsychosozialerTraegervereinReports
//
this.xrTableCell9.BorderColor = System.Drawing.SystemColors.ControlLight;
this.xrTableCell9.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell9.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell9.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell9.StylePriority.UseBorderColor = false;
@@ -797,7 +821,8 @@ namespace PsychosozialerTraegervereinReports
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceItems.GrossAmountTotal")});
this.xrTableCell10.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell10.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell10.StylePriority.UseBorderColor = false;
@@ -823,7 +848,8 @@ namespace PsychosozialerTraegervereinReports
this.xrTableCell7.BorderColor = System.Drawing.SystemColors.ControlLight;
this.xrTableCell7.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell7.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrTableCell7.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell7.StylePriority.UseBorderColor = false;
@@ -832,15 +858,12 @@ namespace PsychosozialerTraegervereinReports
this.xrTableCell7.StylePriority.UsePadding = false;
this.xrTableCell7.Weight = 3D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.Settlement2RO);
//
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable5});
this.GroupFooter1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.GroupFooter1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.GroupFooter1.HeightF = 115F;
this.GroupFooter1.Name = "GroupFooter1";
this.GroupFooter1.StylePriority.UseFont = false;
@@ -1024,7 +1047,7 @@ namespace PsychosozialerTraegervereinReports
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrTableCell60.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Claim", "{0:c}")});
this.xrTableCell60.Font = new System.Drawing.Font("Verdana", 10F, System.Drawing.FontStyle.Bold);
this.xrTableCell60.Font = new DevExpress.Drawing.DXFont("Verdana", 10F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell60.Name = "xrTableCell60";
this.xrTableCell60.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrTableCell60.StylePriority.UseBorderColor = false;
@@ -1035,15 +1058,9 @@ namespace PsychosozialerTraegervereinReports
this.xrTableCell60.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell60.Weight = 0.16397432767427886D;
//
// xrLabel7
// bindingSource1
//
this.xrLabel7.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Underline);
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F);
this.xrLabel7.Name = "xrLabel7";
this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel7.SizeF = new System.Drawing.SizeF(317F, 17F);
this.xrLabel7.StylePriority.UseFont = false;
this.xrLabel7.Text = "pst e.v. Friedrichstrasse 77 58636 Iserlohn";
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.Settlement2RO);
//
// Spitzabrechnung
//
@@ -1062,18 +1079,20 @@ namespace PsychosozialerTraegervereinReports
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new System.Drawing.Printing.Margins(75, 74, 100, 43);
this.Margins = new DevExpress.Drawing.DXMargins(75F, 74F, 100F, 43F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
this.Version = "17.1";
this.Version = "23.2";
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -1102,7 +1121,7 @@ namespace PsychosozialerTraegervereinReports
private DevExpress.XtraReports.UI.XRTableRow xrTableRow6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow8;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRTableCell tableCellBusinessPartnerId;
private DevExpress.XtraReports.UI.XRLabel RecipientPostCodeAndTown;
private DevExpress.XtraReports.UI.XRLabel xrLabel_RecipientStreet;
private DevExpress.XtraReports.UI.XRLabel xrLabel_RecipientDivision;

View File

@@ -15,6 +15,11 @@ namespace PsychosozialerTraegervereinReports
public void SetReportDataSource(Settlement2RO pRO)
{
if (pRO.RecipientOrganisation != null && pRO.RecipientOrganisation.ToLower().Contains("lwl"))
{
tableCellBusinessPartnerId.Text = tableCellBusinessPartnerId.Text.Replace("GP-Nr", "ZAD-Nr");
}
if (String.IsNullOrEmpty(pRO.Notice))
{
lblNotice.Visible = false;

View File

@@ -121,7 +121,4 @@
<value>anbei sende ich Ihnen die unterschriebenen Nachweise über die im Rahmen des Betreuten Wohnens für [Salutation2] [CustomerFirstName] [CustomerLastName] erbrachten Leistungen zu. Nach unserer Berechnung ergeben sich für den Betreuungszeitraum [AccountingPeriod] hieraus:
</value>
</data>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -33,8 +33,53 @@ namespace TRIASAmbulanteSozialarbeit.Invoicing
if (serviceInvoice.InvoiceBase.CostBearer2SupportConcept != null)
{
var sc = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.SupportConcept;
var cust = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.SupportConcept.Customer;
foreach (var c2s in sc.CostBearer2SupportConceptList)
{
//Prüfe ob es eine Bewilligung mit Kategorie "Haushaltshilfe" gibt, bei der der Kostenträger NICHT "Haushaltshilfe" heißt, dann ist es die Pflegekasse
foreach (var item in c2s.ApprovalPeriodList)
{
if (item.ServiceCategory != null && item.ServiceCategory.Name == "Haushaltshilfe" && c2s.CostBearer.Organisation.Name != "Haushaltshilfe")
{
var org = c2s.CostBearer.Organisation;
if (org.InvoiceAddress != null)
{
serviceInvoice.InvoiceBase.RecipientAddress = org.InvoiceAddress.CopyToNew();
}
else if (org.Address != null)
{
serviceInvoice.InvoiceBase.RecipientAddress = org.Address.CopyToNew();
}
serviceInvoice.InvoiceBase.RecipientDivision = org.Name2;
serviceInvoice.InvoiceBase.RecipientOrganisationOid = org.Oid;
serviceInvoice.InvoiceBase.RecipientOrganisation = org.Name;
serviceInvoice.InvoiceBase.RecipientContacts = org.Contacts.Select(i => i.CopyToNew()).ToList();
//serviceInvoice.InvoiceBase.RecipientCostBearerOid = costBearer.Oid;
if (c2s.CostBearerContactPerson != null)
{
//String anrede = "";
//if (c2s.CostBearerContactPerson.Sex.HasValue)
// {
// anrede = c2s.CostBearerContactPerson.Sex.Value == Sex.Male ? "Herr " : "Frau ";
//}
serviceInvoice.InvoiceBase.RecipientPersonFirstName = c2s.CostBearerContactPerson.FirstName;
serviceInvoice.InvoiceBase.RecipientPersonLastName = c2s.CostBearerContactPerson.LastName;
serviceInvoice.InvoiceBase.RecipientPersonOid = c2s.CostBearerContactPerson.Oid;
}
return;
}
}
}
if (cust.Person.InvoiceAddress != null)
{
serviceInvoice.InvoiceBase.RecipientAddress = cust.Person.InvoiceAddress.CopyToNew();

View File

@@ -124,9 +124,7 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
this.lblAbrechnungszeitraum.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(489.8335F, 61.45505F);
this.lblAbrechnungszeitraum.StylePriority.UseFont = false;
this.lblAbrechnungszeitraum.Text = "hier Ihre Rechnung für die haushaltsnahen Dienstleistungen.\r\nVereinbarter Stunden" +
"satz [STUNDENSATZ] plus einmaliger Pauschale für An-/ Abfahrt in Höhe von je [AN" +
"FAHRTPAUSCHALE] pro Einsatztag.";
this.lblAbrechnungszeitraum.Text = resources.GetString("lblAbrechnungszeitraum.Text");
//
// lblAnrede
//
@@ -158,8 +156,8 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
this.RechnungsNR.SizeF = new System.Drawing.SizeF(489.8335F, 37.12482F);
this.RechnungsNR.StylePriority.UseBackColor = false;
this.RechnungsNR.StylePriority.UseFont = false;
this.RechnungsNR.Text = "Rechnung-Nr. [InvoiceNumber], KV-Nr. [CustomerInsuranceNumber], haushaltsnahe Di" +
"enstleistung Grundlage § 45b SGB XI ";
this.RechnungsNR.Text = "Rechn. Nr. [InvoiceNumber], Grundlage § 45b SGB XI, Versicherungsnr. [CustomerIn" +
"suranceNumber]";
//
// DatumsAnzeige
//

View File

@@ -25,17 +25,54 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
if ("Haushaltshilfe".Equals(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientContactPerson);
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
SetzePrivatAnrede(pRO);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
else
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine(pRO.RecipientPostCodeAndTown);
String anrede = "Frau ";
var p = GetAnsprechpartner(pRO);
if (p != null)
{
lblAnrede.Text = String.Format("Sehr geehrte Frau {0}", p.LastName);
if (p != null && p.Sex.HasValue && p.Sex.Value == Sex.Male)
{
lblAnrede.Text = String.Format("Sehr geehrter Herr {0}", p.LastName);
anrede = "Herr ";
}
}
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(String.Format("{0}{1}", anrede, pRO.RecipientContactPerson));
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
}
lblAdresse.Text = sb.ToString();
lblIK.Text = "Institutskennzeichen: 460948378";
@@ -44,7 +81,7 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
//{
//}
SetzeAnrede(pRO);
decimal stundensatz = 0;
decimal pauschale = 0;
@@ -79,21 +116,36 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
lblAbrechnungszeitraum.Text = lblAbrechnungszeitraum.Text.Replace("[STUNDENSATZ]", String.Format("{0:c}", stundensatz)).Replace("[ANFAHRTPAUSCHALE]", String.Format("{0:c}", pauschale));
String customername = pRO.CustomerName;
if (pRO.InvoiceBase.CustomerOid > 0)
{
var c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.InvoiceBase.CustomerOid);
if (c.Person.Sex.HasValue && c.Person.Sex.Value == Sex.Male)
{
customername = String.Format("Herr {0}", customername);
}
else
{
customername = String.Format("Frau {0}", customername);
}
}
lblAbrechnungszeitraum.Text = lblAbrechnungszeitraum.Text.Replace("[CUSTOMER]", customername);
this.bindingSource1.DataSource = pRO;
}
private void SetzeAnrede(ServiceInvoiceRO pRo)
private void SetzePrivatAnrede(ServiceInvoiceRO pRo)
{
if (pRo.InvoiceBase.SupportConceptCostBearerRelDc != null)
{
var c = pRo.InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer;
if (c != null)
{
//var p = DAOFactory.GenericDAO.LoadByID<Person>(pdc.PersonOid);
if (c.Sex.HasValue)
{
if (c.Sex.Value == Sex.Male)
@@ -105,9 +157,18 @@ namespace BeWo.TRIASAmbulanteSozialarbeit
lblAnrede.Text = String.Format("Sehr geehrte Frau {0},", c.LastName);
}
}
}
}
}
private Person GetAnsprechpartner(ServiceInvoiceRO pRo)
{
if (pRo.InvoiceBase.RecipientPersonOid.HasValue)
{
return DAOFactory.GenericDAO.LoadByID<Person>(pRo.InvoiceBase.RecipientPersonOid.Value);
}
return null;
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,24 @@
using BeWo.Data;
using BS.Shared.DataContracts;
using DevExpress.Pdf;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace BeWo.Service.Import.Perseh
{
public class BereichMitZielenUndMassnahmen
{
public String Lebensbereich { get; set; }
public String Ziele { get; set; }
public String Massnahmenplanung { get; set; }
public PdfDocumentArea BereichEndeArea { get; set; }
}
}

View File

@@ -82,8 +82,10 @@ namespace BeWo.Service.Import.Perseh
{
processor.LoadDocument(ms);
var pdfText = processor.Text;
var customerGruppe = ErstelleKlientenStammdatenGruppe(pdfText);
if (customerGruppe == null)
@@ -98,7 +100,7 @@ namespace BeWo.Service.Import.Perseh
result.Ziele = ErstelleAlleZiele(pdfText);
if (result.Ziele.Count == 0) // Keine Ziele gefunden, versuche andere PDF Version
{
result.Ziele = ErstelleAlleZiele2(pdfText);
result.Ziele = ErstelleAlleZiele2(processor);
}
}
}
@@ -107,6 +109,8 @@ namespace BeWo.Service.Import.Perseh
return result;
}
private HilfeplanImportZielDC CreateZiel(string bereich, string ziel, string massnahme)
{
var z = new HilfeplanImportZielDC { Bereich = bereich, ZielName = ziel, DoImport = true};
@@ -220,76 +224,373 @@ namespace BeWo.Service.Import.Perseh
}
private IList<HilfeplanImportZielDC> ErstelleAlleZiele2(string pdfText)
private IList<HilfeplanImportZielDC> ErstelleAlleZiele2(PdfDocumentProcessor processor)
{
var ziele = new List<HilfeplanImportZielDC>();
//Suche Zeile "Zielplanung". So beginnt hinten im Dokument der Bereich mit der Zusammenfassung der Ziele
var zeilen = pdfText.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
var startIdx = -1;
var endIdx = -1;
var zielplanungStart = -1;
StringBuilder gesamtTextMitZielen = new StringBuilder();
var bereiche = LeseBereicheMitZielenUndMassnahmen(processor);
for (int i = zeilen.Length - 1; i >= 0; i--)
foreach (var bereich in bereiche)
{
var z = zeilen[i];
if (z == "Zielplanung")
{
zielplanungStart = i;
startIdx = i;
}
if (z.StartsWith("Übersicht der Leistungsplanung "))
{
endIdx = i;
}
}
if (endIdx < startIdx)
{
for (int i = zeilen.Length - 1; i >= 0; i--)
{
var z = zeilen[i];
if (z.StartsWith("Gesamtübersicht Stunden pro Woche"))
{
endIdx = i;
}
}
}
if (startIdx >= 0)
{
for (int i = startIdx; i < endIdx; i++)
{
gesamtTextMitZielen.AppendLine(zeilen[i]);
}
zeilen = gesamtTextMitZielen.ToString().Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
startIdx = 0;
while (startIdx >= 0)
{
var ta = TextAbschnittReader.LeseBisText(zeilen, startIdx, "Lebensbereich ", true, false, false);
if (ta.Success)
{
ziele.AddRange(ErstelleBereichMitZielen(zeilen, ta));
startIdx = ta.ZeilenIndex + 1;
}
else
{
startIdx = -1;
}
}
}
if (zielplanungStart >= 0)
{
ErstelleMassnahmen(pdfText, zielplanungStart, ziele);
ziele.AddRange(LeseZieleUndMassnahmenAusBereich(bereich));
}
return ziele;
}
private IList<HilfeplanImportZielDC> LeseZieleUndMassnahmenAusBereich(BereichMitZielenUndMassnahmen bereich)
{
var ziele = new List<HilfeplanImportZielDC>();
if (!String.IsNullOrEmpty(bereich.Lebensbereich) && !String.IsNullOrEmpty(bereich.Ziele))
{
var zeilen = bereich.Ziele.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
HilfeplanImportZielDC ziel = null;
foreach (var zeile in zeilen)
{
if (zeile != "Handlungsziele" && zeile != "Maßnahmeplanung" && !IgnoriereZeile(zeile))
{
if (zeile.StartsWith("• "))
{
ziel = new HilfeplanImportZielDC();
ziel.DoImport = true;
ziel.Bereich = bereich.Lebensbereich.Trim();
ziel.ZielName = zeile.Replace("Ziele • ", "").Replace("• ", "").Trim();
LeseMassnahmenAusBereich(bereich, ziel);
ziele.Add(ziel);
}
else if (ziel != null)
{
ziel.ZielName += " " + zeile.Trim();
}
}
}
}
return ziele;
}
private void LeseMassnahmenAusBereich(BereichMitZielenUndMassnahmen bereich, HilfeplanImportZielDC ziel)
{
if (!String.IsNullOrEmpty(bereich.Massnahmenplanung))
{
ziel.Massnahmen = new List<HilfeplanImportZielDC>();
var zeilen = bereich.Massnahmenplanung.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
//Schwer die Massnahmen zu trennen, daher für alles eine Maßnahme erstellen
var massnahme = new HilfeplanImportZielDC();
ziel.Massnahmen.Add(massnahme);
massnahme.ZielName = "";
foreach (var zeile in zeilen)
{
if (zeile != "Maßnahmeplanung" && zeile != "Maßnahme" && zeile != "Leistungsplanung" && !IgnoriereZeile(zeile))
{
if (massnahme.ZielName.Length > 0)
{
massnahme.ZielName += " ";
}
massnahme.ZielName += zeile.Trim();
}
}
}
}
private IList<BereichMitZielenUndMassnahmen> LeseBereicheMitZielenUndMassnahmen(PdfDocumentProcessor processor)
{
var bereiche = new List<BereichMitZielenUndMassnahmen>();
PdfDocumentArea letzterBereich = null;
letzterBereich = SucheText(processor, "Kapitel ", letzterBereich);
while (letzterBereich != null)
{
var bereich = LeseBereichMitZielenUndMassnahmen(processor, letzterBereich);
letzterBereich = null;
if (bereich != null)
{
bereiche.Add(bereich);
if (bereich.BereichEndeArea != null)
{
letzterBereich = SucheText(processor, "Kapitel ", bereich.BereichEndeArea);
}
}
}
//String gesamtText = "";
//int h = 10; //Lese Seite Zeilenweise mit Zeilenhöhe = 10 ein
//foreach (var page in processor.Document.Pages)
//{
// var left = page.CropBox.Left;
// var right = page.CropBox.Right;
// var top = page.CropBox.Top;
// var bottom = page.CropBox.Bottom;
// var opts = new PdfTextExtractionOptions();
// opts.ClipToCropBox = true;
// var abschnittTop = top;
// var abschnittBottom = top - h;
// IList<String> letzten2Zeilen = new List<String>();
// while (abschnittTop > 0)
// {
// var idx = page.GetPageIndex();
// var area = new PdfDocumentArea(idx + 1, new PdfRectangle(left, abschnittBottom, right, abschnittTop));
// String neueZeile = processor.GetText(area, opts);
// //String test0 = processor.GetText(new PdfDocumentArea(1, new PdfRectangle(left, 782, right, 792)), opts);
// //String test = processor.GetText(new PdfDocumentArea(1, new PdfRectangle(left, 772, right, 782)), opts);
// //String test2 = processor.GetText(new PdfDocumentArea(1, new PdfRectangle(left, 762, right, 772)), opts);
// var zeilen = neueZeile.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
// if (zeilen.Length > 2)
// {
// int sollteNichtSein = 0;
// }
// //Die erste Zeile wird manchmal doppelt gelesen
// foreach (var zeile in zeilen)
// {
// var zeileMitUmbruch = zeile + "\r\n";
// bool zeileVorhanden = false;
// foreach (var lz in letzten2Zeilen)
// {
// if (lz == zeileMitUmbruch)
// {
// zeileVorhanden = true;
// }
// }
// if (!zeileVorhanden)
// {
// gesamtText += zeileMitUmbruch;
// letzten2Zeilen.Add(zeileMitUmbruch);
// if (letzten2Zeilen.Count > 2)
// {
// letzten2Zeilen.RemoveAt(0);
// }
// }
// }
// abschnittTop -= (h + 1);
// abschnittBottom = abschnittTop - h;
// if (abschnittBottom < 0)
// {
// abschnittBottom = 0;
// }
// }
//}
return bereiche;
}
private BereichMitZielenUndMassnahmen LeseBereichMitZielenUndMassnahmen(PdfDocumentProcessor processor, PdfDocumentArea kapitelStartArea)
{
var bereich = new BereichMitZielenUndMassnahmen();
bereich.Lebensbereich = processor.GetText(kapitelStartArea, DefaultExtractOptions);
var zielStartArea = SucheText(processor, "Handlungsziele", kapitelStartArea);
if (zielStartArea == null)
{
return null;
}
var massnahmenStartArea = SucheText(processor, "Maßnahmeplanung", zielStartArea);
if (massnahmenStartArea == null)
{
return null;
}
var planungArea = SucheText(processor, "Leistungsplanung", massnahmenStartArea);
bereich.Ziele = LeseGesamtTextImBereich(processor, zielStartArea, massnahmenStartArea, 0, 0);
bereich.Massnahmenplanung = LeseGesamtTextImBereich(processor, massnahmenStartArea, planungArea, 0, 250);
bereich.BereichEndeArea = planungArea;
return bereich;
}
private string SucheMassnahmen(PdfDocumentProcessor processor, PdfDocumentArea zielStartArea, PdfDocumentArea massnahmenStartArea)
{
throw new NotImplementedException();
}
private string SucheZiele(PdfDocumentProcessor processor, PdfDocumentArea zielStartArea, PdfDocumentArea massnahmenStartArea)
{
throw new NotImplementedException();
}
private string LeseGesamtTextImBereich(PdfDocumentProcessor processor, PdfDocumentArea startArea, PdfDocumentArea endeArea, double left, double right)
{
int startSeite = 1;
int letzteSeite = processor.Document.Pages.Count;
if (startArea != null)
{
startSeite = startArea.PageNumber;
}
if (endeArea != null)
{
letzteSeite = endeArea.PageNumber;
}
String gesamtText = "";
for (int i = startSeite - 1; i < letzteSeite; i++)
{
var page = processor.Document.Pages[i];
double bottom = 0;
double top = page.CropBox.Top;
//Lese auf erster Seite ab StartArea Top
if (startArea != null && i == startArea.PageNumber - 1)
{
top = startArea.Area.Top;
}
//Lese auf letzter Seite bis EndeArea Bottom
if (endeArea != null && i == endeArea.PageNumber - 1)
{
bottom = endeArea.Area.Bottom;
}
var text = LeseTextAufSeite(processor, page, top, bottom, left, right);
gesamtText += text;
}
return gesamtText;
}
private PdfDocumentArea SucheText(PdfDocumentProcessor processor, String suchText, PdfDocumentArea startArea)
{
int h = 10; //Lese Seite Zeilenweise mit Zeilenhöhe = 10 ein
int startPage = 1;
if (startArea != null)
{
startPage = startArea.PageNumber;
}
for (int i = startPage - 1; i < processor.Document.Pages.Count; i++)
{
var page = processor.Document.Pages[i];
var left = page.CropBox.Left;
var right = page.CropBox.Right;
var top = page.CropBox.Top;
var bottom = page.CropBox.Bottom;
if (startArea != null && startArea.PageNumber == i + 1)
{
top = startArea.Area.Top;
}
var abschnittTop = top;
var abschnittBottom = top - h;
while (abschnittTop > 0)
{
var idx = page.GetPageIndex();
var area = new PdfDocumentArea(idx + 1, new PdfRectangle(left, abschnittBottom, right, abschnittTop));
String neueZeile = processor.GetText(area, DefaultExtractOptions);
if (neueZeile.StartsWith(suchText))
{
return area;
}
abschnittTop -= (h + 1);
abschnittBottom = abschnittTop - h;
if (abschnittBottom < 0)
{
abschnittBottom = 0;
}
}
}
return null;
}
private String LeseTextAufSeite(PdfDocumentProcessor processor, PdfPage page, double top, double bottom, double left, double right)
{
int h = 10; //Lese Seite Zeilenweise mit Zeilenhöhe = 10 ein
var abschnittTop = top;
var abschnittBottom = top - h;
String gesamtText = "";
String letzteZeile = "";
while (abschnittTop > bottom)
{
double r = right;
if (right == 0)
{
right = page.CropBox.Right;
}
var idx = page.GetPageIndex();
var area = new PdfDocumentArea(idx + 1, new PdfRectangle(left, abschnittBottom, r, abschnittTop));
String neuerText = processor.GetText(area, DefaultExtractOptions);
neuerText = ReplaceZielAufzaehlungszeichen(neuerText);
var zeilen = neuerText.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var zeile in zeilen)
{
if (letzteZeile != zeile)
{
gesamtText += zeile + "\r\n";
}
}
if (zeilen.Length > 0)
{
letzteZeile = zeilen[zeilen.Length - 1];
}
abschnittTop -= (h + 1);
abschnittBottom = abschnittTop - h;
if (abschnittBottom < bottom)
{
abschnittBottom = bottom;
}
}
return gesamtText;
}
private string ReplaceZielAufzaehlungszeichen(string neuerText)
{
//Versuche an den Stellen in dem das Aufzählungs "•" mitten im Text alleine enthalten ist, das Ziel zu erraten. Das passiert bei mehrzeiligen Zielen
var index = neuerText.IndexOf("•");
if (index > 0)
{
return "• " + neuerText.Replace("•", "").Trim();
}
return neuerText;
}
private void ErstelleMassnahmen(string pdfText, int endIndex, List<HilfeplanImportZielDC> ziele)
{
var zeilen = pdfText.ToString().Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
@@ -477,6 +778,12 @@ namespace BeWo.Service.Import.Perseh
{
return true;
}
//V3:
if ("Handlungsziele".Equals(zeile))
{
return true;
}
return false;
}
@@ -628,5 +935,18 @@ namespace BeWo.Service.Import.Perseh
return item;
}
private PdfTextExtractionOptions DefaultExtractOptions
{
get
{
var opts = new PdfTextExtractionOptions();
opts.ClipToCropBox = true;
return opts;
}
}
}
}

View File

@@ -7,8 +7,6 @@ using BS.Shared.DataContracts.Compact;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Service.Invoicing
{
@@ -73,98 +71,19 @@ namespace BeWo.Service.Invoicing
invoice.AmountEquityContribution = equity;
}
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc)
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC serviceRecord, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc)
{
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);
ii.ItemDescription = iServiceRecord.ServiceDescription.Name;
var ii = base.CreateInvoiceItem(serviceRecord, scap, calc);
ii.ItemDescription = serviceRecord.ServiceDescription.Name;
if (ii.ItemDescription.ToLower().Contains("gruppe"))
{
if (iServiceRecord.RoundedDuration <= 45)
ii.UnitDescription = "GPos: 2002678";
else if (iServiceRecord.RoundedDuration <= 60)
ii.UnitDescription = "GPos: 2002677";
else
ii.UnitDescription = "GPos: 2002672"; // 90 min, 2-5 Personen
ii.AmountPerUnit = GetGruppenPreis(scap.CostBearer2SupportConcept, iServiceRecord.Start.Value);
ii.AmountTotal = ii.AmountPerUnit * ii.UnitCount;
ii.GrossAmountTotal = ii.AmountTotal;
}
var sozioLeistung = ii.ItemDescription.ToLower();
if (sozioLeistung.Contains("gruppe"))
AktualisierePreis(ii, GetGruppenPreis(scap.CostBearer2SupportConcept, serviceRecord.Start.Value));
else
{
ii.AmountPerUnit = GetEinzelPreis(scap.CostBearer2SupportConcept, iServiceRecord.Start.Value);
ii.AmountTotal = ii.AmountPerUnit * ii.UnitCount;
ii.GrossAmountTotal = ii.AmountTotal;
AktualisierePreis(ii, GetEinzelPreis(scap.CostBearer2SupportConcept, serviceRecord.Start.Value));
if (ii.ItemDescription.ToLower().Contains("video"))
{
if (iServiceRecord.RoundedDuration <= 30)
{
ii.UnitDescription = "GPos: 2001616";
}
else
{
ii.UnitDescription = "GPos: 2001615";
}
}
else if (ii.ItemDescription.ToLower().Contains("telefonat"))
{
if (iServiceRecord.RoundedDuration <= 30)
{
ii.UnitDescription = "GPos: 2001618";
}
else
{
ii.UnitDescription = "GPos: 2001617";
}
}
else if (ii.ItemDescription.ToLower().Contains("aufsuchende einheit"))
{
if (iServiceRecord.RoundedDuration <= 10)
{
ii.UnitDescription = "GPos: 2001613";
}
else if (iServiceRecord.RoundedDuration <= 30)
{
ii.UnitDescription = "GPos: 2001612";
}
else if (iServiceRecord.RoundedDuration <= 45)
{
ii.UnitDescription = "GPos: 2001611";
}
else
{
ii.UnitDescription = "GPos: 2001610";
}
}
else if (ii.ItemDescription.ToLower().Contains("aufsuchende probatorik"))
{
ii.UnitDescription = "GPos: 2001607";
}
else if (ii.ItemDescription.ToLower().Contains("büroprobatorik"))
{
ii.UnitDescription = "GPos: 2001607";
}
else if (ii.ItemDescription.ToLower().Contains("büroeinheit"))
{
if (iServiceRecord.RoundedDuration <= 10)
{
ii.UnitDescription = "GPos: 2001613";
}
else if (iServiceRecord.RoundedDuration <= 30)
{
ii.UnitDescription = "GPos: 2001612";
}
else if (iServiceRecord.RoundedDuration <= 45)
{
ii.UnitDescription = "GPos: 2001611";
}
else
{
ii.UnitDescription = "GPos: 2001610";
}
}
}
ii.UnitDescription = ErmittleGPosNummer(serviceRecord, sozioLeistung);
return ii;
}
@@ -202,7 +121,7 @@ namespace BeWo.Service.Invoicing
foreach (var sr in serviceRecordsInPeriod)
{
if (sr.ServiceDescription.Name.ToLower().Contains("aufsuchende"))
if (sr.ServiceDescription.Name.ToLower().Contains("aufsuchend"))
{
var date = sr.Start.Value.Date;
@@ -246,6 +165,64 @@ namespace BeWo.Service.Invoicing
return items;
}
protected void AktualisierePreis(InvoiceItem invoiceItem, decimal preis)
{
if (preis > 0)
{
invoiceItem.AmountPerUnit = preis;
invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount;
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
}
}
protected virtual string ErmittleGPosNummer(ServiceRecordDC serviceRecord, string sozioLeistung)
{
string unitDescription = "";
var duration = serviceRecord.RoundedDuration;
if (sozioLeistung.Contains("gruppe"))
{
if (duration <= 45)
unitDescription = "GPos: 2002678";
else if (duration <= 60)
unitDescription = "GPos: 2002677";
else
unitDescription = "GPos: 2002672"; // 90 min, 2-5 Personen
}
else if (sozioLeistung.Contains("video"))
{
if (duration <= 30)
unitDescription = "GPos: 2001616";
else
unitDescription = "GPos: 2001615";
}
else if (sozioLeistung.Contains("telefon"))
{
if (duration <= 30)
unitDescription = "GPos: 2001618";
else
unitDescription = "GPos: 2001617";
}
else if (sozioLeistung.Contains("aufsuchende probatorik") || sozioLeistung.Contains("büroprobatorik"))
{
unitDescription = "GPos: 2001607";
}
else if (sozioLeistung.Contains("aufsuchende einheit") || sozioLeistung.Contains("büroeinheit"))
{
if (duration <= 10)
unitDescription = "GPos: 2001613";
else if (duration <= 30)
unitDescription = "GPos: 2001612";
else if (duration <= 45)
unitDescription = "GPos: 2001611";
else
unitDescription = "GPos: 2001610";
}
return unitDescription;
}
private decimal GetHausbesuchspauschale(CostBearer2SupportConcept c2s, DateTime dt)
{
String preisName = "Hausbesuchspauschale Primärkasse";
@@ -261,7 +238,7 @@ namespace BeWo.Service.Invoicing
return base.GetPreis(preisName, dt);
}
private decimal GetGruppenPreis(CostBearer2SupportConcept c2s, DateTime dt)
protected decimal GetGruppenPreis(CostBearer2SupportConcept c2s, DateTime dt)
{
String preisName = "Gruppentherapie Primärkasse";
@@ -276,7 +253,7 @@ namespace BeWo.Service.Invoicing
return base.GetPreis(preisName, dt);
}
private decimal GetEinzelPreis(CostBearer2SupportConcept c2s, DateTime dt)
protected decimal GetEinzelPreis(CostBearer2SupportConcept c2s, DateTime dt)
{
String preisName = "Einzelstunde Primärkasse";

View File

@@ -1589,12 +1589,20 @@ namespace BeWo.Service.Plugins
{
var ziel = alleZiele.Where(z => z.DisplayName != null && z.DisplayName.Contains(bereich)).FirstOrDefault();
if (ziel == null && bereich.StartsWith("Lebensbereich "))
{
bereich = bereich.Substring(13).Trim();
ziel = alleZiele.Where(z => z.DisplayName != null && z.DisplayName.Contains(bereich)).FirstOrDefault();
}
if (ziel == null)
{
if (bereich.StartsWith("Lebensbereich "))
{
bereich = bereich.Substring(13).Trim();
}
ziel = alleZiele.Where(z => z.DisplayName != null && z.DisplayName.Contains(bereich)).FirstOrDefault();
if (ziel == null)
{
ziel = alleZiele.Where(z => z.DisplayName != null && z.DisplayName.ToLower().Contains(bereich.ToLower())).FirstOrDefault();
}
}
return ziel;
}

View File

@@ -319,7 +319,7 @@ namespace BeWo.Service.Plugins
//t = "9734214365"; // Wegfinder Rhein-Ruhr
//t = "1011478760"; // Autismus Köln/Bonn e.V.
//t = "8184278271"; // Ambulant Betreutes Wohnen Stephan Schillings
//t = "2576513996"; // TRIAS Ambulante Sozialarbeit Schön + Schön-Uhlmann GbR
t = "2576513996"; // TRIAS Ambulante Sozialarbeit Schön + Schön-Uhlmann GbR
//t = "9518001524"; // Sozialpädagogische Praxis Astrid Schnödewind
//t = "1048483934"; // Frauenhaus e.V. EWFRA - Wohnprojekt für Frauen
//t = "4293131072"; // ASB Rhein-Erft/Düren e.V. Schulbegleitung

View File

@@ -409,6 +409,7 @@
<Compile Include="Import\AvisImport\LvrAvisKlientGesamt.cs" />
<Compile Include="Import\AvisImport\LvrAvisPdfReader.cs" />
<Compile Include="Import\AvisImport\Avis.cs" />
<Compile Include="Import\Perseh\BereichMitZielenUndMassnahmen.cs" />
<Compile Include="Import\TextAbschnittReader.cs" />
<Compile Include="Import\TextAbschnitt.cs" />
<Compile Include="Import\Perseh\PersehReader.cs" />

View File

@@ -39,7 +39,7 @@ namespace BeWo.Service.ServiceImplementations
foreach (var sc in c.SupportConcepts)
ServiceLogic.SetActivationType<SupportConcept>(sc.Oid.Value, sc.Version.Value, ActivationTypeId.Archived);
HistoryCreator.MakeCustomerHistoryEntry(c, MapperFactory.CustomerDC_Customer.MapToNewDC(c), null, StatementType.Archived, null, null, null);
HistoryCreator.MakeCustomerHistoryEntry(c, MapperFactory.CustomerDC_Customer.MapToNewDC(c), null, StatementType.Archived, null, null, null, null);
}
@@ -122,7 +122,7 @@ namespace BeWo.Service.ServiceImplementations
foreach (var sc in customer.SupportConcepts)
ServiceLogic.SetActivationType<SupportConcept>(sc.Oid.Value, sc.Version.Value, ActivationTypeId.Deleted);
HistoryCreator.MakeCustomerHistoryEntry(customer, MapperFactory.CustomerDC_Customer.MapToNewDC(customer), null, StatementType.Delete, null, null, null);
HistoryCreator.MakeCustomerHistoryEntry(customer, MapperFactory.CustomerDC_Customer.MapToNewDC(customer), null, StatementType.Delete, null, null, null, null);
}
public void DeactivateOrganisation(long pOid, long pVersion)
@@ -251,7 +251,7 @@ namespace BeWo.Service.ServiceImplementations
lOriginals.DoForEach(or => MapperFactory.CustomerDC_Customer.ConcurrencyCheck(pOid2Version[or.Oid.Value], or));
foreach (Customer lOriginal in lOriginals)
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, MapperFactory.CustomerDC_Customer.MapToNewDC(lOriginal), null, StatementType.Delete, null, null, null);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, MapperFactory.CustomerDC_Customer.MapToNewDC(lOriginal), null, StatementType.Delete, null, null, null, null);
DAOFactory.GenericDAO.Delete(lOriginals);
}
@@ -1008,7 +1008,7 @@ namespace BeWo.Service.ServiceImplementations
var lOriginal = DAOFactory.GenericDAO.LoadByID<Customer>(oid);
object[] Lists = GetFromNHibernateDecoupledCustomerRelatedLists(lOriginal);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, pCustomerDC, lOriginal.Oid.Value, StatementType.Insert, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, pCustomerDC, lOriginal.Oid.Value, StatementType.Insert, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>, Lists[3] as List<AbsenceTime>);
OwnChatHelper.StartOwnChatSync();
return oid;
@@ -1242,13 +1242,11 @@ namespace BeWo.Service.ServiceImplementations
object[] Lists = GetFromNHibernateDecoupledCustomerRelatedLists(lOriginal);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, pCustomerDC, null, StatementType.Update, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>);
MapperFactory.CustomerDC_Customer.MergeWithEntity(pCustomerDC, lOriginal);
DAOFactory.GenericDAO.Update(lOriginal);
HistoryCreator.MakeCustomerHistoryEntry(lOriginal, pCustomerDC, null, StatementType.Update, Lists[0] as List<Customer2Person>, Lists[1] as List<Customer2Organisation>, Lists[2] as List<Employee2Customer>, Lists[3] as List<AbsenceTime>);
CheckUpdatedReferenceNumbers(pCustomerDC, lOriginal);
@@ -2077,7 +2075,7 @@ namespace BeWo.Service.ServiceImplementations
private static object[] GetFromNHibernateDecoupledCustomerRelatedLists(Customer customer)
{
var CustomerRelatedListsList = new object[3];
var CustomerRelatedListsList = new object[4];
List<Customer2Person> originalC2PList = customer.Customer2PersonList.Select(element => new Customer2Person
{
@@ -2124,10 +2122,27 @@ namespace BeWo.Service.ServiceImplementations
ValueList = element.ValueList,
Version = element.Version
}).ToList();
List<AbsenceTime> originalAbsenceTimeList =
customer.AbsenceTimes.Select(element => new AbsenceTime
{
CustomerOid = element.CustomerOid,
Notice = element.Notice,
Oid = element.Oid,
InsTs = element.InsTs,
InsUser = element.InsUser,
UdpUser = element.UdpUser,
Version = element.Version,
AbsenceReason = element.AbsenceReason,
Start = element.Start,
End = element.End,
KrankheitsMeldung = element.KrankheitsMeldung,
UpdTs = element.UpdTs
}).ToList();
CustomerRelatedListsList[0] = originalC2PList;
CustomerRelatedListsList[1] = originalC2OList;
CustomerRelatedListsList[2] = original2CList;
CustomerRelatedListsList[3] = originalAbsenceTimeList;
return CustomerRelatedListsList;
}
@@ -2296,7 +2311,7 @@ namespace BeWo.Service.ServiceImplementations
ServiceLogic.SetActivationType<Customer>(pOid, pVersion, ActivationTypeId.Active);
HistoryCreator.MakeCustomerHistoryEntry(c, MapperFactory.CustomerDC_Customer.MapToNewDC(c), null, StatementType.Reactivate, null, null, null);
HistoryCreator.MakeCustomerHistoryEntry(c, MapperFactory.CustomerDC_Customer.MapToNewDC(c), null, StatementType.Reactivate, null, null, null, null);
}
public void ReactivateSupportConcept(long pOid, long pVersion)

View File

@@ -206,7 +206,7 @@ namespace BeWo.ServiceUtils.History
}
public static void MakeCustomerHistoryEntry(Customer lOriginal, CustomerDC newCustomer, long? Oid, StatementType statementType, List<Customer2Person> originalCustomer2PersonList, List<Customer2Organisation> originalC2OList, List<Employee2Customer> originale2CList)
public static void MakeCustomerHistoryEntry(Customer lOriginal, CustomerDC newCustomer, long? Oid, StatementType statementType, List<Customer2Person> originalCustomer2PersonList, List<Customer2Organisation> originalC2OList, List<Employee2Customer> originale2CList, List<AbsenceTime> originaleAbsenceTimeList)
{
var lCustomerHistory = new CustomerHistory
{
@@ -239,21 +239,22 @@ namespace BeWo.ServiceUtils.History
MakeHistoryEntry(lOriginal.Customer2PersonList, originalCustomer2PersonList, lOriginal.Oid, statementType);
MakeHistoryEntry(lOriginal.Customer2OrganisationList, originalC2OList, lOriginal.Oid, statementType);
MakeHistoryEntry(lOriginal.Employee2CustomerList, originale2CList, lOriginal.Oid, statementType);
MakeHistoryEntry(lOriginal.AbsenceTimes, originaleAbsenceTimeList, lOriginal.Oid, statementType);
var person = lOriginal.Person;
MakeNewPersonHistoryEntry(person, newCustomer, statementType);
if (newCustomer.AbsenceTimes != null)
{
foreach (var item in newCustomer.AbsenceTimes)
{
if (!item.CustomerOid.HasValue)
{
item.CustomerOid = lOriginal.Oid.Value;
}
}
}
CreateAbsenceTimeHistoryEntry(lOriginal.AbsenceTimes, newCustomer.AbsenceTimes);
//if (newCustomer.AbsenceTimes != null)
//{
// foreach (var item in newCustomer.AbsenceTimes)
// {
// if (!item.CustomerOid.HasValue)
// {
// item.CustomerOid = lOriginal.Oid.Value;
// }
// }
//}
//CreateAbsenceTimeHistoryEntry(lOriginal.AbsenceTimes, newCustomer.AbsenceTimes);
}
public static void MakeNewPersonHistoryEntry(Person originalPerson, PersonDC newPerson, StatementType statementType)
@@ -740,6 +741,13 @@ namespace BeWo.ServiceUtils.History
DAOFactory.GenericDAO.Insert(historyEntry);
}
else if (entityObj is AbsenceTime)
{
var at = entityObj as AbsenceTime;
var atDc = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDC(at);
atDc.CustomerOid = customerOid;
CreateAbsenceTimeHistoryEntry(atDc, sType);
}
}
}
}

View File

@@ -601,8 +601,11 @@ namespace BS.Shared
ConfirmationReceiptSignatures_Delete = 50000,
/// <summary>Einzelunterschriften leisten</summary>
Signature_ProvideSingleSignature = 60000,
/// <summary>Monatsunterschriften leisten</summary>
Signature_ProvideMonthlySignature = 60001,
/// <summary>Stellvertretend Monatsunterschriften leisten</summary>
Signature_ProvideMonthlySignatureByProxy = 60002,
Customer_Anonymization = 171717,