Bugfix beim Speichern von Rechnungen aus Rechnungsübersicht, Bugfix Anzeige von Zielen, wenn übergeordnetes Ziel gelöscht wurde
This commit is contained in:
@@ -347,7 +347,8 @@ namespace BeWo.Core.Service
|
||||
}
|
||||
if (ve == null)
|
||||
{
|
||||
return new ValueListEntryDC {TypeDescription = "<Gelöscht>"};
|
||||
return new ValueListEntryDC {TypeDescription = "<Gelöscht>", ValueListEntryOid = oid };
|
||||
//return new ValueListEntryDC { TypeDescription = "<Gelöscht>" };
|
||||
}
|
||||
return ve;
|
||||
}
|
||||
|
||||
@@ -1,401 +0,0 @@
|
||||
@using BeWoPlanerMobil.Controllers
|
||||
@using BeWoPlanerMobil.Models
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||||
<meta content="utf-8" http-equiv="encoding">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" id="viewport" />
|
||||
<title>@ViewBag.Title</title>
|
||||
|
||||
<script defer src="~/Content/fontawesome/all.min.js"></script>
|
||||
|
||||
<!-- jquery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="@Url.Content("~/Scripts/jquery-3.6.0.min.js")" type="text/javascript"></script>
|
||||
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.13.0.min.js")"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
|
||||
<script src="@Url.Content("~/Scripts/src-min/ace.js")"></script>
|
||||
<script src="@Url.Content("~/node_modules/cldrjs/dist/cldr.js")"></script>
|
||||
<script src="@Url.Content("~/node_modules/cldrjs/dist/cldr/event.js")"></script>
|
||||
<script src="@Url.Content("~/node_modules/globalize/dist/globalize.js")"></script>
|
||||
<script src="@Url.Content("~/Scripts/devexpress-scripts/knockout-3.5.1.js")"></script>
|
||||
|
||||
<script src="~/Scripts/umd/popper.min.js"></script>
|
||||
<script src="~/node_modules/bootstrap/dist/js/bootstrap.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="~/Content/style.css?v=1.18">
|
||||
<script src="~/Scripts/mobileUtils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/moment.min.js"></script>
|
||||
<script src="~/Scripts/locale/de.js?v=1.18"></script>
|
||||
<script src="~/Scripts/group-booking.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/main.js?v=1.19"></script>
|
||||
<script src="~/Scripts/signature.js?v=1.18"></script>
|
||||
<script src="~/Scripts/tempusdominus-boostrap-4.min.js"></script>
|
||||
<link rel="stylesheet" href="~/Content/tempusdominus-bootstrap-4.min.css" />
|
||||
<script src="~/Scripts/Chart.min.js?v=1.18"></script>
|
||||
<script src="~/Scripts/support-concept-statistics.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/customer.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/scheduler.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/dateUtils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/report.js?v=1.18"></script>
|
||||
<script src="~/Scripts/signature_pad-3.2.min.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/trimCanvas.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/resources-list-utils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/list-utils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/service-record-time-calc.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/js-helper.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/logging.js?v=1.18"></script>
|
||||
|
||||
<script>
|
||||
window.addEventListener("error", (event) => {
|
||||
hideSpinner();
|
||||
|
||||
var textToShow = "Message: " + event.message + "\r\n" +
|
||||
"File name: " + event.filename + "\r\n" +
|
||||
"Line: " + event.lineno + "\r\n" +
|
||||
"Column: " + event.colno + "\r\n" +
|
||||
"Stack: " + event.error.stack;
|
||||
|
||||
configureErrorPopup(textToShow);
|
||||
});
|
||||
|
||||
function copyErrorToClipboard() {
|
||||
var element = document.querySelector("#fehlerdetail-textarea");
|
||||
element.select();
|
||||
element.setSelectionRange(0, 99999);
|
||||
|
||||
document.execCommand("copy");
|
||||
}
|
||||
|
||||
function showErrorPopup(error) {
|
||||
hideSpinner();
|
||||
|
||||
var textToShow = "name: " + error.name + ";\r\nmessage: " + error.message + ";\r\nstack: " + error.stack;
|
||||
|
||||
configureErrorPopup(textToShow);
|
||||
}
|
||||
|
||||
function configureErrorPopup(textToShow) {
|
||||
$("#fehlerdetail-textarea").text(textToShow);
|
||||
$("#error-message-popup").modal("show");
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
try {
|
||||
var timeoutInMilliseconds = parseInt("@AbstractBaseController.TimeoutLimit", 10) * 60 * 1000;
|
||||
|
||||
var timeOfLogin = "@AbstractModel.TimeOfLastAction";
|
||||
|
||||
if(timeOfLogin.length > 0) {
|
||||
var countDownDate = new Date().getTime() + timeoutInMilliseconds;
|
||||
|
||||
var interval = setInterval(function() {
|
||||
var now = new Date().getTime();
|
||||
|
||||
var distance = countDownDate - now;
|
||||
|
||||
if (distance <= 0) {
|
||||
clearInterval(interval);
|
||||
$("#countdown").html("00:00");
|
||||
|
||||
$("#logout-form").submit();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
||||
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||
|
||||
var m = minutes.toString();
|
||||
var s = seconds.toString();
|
||||
|
||||
if (minutes < 10) {
|
||||
m = "0" + m;
|
||||
}
|
||||
|
||||
if (seconds < 10) {
|
||||
s = "0" + s;
|
||||
}
|
||||
|
||||
$("#countdown").html("Abmeldung in " + m + ":" + s + '<span class="fas fa-unlock-alt pl-1"></span>');
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
calcPrependWidth();
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
logSize();
|
||||
calcPrependWidth();
|
||||
});
|
||||
|
||||
previousWidth = "";
|
||||
function logSize() {
|
||||
var width = $(document).width();
|
||||
|
||||
var val = widthToBootstrapVal(width);
|
||||
|
||||
if(previousWidth !== val) {
|
||||
console.log("%c" + val, "font-size: 16px; font-weight: bold; color: #00F2FF;");
|
||||
}
|
||||
|
||||
previousWidth = val;
|
||||
}
|
||||
|
||||
function widthToBootstrapVal(width) {
|
||||
try {
|
||||
/*
|
||||
Extra small <576px
|
||||
Small ≥576px
|
||||
Medium ≥768px
|
||||
Large ≥992px
|
||||
Extra large ≥1200px
|
||||
*/
|
||||
var result = "xs";
|
||||
|
||||
if(width < 567) {
|
||||
result = "xs";
|
||||
}
|
||||
|
||||
if(width >= 576) {
|
||||
result = "sm";
|
||||
}
|
||||
|
||||
if(width >= 768) {
|
||||
result = "md";
|
||||
}
|
||||
|
||||
if(width >= 992) {
|
||||
result = "lg";
|
||||
}
|
||||
|
||||
if(width >= 1200) {
|
||||
result = "xl";
|
||||
}
|
||||
|
||||
return result;
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function countdownClick() {
|
||||
$("#countdown-tooltip").tooltip('show');
|
||||
|
||||
setTimeout(function() {
|
||||
$("#countdown-tooltip").tooltip('hide');
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
var initialVonWidth = 0;
|
||||
function calcPrependWidth() {
|
||||
try {
|
||||
// Prepend-Elemente
|
||||
if(initialVonWidth === 0 && $.isNumeric(getMaxWidth("sm-prepend-input-group-text"))) {
|
||||
initialVonWidth = getMaxWidth("sm-prepend-input-group-text");
|
||||
}
|
||||
|
||||
var smallPrependInputGroupTextWidth = getMaxWidth("sm-prepend-input-group-text");
|
||||
var documentWidth = $(document).width();
|
||||
|
||||
$(".prepend-input-group-text").width(getMaxWidth("prepend-input-group-text"));
|
||||
|
||||
if(documentWidth < 768 && $.isNumeric(smallPrependInputGroupTextWidth)) {
|
||||
$(".sm-prepend-input-group-text").width(getMaxWidth("prepend-input-group-text"));
|
||||
} else if($.isNumeric(smallPrependInputGroupTextWidth)) {
|
||||
$(".sm-prepend-input-group-text").width(initialVonWidth);
|
||||
}
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function getMaxWidth(elementClassName) {
|
||||
try {
|
||||
return Math.max.apply(Math, $('.' + elementClassName).map(function () { return $(this).width(); }).get());
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@using(Html.BeginForm("LogOutAfterSessionTimeout", "Main", FormMethod.Post, new {id="logout-form", css="display:none;"}))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@if(Model != null)
|
||||
{
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top justify-content-end">
|
||||
<div class="container-fluid">
|
||||
<a href="#" class="navbar-brand">
|
||||
@Model.LoggedInEmplyeeFirstNameLastName
|
||||
</a>
|
||||
|
||||
<span class="d-inline-block" data-toggle="tooltip" title="Zeit bis zur automatischen Abmeldung" id="countdown-tooltip">
|
||||
<span class="navbar-text" id="countdown" onclick="countdownClick()"></span>
|
||||
</span>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
@*@if(Html.IsInDebugMode())
|
||||
{
|
||||
using(Html.BeginForm("RedirectToDevExpressScheduler", "Main", FormMethod.Post))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
||||
<i class="fas fa-hand-middle-finger"></i>
|
||||
Scheduler
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
}*@
|
||||
|
||||
@if(AbstractModel.IsAllowedToSeeCustomers)
|
||||
{
|
||||
using(Html.BeginForm("RedirectToCustomer", "Main", FormMethod.Post))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
||||
<i class="fas fa-user text-bewo-customers"></i>
|
||||
Klienten
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
|
||||
@using(Html.BeginForm("RedirectToMain", "Main", FormMethod.Post))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
||||
<i class="fas fa-clock text-bewo-service-records"></i>
|
||||
Zeiterfassung
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
|
||||
@if(AbstractModel.IsAllowedToSeeScheduler)
|
||||
{
|
||||
using(Html.BeginForm("RedirectToScheduler", "Main", FormMethod.Post))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
||||
<i class="fas fa-calendar-alt text-bewo-calendar"></i>
|
||||
Kalender
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
|
||||
@if(AbstractModel.IsAllowedToSeeBills)
|
||||
{
|
||||
using(Html.BeginForm("RedirectToReportView", "Main", FormMethod.Post))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
||||
<i class="fas fa-file-invoice text-bewo-report">
|
||||
|
||||
</i>
|
||||
Quittierungsbelege
|
||||
</button>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
|
||||
<li class="nav-item">
|
||||
<button class="btn btn-link text-light no-underline" onclick="showAboutPopup()">
|
||||
<i class="fas fa-balance-scale text-primary"></i>
|
||||
Über
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
@using(Html.BeginForm("Logout", "Main", FormMethod.Post))
|
||||
{
|
||||
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
|
||||
<i class="fas fa-sign-out-alt text-primary"></i>
|
||||
Abmelden
|
||||
</button>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
}
|
||||
|
||||
<div class="modal" role="dialog" tabindex="-1" id="mySpinner">
|
||||
<div class="modal-dialog modal-dialog-centered text-center" role="document">
|
||||
<div class="modal-content bg-transparent border-0">
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="spinner-border text-primary" role="status" style="width: 5rem; height: 5rem;">
|
||||
<span class="sr-only"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" tabindex="-1" role="dialog" id="messagePopup">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="popupTitle"></h5>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="close" id="message-popup-esc-btn">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-body">
|
||||
<p id="popupMessage"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" type="button" data-dismiss="modal" id="message-popup-ok-btn">OK</button>
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal" id="message-popup-close-btn">Schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" tabindex="-1" role="dialog" id="error-message-popup">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title text-danger">Es ist ein Fehler aufgetreten</h5>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Es ist leider ein unbekannter Fehler aufgetreten. Prüfen Sie Ihre Internetverbindung oder versuchen Sie es später erneut. Wir sind stets bemüht, das Programm zu verbessern, daher freuen wir uns auch, wenn Sie die Fehlerdetails unten in einer Mail an <a href="mailto:support@bewoplaner.de" id="error-popup-mailto">support@bewoplaner.de</a> senden.
|
||||
</p>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<label for="fehlerdetail-textarea">Fehlerdetails:</label>
|
||||
<textarea class="form-control font-italic text-monospace" style="height: 20em;" id="fehlerdetail-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="clearfix w-100">
|
||||
<button class="btn btn-primary float-left" type="button" onclick="copyErrorToClipboard()">In die Zwischenablage kopieren</button>
|
||||
<button class="btn btn-primary float-right" type="button" data-dismiss="modal">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@RenderBody()
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -57,119 +57,11 @@ namespace Fortis
|
||||
{
|
||||
|
||||
decimal minuten = pRO.ApprovedFLSPerWeek * 60;
|
||||
if (minuten < 30)
|
||||
{
|
||||
ro.StufeGeplant = "";
|
||||
ro.KorridorVon = 0;
|
||||
ro.KorridorBis = 30;
|
||||
}
|
||||
else if (minuten < 60)
|
||||
{
|
||||
ro.StufeGeplant = "1";
|
||||
ro.KorridorVon = 30;
|
||||
ro.KorridorBis = 60;
|
||||
}
|
||||
else if (minuten < 90)
|
||||
{
|
||||
ro.StufeGeplant = "2";
|
||||
ro.KorridorVon = 60;
|
||||
ro.KorridorBis = 90;
|
||||
}
|
||||
else if (minuten < 120)
|
||||
{
|
||||
ro.StufeGeplant = "3";
|
||||
ro.KorridorVon = 90;
|
||||
ro.KorridorBis = 120;
|
||||
}
|
||||
else if (minuten < 150)
|
||||
{
|
||||
ro.StufeGeplant = "4";
|
||||
ro.KorridorVon = 120;
|
||||
ro.KorridorBis = 150;
|
||||
}
|
||||
else if (minuten < 180)
|
||||
{
|
||||
ro.StufeGeplant = "5";
|
||||
ro.KorridorVon = 150;
|
||||
ro.KorridorBis = 180;
|
||||
}
|
||||
else if (minuten < 210)
|
||||
{
|
||||
ro.StufeGeplant = "6";
|
||||
ro.KorridorVon = 180;
|
||||
ro.KorridorBis = 210;
|
||||
}
|
||||
else if (minuten < 240)
|
||||
{
|
||||
ro.StufeGeplant = "7";
|
||||
ro.KorridorVon = 210;
|
||||
ro.KorridorBis = 240;
|
||||
}
|
||||
else if (minuten < 270)
|
||||
{
|
||||
ro.StufeGeplant = "8";
|
||||
ro.KorridorVon = 240;
|
||||
ro.KorridorBis = 270;
|
||||
}
|
||||
else if (minuten < 300)
|
||||
{
|
||||
ro.StufeGeplant = "9";
|
||||
ro.KorridorVon = 270;
|
||||
ro.KorridorBis = 300;
|
||||
}
|
||||
else if (minuten < 330)
|
||||
{
|
||||
ro.StufeGeplant = "10";
|
||||
ro.KorridorVon = 300;
|
||||
ro.KorridorBis = 330;
|
||||
}
|
||||
else if (minuten < 360)
|
||||
{
|
||||
ro.StufeGeplant = "11";
|
||||
ro.KorridorVon = 330;
|
||||
ro.KorridorBis = 360;
|
||||
}
|
||||
else if (minuten < 390)
|
||||
{
|
||||
ro.StufeGeplant = "12";
|
||||
ro.KorridorVon = 360;
|
||||
ro.KorridorBis = 390;
|
||||
}
|
||||
else if (minuten < 420)
|
||||
{
|
||||
ro.StufeGeplant = "13";
|
||||
ro.KorridorVon = 390;
|
||||
ro.KorridorBis = 420;
|
||||
}
|
||||
else if (minuten < 450)
|
||||
{
|
||||
ro.StufeGeplant = "14";
|
||||
ro.KorridorVon = 420;
|
||||
ro.KorridorBis = 450;
|
||||
}
|
||||
else if (minuten < 480)
|
||||
{
|
||||
ro.StufeGeplant = "15";
|
||||
ro.KorridorVon = 450;
|
||||
ro.KorridorBis = 480;
|
||||
}
|
||||
else
|
||||
{
|
||||
int stufe = 16;
|
||||
ro.KorridorVon = 480;
|
||||
ro.KorridorBis = ro.KorridorVon + 30;
|
||||
|
||||
//AXDVG TEST
|
||||
|
||||
while (ro.KorridorBis < minuten)
|
||||
{
|
||||
stufe++;
|
||||
ro.KorridorVon += 30;
|
||||
ro.KorridorBis += 30;
|
||||
}
|
||||
|
||||
ro.StufeGeplant = String.Format("{0:0}", stufe);
|
||||
}
|
||||
ro.StufeGeplant = SetKorridorAndReturnStufe(minuten, out var korridorVon, out var korridorBis);
|
||||
ro.KorridorVon = korridorVon;
|
||||
ro.KorridorBis = korridorBis;
|
||||
}
|
||||
|
||||
ro.AktuellesDatum = DateTime.Now.Date;
|
||||
@@ -197,50 +89,22 @@ namespace Fortis
|
||||
|
||||
//Stufe IST:
|
||||
|
||||
var durchschnittProWoche = ro.DurchschnittProWocheDirekt + ro.DurchschnittProWocheAbgesagt;
|
||||
var durchschnittProWoche = Math.Round(ro.DurchschnittProWocheDirekt + ro.DurchschnittProWocheAbgesagt, 2);
|
||||
if (!ro.DokuzeitraumStart.HasValue)
|
||||
{
|
||||
ro.StufeIst = "-";
|
||||
}
|
||||
else if (durchschnittProWoche < 90)
|
||||
else
|
||||
{
|
||||
ro.StufeIst = "< 1";
|
||||
}
|
||||
else if (durchschnittProWoche >= 90 && durchschnittProWoche < 120)
|
||||
{
|
||||
ro.StufeIst = "2";
|
||||
}
|
||||
else if (durchschnittProWoche >= 121 && durchschnittProWoche < 165)
|
||||
{
|
||||
ro.StufeIst = "3";
|
||||
}
|
||||
else if (durchschnittProWoche >= 166 && durchschnittProWoche <= 225)
|
||||
{
|
||||
ro.StufeIst = "4";
|
||||
}
|
||||
else if (durchschnittProWoche >= 226 && durchschnittProWoche <= 300)
|
||||
{
|
||||
ro.StufeIst = "5";
|
||||
}
|
||||
else if (durchschnittProWoche >= 301 && durchschnittProWoche <= 420)
|
||||
{
|
||||
ro.StufeIst = "6";
|
||||
}
|
||||
else if (durchschnittProWoche > 420)
|
||||
{
|
||||
ro.StufeIst = "> 6";
|
||||
ro.StufeIst = SetKorridorAndReturnStufe(durchschnittProWoche, out var kv, out var kb);
|
||||
}
|
||||
|
||||
|
||||
//Unter STufe:
|
||||
if (durchschnittProWoche < 90)
|
||||
if (durchschnittProWoche < ro.KorridorVon)
|
||||
{
|
||||
ro.MinutenProWocheUnterStufe = durchschnittProWoche - ro.KorridorVon;
|
||||
}
|
||||
else if (ro.KorridorVon > durchschnittProWoche + 1)
|
||||
{
|
||||
ro.MinutenProWocheUnterStufe = durchschnittProWoche + 1 - ro.KorridorVon;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.MinutenProWocheUnterStufe = 0;
|
||||
@@ -249,11 +113,7 @@ namespace Fortis
|
||||
|
||||
//Bis Ende Stufe:
|
||||
|
||||
if (durchschnittProWoche < 90)
|
||||
{
|
||||
ro.MinutenProWocheBisEndeStufe = 0;
|
||||
}
|
||||
else if (durchschnittProWoche + 1 >= ro.KorridorVon && durchschnittProWoche < ro.KorridorBis)
|
||||
if (ro.KorridorVon <= durchschnittProWoche && durchschnittProWoche < ro.KorridorBis)
|
||||
{
|
||||
ro.MinutenProWocheBisEndeStufe = durchschnittProWoche - ro.KorridorBis;
|
||||
}
|
||||
@@ -261,9 +121,9 @@ namespace Fortis
|
||||
|
||||
//Über Stufe:
|
||||
|
||||
if (ro.KorridorBis < durchschnittProWoche)
|
||||
if (durchschnittProWoche >= ro.KorridorBis)
|
||||
{
|
||||
ro.MinutenProWocheUeberStufe = (ro.KorridorBis - durchschnittProWoche) * -1;
|
||||
ro.MinutenProWocheUeberStufe = durchschnittProWoche - ro.KorridorBis;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -280,6 +140,125 @@ namespace Fortis
|
||||
|
||||
}
|
||||
|
||||
private string SetKorridorAndReturnStufe(decimal minuten, out decimal korridorVon, out decimal korridorBis)
|
||||
{
|
||||
String stufe = "";
|
||||
if (minuten < 30)
|
||||
{
|
||||
korridorVon = 0;
|
||||
korridorBis = 30;
|
||||
}
|
||||
else if (minuten < 60)
|
||||
{
|
||||
stufe = "1";
|
||||
korridorVon = 30;
|
||||
korridorBis = 60;
|
||||
}
|
||||
else if (minuten < 90)
|
||||
{
|
||||
stufe = "2";
|
||||
korridorVon = 60;
|
||||
korridorBis = 90;
|
||||
}
|
||||
else if (minuten < 120)
|
||||
{
|
||||
stufe = "3";
|
||||
korridorVon = 90;
|
||||
korridorBis = 120;
|
||||
}
|
||||
else if (minuten < 150)
|
||||
{
|
||||
stufe = "4";
|
||||
korridorVon = 120;
|
||||
korridorBis = 150;
|
||||
}
|
||||
else if (minuten < 180)
|
||||
{
|
||||
stufe = "5";
|
||||
korridorVon = 150;
|
||||
korridorBis = 180;
|
||||
}
|
||||
else if (minuten < 210)
|
||||
{
|
||||
stufe = "6";
|
||||
korridorVon = 180;
|
||||
korridorBis = 210;
|
||||
}
|
||||
else if (minuten < 240)
|
||||
{
|
||||
stufe = "7";
|
||||
korridorVon = 210;
|
||||
korridorBis = 240;
|
||||
}
|
||||
else if (minuten < 270)
|
||||
{
|
||||
stufe = "8";
|
||||
korridorVon = 240;
|
||||
korridorBis = 270;
|
||||
}
|
||||
else if (minuten < 300)
|
||||
{
|
||||
stufe = "9";
|
||||
korridorVon = 270;
|
||||
korridorBis = 300;
|
||||
}
|
||||
else if (minuten < 330)
|
||||
{
|
||||
stufe = "10";
|
||||
korridorVon = 300;
|
||||
korridorBis = 330;
|
||||
}
|
||||
else if (minuten < 360)
|
||||
{
|
||||
stufe = "11";
|
||||
korridorVon = 330;
|
||||
korridorBis = 360;
|
||||
}
|
||||
else if (minuten < 390)
|
||||
{
|
||||
stufe = "12";
|
||||
korridorVon = 360;
|
||||
korridorBis = 390;
|
||||
}
|
||||
else if (minuten < 420)
|
||||
{
|
||||
stufe = "13";
|
||||
korridorVon = 390;
|
||||
korridorBis = 420;
|
||||
}
|
||||
else if (minuten < 450)
|
||||
{
|
||||
stufe = "14";
|
||||
korridorVon = 420;
|
||||
korridorBis = 450;
|
||||
}
|
||||
else if (minuten < 480)
|
||||
{
|
||||
stufe = "15";
|
||||
korridorVon = 450;
|
||||
korridorBis = 480;
|
||||
}
|
||||
else
|
||||
{
|
||||
int st = 16;
|
||||
korridorVon = 480;
|
||||
korridorBis = korridorVon + 30;
|
||||
|
||||
//AXDVG TEST
|
||||
|
||||
while (korridorBis < minuten)
|
||||
{
|
||||
st++;
|
||||
korridorVon += 30;
|
||||
korridorBis += 30;
|
||||
}
|
||||
|
||||
stufe = String.Format("{0:0}", st);
|
||||
}
|
||||
|
||||
return stufe;
|
||||
}
|
||||
|
||||
private void BerechneGesamtSummenIst(ServicesOverviewRO pRO, PlanIstUebersichtRO ro)
|
||||
{
|
||||
if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.ParentOid = pEntity.ParentOid;
|
||||
pDataContract.CatalogOid = pEntity.ValueListEntryOid;
|
||||
pDataContract.Notice = pEntity.Notice;
|
||||
pDataContract.IsActive = pEntity.IsActive == ActivationTypeId.Active;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
@@ -25,23 +25,56 @@ namespace BeWo.Service.Plugins
|
||||
public AiChatDC CreateAiQueryForServiceRecords(AiChatDC acdc, long cb2scOid, DateTime startdate, DateTime enddate)
|
||||
{
|
||||
String context = CreateContextForServiceRecords(cb2scOid, startdate, enddate);
|
||||
return CreateWebRequest(acdc, context);
|
||||
var settings = GetAiSettings(acdc, context);
|
||||
return CreateAiQuery(acdc, context);
|
||||
|
||||
}
|
||||
|
||||
public AiChatDC CreateAiQueryForSingleCustomer(AiChatDC acdc, long customerOid)
|
||||
{
|
||||
String context = "";
|
||||
return CreateWebRequest(acdc, context);
|
||||
return CreateAiQuery(acdc, context);
|
||||
}
|
||||
|
||||
public AiChatDC CreateAiQueryForObjects(AiChatDC acdc, long objectTid)
|
||||
{
|
||||
String context = "";
|
||||
return CreateWebRequest(acdc, context);
|
||||
return CreateAiQuery(acdc, context);
|
||||
}
|
||||
|
||||
public AiChatDC CreateWebRequest(AiChatDC acdc, String context)
|
||||
public String GetAiSettings(AiChatDC acdc, String context)
|
||||
{
|
||||
|
||||
using (WebClient client = new WebClient())
|
||||
{
|
||||
String url = "https://ai1.ownsoft.de/osaisettings.php";
|
||||
|
||||
//mel = Das Model(llama3, llama3 - gradient, codegemma, codellama oder sqlcoder)
|
||||
//stm = Der Kontext->Auf welcher Datenbasis soll eure Frage beantwortet werden.Kann auch leer sein.
|
||||
//pmt = Der Prompt->Eure Frage
|
||||
//opt = Art der Rückgabe(json oder plaintext)
|
||||
|
||||
|
||||
var nvc = new NameValueCollection();
|
||||
nvc.Add("mel", "llama3-gradient");
|
||||
nvc.Add("stm", context);
|
||||
nvc.Add("pmt", acdc.Prompt);
|
||||
nvc.Add("opt", "json");
|
||||
|
||||
//var t = JsonConvert.DeserializeAnonymousType();0
|
||||
var definition = new { mel = "", stm = new { pre = "", post = "" }, pmt = new { pre = "", post = "" } };
|
||||
var response = client.UploadValues(url, "POST", nvc);
|
||||
String responseStr = System.Text.Encoding.UTF8.GetString(response);
|
||||
var json = JsonConvert.DeserializeAnonymousType(responseStr, definition);
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
public AiChatDC CreateAiQuery(AiChatDC acdc, String context)
|
||||
{
|
||||
|
||||
using (WebClient client = new WebClient())
|
||||
@@ -72,6 +105,7 @@ namespace BeWo.Service.Plugins
|
||||
return new AiChatDC { Result = "Das kann ich leider nicht beantworten:)" };
|
||||
|
||||
}
|
||||
|
||||
public virtual string CreateContextForServiceRecords(long cb2scOid, DateTime startdate, DateTime enddate)
|
||||
{
|
||||
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(cb2scOid);
|
||||
|
||||
@@ -561,8 +561,34 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var originals = DAOFactory.GenericDAO.LoadByIDs<InvoiceBase>(invoices.Select(i => i.InvoiceBaseOid.Value));
|
||||
MapperFactory.InvoiceBaseDC_InvoiceBase.MergeWithEntitys(invoices, originals);
|
||||
DAOFactory.GenericDAO.Update(originals);
|
||||
bool macheMerge = true;
|
||||
foreach (var entity in originals)
|
||||
{
|
||||
var dc = invoices.Where(i => i.InvoiceBaseOid == entity.Oid).FirstOrDefault();
|
||||
|
||||
|
||||
if (dc.IsPaid != entity.IsPaid ||
|
||||
dc.IsExported != entity.IsExported ||
|
||||
dc.IsReviewed != entity.IsReviewed ||
|
||||
dc.IsSent != entity.IsSent ||
|
||||
dc.PartialPayment != entity.PartialPayment)
|
||||
{
|
||||
//Kann nur über die Rechnungsübersicht geändert werden, daher kein Merge mit dem dc machen!
|
||||
entity.IsPaid = dc.IsPaid;
|
||||
entity.IsExported = dc.IsExported;
|
||||
entity.IsReviewed = dc.IsReviewed;
|
||||
entity.IsSent = dc.IsSent;
|
||||
entity.PartialPayment = dc.PartialPayment;
|
||||
macheMerge = false;
|
||||
DAOFactory.GenericDAO.Update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
if (macheMerge)
|
||||
{
|
||||
MapperFactory.InvoiceBaseDC_InvoiceBase.MergeWithEntitys(invoices, originals);
|
||||
DAOFactory.GenericDAO.Update(originals);
|
||||
}
|
||||
return originals.Select(e => e.Version.Value).ToList();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -2923,6 +2923,20 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
var entryDc = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(v2o.Entry);
|
||||
entryDc.RatingTypeOid = v2o.RatingTypeOid;
|
||||
|
||||
//CB 1.7.24: Nach nächstem Update wieder rausnehmen:
|
||||
if (entryDc.ParentOid.HasValue)
|
||||
{
|
||||
var p = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(entryDc.ParentOid.Value);
|
||||
if (p.IsActive != ActivationTypeId.Active)
|
||||
{
|
||||
entryDc.Parent = null;
|
||||
entryDc.ParentOid = null;
|
||||
}
|
||||
}
|
||||
//###########
|
||||
|
||||
|
||||
dc.Goals.Add(entryDc);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,5 +38,8 @@ namespace BS.Shared.DataContracts
|
||||
|
||||
[DataMember]
|
||||
public long? CatalogOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user