< Summary

Information
Class: AspNetCoreGeneratedDocument.Areas_Studio2_Views_Shared__OrderRowNoCheckbox
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/Shared/_OrderRowNoCheckbox.cshtml
Line coverage
0%
Covered lines: 0
Uncovered lines: 68
Coverable lines: 68
Total lines: 273
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 72
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%5256720%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/Shared/_OrderRowNoCheckbox.cshtml

#LineLine coverage
 1@using OzonDomains.Models
 2@using OzonOrdersWeb.ViewModels.OrderViewModels
 3@model Order
 4
 5
 6@{
 07    var order = Model;
 8    string rowClass;
 09    rowClass = order.AppStatus?.Name == "Заказан поставщику" ? "table-success" : "custom-white";
 10}
 11
 12
 13<tr class=@rowClass>
 14    <td>
 15        <div class="d-flex align-items-center">
 16            <span class="ml-2">
 017                @Html.DisplayFor(modelItem => order.ShipmentNumber)
 18            </span>
 19        </div>
 20    </td>
 21    <td>
 22        <div title="@order.OzonClient">
 023            @if (order.OzonClient != null)
 24            {
 025                string ozonClient = order.OzonClient.Name;
 026                if (ozonClient.Length > 18)
 27                {
 028                    ozonClient = ozonClient.Substring(0, 18) + "...";
 29                }
 030                @ozonClient
 31            }
 32        </div>
 33
 034        @if (order.DeliveryCity != null && order.DeliveryCity != "")
 35        {
 36            <div style="white-space: nowrap;" title="@order.DeliveryCity">
 37                @{
 038                    string deliveryCity = order.DeliveryCity;
 039                    if (deliveryCity.Length > 11)
 40                    {
 041                        deliveryCity = deliveryCity.Substring(0, 11) + "...";
 42                    }
 043                    @deliveryCity
 44                }
 45            </div>
 46        }
 47    </td>
 48
 49    <td>
 50        <div id="td2ProcessingDate" title="@Html.DisplayFor(modelItem => order.FullFormattedProcessingDate)">
 051            @Html.DisplayFor(modelItem => order.FormattedProcessingDate)
 52        </div>
 53
 54        <div class="text-muted" title="@Html.DisplayFor(modelItem => order.FullFormattedShippingDate)">
 055            @Html.DisplayFor(modelItem => order.FormattedShippingDate)
 56        </div>
 57    </td>
 58
 59    <td>
 60        <div style="white-space: nowrap; text-align: right;">
 061            <div title="@Html.DisplayFor(modelItem => order.FormattedDeliveryDay) @Html.DisplayFor(modelItem => order.Fo
 62        </div>
 63
 64        <div style="white-space: nowrap; text-align: right;" class="text-muted">
 065            @Html.DisplayFor(modelItem => order.FormattedTimeLeftDay)
 66        </div>
 67    </td>
 68
 69    <td>
 70        <div class="nowrap" title="item.Status">
 071            @if (order.Status != null)
 72            {
 073                string status = order.Status;
 074                if (status.Length > 14)
 75                {
 076                    status = status.Substring(0, 14) + "...";
 77                }
 078                @status
 79            }
 80            else
 81            {
 82                <br />
 83            }
 84
 85        </div>
 86
 87        <div class="text-muted nowrap" title="@(order.AppStatus?.Name ?? "")">
 88            @{
 089                var appStatus = order.AppStatus?.Name ?? "";
 090                if (appStatus.Length > 14)
 91                {
 092                    appStatus = appStatus.Substring(0, 14) + "...";
 93                }
 94            }
 095            @appStatus
 96        </div>
 97    </td>
 98
 99    <td>
 100        <div class="container">
 101            <div class="row mb-0 justify-content-between">
 102                <div id="thArticle" title="@order.ProductKey" class="col-md-4 d-flex align-items-center mb-1" style="whi
 103                    @{
 0104                        string? productKey = order.ProductKey;
 0105                        if (productKey != null && productKey.Length > 17)
 106                        {
 0107                            productKey = productKey.Substring(0, 17) + "...";
 108                        }
 109                    }
 0110                    @productKey
 111                </div>
 112
 113                <div id="thManufacturer" class="col-md-4 d-flex flex-column mb-1 nowrap text-center">
 0114                    @(order.Manufacturer?.Name ?? "")
 115                </div>
 116
 117                <div id="thArticle2" class="col-md-4 d-flex flex-column mb-1 nowrap text-end">
 0118                    @if (order.Article != null)
 119                    {
 0120                        @Html.DisplayFor(modelItem => order.Article)
 121                    }
 122                </div>
 123            </div>
 124            <div class="row mt-0">
 125                <div id="thProductName" class="custom-width-large d-flex flex-column text-muted">
 126                    <div>
 127                        <div class="product-cell" title="@Html.DisplayFor(modelItem => order.ProductName)">
 0128                            @Html.DisplayFor(modelItem => order.ProductName)
 129                        </div>
 130                    </div>
 131                </div>
 132            </div>
 133        </div>
 134    </td>
 135
 136    <td>
 137    </td>
 138
 139
 140    <td>
 0141        @(order.ShipmentWarehouse?.Name ?? "")
 142    </td>
 143
 144
 145    <td>
 146
 147        <div>
 0148            @(order.Supplier?.Name ?? "")
 149        </div>
 150
 151        <div class="text-muted">
 0152            @Html.DisplayFor(modelItem => order.OrderNumberToSupplier)
 153        </div>
 154    </td>
 155
 156    <td>
 157        <div>
 0158            @if (order.ProductInfo?.CommercialCategory != null)
 159            {
 0160                string сommercialCategory = order.ProductInfo!.CommercialCategory;
 0161                if (сommercialCategory.Length > 10)
 162                {
 0163                    сommercialCategory = сommercialCategory.Substring(0, 10) + "...";
 164                }
 0165                @сommercialCategory
 166            }
 167
 168        </div>
 169
 170        <div class="text-muted">
 0171            @(order.ProductInfo?.VolumetricWeight)
 172        </div>
 173    </td>
 174
 175    <td>
 176        <div style="text-align: right;">
 0177            @Html.Raw(string.Format("{0:N0}", order.ProductInfo?.CurrentPriceWithDiscount ?? 0).Replace(",", " "))
 178        </div>
 179
 180        <div class="text-muted" style="text-align: right;">
 181            @{
 182
 0183                if (order.Quantity > 1)
 184                {
 185                    <b>
 0186                        @Html.DisplayFor(modelItem => order.Quantity)
 187                    </b>
 188                }
 189                else
 190                {
 0191                    @Html.DisplayFor(modelItem => order.Quantity)
 192                }
 193            }
 194        </div>
 195    </td>
 196
 197    <td>
 198        <div style="text-align: right;">
 0199            @Html.Raw(string.Format("{0:N0}", order.Price).Replace(",", " "))
 200        </div>
 201
 202        <div class="text-muted" style="text-align: right;">
 0203            @Html.Raw(string.Format("{0:N0}", order.ShipmentAmount).Replace(",", " "))
 204        </div>
 205    </td>
 206
 207    <td>
 208            <div style="text-align: right;  white-space: nowrap;">
 209            <p style="display: inline; white-space: nowrap; margin: 0;">
 0210                @Html.Raw(string.Format("{0:N0}", order.PurchasePrice).Replace(",", " "))
 211            </p>
 0212            @if (order.OriginalPurchasePrice != null)
 213            {
 214                <div style="display: inline-block; white-space: nowrap; margin: 0; font-size: 10px; text-align: center;"
 215                    <div>
 0216                        @Html.Raw(string.Format("{0:N0}", order.OriginalPurchasePrice).Replace(",", " "))
 217                    </div>
 218                    <div>
 0219                        @(order.Supplier?.CurrencyCode.ToString() ?? "")
 220                    </div>
 221                </div>
 222            }
 223        </div>
 224
 225        <div style="text-align: right;">
 0226            @Html.Raw(string.Format("{0:N0}", order.CostPrice).Replace(",", " "))
 227        </div>
 228    </td>
 229    <td style="text-align: right;">
 0230        @Html.Raw(string.Format("{0:N0}", order.MinOzonCommission).Replace(",", " ")) <br />
 0231        @Html.Raw(string.Format("{0:N0}", order.MaxOzonCommission).Replace(",", " "))
 232    </td>
 233
 234    <td style="text-align: right;">
 0235        @if (order.MaxProfit < 0)
 236        {
 0237            <span style="color:red">@Html.Raw(string.Format("{0:N0}", order.MaxProfit).Replace(",", " "))</span>
 238        }
 239        else
 240        {
 0241            @Html.Raw(string.Format("{0:N0}", order.MaxProfit).Replace(",", " "))
 242        }
 243        <br>
 0244        @if (order.MinProfit < 0)
 245        {
 0246            <span style="color:red">@Html.Raw(string.Format("{0:N0}", order.MinProfit).Replace(",", " "))</span>
 247        }
 248        else
 249        {
 0250            @Html.Raw(string.Format("{0:N0}", order.MinProfit).Replace(",", " "))
 251        }
 252    </td>
 253
 254    <td style="text-align: right;">
 0255        @if (order.MaxDiscount < 0)
 256        {
 0257            <span style="color:red">@Html.Raw(string.Format("{0:N0}", order.MaxDiscount).Replace(",", " "))</span>
 258        }
 259        else
 260        {
 0261            @Html.Raw(string.Format("{0:N0}", order.MaxDiscount).Replace(",", " "))
 262        }
 263        <br>
 0264        @if (order.MinDiscount < 0)
 265        {
 0266            <span style="color:red">@Html.Raw(string.Format("{0:N0}", order.MinDiscount).Replace(",", " "))</span>
 267        }
 268        else
 269        {
 0270            @Html.Raw(string.Format("{0:N0}", order.MinDiscount).Replace(",", " "))
 271        }
 272    </td>
 273</tr>

Methods/Properties

ExecuteAsync()