| | | 1 | | using Newtonsoft.Json; |
| | | 2 | | |
| | | 3 | | namespace Services.ApiServices._1CApi.OData.Models; |
| | | 4 | | |
| | | 5 | | public 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 | | |
| | | 22 | | public class ODataExpenseLine |
| | | 23 | | { |
| | 0 | 24 | | [JsonProperty("LineNumber")] public int LineNumber { get; set; } |
| | 0 | 25 | | [JsonProperty("Номенклатура_Key")] public Guid NomenclatureKey { get; set; } |
| | 0 | 26 | | [JsonProperty("Характеристика_Key")] public string? CharacteristicKey { get; set; } = OneCODataConstants.ZeroGuid; |
| | 0 | 27 | | [JsonProperty("ЕдиницаИзмерения")] public string? UnitKey { get; set; } = OneCODataConstants.UnitShtukaGuid; |
| | 0 | 28 | | [JsonProperty("ЕдиницаИзмерения_Type")] public string? UnitType { get; set; } = OneCODataConstants.UnitType; |
| | 0 | 29 | | [JsonProperty("Количество")] public decimal Quantity { get; set; } |
| | 0 | 30 | | [JsonProperty("Цена")] public decimal Price { get; set; } |
| | 0 | 31 | | [JsonProperty("Сумма")] public decimal Amount { get; set; } |
| | 0 | 32 | | [JsonProperty("СуммаНДС")] public decimal VatAmount { get; set; } |
| | 0 | 33 | | [JsonProperty("Всего")] public decimal TotalAmount { get; set; } |
| | 0 | 34 | | [JsonProperty("ПроцентСкидкиНаценки")] public decimal DiscountPercent { get; set; } = 0; |
| | 0 | 35 | | [JsonProperty("СуммаСкидкиНаценки")] public decimal DiscountAmount { get; set; } = 0; |
| | 0 | 36 | | [JsonProperty("СтавкаНДС_Key")] public Guid VatRateKey { get; set; } |
| | 0 | 37 | | [JsonProperty("СтруктурнаяЕдиница_Key")] public Guid WarehouseKey { get; set; } |
| | 0 | 38 | | [JsonProperty("Заказ")] public string? OrderKey { get; set; } = OneCODataConstants.ZeroGuid; |
| | 0 | 39 | | [JsonProperty("Заказ_Type")] public string? OrderType { get; set; } = OneCODataConstants.OrderTypeExpenseBuyer; |
| | 0 | 40 | | [JsonProperty("ДокументПоступления_Key")] public string? ReceiptDocKey { get; set; } = OneCODataConstants.ZeroGuid; |
| | 0 | 41 | | [JsonProperty("Партия_Key")] public string? BatchKey { get; set; } = OneCODataConstants.ZeroGuid; |
| | 0 | 42 | | [JsonProperty("Проект_Key")] public string? ProjectKey { get; set; } = OneCODataConstants.ZeroGuid; |
| | 0 | 43 | | [JsonProperty("ЗаказПокупателя_Key")] public string? BuyerOrderKey { get; set; } = OneCODataConstants.ZeroGuid; |
| | | 44 | | } |