| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- @model GreenTree.Strohrmann.ERP.Web.Models.Business.CraftModel
- @{
- ViewData["Title"] = "Kundendetails";
- }
- <h1>Werksdetails</h1>
- <h4>@Model.Name</h4>
- <hr />
- <div class="row">
- <div class="col-4 pr-1">
- <div class="card h-100">
- <div class="card-header pb-1">
- <h6>Allgemein</h6>
- </div>
- <div class="card-body">
- <dl class="row">
- <dt class = "col-sm-6">
- @Html.DisplayNameFor(model => model.Id)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.Id)
- </dd>
- <dt class = "col-sm-6">
- @Html.DisplayNameFor(model => model.Name)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.Name)
- </dd>
- <dt class = "col-sm-6">
- @Html.DisplayNameFor(model => model.CreationDate)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.CreationDate)
- </dd>
- <dt class = "col-sm-6">
- @Html.DisplayNameFor(model => model.Customer)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.CustomerText)
- </dd>
- <dt class = "col-sm-6">
- @Html.DisplayNameFor(model => model.Comment)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.Comment)
- </dd>
- </dl>
- </div>
- </div>
- </div>
- <div class="col-8">
- <div class="card">
- <div class="card-header pb-1">
- <h6 class="float-left">Arbeitsstunden</h6>
- </div>
- <div id="craftemployeelist" class="card-body">
- <table class="table">
- @if (Model != null && Model.CraftEmployees != null && Model.CraftEmployees.Count > 0)
- {
- <thead>
- <tr class="row">
- <th class="col-4">
- @Html.DisplayNameFor(model => model.CraftEmployees.First().Value.Employee)
- </th>
- <th class="col-2">
- @Html.DisplayNameFor(model => model.CraftEmployees.First().Value.Amount)
- </th>
- <th class="col-2">
- @Html.DisplayNameFor(model => model.CraftEmployees.First().Value.Value)
- </th>
- <th class="col-4">
- @Html.DisplayNameFor(model => model.CraftEmployees.First().Value.Comment)
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model.CraftEmployees)
- {
- <tr class="row">
- <td class="col-4">
- @Html.DisplayFor(model => item.Value.Employee.Fullname)
- </td>
- <td class="col-2">
- @Html.DisplayFor(model => item.Value.Amount)
- <span class="ml-1">Std.</span>
- </td>
- <td class="col-2">
- @Html.DisplayFor(model => item.Value.Value)
- </td>
- <td class="col-4">
- @Html.DisplayFor(model => item.Value.Comment)
- </td>
- </tr>
- }
- </tbody>
- }
- else
- {
- <tbody>
- <tr class="row">
- Keine Stunden eingetragen
- </tr>
- </tbody>
- }
- </table>
- </div>
- <div class="card-footer">
- <div class="row">
- <div class="col-4">
- <h5 class="mb-0">
- <span class="badge badge-info">
- <span class="fa fa-hashtag" aria-label="Anzahl"> </span>
- @if (Model != null && Model.CraftEmployees != null)
- {
- <span id="aggEmployeeCount">
- @Model.CraftEmployees.Values.Count
- </span>
- }
- else
- {
- <span id="aggEmployeeCount">1</span>
- }
- </span>
- </h5>
- </div>
- <div class="col-2">
- <h5 class="mb-0">
- <span class="badge badge-info">
- <img height="14" src="~/img/icon-average-48.png" alt="Durchschnitt" title="Durchschnitt" />
- @if (Model != null && Model.CraftEmployees != null)
- {
- <span id="aggEmployeeAmountAvg">
- @String.Format("{0:G29} Std.", Model.CraftEmployees.Values.Average(m => m.Amount))
- </span>
- }
- else
- {
- <span id="aggEmployeeAmountAvg"> -</span>
- }
- </span>
- </h5>
- </div>
- <div class="col-6">
- <h5 class="mb-0">
- <span class="badge badge-info">
- <img height="14" src="~/img/icon-sigma-48.png" alt="Summe" title="Summe" />
- @if (Model != null && Model.CraftEmployees != null)
- {
- <span id="aggEmployeeValueSum">
- @String.Format("{0} €", Model.CraftEmployees.Values.Sum(m => m.Value))
- </span>
- }
- else
- {
- <span id="aggEmployeeValueSum"> -</span>
- }
- </span>
- </h5>
- </div>
- </div>
- </div>
- </div>
- <div class="card mt-3">
- <div class="card-header pb-1">
- <h6 class="float-left">Materialien</h6>
- </div>
- <div id="craftmateriallist" class="card-body">
- <table class="table">
- @if (Model != null && Model.CraftMaterials != null && Model.CraftMaterials.Count > 0)
- {
- <thead>
- <tr class="row">
- <th class="col-4">
- @Html.DisplayNameFor(model => model.CraftMaterials.First().Value.Material)
- </th>
- <th class="col-2">
- @Html.DisplayNameFor(model => model.CraftMaterials.First().Value.Amount)
- </th>
- <th class="col-2">
- @Html.DisplayNameFor(model => model.CraftMaterials.First().Value.CalculationFactor)
- </th>
- <th class="col-4">
- @Html.DisplayNameFor(model => model.CraftMaterials.First().Value.Value)
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model.CraftMaterials)
- {
- <tr class="row">
- <td class="col-4">
- @Html.DisplayFor(model => item.Value.MaterialText)
- </td>
- <td class="col-2">
- @Html.DisplayFor(model => item.Value.Amount)
- @Html.DisplayFor(model => item.Value.Material.DefaultUnit.ShortName)
- </td>
- <td class="col-2">
- @Html.DisplayFor(model => item.Value.CalculationFactorUncalculated)
- </td>
- <td class="col-4">
- @Html.DisplayFor(model => item.Value.Value)
- </td>
- </tr>
- }
- </tbody>
- }
- else
- {
- <tbody>
- Keine Materialien verwendet
- </tbody>
- }
- </table>
- </div>
- <div class="card-footer">
- <div class="row">
- <div class="col-4">
- <h5 class="mb-0">
- <span class="badge badge-info">
- <span class="fa fa-hashtag" aria-label="Anzahl"> </span>
- @if (Model != null && Model.CraftMaterials != null)
- {
- <span id="aggMaterialCount">
- @Model.CraftMaterials.Values.Count
- </span>
- }
- else
- {
- <span id="aggMaterialCount">1</span>
- }
- </span>
- </h5>
- </div>
- <div class="col-2">
- </div>
- <div class="col-2">
- <h5 class="mb-0">
- <span class="badge badge-info">
- <img height="14" src="~/img/icon-average-48.png" alt="Durchschnitt" title="Durchschnitt" />
- @if (Model != null && Model.CraftMaterials != null)
- {
- <span id="aggMaterialCalculationFactorAvg">
- @String.Format("{0:G29} %", Model.CraftMaterials.Values.Average(m => m.CalculationFactor))
- </span>
- }
- else
- {
- <span id="aggMaterialCalculationFactorAvg"> -</span>
- }
- </span>
- </h5>
- </div>
- <div class="col-4">
- <h5 class="mb-0">
- <span class="badge badge-info">
- <img height="14" src="~/img/icon-sigma-48.png" alt="Summe" title="Summe" />
- @if (Model != null && Model.CraftMaterials != null)
- {
- <span id="aggMaterialValueSum">
- @String.Format("{0} €", Model.CraftMaterials.Values.Sum(m => m.Value))
- </span>
- }
- else
- {
- <span id="aggMaterialValueSum"> -</span>
- }
- </span>
- </h5>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <hr />
- <div class="d-flex">
- @Html.ActionLink("Bearbeiten", "Edit", new { id = Model.Id })
- <div class="align-self-center ml-3">
- <a asp-action="Index">Zurück zur Liste</a>
- </div>
- <div class="align-self-center ml-auto">
- <a href="#" data-toggle="modal" data-target="#trackingModal">Änderungsinfo</a>
- </div>
- </div>
- <div id="trackingModal" class="modal fade" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content modal-content-header-custom">
- <div class="modal-header modal-header-info text-white">
- <h5 class="modal-title">Änderungsinfo - @Model.Name</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <dl class="row">
- <dt class = "col-sm-4">
- @Html.DisplayNameFor(model => model.CreatedBy)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.CreatedBy)
- </dd>
- <dt class = "col-sm-4">
- @Html.DisplayNameFor(model => model.CreatedOn)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.CreatedOn)
- </dd>
- </dl>
- <dl class="row">
- <dt class = "col-sm-4">
- @Html.DisplayNameFor(model => model.ChangedBy)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.ChangedBy)
- </dd>
- <dt class = "col-sm-4">
- @Html.DisplayNameFor(model => model.ChangedOn)
- </dt>
- <dd class = "col-sm-6">
- @Html.DisplayFor(model => model.ChangedOn)
- </dd>
- </dl>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-dismiss="modal">Schließen</button>
- </div>
- </div>
- </div>
- </div>
|