< Summary

Information
Class: AspNetCoreGeneratedDocument.Areas_Studio2_Views_OrderHistory__OrderHistoryOneCPostingHeader
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/OrderHistory/_OrderHistoryOneCPostingHeader.cshtml
Line coverage
0%
Covered lines: 0
Uncovered lines: 38
Coverable lines: 38
Total lines: 110
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 60
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ExecuteAsync()0%3660600%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/OrderHistory/_OrderHistoryOneCPostingHeader.cshtml

#LineLine coverage
 1@model List<OzonOrdersWeb.Areas.Studio2.ViewModels.OrderHistory.OrderHistoryOneCPostingViewModel>
 2
 03@foreach (var posting in Model)
 4{
 5    <div class="one-c-posting-header text-end small @(posting != Model.Last() ? "mb-2" : "")" style="max-width: 480px;">
 6        <div class="d-flex flex-wrap align-items-center justify-content-end gap-1 mb-1">
 7            <span class="badge @(posting.Success ? "bg-success-subtle text-success" : "bg-warning-subtle text-warning")"
 08                <i class="fas fa-file-invoice me-1"></i>@(posting.Success ? "Успешно в 1С" : "1С — ошибка")
 9            </span>
 010            <span class="badge bg-light text-dark border">@posting.OperationKindDisplay</span>
 11        </div>
 012        @if (!string.IsNullOrWhiteSpace(posting.ChangedBy))
 13        {
 14            <div class="text-muted mb-1">
 015                <i class="fas fa-user-check me-1"></i><span class="text-muted">Провёл:</span> <strong>@posting.ChangedBy
 16            </div>
 17        }
 18        <ul class="list-unstyled mb-0 text-secondary" style="line-height: 1.4;">
 019            @if (!string.IsNullOrWhiteSpace(posting.OrganizationName))
 20            {
 21                <li>
 22                    <span class="text-muted">Организация:</span>
 023                    @posting.OrganizationName@(string.IsNullOrWhiteSpace(posting.OrganizationInn) ? "" : $" (ИНН {postin
 24                </li>
 25            }
 026            @if (!string.IsNullOrWhiteSpace(posting.SenderName))
 27            {
 28                <li>
 29                    <span class="text-muted">Отправитель:</span>
 030                    @posting.SenderName@(string.IsNullOrWhiteSpace(posting.SenderInn) ? "" : $" (ИНН {posting.SenderInn}
 31                </li>
 32            }
 033            else if (posting.OperationKind is "Movement" or "Expense")
 34            {
 35                <li><span class="text-muted">Отправитель:</span> Не указан</li>
 36            }
 037            @if (!string.IsNullOrWhiteSpace(posting.WarehouseSender))
 38            {
 039                <li><span class="text-muted">Склад отправителя:</span> @posting.WarehouseSender</li>
 40            }
 041            @if (!string.IsNullOrWhiteSpace(posting.WarehouseRecipient))
 42            {
 043                <li><span class="text-muted">Склад получателя:</span> @posting.WarehouseRecipient</li>
 44            }
 045            @if (posting.OrdersCount > 0 || posting.ProductsCount > 0)
 46            {
 47                <li>
 48                    <span class="text-muted">Вход:</span>
 049                    заказов @posting.OrdersCount, товаров @posting.ProductsCount
 050                    @if (!string.IsNullOrWhiteSpace(posting.ArticlesSummary))
 51                    {
 052                        <text>, <span class="text-muted">артикулы:</span> @posting.ArticlesSummary</text>
 53                    }
 54                </li>
 55            }
 056            else if (!string.IsNullOrWhiteSpace(posting.ArticlesSummary))
 57            {
 058                <li><span class="text-muted">Артикулы:</span> @posting.ArticlesSummary</li>
 59            }
 060            @if (posting.DocumentsCount > 0)
 61            {
 62                <li>
 063                    <span class="text-muted">Документов:</span> @posting.DocumentsCount
 064                    @if (posting.IsPosted)
 65                    {
 66                        <span class="badge bg-success-subtle text-success ms-1">✔ проведено</span>
 67                    }
 068                    else if (posting.Success)
 69                    {
 70                        <span class="badge bg-warning-subtle text-warning ms-1">⚠ черновик</span>
 71                    }
 72                </li>
 73            }
 074            @if (!string.IsNullOrWhiteSpace(posting.DocumentNumbers))
 75            {
 076                var hNums = posting.DocumentNumbers.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOption
 077                var hGuids = (posting.DocumentGuids ?? "").Split(',', StringSplitOptions.RemoveEmptyEntries | StringSpli
 78                <li>
 79                    <span class="text-muted">Номера:</span>
 80                    <span class="fw-medium text-dark">
 081                        @for (var hi = 0; hi < hNums.Length; hi++)
 82                        {
 083                            if (hi < hGuids.Length && Guid.TryParse(hGuids[hi], out _))
 84                            {
 085                                <a href="/Studio2/OneCDocument/Details?refKey=@hGuids[hi]" target="_blank" title="Открыт
 86                            }
 87                            else
 88                            {
 089                                <span>@hNums[hi]</span>
 90                            }
 091                            if (hi < hNums.Length - 1) { <span>, </span> }
 92                        }
 93                    </span>
 94                </li>
 95            }
 096            @if (!string.IsNullOrWhiteSpace(posting.DocumentGuids))
 97            {
 098                <li><span class="text-muted">GUID:</span> <span class="font-monospace text-secondary user-select-all" st
 99            }
 0100            @if (!string.IsNullOrWhiteSpace(posting.CreatedNomenclature))
 101            {
 0102                <li><span class="text-muted">Создана номенклатура 1С:</span> <span class="text-info-emphasis">@posting.C
 103            }
 0104            @if (!string.IsNullOrWhiteSpace(posting.ErrorSummary))
 105            {
 0106                <li><span class="text-muted">Ошибки:</span> <span class="text-danger">@posting.ErrorSummary</span></li>
 107            }
 108        </ul>
 109    </div>
 110}

Methods/Properties

ExecuteAsync()