< Summary

Information
Class: Services.ApiServices._1CApi.OData.Models.ODataExpenseRequest
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/1CApi/OData/Models/ODataExpenseRequest.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
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_Date()100%210%
get_OrganizationKey()100%210%
get_CounterpartyKey()100%210%
get_ContractKey()100%210%
get_WarehouseKey()100%210%
get_DivisionKey()100%210%
get_OperationType()100%210%
get_VatIncludedInCost()100%210%
get_AmountIncludesVat()100%210%
get_IsUniversalDocument()100%210%
get_TotalAmount()100%210%
get_Comment()100%210%
get_Lines()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{
 07    [JsonProperty("Date")] public string? Date { get; set; } = string.Empty;
 08    [JsonProperty("Организация_Key")] public Guid OrganizationKey { get; set; }
 09    [JsonProperty("Контрагент_Key")] public Guid CounterpartyKey { get; set; }
 010    [JsonProperty("Договор_Key")] public Guid? ContractKey { get; set; }
 011    [JsonProperty("СтруктурнаяЕдиница_Key")] public Guid WarehouseKey { get; set; }
 012    [JsonProperty("Подразделение_Key")] public Guid DivisionKey { get; set; }
 013    [JsonProperty("ВидОперации")] public string? OperationType { get; set; } = OneCODataConstants.OperationTypeExpense;
 014    [JsonProperty("НДСВключатьВСтоимость")] public bool VatIncludedInCost { get; set; } = true;
 015    [JsonProperty("СуммаВключаетНДС")] public bool AmountIncludesVat { get; set; } = true;
 016    [JsonProperty("ЭтоУниверсальныйДокумент")] public bool IsUniversalDocument { get; set; } = true;
 017    [JsonProperty("СуммаДокумента")] public decimal TotalAmount { get; set; }
 018    [JsonProperty("Комментарий")] public string? Comment { get; set; }
 019    [JsonProperty("Запасы")] public List<ODataExpenseLine>? Lines { get; set; } = new();
 20}
 21
 22public class ODataExpenseLine
 23{
 24    [JsonProperty("LineNumber")] public int LineNumber { get; set; }
 25    [JsonProperty("Номенклатура_Key")] public Guid NomenclatureKey { get; set; }
 26    [JsonProperty("Характеристика_Key")] public string? CharacteristicKey { get; set; } = OneCODataConstants.ZeroGuid;
 27    [JsonProperty("ЕдиницаИзмерения")] public string? UnitKey { get; set; } = OneCODataConstants.UnitShtukaGuid;
 28    [JsonProperty("ЕдиницаИзмерения_Type")] public string? UnitType { get; set; } = OneCODataConstants.UnitType;
 29    [JsonProperty("Количество")] public decimal Quantity { get; set; }
 30    [JsonProperty("Цена")] public decimal Price { get; set; }
 31    [JsonProperty("Сумма")] public decimal Amount { get; set; }
 32    [JsonProperty("СуммаНДС")] public decimal VatAmount { get; set; }
 33    [JsonProperty("Всего")] public decimal TotalAmount { get; set; }
 34    [JsonProperty("ПроцентСкидкиНаценки")] public decimal DiscountPercent { get; set; } = 0;
 35    [JsonProperty("СуммаСкидкиНаценки")] public decimal DiscountAmount { get; set; } = 0;
 36    [JsonProperty("СтавкаНДС_Key")] public Guid VatRateKey { get; set; }
 37    [JsonProperty("СтруктурнаяЕдиница_Key")] public Guid WarehouseKey { get; set; }
 38    [JsonProperty("Заказ")] public string? OrderKey { get; set; } = OneCODataConstants.ZeroGuid;
 39    [JsonProperty("Заказ_Type")] public string? OrderType { get; set; } = OneCODataConstants.OrderTypeExpenseBuyer;
 40    [JsonProperty("ДокументПоступления_Key")] public string? ReceiptDocKey { get; set; } = OneCODataConstants.ZeroGuid;
 41    [JsonProperty("Партия_Key")] public string? BatchKey { get; set; } = OneCODataConstants.ZeroGuid;
 42    [JsonProperty("Проект_Key")] public string? ProjectKey { get; set; } = OneCODataConstants.ZeroGuid;
 43    [JsonProperty("ЗаказПокупателя_Key")] public string? BuyerOrderKey { get; set; } = OneCODataConstants.ZeroGuid;
 44}