< Summary

Information
Class: Services.ApiServices._1CApi.OData.Models.ODataExpenseLine
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/1CApi/OData/Models/ODataExpenseRequest.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 20
Coverable lines: 20
Total lines: 44
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_LineNumber()100%210%
get_NomenclatureKey()100%210%
get_CharacteristicKey()100%210%
get_UnitKey()100%210%
get_UnitType()100%210%
get_Quantity()100%210%
get_Price()100%210%
get_Amount()100%210%
get_VatAmount()100%210%
get_TotalAmount()100%210%
get_DiscountPercent()100%210%
get_DiscountAmount()100%210%
get_VatRateKey()100%210%
get_WarehouseKey()100%210%
get_OrderKey()100%210%
get_OrderType()100%210%
get_ReceiptDocKey()100%210%
get_BatchKey()100%210%
get_ProjectKey()100%210%
get_BuyerOrderKey()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/1CApi/OData/Models/ODataExpenseRequest.cs

#LineLine coverage
 1using Newtonsoft.Json;
 2
 3namespace Services.ApiServices._1CApi.OData.Models;
 4
 5public class ODataExpenseRequest
 6{
 7    [JsonProperty("Date")] public string? Date { get; set; } = string.Empty;
 8    [JsonProperty("Организация_Key")] public Guid OrganizationKey { get; set; }
 9    [JsonProperty("Контрагент_Key")] public Guid CounterpartyKey { get; set; }
 10    [JsonProperty("Договор_Key")] public Guid? ContractKey { get; set; }
 11    [JsonProperty("СтруктурнаяЕдиница_Key")] public Guid WarehouseKey { get; set; }
 12    [JsonProperty("Подразделение_Key")] public Guid DivisionKey { get; set; }
 13    [JsonProperty("ВидОперации")] public string? OperationType { get; set; } = OneCODataConstants.OperationTypeExpense;
 14    [JsonProperty("НДСВключатьВСтоимость")] public bool VatIncludedInCost { get; set; } = true;
 15    [JsonProperty("СуммаВключаетНДС")] public bool AmountIncludesVat { get; set; } = true;
 16    [JsonProperty("ЭтоУниверсальныйДокумент")] public bool IsUniversalDocument { get; set; } = true;
 17    [JsonProperty("СуммаДокумента")] public decimal TotalAmount { get; set; }
 18    [JsonProperty("Комментарий")] public string? Comment { get; set; }
 19    [JsonProperty("Запасы")] public List<ODataExpenseLine>? Lines { get; set; } = new();
 20}
 21
 22public class ODataExpenseLine
 23{
 024    [JsonProperty("LineNumber")] public int LineNumber { get; set; }
 025    [JsonProperty("Номенклатура_Key")] public Guid NomenclatureKey { get; set; }
 026    [JsonProperty("Характеристика_Key")] public string? CharacteristicKey { get; set; } = OneCODataConstants.ZeroGuid;
 027    [JsonProperty("ЕдиницаИзмерения")] public string? UnitKey { get; set; } = OneCODataConstants.UnitShtukaGuid;
 028    [JsonProperty("ЕдиницаИзмерения_Type")] public string? UnitType { get; set; } = OneCODataConstants.UnitType;
 029    [JsonProperty("Количество")] public decimal Quantity { get; set; }
 030    [JsonProperty("Цена")] public decimal Price { get; set; }
 031    [JsonProperty("Сумма")] public decimal Amount { get; set; }
 032    [JsonProperty("СуммаНДС")] public decimal VatAmount { get; set; }
 033    [JsonProperty("Всего")] public decimal TotalAmount { get; set; }
 034    [JsonProperty("ПроцентСкидкиНаценки")] public decimal DiscountPercent { get; set; } = 0;
 035    [JsonProperty("СуммаСкидкиНаценки")] public decimal DiscountAmount { get; set; } = 0;
 036    [JsonProperty("СтавкаНДС_Key")] public Guid VatRateKey { get; set; }
 037    [JsonProperty("СтруктурнаяЕдиница_Key")] public Guid WarehouseKey { get; set; }
 038    [JsonProperty("Заказ")] public string? OrderKey { get; set; } = OneCODataConstants.ZeroGuid;
 039    [JsonProperty("Заказ_Type")] public string? OrderType { get; set; } = OneCODataConstants.OrderTypeExpenseBuyer;
 040    [JsonProperty("ДокументПоступления_Key")] public string? ReceiptDocKey { get; set; } = OneCODataConstants.ZeroGuid;
 041    [JsonProperty("Партия_Key")] public string? BatchKey { get; set; } = OneCODataConstants.ZeroGuid;
 042    [JsonProperty("Проект_Key")] public string? ProjectKey { get; set; } = OneCODataConstants.ZeroGuid;
 043    [JsonProperty("ЗаказПокупателя_Key")] public string? BuyerOrderKey { get; set; } = OneCODataConstants.ZeroGuid;
 44}