From e404fc6ff52196d38efda3f0a18bdd00888fbf65 Mon Sep 17 00:00:00 2001 From: "as.smirnova" Date: Thu, 10 Jul 2025 09:30:47 +0300 Subject: [PATCH] DDCORE-10414: Add UserContract for XmlProformaInvoice/XmlInvoiceOffer --- .../Diadoc.Samples/PostXmlInvoiceOffer29.cs | 384 ++ .../PostXmlProformaInvoice29.cs | 384 ++ Samples/Diadoc.Samples/Program.cs | 2 + proto/Invoicing/ExtendedSigner.proto | 1 + .../ON_CHETOP_UserContract_05_01_01.cs | 3309 ++++++++++++++++ .../ON_CHETOP_UserContract_05_01_01.xsd | 3347 +++++++++++++++++ src/Proto/Invoicing/ExtendedSigner.proto.cs | 5 +- 7 files changed, 7431 insertions(+), 1 deletion(-) create mode 100644 Samples/Diadoc.Samples/PostXmlInvoiceOffer29.cs create mode 100644 Samples/Diadoc.Samples/PostXmlProformaInvoice29.cs create mode 100644 src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.cs create mode 100644 src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.xsd diff --git a/Samples/Diadoc.Samples/PostXmlInvoiceOffer29.cs b/Samples/Diadoc.Samples/PostXmlInvoiceOffer29.cs new file mode 100644 index 00000000..1cb1104f --- /dev/null +++ b/Samples/Diadoc.Samples/PostXmlInvoiceOffer29.cs @@ -0,0 +1,384 @@ +using System; +using System.IO; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using Diadoc.Api; +using Diadoc.Api.Cryptography; +using Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01; +using Diadoc.Api.Proto; +using Diadoc.Api.Proto.Events; +using Diadoc.Api.Proto.PowersOfAttorney; +using Certificate = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Certificate; +using Electronic = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Electronic; +using OrganizationType_DatabaseOrder = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.OrganizationType_DatabaseOrder; +using PowerOfAttorney = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.PowerOfAttorney; +using RussianAddressUtd970 = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.RussianAddressUtd970; +using Signer = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Signer; +using SignerPosition = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.SignerPosition; +using SignerPositionPositionSource = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.SignerPositionPositionSource; +using Signers = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Signers; +using SignerSignerPowersConfirmationMethod = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.SignerSignerPowersConfirmationMethod; +using Storage = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Storage; +using StorageFullId = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.StorageFullId; +using StorageUseDefault = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.StorageUseDefault; +using TaxRateUtd970 = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.TaxRateUtd970; + +namespace Diadoc.Samples +{ + internal static class PostXmlInvoiceOffer29 + { + public static void RunSample() + { + Console.WriteLine("Пример отправки Счета-оферты в формате приказа №29"); + Console.WriteLine("==================================================================================="); + + // Для использования API Диадока требуются: + // 1. Крипто-API, предоставляемое операционной системой. Для систем на ОС Windows используйте класс WinApiCrypt. + // 2. Экземпляр класса DiadocApi, проксирующий работу с Диадоком. + var crypt = new WinApiCrypt(); + var diadocApi = new DiadocApi( + Constants.DefaultClientId, + Constants.DefaultApiUrl, + crypt); + + // Авторизуемся в Диадоке. В этом примере используем авторизацию через логин-пароль: + var authToken = diadocApi.Authenticate(Constants.DefaultLogin, Constants.DefaultPassword); + // Также можно использовать авторизацию по сертификату, она описана в примере Authenticate.cs + + // Для отправки комплекта документов требуется подготовить структуру MessageToPost, + // которая и будет содержать отправляемый комплект документов. + + // Для начала, укажем в структуре идентификаторы отправителя и получателя: + var messageToPost = new MessageToPost + { + FromBoxId = Constants.DefaultFromBoxId, + ToBoxId = Constants.DefaultToBoxId + }; + + // Перечислим связку идентификаторов, которая характеризует полный формализованный тип документа в Диадоке + var typeNamedId = "XmlInvoiceOffer"; // строковый идентификатор типа Счет-оферта + var function = "default"; // функция + var version = "invoiceoffer29_05_01_01"; // версия, отвечающая за то, что документ сформирован в формате приказа №29 + + // Укажем наш сертификат + // Далее он понадобится для генерации подписанта в документе и подписания + var certificateRawData = new X509Certificate2(File.ReadAllBytes(Constants.CertificatePath)).RawData; + + // Укажем способ передачи МЧД + // Это поможет сформировать правильно контент документа и запрос + // Подробнее о способах передачи - https://developer.kontur.ru/docs/diadoc-api/ru/latest/instructions/powerofattorney.html#powerofattorney-send + + var powerOfAttorneyType = PowerOfAttorneyType.None; + + // Теперь создадим сам формализованный документ. + // C# SDK Диадока позволяет интеграторам создать объект типа XmlProformaInvoice, + // который получается из кодогенерации упрощенной xsd-схемы титула документа. + var userDataContract = BuildUserDataContract(messageToPost.FromBoxId, certificateRawData, powerOfAttorneyType); + + // Теперь средствами универсального метода генерации мы получим из упрощенного xml + // уже реальный титул документа, который будет удовлетворять приказу №29 + Console.WriteLine("Генерируем титул отправителя..."); + var generatedTitle = diadocApi.GenerateTitleXml( + authToken, + Constants.DefaultFromBoxId, + typeNamedId, + function, + version, + 0, + userDataContract.SerializeToXml()); + Console.WriteLine("Титул отправителя был успешно сгенерирован."); + + // Подпишем полученный титул через WinApiCrypt нашим сертификатом: + Console.WriteLine("Создаём подпись..."); + var content = generatedTitle.Content; + + var signature = crypt.Sign(content, certificateRawData); // здесь лежит бинарное представление подписи к Счету-оферте + Console.WriteLine("Создана подпись к документу."); + + // Теперь передадим в структуру информацию о файле. + // Для этого воспользуемся универсальным полем DocumentAttachment — через него можно отправить любой тип. + var documentAttachment = new DocumentAttachment + { + /* + Чтобы Диадок знал, какой тип документа вы хотите отправить, + нужно заполнить поле TypeNamedId (а также Function и Version, если у типа больше одной функции и версии). + Узнать список доступных типов можно через метод-справочник GetDocumentTypes. + + Для наших целей (Счет-оферта в формате приказа №29) мы уже подобрали нужную комбинацию выше: + */ + TypeNamedId = typeNamedId, + Function = function, + Version = version, + + // Теперь передадим сам файл Счета и сформированную к нему подпись и МЧД: + SignedContent = BuildSignerContent(content, signature, powerOfAttorneyType), + + Comment = "Здесь можно указать любой текстовый комментарий, который нужно оставить к документу", + CustomDocumentId = "Тут можно указать любой строковый идентификатор, например, для соответствия с вашей учётной системой" + + /* + У каждого типа документа в Диадоке может быть свой набор метаданных. + Их нужно указывать при отправке, если они обязательны. + Узнать набор требуемых метаданных для конкретного набора (тип-функция-версия-порядковый номер титула) + можно через тот же метод-справочник GetDocumentTypes: смотрите поля MetadataItems. + + Для формализованных документов метаданные обычно достаются из xml самим Диадоком. + Если у метаданных указан Source=Xml, отдельно передавать в MessageToPost их не нужно. + */ + }; + + // Добавим информацию о документе в MessageToPost: + messageToPost.DocumentAttachments.Add(documentAttachment); + + // Наконец отправляем подготовленный комплект документов через Диадок + Console.WriteLine("Отправляем пакет из одного Счета..."); + Console.WriteLine("Из ящика: " + messageToPost.FromBoxId); + Console.WriteLine("В ящик: " + messageToPost.ToBoxId); + + var response = diadocApi.PostMessage(authToken, messageToPost); + + // При необходимости можно обработать ответ сервера (например, можно получить + // и сохранить для последующей обработки идентификатор сообщения) + Console.WriteLine("Документ был успешно загружен."); + Console.WriteLine("MessageID: " + response.MessageId); + Console.WriteLine("Количество сущностей в сообщении: " + response.Entities.Count); + + // В ответе будет две сущности, т.к. контент и подпись к нему хранятся отдельно друг от друга. + // Выведем информацию о самом документе. Это можно сделать так: + var responseDocument = response.Entities.FirstOrDefault(e => string.IsNullOrEmpty(e.ParentEntityId)); // т.к. у документа нет "родительских сущностей" + Console.WriteLine("Идентификатор документа: " + responseDocument.EntityId); + Console.WriteLine("Название документа: " + responseDocument.DocumentInfo.Title); + } + + private static SignedContent BuildSignerContent(byte[] content, byte[] signature, PowerOfAttorneyType powerOfAttorneyType) + { + // https://developer.kontur.ru/docs/diadoc-api/ru/latest/proto/SignedContent.html + return new SignedContent + { + Content = content, + Signature = signature, + PowerOfAttorney = powerOfAttorneyType != PowerOfAttorneyType.None + ? BuildPowerOfAttorneyToPost(powerOfAttorneyType) + : null + }; + } + + private static XmlProformaInvoice BuildUserDataContract(string senderBoxId, byte[] certificateRawData, PowerOfAttorneyType powerOfAttorneyType) + { + // Ниже перечислены минимально необходимые поля для генерации титула отправителя. + var xmlProformaInvoice = new XmlProformaInvoice + { + Function = XmlProformaInvoiceFunction.Item1, + DocumentDate = "01.01.2020", + DocumentNumber = "134", + Seller = GetSellerInfo(), //Данные организации продавца + Buyer = GetBuyerInfo(), //Данные организации покупателя + Table = BuildTableSample(), //Табличная часть документа + Currency = "643", + + // Передадим информацию о подписанте документа, т.е. персональные данные сотрудника, который подписывает документ. + // Эти данные осядут в самом xml: + Signers = BuildSigners(senderBoxId, certificateRawData, powerOfAttorneyType) + }; + + return xmlProformaInvoice; + } + + private static ProformaInvoiceTable BuildTableSample() + { + return new ProformaInvoiceTable + { + Item = new[] + { + new ProformaInvoiceTableItem + { + Product = "товар", + Unit = "796", + Quantity = 10, + QuantitySpecified = true, + TaxRate = TaxRateUtd970.TenPercent, + TaxRateSpecified = true, + Price = 10, + PriceSpecified = true, + SubtotalWithVatExcluded = 100, + VatWithoutDiscount = 10, + VatWithoutDiscountSpecified = true, + Vat = 10, + VatSpecified = true, + Subtotal = 110, + } + }, + Total = 110, + TotalWithVatExcluded = 0, + Vat = 10m, + VatSpecified = true + }; + } + + private static Signers BuildSigners(string senderBoxId, byte[] certificateRawData, PowerOfAttorneyType powerOfAttorneyType) + { + var signers = new Signers + { + BoxId = senderBoxId, + Signer = new[] + { + new Signer + { + Certificate = new Certificate { CertificateBytes = certificateRawData }, + Position = new SignerPosition + { + // Автоматическое заполнение должности из настроек сотрудника указанных в сервисе + // Более подробное описание работы см. в xsd-cхеме + PositionSource = SignerPositionPositionSource.StorageByTitleTypeId + }, + SignerPowersConfirmationMethod = SignerPowersConfirmationMethodConvert(powerOfAttorneyType), + SignerPowersConfirmationMethodSpecified = true + } + } + }; + + if (powerOfAttorneyType != PowerOfAttorneyType.InDocumentContent) return signers; + + //Если мы собираемся заполнить данные о электронной доверенности в самом документе: + signers.Signer.FirstOrDefault().PowerOfAttorney = BuildSignerElectronicPowerOfAttorney(); + return signers; + } + + private static PowerOfAttorney BuildSignerElectronicPowerOfAttorney() + { + return new PowerOfAttorney + { + Electronic = new Electronic + { + Item = new Storage + { + FullId = new StorageFullId + { + IssuerInn = "<ИНН доверителя из МЧД>", + RegistrationNumber = "<Регистрационный номер МЧД в формате GUID>" + }, + // Подробнее о флаге UseDefault - https://developer.kontur.ru/docs/diadoc-api/ru/latest/proto/PowerOfAttorneyToPost.html?highlight=usedefault + UseDefault = StorageUseDefault.@false + } + } + }; + } + + private static PowerOfAttorneyToPost BuildPowerOfAttorneyToPost(PowerOfAttorneyType powerOfAttorneyType) + { + // PowerOfAttorneyToPost - https://developer.kontur.ru/docs/diadoc-api/ru/latest/proto/PowerOfAttorneyToPost.html + switch (powerOfAttorneyType) + { + case PowerOfAttorneyType.None: + return null; + case PowerOfAttorneyType.FileAsMeta: + return BuildPowerOfAttorneyToPostInMeta(); + case PowerOfAttorneyType.InDocumentContent: + return BuildPowerOfAttorneyToPostInDocumentContent(); + default: + return null; + } + } + + private static PowerOfAttorneyToPost BuildPowerOfAttorneyToPostInDocumentContent() + { + return new PowerOfAttorneyToPost + { + UseDocumentContent = true + }; + } + + private static PowerOfAttorneyToPost BuildPowerOfAttorneyToPostInMeta() + { + const string powerOfAttorneyPath = @"<Путь до файла доверенности>"; + const string powerOfAttorneySignaturePath = @"<Путь до файла подписи доверенности>"; + + var powerOfAttorneyContent = File.ReadAllBytes(powerOfAttorneyPath); + var powerOfAttorneySignatureContent = File.ReadAllBytes(powerOfAttorneySignaturePath); + + return new PowerOfAttorneyToPost + { + Contents = + { + new PowerOfAttorneySignedContent + { + Content = new Content_v3 { Content = powerOfAttorneyContent }, + Signature = new Content_v3 { Content = powerOfAttorneySignatureContent } + } + } + }; + } + + private static SignerSignerPowersConfirmationMethod SignerPowersConfirmationMethodConvert(PowerOfAttorneyType signerPowersConfirmationMethod) + { + switch (signerPowersConfirmationMethod) + { + // Описание значений и другие варианты см. в xsd-схеме + case PowerOfAttorneyType.None: + return SignerSignerPowersConfirmationMethod.Item6; + case PowerOfAttorneyType.FileAsMeta: + return SignerSignerPowersConfirmationMethod.Item4; + case PowerOfAttorneyType.InDocumentContent: + return SignerSignerPowersConfirmationMethod.Item3; + default: + return SignerSignerPowersConfirmationMethod.Item6; + } + } + + private static ExtendedOrganizationInfoXmlProformaInvoice29 GetSellerInfo() + { + return new ExtendedOrganizationInfoXmlProformaInvoice29 + { + Item = new ExtendedOrganizationDetailsXmlProformaInvoice29 + { + Inn = "7750370238", + Kpp = "770100101", + FnsParticipantId = "2BM-Seller", + OrgType = OrganizationType_DatabaseOrder.Item2, //ЮЛ + OrgName = "ЗАО Очень Древний Папирус", + Address = new AddressXmlProformaInvoice29 + { + Item = new RussianAddressUtd970 + { + Region = "66" + } + }, + BankId = "123456789", + CorrespondentAccount = "CorrespondentAccount", + BankAccountNumber = "BankAccountNumber" + + } + + }; + } + + private static ExtendedOrganizationInfoXmlProformaInvoice29 GetBuyerInfo() + { + return new ExtendedOrganizationInfoXmlProformaInvoice29 + { + Item = new ExtendedOrganizationDetailsXmlProformaInvoice29 + { + Inn = "9500000005", + Kpp = "667301001", + FnsParticipantId = "2BM-Buyer", + OrgType = OrganizationType_DatabaseOrder.Item2, //ЮЛ + OrgName = "ООО Тестовое Юрлицо обычное", + Address = new AddressXmlProformaInvoice29 + { + Item = new RussianAddressUtd970 + { + Region = "66" + } + } + } + }; + } + + private enum PowerOfAttorneyType + { + None, // Без МЧД + FileAsMeta, // Файлом представленным в метаданных документа + InDocumentContent // Информация об МЧД находится в содержимом документа + } + } +} diff --git a/Samples/Diadoc.Samples/PostXmlProformaInvoice29.cs b/Samples/Diadoc.Samples/PostXmlProformaInvoice29.cs new file mode 100644 index 00000000..1aed204a --- /dev/null +++ b/Samples/Diadoc.Samples/PostXmlProformaInvoice29.cs @@ -0,0 +1,384 @@ +using System; +using System.IO; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using Diadoc.Api; +using Diadoc.Api.Cryptography; +using Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01; +using Diadoc.Api.Proto; +using Diadoc.Api.Proto.Events; +using Diadoc.Api.Proto.PowersOfAttorney; +using Certificate = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Certificate; +using Electronic = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Electronic; +using OrganizationType_DatabaseOrder = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.OrganizationType_DatabaseOrder; +using PowerOfAttorney = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.PowerOfAttorney; +using RussianAddressUtd970 = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.RussianAddressUtd970; +using Signer = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Signer; +using SignerPosition = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.SignerPosition; +using SignerPositionPositionSource = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.SignerPositionPositionSource; +using Signers = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Signers; +using SignerSignerPowersConfirmationMethod = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.SignerSignerPowersConfirmationMethod; +using Storage = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.Storage; +using StorageFullId = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.StorageFullId; +using StorageUseDefault = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.StorageUseDefault; +using TaxRateUtd970 = Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01.TaxRateUtd970; + +namespace Diadoc.Samples +{ + internal static class PostXmlProformaInvoice29 + { + public static void RunSample() + { + Console.WriteLine("Пример отправки Счета в формате приказа №29"); + Console.WriteLine("==================================================================================="); + + // Для использования API Диадока требуются: + // 1. Крипто-API, предоставляемое операционной системой. Для систем на ОС Windows используйте класс WinApiCrypt. + // 2. Экземпляр класса DiadocApi, проксирующий работу с Диадоком. + var crypt = new WinApiCrypt(); + var diadocApi = new DiadocApi( + Constants.DefaultClientId, + Constants.DefaultApiUrl, + crypt); + + // Авторизуемся в Диадоке. В этом примере используем авторизацию через логин-пароль: + var authToken = diadocApi.Authenticate(Constants.DefaultLogin, Constants.DefaultPassword); + // Также можно использовать авторизацию по сертификату, она описана в примере Authenticate.cs + + // Для отправки комплекта документов требуется подготовить структуру MessageToPost, + // которая и будет содержать отправляемый комплект документов. + + // Для начала, укажем в структуре идентификаторы отправителя и получателя: + var messageToPost = new MessageToPost + { + FromBoxId = Constants.DefaultFromBoxId, + ToBoxId = Constants.DefaultToBoxId + }; + + // Перечислим связку идентификаторов, которая характеризует полный формализованный тип документа в Диадоке + var typeNamedId = "XmlProformaInvoice"; // строковый идентификатор типа Счет + var function = "default"; // функция + var version = "proformainvoice29_05_01_01"; // версия, отвечающая за то, что документ сформирован в формате приказа №29 + + // Укажем наш сертификат + // Далее он понадобится для генерации подписанта в документе и подписания + var certificateRawData = new X509Certificate2(File.ReadAllBytes(Constants.CertificatePath)).RawData; + + // Укажем способ передачи МЧД + // Это поможет сформировать правильно контент документа и запрос + // Подробнее о способах передачи - https://developer.kontur.ru/docs/diadoc-api/ru/latest/instructions/powerofattorney.html#powerofattorney-send + + var powerOfAttorneyType = PowerOfAttorneyType.None; + + // Теперь создадим сам формализованный документ. + // C# SDK Диадока позволяет интеграторам создать объект типа XmlProformaInvoice, + // который получается из кодогенерации упрощенной xsd-схемы титула документа. + var userDataContract = BuildUserDataContract(messageToPost.FromBoxId, certificateRawData, powerOfAttorneyType); + + // Теперь средствами универсального метода генерации мы получим из упрощенного xml + // уже реальный титул документа, который будет удовлетворять приказу №29 + Console.WriteLine("Генерируем титул отправителя..."); + var generatedTitle = diadocApi.GenerateTitleXml( + authToken, + Constants.DefaultFromBoxId, + typeNamedId, + function, + version, + 0, + userDataContract.SerializeToXml()); + Console.WriteLine("Титул отправителя был успешно сгенерирован."); + + // Подпишем полученный титул через WinApiCrypt нашим сертификатом: + Console.WriteLine("Создаём подпись..."); + var content = generatedTitle.Content; + + var signature = crypt.Sign(content, certificateRawData); // здесь лежит бинарное представление подписи к Счету + Console.WriteLine("Создана подпись к документу."); + + // Теперь передадим в структуру информацию о файле. + // Для этого воспользуемся универсальным полем DocumentAttachment — через него можно отправить любой тип. + var documentAttachment = new DocumentAttachment + { + /* + Чтобы Диадок знал, какой тип документа вы хотите отправить, + нужно заполнить поле TypeNamedId (а также Function и Version, если у типа больше одной функции и версии). + Узнать список доступных типов можно через метод-справочник GetDocumentTypes. + + Для наших целей (Счет в формате приказа №29) мы уже подобрали нужную комбинацию выше: + */ + TypeNamedId = typeNamedId, + Function = function, + Version = version, + + // Теперь передадим сам файл Счета и сформированную к нему подпись и МЧД: + SignedContent = BuildSignerContent(content, signature, powerOfAttorneyType), + + Comment = "Здесь можно указать любой текстовый комментарий, который нужно оставить к документу", + CustomDocumentId = "Тут можно указать любой строковый идентификатор, например, для соответствия с вашей учётной системой" + + /* + У каждого типа документа в Диадоке может быть свой набор метаданных. + Их нужно указывать при отправке, если они обязательны. + Узнать набор требуемых метаданных для конкретного набора (тип-функция-версия-порядковый номер титула) + можно через тот же метод-справочник GetDocumentTypes: смотрите поля MetadataItems. + + Для формализованных документов метаданные обычно достаются из xml самим Диадоком. + Если у метаданных указан Source=Xml, отдельно передавать в MessageToPost их не нужно. + */ + }; + + // Добавим информацию о документе в MessageToPost: + messageToPost.DocumentAttachments.Add(documentAttachment); + + // Наконец отправляем подготовленный комплект документов через Диадок + Console.WriteLine("Отправляем пакет из одного Счета..."); + Console.WriteLine("Из ящика: " + messageToPost.FromBoxId); + Console.WriteLine("В ящик: " + messageToPost.ToBoxId); + + var response = diadocApi.PostMessage(authToken, messageToPost); + + // При необходимости можно обработать ответ сервера (например, можно получить + // и сохранить для последующей обработки идентификатор сообщения) + Console.WriteLine("Документ был успешно загружен."); + Console.WriteLine("MessageID: " + response.MessageId); + Console.WriteLine("Количество сущностей в сообщении: " + response.Entities.Count); + + // В ответе будет две сущности, т.к. контент и подпись к нему хранятся отдельно друг от друга. + // Выведем информацию о самом документе. Это можно сделать так: + var responseDocument = response.Entities.FirstOrDefault(e => string.IsNullOrEmpty(e.ParentEntityId)); // т.к. у документа нет "родительских сущностей" + Console.WriteLine("Идентификатор документа: " + responseDocument.EntityId); + Console.WriteLine("Название документа: " + responseDocument.DocumentInfo.Title); + } + + private static SignedContent BuildSignerContent(byte[] content, byte[] signature, PowerOfAttorneyType powerOfAttorneyType) + { + // https://developer.kontur.ru/docs/diadoc-api/ru/latest/proto/SignedContent.html + return new SignedContent + { + Content = content, + Signature = signature, + PowerOfAttorney = powerOfAttorneyType != PowerOfAttorneyType.None + ? BuildPowerOfAttorneyToPost(powerOfAttorneyType) + : null + }; + } + + private static XmlProformaInvoice BuildUserDataContract(string senderBoxId, byte[] certificateRawData, PowerOfAttorneyType powerOfAttorneyType) + { + // Ниже перечислены минимально необходимые поля для генерации титула отправителя. + var xmlProformaInvoice = new XmlProformaInvoice + { + Function = XmlProformaInvoiceFunction.Item0, + DocumentDate = "01.01.2020", + DocumentNumber = "134", + Seller = GetSellerInfo(), //Данные организации продавца + Buyer = GetBuyerInfo(), //Данные организации покупателя + Table = BuildTableSample(), //Табличная часть документа + Currency = "643", + + // Передадим информацию о подписанте документа, т.е. персональные данные сотрудника, который подписывает документ. + // Эти данные осядут в самом xml: + Signers = BuildSigners(senderBoxId, certificateRawData, powerOfAttorneyType) + }; + + return xmlProformaInvoice; + } + + private static ProformaInvoiceTable BuildTableSample() + { + return new ProformaInvoiceTable + { + Item = new[] + { + new ProformaInvoiceTableItem + { + Product = "товар", + Unit = "796", + Quantity = 10, + QuantitySpecified = true, + TaxRate = TaxRateUtd970.TenPercent, + TaxRateSpecified = true, + Price = 10, + PriceSpecified = true, + SubtotalWithVatExcluded = 100, + VatWithoutDiscount = 10, + VatWithoutDiscountSpecified = true, + Vat = 10, + VatSpecified = true, + Subtotal = 110, + } + }, + Total = 110, + TotalWithVatExcluded = 0, + Vat = 10m, + VatSpecified = true + }; + } + + private static Signers BuildSigners(string senderBoxId, byte[] certificateRawData, PowerOfAttorneyType powerOfAttorneyType) + { + var signers = new Signers + { + BoxId = senderBoxId, + Signer = new[] + { + new Signer + { + Certificate = new Certificate { CertificateBytes = certificateRawData }, + Position = new SignerPosition + { + // Автоматическое заполнение должности из настроек сотрудника указанных в сервисе + // Более подробное описание работы см. в xsd-cхеме + PositionSource = SignerPositionPositionSource.StorageByTitleTypeId + }, + SignerPowersConfirmationMethod = SignerPowersConfirmationMethodConvert(powerOfAttorneyType), + SignerPowersConfirmationMethodSpecified = true + } + } + }; + + if (powerOfAttorneyType != PowerOfAttorneyType.InDocumentContent) return signers; + + //Если мы собираемся заполнить данные о электронной доверенности в самом документе: + signers.Signer.FirstOrDefault().PowerOfAttorney = BuildSignerElectronicPowerOfAttorney(); + return signers; + } + + private static PowerOfAttorney BuildSignerElectronicPowerOfAttorney() + { + return new PowerOfAttorney + { + Electronic = new Electronic + { + Item = new Storage + { + FullId = new StorageFullId + { + IssuerInn = "<ИНН доверителя из МЧД>", + RegistrationNumber = "<Регистрационный номер МЧД в формате GUID>" + }, + // Подробнее о флаге UseDefault - https://developer.kontur.ru/docs/diadoc-api/ru/latest/proto/PowerOfAttorneyToPost.html?highlight=usedefault + UseDefault = StorageUseDefault.@false + } + } + }; + } + + private static PowerOfAttorneyToPost BuildPowerOfAttorneyToPost(PowerOfAttorneyType powerOfAttorneyType) + { + // PowerOfAttorneyToPost - https://developer.kontur.ru/docs/diadoc-api/ru/latest/proto/PowerOfAttorneyToPost.html + switch (powerOfAttorneyType) + { + case PowerOfAttorneyType.None: + return null; + case PowerOfAttorneyType.FileAsMeta: + return BuildPowerOfAttorneyToPostInMeta(); + case PowerOfAttorneyType.InDocumentContent: + return BuildPowerOfAttorneyToPostInDocumentContent(); + default: + return null; + } + } + + private static PowerOfAttorneyToPost BuildPowerOfAttorneyToPostInDocumentContent() + { + return new PowerOfAttorneyToPost + { + UseDocumentContent = true + }; + } + + private static PowerOfAttorneyToPost BuildPowerOfAttorneyToPostInMeta() + { + const string powerOfAttorneyPath = @"<Путь до файла доверенности>"; + const string powerOfAttorneySignaturePath = @"<Путь до файла подписи доверенности>"; + + var powerOfAttorneyContent = File.ReadAllBytes(powerOfAttorneyPath); + var powerOfAttorneySignatureContent = File.ReadAllBytes(powerOfAttorneySignaturePath); + + return new PowerOfAttorneyToPost + { + Contents = + { + new PowerOfAttorneySignedContent + { + Content = new Content_v3 { Content = powerOfAttorneyContent }, + Signature = new Content_v3 { Content = powerOfAttorneySignatureContent } + } + } + }; + } + + private static SignerSignerPowersConfirmationMethod SignerPowersConfirmationMethodConvert(PowerOfAttorneyType signerPowersConfirmationMethod) + { + switch (signerPowersConfirmationMethod) + { + // Описание значений и другие варианты см. в xsd-схеме + case PowerOfAttorneyType.None: + return SignerSignerPowersConfirmationMethod.Item6; + case PowerOfAttorneyType.FileAsMeta: + return SignerSignerPowersConfirmationMethod.Item4; + case PowerOfAttorneyType.InDocumentContent: + return SignerSignerPowersConfirmationMethod.Item3; + default: + return SignerSignerPowersConfirmationMethod.Item6; + } + } + + private static ExtendedOrganizationInfoXmlProformaInvoice29 GetSellerInfo() + { + return new ExtendedOrganizationInfoXmlProformaInvoice29 + { + Item = new ExtendedOrganizationDetailsXmlProformaInvoice29 + { + Inn = "7750370238", + Kpp = "770100101", + FnsParticipantId = "2BM-Seller", + OrgType = OrganizationType_DatabaseOrder.Item2, //ЮЛ + OrgName = "ЗАО Очень Древний Папирус", + Address = new AddressXmlProformaInvoice29 + { + Item = new RussianAddressUtd970 + { + Region = "66" + } + }, + BankId = "123456789", + CorrespondentAccount = "CorrespondentAccount", + BankAccountNumber = "BankAccountNumber" + + } + + }; + } + + private static ExtendedOrganizationInfoXmlProformaInvoice29 GetBuyerInfo() + { + return new ExtendedOrganizationInfoXmlProformaInvoice29 + { + Item = new ExtendedOrganizationDetailsXmlProformaInvoice29 + { + Inn = "9500000005", + Kpp = "667301001", + FnsParticipantId = "2BM-Buyer", + OrgType = OrganizationType_DatabaseOrder.Item2, //ЮЛ + OrgName = "ООО Тестовое Юрлицо обычное", + Address = new AddressXmlProformaInvoice29 + { + Item = new RussianAddressUtd970 + { + Region = "66" + } + } + } + }; + } + + private enum PowerOfAttorneyType + { + None, // Без МЧД + FileAsMeta, // Файлом представленным в метаданных документа + InDocumentContent // Информация об МЧД находится в содержимом документа + } + } +} diff --git a/Samples/Diadoc.Samples/Program.cs b/Samples/Diadoc.Samples/Program.cs index 5687bed9..2d9ecc08 100644 --- a/Samples/Diadoc.Samples/Program.cs +++ b/Samples/Diadoc.Samples/Program.cs @@ -16,6 +16,8 @@ private static void Main() PostUniversalTransferDocument970.RunSample(); PostXmlAcceptanceCertificateRezru552.RunSample(); PostXmlTorg12TovTorg551.RunSample(); + PostXmlProformaInvoice29.RunSample(); + PostXmlInvoiceOffer29.RunSample(); PatchDocumentWithReceipt.RunSample(); } catch (Exception ex) diff --git a/proto/Invoicing/ExtendedSigner.proto b/proto/Invoicing/ExtendedSigner.proto index 3835c60b..9e89c34c 100644 --- a/proto/Invoicing/ExtendedSigner.proto +++ b/proto/Invoicing/ExtendedSigner.proto @@ -88,4 +88,5 @@ enum DocumentTitleType { Ucd736Buyer = 11; // Данные для титула покупателя УКД формата приказа 736 Utd970Seller = 12; // Данные для титула продавца УПД формата приказа 970 Utd970Buyer = 13; // Данные для титула покупателя УПД формата приказа 970 + ProformaInvoice29 = 14; // Данные для титула продавца формата приказа 29 } \ No newline at end of file diff --git a/src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.cs b/src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.cs new file mode 100644 index 00000000..2480a1f0 --- /dev/null +++ b/src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.cs @@ -0,0 +1,3309 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +// +// Этот исходный код был создан с помощью xsd, версия=4.8.3928.0. +// +namespace Diadoc.Api.DataXml.ON_CHETOP_UserContract_05_01_01 { + using System.Xml.Serialization; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)] + public partial class XmlProformaInvoice { + + private XmlProformaInvoiceProformaInvoiceBase[] proformaInvoiceBasesField; + + private ExtendedOrganizationInfoXmlProformaInvoice29 moneyRecipientField; + + private ExtendedOrganizationInfoXmlProformaInvoice29 payerField; + + private ExtendedOrganizationInfoXmlProformaInvoice29 sellerField; + + private ExtendedOrganizationInfoXmlProformaInvoice29 buyerField; + + private ExtendedOrganizationInfoXmlProformaInvoice29 shipperField; + + private ExtendedOrganizationInfoXmlProformaInvoice29 consigneeField; + + private XmlProformaInvoiceCommitmentType[] commitmentTypesField; + + private ProformaInvoiceAdditionalInfo proformaInvoiceAdditionalInfoField; + + private ProformaInvoiceTable tableField; + + private Signers signersField; + + private AdditionalInfoId[] additionalInfosField; + + private XmlProformaInvoiceFunction functionField; + + private string documentDateField; + + private string documentNumberField; + + private string currencyField; + + private decimal currencyRateField; + + private bool currencyRateFieldSpecified; + + private bool isConventionalUnitField; + + private string conventionalUnitDefinitionField; + + private string totalItemsField; + + public XmlProformaInvoice() { + this.isConventionalUnitField = false; + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("ProformaInvoiceBase", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public XmlProformaInvoiceProformaInvoiceBase[] ProformaInvoiceBases { + get { + return this.proformaInvoiceBasesField; + } + set { + this.proformaInvoiceBasesField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ExtendedOrganizationInfoXmlProformaInvoice29 MoneyRecipient { + get { + return this.moneyRecipientField; + } + set { + this.moneyRecipientField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ExtendedOrganizationInfoXmlProformaInvoice29 Payer { + get { + return this.payerField; + } + set { + this.payerField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ExtendedOrganizationInfoXmlProformaInvoice29 Seller { + get { + return this.sellerField; + } + set { + this.sellerField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ExtendedOrganizationInfoXmlProformaInvoice29 Buyer { + get { + return this.buyerField; + } + set { + this.buyerField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ExtendedOrganizationInfoXmlProformaInvoice29 Shipper { + get { + return this.shipperField; + } + set { + this.shipperField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ExtendedOrganizationInfoXmlProformaInvoice29 Consignee { + get { + return this.consigneeField; + } + set { + this.consigneeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("CommitmentType", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public XmlProformaInvoiceCommitmentType[] CommitmentTypes { + get { + return this.commitmentTypesField; + } + set { + this.commitmentTypesField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ProformaInvoiceAdditionalInfo ProformaInvoiceAdditionalInfo { + get { + return this.proformaInvoiceAdditionalInfoField; + } + set { + this.proformaInvoiceAdditionalInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ProformaInvoiceTable Table { + get { + return this.tableField; + } + set { + this.tableField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Signers Signers { + get { + return this.signersField; + } + set { + this.signersField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public AdditionalInfoId[] AdditionalInfos { + get { + return this.additionalInfosField; + } + set { + this.additionalInfosField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public XmlProformaInvoiceFunction Function { + get { + return this.functionField; + } + set { + this.functionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string DocumentDate { + get { + return this.documentDateField; + } + set { + this.documentDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string DocumentNumber { + get { + return this.documentNumberField; + } + set { + this.documentNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Currency { + get { + return this.currencyField; + } + set { + this.currencyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal CurrencyRate { + get { + return this.currencyRateField; + } + set { + this.currencyRateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool CurrencyRateSpecified { + get { + return this.currencyRateFieldSpecified; + } + set { + this.currencyRateFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(false)] + public bool IsConventionalUnit { + get { + return this.isConventionalUnitField; + } + set { + this.isConventionalUnitField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ConventionalUnitDefinition { + get { + return this.conventionalUnitDefinitionField; + } + set { + this.conventionalUnitDefinitionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="integer")] + public string TotalItems { + get { + return this.totalItemsField; + } + set { + this.totalItemsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class XmlProformaInvoiceProformaInvoiceBase { + + private object itemField; + + /// + [System.Xml.Serialization.XmlElementAttribute("OtherBase", typeof(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlElementAttribute("ProformaInvoiceBaseDocument", typeof(DocumentRequisitesType), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public object Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DocumentRequisitesType { + + private IdentificationDetails[] identificationDetailsField; + + private string documentNameField; + + private string documentNumberField; + + private string documentDateField; + + private string fileIdField; + + private string idField; + + private string systemIdField; + + private string systemUrlField; + + private string additionalInfoField; + + /// + [System.Xml.Serialization.XmlElementAttribute("IdentificationDetails", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public IdentificationDetails[] IdentificationDetails { + get { + return this.identificationDetailsField; + } + set { + this.identificationDetailsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string DocumentName { + get { + return this.documentNameField; + } + set { + this.documentNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string DocumentNumber { + get { + return this.documentNumberField; + } + set { + this.documentNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string DocumentDate { + get { + return this.documentDateField; + } + set { + this.documentDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string FileId { + get { + return this.fileIdField; + } + set { + this.fileIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Id { + get { + return this.idField; + } + set { + this.idField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string SystemId { + get { + return this.systemIdField; + } + set { + this.systemIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string SystemUrl { + get { + return this.systemUrlField; + } + set { + this.systemUrlField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string AdditionalInfo { + get { + return this.additionalInfoField; + } + set { + this.additionalInfoField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class IdentificationDetails { + + private string innField; + + private string shortNameExecutiveAuthorityField; + + private IdentificationDetailsStatusId statusIdField; + + private bool statusIdFieldSpecified; + + private string countryField; + + private string orgNameField; + + private string legalEntityIdField; + + private string organizationOrPersonInfoField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Inn { + get { + return this.innField; + } + set { + this.innField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ShortNameExecutiveAuthority { + get { + return this.shortNameExecutiveAuthorityField; + } + set { + this.shortNameExecutiveAuthorityField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public IdentificationDetailsStatusId StatusId { + get { + return this.statusIdField; + } + set { + this.statusIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool StatusIdSpecified { + get { + return this.statusIdFieldSpecified; + } + set { + this.statusIdFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Country { + get { + return this.countryField; + } + set { + this.countryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OrgName { + get { + return this.orgNameField; + } + set { + this.orgNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string LegalEntityId { + get { + return this.legalEntityIdField; + } + set { + this.legalEntityIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OrganizationOrPersonInfo { + get { + return this.organizationOrPersonInfoField; + } + set { + this.organizationOrPersonInfoField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum IdentificationDetailsStatusId { + + /// + LegalEntity, + + /// + PhysicalPerson, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Paper { + + private Fio personField; + + private string internalNumberField; + + private string registrationDateField; + + private string issuerInfoField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Fio Person { + get { + return this.personField; + } + set { + this.personField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string InternalNumber { + get { + return this.internalNumberField; + } + set { + this.internalNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string RegistrationDate { + get { + return this.registrationDateField; + } + set { + this.registrationDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string IssuerInfo { + get { + return this.issuerInfoField; + } + set { + this.issuerInfoField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Fio { + + private string lastNameField; + + private string firstNameField; + + private string middleNameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string LastName { + get { + return this.lastNameField; + } + set { + this.lastNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string FirstName { + get { + return this.firstNameField; + } + set { + this.firstNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string MiddleName { + get { + return this.middleNameField; + } + set { + this.middleNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Manual { + + private string registrationNumberField; + + private string registrationDateField; + + private string internalNumberField; + + private string internalDateField; + + private string systemIdField; + + private string systemUrlField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string RegistrationNumber { + get { + return this.registrationNumberField; + } + set { + this.registrationNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string RegistrationDate { + get { + return this.registrationDateField; + } + set { + this.registrationDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string InternalNumber { + get { + return this.internalNumberField; + } + set { + this.internalNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string InternalDate { + get { + return this.internalDateField; + } + set { + this.internalDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string SystemId { + get { + return this.systemIdField; + } + set { + this.systemIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string SystemUrl { + get { + return this.systemUrlField; + } + set { + this.systemUrlField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Storage { + + private StorageFullId fullIdField; + + private StorageUseDefault useDefaultField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public StorageFullId FullId { + get { + return this.fullIdField; + } + set { + this.fullIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public StorageUseDefault UseDefault { + get { + return this.useDefaultField; + } + set { + this.useDefaultField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class StorageFullId { + + private string registrationNumberField; + + private string issuerInnField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string RegistrationNumber { + get { + return this.registrationNumberField; + } + set { + this.registrationNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string IssuerInn { + get { + return this.issuerInnField; + } + set { + this.issuerInnField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum StorageUseDefault { + + /// + @true, + + /// + @false, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Electronic { + + private object itemField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Manual", typeof(Manual), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlElementAttribute("Storage", typeof(Storage), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public object Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class PowerOfAttorney { + + private Electronic electronicField; + + private Paper paperField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Electronic Electronic { + get { + return this.electronicField; + } + set { + this.electronicField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Paper Paper { + get { + return this.paperField; + } + set { + this.paperField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Certificate { + + private string certificateThumbprintField; + + private byte[] certificateBytesField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string CertificateThumbprint { + get { + return this.certificateThumbprintField; + } + set { + this.certificateThumbprintField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="base64Binary")] + public byte[] CertificateBytes { + get { + return this.certificateBytesField; + } + set { + this.certificateBytesField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Signer { + + private Certificate certificateField; + + private Fio fioField; + + private SignerPosition positionField; + + private SignerSignerAdditionalInfo signerAdditionalInfoField; + + private PowerOfAttorney powerOfAttorneyField; + + private SignerSignerStatus signerStatusField; + + private bool signerStatusFieldSpecified; + + private SignerSignatureType signatureTypeField; + + private bool signatureTypeFieldSpecified; + + private string signingDateField; + + private SignerSignerPowersConfirmationMethod signerPowersConfirmationMethodField; + + private bool signerPowersConfirmationMethodFieldSpecified; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Certificate Certificate { + get { + return this.certificateField; + } + set { + this.certificateField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Fio Fio { + get { + return this.fioField; + } + set { + this.fioField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public SignerPosition Position { + get { + return this.positionField; + } + set { + this.positionField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public SignerSignerAdditionalInfo SignerAdditionalInfo { + get { + return this.signerAdditionalInfoField; + } + set { + this.signerAdditionalInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public PowerOfAttorney PowerOfAttorney { + get { + return this.powerOfAttorneyField; + } + set { + this.powerOfAttorneyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public SignerSignerStatus SignerStatus { + get { + return this.signerStatusField; + } + set { + this.signerStatusField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SignerStatusSpecified { + get { + return this.signerStatusFieldSpecified; + } + set { + this.signerStatusFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public SignerSignatureType SignatureType { + get { + return this.signatureTypeField; + } + set { + this.signatureTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SignatureTypeSpecified { + get { + return this.signatureTypeFieldSpecified; + } + set { + this.signatureTypeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string SigningDate { + get { + return this.signingDateField; + } + set { + this.signingDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public SignerSignerPowersConfirmationMethod SignerPowersConfirmationMethod { + get { + return this.signerPowersConfirmationMethodField; + } + set { + this.signerPowersConfirmationMethodField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SignerPowersConfirmationMethodSpecified { + get { + return this.signerPowersConfirmationMethodFieldSpecified; + } + set { + this.signerPowersConfirmationMethodFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class SignerPosition { + + private SignerPositionPositionSource positionSourceField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public SignerPositionPositionSource PositionSource { + get { + return this.positionSourceField; + } + set { + this.positionSourceField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum SignerPositionPositionSource { + + /// + Employee, + + /// + Certificate, + + /// + StorageByTitleTypeId, + + /// + Manual, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class SignerSignerAdditionalInfo { + + private SignerSignerAdditionalInfoSignerAdditionalInfoSource signerAdditionalInfoSourceField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public SignerSignerAdditionalInfoSignerAdditionalInfoSource SignerAdditionalInfoSource { + get { + return this.signerAdditionalInfoSourceField; + } + set { + this.signerAdditionalInfoSourceField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum SignerSignerAdditionalInfoSignerAdditionalInfoSource { + + /// + StorageByTitleTypeId, + + /// + Manual, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum SignerSignerStatus { + + /// + [System.Xml.Serialization.XmlEnumAttribute("1")] + Item1, + + /// + [System.Xml.Serialization.XmlEnumAttribute("2")] + Item2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("3")] + Item3, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum SignerSignatureType { + + /// + [System.Xml.Serialization.XmlEnumAttribute("1")] + Item1, + + /// + [System.Xml.Serialization.XmlEnumAttribute("2")] + Item2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("3")] + Item3, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum SignerSignerPowersConfirmationMethod { + + /// + [System.Xml.Serialization.XmlEnumAttribute("1")] + Item1, + + /// + [System.Xml.Serialization.XmlEnumAttribute("2")] + Item2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("3")] + Item3, + + /// + [System.Xml.Serialization.XmlEnumAttribute("4")] + Item4, + + /// + [System.Xml.Serialization.XmlEnumAttribute("5")] + Item5, + + /// + [System.Xml.Serialization.XmlEnumAttribute("6")] + Item6, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class Signers { + + private Signer[] signerField; + + private string boxIdField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Signer", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public Signer[] Signer { + get { + return this.signerField; + } + set { + this.signerField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string BoxId { + get { + return this.boxIdField; + } + set { + this.boxIdField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ProformaInvoiceTable { + + private ProformaInvoiceTableItem[] itemField; + + private decimal totalWithVatExcludedField; + + private decimal vatField; + + private bool vatFieldSpecified; + + private ProformaInvoiceTableWithoutVat withoutVatField; + + private decimal totalField; + + private decimal totalDiscountSumField; + + private bool totalDiscountSumFieldSpecified; + + public ProformaInvoiceTable() { + this.withoutVatField = ProformaInvoiceTableWithoutVat.@false; + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Item", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ProformaInvoiceTableItem[] Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal TotalWithVatExcluded { + get { + return this.totalWithVatExcludedField; + } + set { + this.totalWithVatExcludedField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal Vat { + get { + return this.vatField; + } + set { + this.vatField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool VatSpecified { + get { + return this.vatFieldSpecified; + } + set { + this.vatFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(ProformaInvoiceTableWithoutVat.@false)] + public ProformaInvoiceTableWithoutVat WithoutVat { + get { + return this.withoutVatField; + } + set { + this.withoutVatField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal Total { + get { + return this.totalField; + } + set { + this.totalField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal TotalDiscountSum { + get { + return this.totalDiscountSumField; + } + set { + this.totalDiscountSumField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool TotalDiscountSumSpecified { + get { + return this.totalDiscountSumFieldSpecified; + } + set { + this.totalDiscountSumFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class ProformaInvoiceTableItem { + + private AdditionalInfoId[] additionalInfosField; + + private ProformaInvoiceTableItemStateSystemItemInfo[] stateSystemItemInfosField; + + private string productField; + + private string unitField; + + private string unitNameField; + + private decimal quantityField; + + private bool quantityFieldSpecified; + + private decimal priceField; + + private bool priceFieldSpecified; + + private decimal priceWithoutDiscountField; + + private bool priceWithoutDiscountFieldSpecified; + + private TaxRateUtd970 taxRateField; + + private bool taxRateFieldSpecified; + + private string otherTaxRateField; + + private decimal discountSumField; + + private bool discountSumFieldSpecified; + + private string discountPercentField; + + private decimal subtotalWithVatExcludedField; + + private decimal subtotalWithoutVatAndDiscountField; + + private bool subtotalWithoutVatAndDiscountFieldSpecified; + + private decimal vatField; + + private bool vatFieldSpecified; + + private decimal vatWithoutDiscountField; + + private bool vatWithoutDiscountFieldSpecified; + + private ProformaInvoiceTableItemWithoutVat withoutVatField; + + private decimal subtotalField; + + private decimal subtotalWithoutDiscountField; + + private bool subtotalWithoutDiscountFieldSpecified; + + private ProformaInvoiceTableItemItemMark itemMarkField; + + private bool itemMarkFieldSpecified; + + private string additionalPropertyField; + + private string itemVendorCodeField; + + private string countryField; + + private string itemCharactField; + + private string itemArticleField; + + private string itemKindField; + + private string itemSeriesField; + + private string catalogCodeField; + + private string itemTypeCodeField; + + public ProformaInvoiceTableItem() { + this.withoutVatField = ProformaInvoiceTableItemWithoutVat.@false; + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public AdditionalInfoId[] AdditionalInfos { + get { + return this.additionalInfosField; + } + set { + this.additionalInfosField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("StateSystemItemInfo", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public ProformaInvoiceTableItemStateSystemItemInfo[] StateSystemItemInfos { + get { + return this.stateSystemItemInfosField; + } + set { + this.stateSystemItemInfosField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Product { + get { + return this.productField; + } + set { + this.productField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Unit { + get { + return this.unitField; + } + set { + this.unitField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string UnitName { + get { + return this.unitNameField; + } + set { + this.unitNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal Quantity { + get { + return this.quantityField; + } + set { + this.quantityField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool QuantitySpecified { + get { + return this.quantityFieldSpecified; + } + set { + this.quantityFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal Price { + get { + return this.priceField; + } + set { + this.priceField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PriceSpecified { + get { + return this.priceFieldSpecified; + } + set { + this.priceFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal PriceWithoutDiscount { + get { + return this.priceWithoutDiscountField; + } + set { + this.priceWithoutDiscountField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PriceWithoutDiscountSpecified { + get { + return this.priceWithoutDiscountFieldSpecified; + } + set { + this.priceWithoutDiscountFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public TaxRateUtd970 TaxRate { + get { + return this.taxRateField; + } + set { + this.taxRateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool TaxRateSpecified { + get { + return this.taxRateFieldSpecified; + } + set { + this.taxRateFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OtherTaxRate { + get { + return this.otherTaxRateField; + } + set { + this.otherTaxRateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal DiscountSum { + get { + return this.discountSumField; + } + set { + this.discountSumField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DiscountSumSpecified { + get { + return this.discountSumFieldSpecified; + } + set { + this.discountSumFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="integer")] + public string DiscountPercent { + get { + return this.discountPercentField; + } + set { + this.discountPercentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal SubtotalWithVatExcluded { + get { + return this.subtotalWithVatExcludedField; + } + set { + this.subtotalWithVatExcludedField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal SubtotalWithoutVatAndDiscount { + get { + return this.subtotalWithoutVatAndDiscountField; + } + set { + this.subtotalWithoutVatAndDiscountField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SubtotalWithoutVatAndDiscountSpecified { + get { + return this.subtotalWithoutVatAndDiscountFieldSpecified; + } + set { + this.subtotalWithoutVatAndDiscountFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal Vat { + get { + return this.vatField; + } + set { + this.vatField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool VatSpecified { + get { + return this.vatFieldSpecified; + } + set { + this.vatFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal VatWithoutDiscount { + get { + return this.vatWithoutDiscountField; + } + set { + this.vatWithoutDiscountField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool VatWithoutDiscountSpecified { + get { + return this.vatWithoutDiscountFieldSpecified; + } + set { + this.vatWithoutDiscountFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(ProformaInvoiceTableItemWithoutVat.@false)] + public ProformaInvoiceTableItemWithoutVat WithoutVat { + get { + return this.withoutVatField; + } + set { + this.withoutVatField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal Subtotal { + get { + return this.subtotalField; + } + set { + this.subtotalField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public decimal SubtotalWithoutDiscount { + get { + return this.subtotalWithoutDiscountField; + } + set { + this.subtotalWithoutDiscountField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SubtotalWithoutDiscountSpecified { + get { + return this.subtotalWithoutDiscountFieldSpecified; + } + set { + this.subtotalWithoutDiscountFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ProformaInvoiceTableItemItemMark ItemMark { + get { + return this.itemMarkField; + } + set { + this.itemMarkField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ItemMarkSpecified { + get { + return this.itemMarkFieldSpecified; + } + set { + this.itemMarkFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string AdditionalProperty { + get { + return this.additionalPropertyField; + } + set { + this.additionalPropertyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ItemVendorCode { + get { + return this.itemVendorCodeField; + } + set { + this.itemVendorCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Country { + get { + return this.countryField; + } + set { + this.countryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ItemCharact { + get { + return this.itemCharactField; + } + set { + this.itemCharactField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ItemArticle { + get { + return this.itemArticleField; + } + set { + this.itemArticleField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ItemKind { + get { + return this.itemKindField; + } + set { + this.itemKindField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ItemSeries { + get { + return this.itemSeriesField; + } + set { + this.itemSeriesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string CatalogCode { + get { + return this.catalogCodeField; + } + set { + this.catalogCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ItemTypeCode { + get { + return this.itemTypeCodeField; + } + set { + this.itemTypeCodeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AdditionalInfoId { + + private AdditionalInfo[] additionalInfoField; + + private string infoFileIdField; + + /// + [System.Xml.Serialization.XmlElementAttribute("AdditionalInfo", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AdditionalInfo[] AdditionalInfo { + get { + return this.additionalInfoField; + } + set { + this.additionalInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string InfoFileId { + get { + return this.infoFileIdField; + } + set { + this.infoFileIdField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AdditionalInfo { + + private string idField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Id { + get { + return this.idField; + } + set { + this.idField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class ProformaInvoiceTableItemStateSystemItemInfo { + + private string[] stateSystemIdField; + + private string stateSystemNameField; + + private string accountingUnitField; + + private string otherInfoField; + + /// + [System.Xml.Serialization.XmlElementAttribute("StateSystemId", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string[] StateSystemId { + get { + return this.stateSystemIdField; + } + set { + this.stateSystemIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string StateSystemName { + get { + return this.stateSystemNameField; + } + set { + this.stateSystemNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string AccountingUnit { + get { + return this.accountingUnitField; + } + set { + this.accountingUnitField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OtherInfo { + get { + return this.otherInfoField; + } + set { + this.otherInfoField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + public enum TaxRateUtd970 { + + /// + NoVat, + + /// + ZeroPercent, + + /// + FivePercent, + + /// + SevenPercent, + + /// + NinePointZeroNinePercent, + + /// + TenPercent, + + /// + SixteenPointSixtySevenPercent, + + /// + TwentyPercent, + + /// + FiveFraction, + + /// + SevenFraction, + + /// + TenFraction, + + /// + TwentyFraction, + + /// + TaxedByAgent, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum ProformaInvoiceTableItemWithoutVat { + + /// + @true, + + /// + @false, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum ProformaInvoiceTableItemItemMark { + + /// + [System.Xml.Serialization.XmlEnumAttribute("1")] + Item1, + + /// + [System.Xml.Serialization.XmlEnumAttribute("2")] + Item2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("3")] + Item3, + + /// + [System.Xml.Serialization.XmlEnumAttribute("4")] + Item4, + + /// + [System.Xml.Serialization.XmlEnumAttribute("5")] + Item5, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum ProformaInvoiceTableWithoutVat { + + /// + @true, + + /// + @false, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ProformaInvoiceAdditionalInfo { + + private string[] paymentTermsField; + + private string[] shipmentTermsField; + + private AdditionalInfoId[] additionalInfosField; + + private string dateRestrictionField; + + private string dateAndTimeRestrictionField; + + private string startShipmentDateField; + + private string paymentPurposeField; + + private string uniquePaymentInfoField; + + private string paymentMethodField; + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("PaymentTerm", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public string[] PaymentTerms { + get { + return this.paymentTermsField; + } + set { + this.paymentTermsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("ShipmentTerm", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public string[] ShipmentTerms { + get { + return this.shipmentTermsField; + } + set { + this.shipmentTermsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public AdditionalInfoId[] AdditionalInfos { + get { + return this.additionalInfosField; + } + set { + this.additionalInfosField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string DateRestriction { + get { + return this.dateRestrictionField; + } + set { + this.dateRestrictionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string DateAndTimeRestriction { + get { + return this.dateAndTimeRestrictionField; + } + set { + this.dateAndTimeRestrictionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string StartShipmentDate { + get { + return this.startShipmentDateField; + } + set { + this.startShipmentDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string PaymentPurpose { + get { + return this.paymentPurposeField; + } + set { + this.paymentPurposeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string UniquePaymentInfo { + get { + return this.uniquePaymentInfoField; + } + set { + this.uniquePaymentInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string PaymentMethod { + get { + return this.paymentMethodField; + } + set { + this.paymentMethodField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ForeignAddressUtd970 { + + private string countryField; + + private string addressField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Country { + get { + return this.countryField; + } + set { + this.countryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Address { + get { + return this.addressField; + } + set { + this.addressField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddressElement { + + private string typeField; + + private string nameOrNumberField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string NameOrNumber { + get { + return this.nameOrNumberField; + } + set { + this.nameOrNumberField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GarAddress { + + private AddressElement municipalTerritoryField; + + private AddressElement urbanSettlementField; + + private AddressElement localityField; + + private AddressElement elementPlanningStructureField; + + private AddressElement elementRoadNetworkField; + + private AddressElement[] buildingsField; + + private AddressElement roomBuildingField; + + private AddressElement roomApartmentField; + + private string addressCodeField; + + private string zipCodeField; + + private string regionField; + + private string landPlotField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressElement MunicipalTerritory { + get { + return this.municipalTerritoryField; + } + set { + this.municipalTerritoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressElement UrbanSettlement { + get { + return this.urbanSettlementField; + } + set { + this.urbanSettlementField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressElement Locality { + get { + return this.localityField; + } + set { + this.localityField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressElement ElementPlanningStructure { + get { + return this.elementPlanningStructureField; + } + set { + this.elementPlanningStructureField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressElement ElementRoadNetwork { + get { + return this.elementRoadNetworkField; + } + set { + this.elementRoadNetworkField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("Building", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public AddressElement[] Buildings { + get { + return this.buildingsField; + } + set { + this.buildingsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressElement RoomBuilding { + get { + return this.roomBuildingField; + } + set { + this.roomBuildingField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressElement RoomApartment { + get { + return this.roomApartmentField; + } + set { + this.roomApartmentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string AddressCode { + get { + return this.addressCodeField; + } + set { + this.addressCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ZipCode { + get { + return this.zipCodeField; + } + set { + this.zipCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Region { + get { + return this.regionField; + } + set { + this.regionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string LandPlot { + get { + return this.landPlotField; + } + set { + this.landPlotField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RussianAddressUtd970 { + + private string zipCodeField; + + private string regionField; + + private string territoryField; + + private string cityField; + + private string localityField; + + private string streetField; + + private string buildingField; + + private string blockField; + + private string apartmentField; + + private string otherInfoField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ZipCode { + get { + return this.zipCodeField; + } + set { + this.zipCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Region { + get { + return this.regionField; + } + set { + this.regionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Territory { + get { + return this.territoryField; + } + set { + this.territoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string City { + get { + return this.cityField; + } + set { + this.cityField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Locality { + get { + return this.localityField; + } + set { + this.localityField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Street { + get { + return this.streetField; + } + set { + this.streetField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Building { + get { + return this.buildingField; + } + set { + this.buildingField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Block { + get { + return this.blockField; + } + set { + this.blockField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Apartment { + get { + return this.apartmentField; + } + set { + this.apartmentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OtherInfo { + get { + return this.otherInfoField; + } + set { + this.otherInfoField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddressXmlProformaInvoice29 { + + private object itemField; + + private string glnField; + + /// + [System.Xml.Serialization.XmlElementAttribute("ForeignAddress", typeof(ForeignAddressUtd970), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlElementAttribute("GarAddress", typeof(GarAddress), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlElementAttribute("RussianAddress", typeof(RussianAddressUtd970), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public object Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Gln { + get { + return this.glnField; + } + set { + this.glnField = value; + } + } + } + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExtendedOrganizationDetailsXmlProformaInvoice29))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(ExtendedOrganizationReferenceXmlProformaInvoice29))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29 { + + private string[] phonesField; + + private string[] emailsField; + + private string okpoField; + + private string okopfField; + + private string fullNameOkopfField; + + private string departmentField; + + private string organizationAdditionalInfoField; + + private string shortOrgNameField; + + private string ogrnField; + + private string ogrnDateField; + + private string snilsField; + + private string individualEntityRegistrationCertificateField; + + private ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29PersonStatusId personStatusIdField; + + private bool personStatusIdFieldSpecified; + + private string otherContactInfoField; + + private string correspondentAccountField; + + private string bankAccountNumberField; + + private string bankNameField; + + private string bankIdField; + + private string bankInnField; + + private string bankKppField; + + private string swiftCodeField; + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("Phone", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public string[] Phones { + get { + return this.phonesField; + } + set { + this.phonesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlArrayItemAttribute("Email", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] + public string[] Emails { + get { + return this.emailsField; + } + set { + this.emailsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Okpo { + get { + return this.okpoField; + } + set { + this.okpoField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Okopf { + get { + return this.okopfField; + } + set { + this.okopfField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string FullNameOkopf { + get { + return this.fullNameOkopfField; + } + set { + this.fullNameOkopfField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Department { + get { + return this.departmentField; + } + set { + this.departmentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OrganizationAdditionalInfo { + get { + return this.organizationAdditionalInfoField; + } + set { + this.organizationAdditionalInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string ShortOrgName { + get { + return this.shortOrgNameField; + } + set { + this.shortOrgNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Ogrn { + get { + return this.ogrnField; + } + set { + this.ogrnField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OgrnDate { + get { + return this.ogrnDateField; + } + set { + this.ogrnDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Snils { + get { + return this.snilsField; + } + set { + this.snilsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string IndividualEntityRegistrationCertificate { + get { + return this.individualEntityRegistrationCertificateField; + } + set { + this.individualEntityRegistrationCertificateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29PersonStatusId PersonStatusId { + get { + return this.personStatusIdField; + } + set { + this.personStatusIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PersonStatusIdSpecified { + get { + return this.personStatusIdFieldSpecified; + } + set { + this.personStatusIdFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OtherContactInfo { + get { + return this.otherContactInfoField; + } + set { + this.otherContactInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string CorrespondentAccount { + get { + return this.correspondentAccountField; + } + set { + this.correspondentAccountField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string BankAccountNumber { + get { + return this.bankAccountNumberField; + } + set { + this.bankAccountNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string BankName { + get { + return this.bankNameField; + } + set { + this.bankNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string BankId { + get { + return this.bankIdField; + } + set { + this.bankIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string BankInn { + get { + return this.bankInnField; + } + set { + this.bankInnField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string BankKpp { + get { + return this.bankKppField; + } + set { + this.bankKppField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string SwiftCode { + get { + return this.swiftCodeField; + } + set { + this.swiftCodeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29PersonStatusId { + + /// + [System.Xml.Serialization.XmlEnumAttribute("0")] + Item0, + + /// + [System.Xml.Serialization.XmlEnumAttribute("1")] + Item1, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ExtendedOrganizationDetailsXmlProformaInvoice29 : ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29 { + + private AddressXmlProformaInvoice29 addressField; + + private string orgNameField; + + private string innField; + + private string kppField; + + private string fnsParticipantIdField; + + private OrganizationType_DatabaseOrder orgTypeField; + + private ExtendedOrganizationDetailsXmlProformaInvoice29StatusId statusIdField; + + private bool statusIdFieldSpecified; + + private string legalEntityIdField; + + private string countryField; + + private string organizationOrPersonInfoField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public AddressXmlProformaInvoice29 Address { + get { + return this.addressField; + } + set { + this.addressField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OrgName { + get { + return this.orgNameField; + } + set { + this.orgNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Inn { + get { + return this.innField; + } + set { + this.innField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Kpp { + get { + return this.kppField; + } + set { + this.kppField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string FnsParticipantId { + get { + return this.fnsParticipantIdField; + } + set { + this.fnsParticipantIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public OrganizationType_DatabaseOrder OrgType { + get { + return this.orgTypeField; + } + set { + this.orgTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ExtendedOrganizationDetailsXmlProformaInvoice29StatusId StatusId { + get { + return this.statusIdField; + } + set { + this.statusIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool StatusIdSpecified { + get { + return this.statusIdFieldSpecified; + } + set { + this.statusIdFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string LegalEntityId { + get { + return this.legalEntityIdField; + } + set { + this.legalEntityIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Country { + get { + return this.countryField; + } + set { + this.countryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string OrganizationOrPersonInfo { + get { + return this.organizationOrPersonInfoField; + } + set { + this.organizationOrPersonInfoField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + public enum OrganizationType_DatabaseOrder { + + /// + [System.Xml.Serialization.XmlEnumAttribute("1")] + Item1, + + /// + [System.Xml.Serialization.XmlEnumAttribute("2")] + Item2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("3")] + Item3, + + /// + [System.Xml.Serialization.XmlEnumAttribute("4")] + Item4, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum ExtendedOrganizationDetailsXmlProformaInvoice29StatusId { + + /// + LegalEntity, + + /// + PhysicalPerson, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ExtendedOrganizationReferenceXmlProformaInvoice29 : ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29 { + + private string boxIdField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string BoxId { + get { + return this.boxIdField; + } + set { + this.boxIdField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ExtendedOrganizationInfoXmlProformaInvoice29 { + + private ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29 itemField; + + /// + [System.Xml.Serialization.XmlElementAttribute("OrganizationDetails", typeof(ExtendedOrganizationDetailsXmlProformaInvoice29), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + [System.Xml.Serialization.XmlElementAttribute("OrganizationReference", typeof(ExtendedOrganizationReferenceXmlProformaInvoice29), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] + public ExtendedOrganizationDetails_ManualFilling_XmlProformaInvoice29 Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public partial class XmlProformaInvoiceCommitmentType { + + private string commitmentTypeCodeField; + + private string commitmentTypeNameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string CommitmentTypeCode { + get { + return this.commitmentTypeCodeField; + } + set { + this.commitmentTypeCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string CommitmentTypeName { + get { + return this.commitmentTypeNameField; + } + set { + this.commitmentTypeNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum XmlProformaInvoiceFunction { + + /// + [System.Xml.Serialization.XmlEnumAttribute("0")] + Item0, + + /// + [System.Xml.Serialization.XmlEnumAttribute("1")] + Item1, + } +} diff --git a/src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.xsd b/src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.xsd new file mode 100644 index 00000000..4ece0df7 --- /dev/null +++ b/src/DataXml/ProformaInvoice/ON_CHETOP_UserContract_05_01_01.xsd @@ -0,0 +1,3347 @@ + + + + + + + + + + + - + + + + + + - : + + + + + - : + + + + + + + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + + + - + + + + + - + + + + + - + + + + + + + + + + + - ( ) + + + + + + + + + + - + + + + + + + + + + - + 0 ; + 1 - + + + + + + + + + + + + + - ( ) + + + + + - ( ) + + + + + - () + + + + + - + + + + + + + + + + + - + + + + + - + + + + + - (, , ) + + + + + + + + + + + + + + - (, , ) + + + + + + + + + - + + + + + + + + + + + - , + + + + + + + + - + + + + + + + + - + + + + + + + - + + + + + + + - , + + + + + + + + + + + + + - ( , ) + + + + + - + + + + + - . + , Unit=='0000'. + + + + + - () + + + + + + + + + + + + - () + + + + + + + + + + + + - () ( ) + + + + + + + + + + + - + + + + + - + + + + + - + + + + + + + + + + + - + + + + + + + + + + - (, ) + + + + + + + + + + + + - (, , ) ( ) + + + + + + + + + + + - + + + + + + + + + + + + - , ( ) + + + + + + + + + + + + . , + + + + + + + + + + + - (, , ) + + + + + + + + + + + + - (, , ) ( ) + + + + + + + + + + + + - -- + 1 - ; + 2 - ; + 3 - ; + 4 ; + 5 - + + + + + + + + + + + + + + + - + + + + + - ( 1 -) + + + + + + + - + () + 980 - , + 981 - + + + + + + + + + + + + - / + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + + + - + + + + + + + + + + + + - + + + + + + + + + + + + . , + + + + + + + + + + + - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + - / () + + + + + + + + + + + - + + + + + + + + + - () + + + + + - ( ) + + + + + - / () + + + + + - + + + + + - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + - + + + + + + + + + + () - 5 6 0-9 A-Z + + + + + + + + + .. (01.01.1800 - 31.12.2099) + + + + + + + + + .. + + + + + + + + + .. .. (01.01.1800 - 31.12.2099) + + + + + + + + + ..T::CC+-: + + + + + + + + + - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + (GUID) - + + + + + + + + + + + + + - + + + + + + (GUID) - + + + + + + + + + + + + - () + + + + + - + + + + + + + - + + + + + - + + + + + + + + - () + 980 - , + 981 - + + + + + + + + + + + + + + - () + 980 - , + 981 - + + + + + + - , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + Vat + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + , + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + , / + + + + + / + + + + + + / + + + + + + + - - + + + + + - - + + + + + - - + + + + + + + + + + + + + - - + + + + + - - + + + + + - - + + + + + + + + + + + + + - - + + + + + - - + + + + + - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - + + + + + - + + + + + + + + + + + - + + + + + + + + + + + - / + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + + + + + + + + + + - + + + + + - + + + + + - , + + + + + - + + + + + - , + + + + + - + + + + + + + + + + + + - - + + + + + - + + + + + + + + + + + - / + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + + + + + + + + + + - + + + + + - + + + + + - , + + + + + - + + + + + - , + + + + + - + + + + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + - - - + + + + + + - + + + + + + + + + + + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - , + + + + + - + + + + + - / + + + + + - + + + + + - + + + + + + + + + + + + + + + + / - / /, , ( ) + + + + + - - + + + + + + + + + + + + + + + - - - + + + + + - + 'LegalEntity' '' + 'PhysicalPerson' '' + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + - , + + + + + + + + + + + + + - / + + + + + + + + + + + - + + + + + + + + + - + + + + + - - - + + + + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + - + 0 - , + 1 - + + + + + + + + + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + + + + + + + + + + + + + + + + / - / /, , ( ) + + + + + - - + + + + + + + + + + + + + + + - - - + + + + + - + 'LegalEntity' '' + 'PhysicalPerson' '' + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + - , + + + + + + + + + + + + + - / + + + + + + + + + + + - + + + + + + + + + - + + + + + - - - + + + + + + + + + + + - - + + + + + + + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + - + 0 - , + 1 - + + + + + + + + + + + + + - + + + + + - + + + + + - + + + + + - + + + + + + + + + + + + + + + + + + + + SWIFT- + + + + + + + 1 - , // + 2 - // + 3 - , // , + 4 - // + + + + + + + + + + + + + 1 - // + 2 - , // + 3 - // + 4 - , // + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - (GLN ) + + + + + + + + + + + + - (GLN ) + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + + - / / / / + + + + + - / / / + + + + + - (, , ) + + + + + - + + + + + - - + + + + + + + + - (), / + + + + + + + + - (), / - + + + + + - + + + + + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + () + + + + + + + + + + ()/ + + + + + / + + + + + + + + + + + + - , + + + + + - + + + + + + + + + + + - "". + "". + + + + + - , + + + + + () - + + + + + - , + + + + + - , + + + + + + + + + + + + + + + - , + + + + + + + + + + + + + + + + + + + + + + + / () - + + + + + / - , / + + + + + + + - "/" + "/" + + + + + - , + + + + + / (/) + + + + + / - + + + + + + + + + + + + + + + + + + + + + + + - , () + + + + + + - + + + + + - + + + + + - + + + + + - , + + + + + - + + + + + - , , + + + + + - URL , + + + + + - + + + + + + Inn - () + Inn, ShortNameExecutiveAuthority - + Inn ShortNameExecutiveAuthority - + + + + () + + + + + - ( ), + + + + + - + 'LegalEntity' '' + 'PhysicalPerson' '' + + + + + + + + + + + - + + + + + + + + + + + + - /, , ( ) + + + + + - ( ) + + + + + - ( ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , Position + Position , + + + + + + + + + + , Position + Position , + + + + + + + + + @970 . - + Certificate + , ExtendedSignerDetails documentTitleType + , Position + Position , + + + + + + + + + + + + + + + + + + + + + @970 @405 . - + - + + + + + + + + + + + + + + + + + @970 . - + Certificate + , ExtendedSignerDetails documentTitleType + , SignerAdditionalInfo + SignerAdditionalInfo, + + + + + + + + + + + + + + + + + + + + + + + @405 @691 . - + - + + + + + + + + + , + + + + + , + + + + + , + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + @970 . - + - + + + + + + + + + @970 @405 . - + - + + + + + + + + + , + + + + + , , + + + + + , . , + + + + + , . , , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + , + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + + + + , + + + + + + + @970 . - + URL , + + + + + + + + , + + + + + , , ( ) , + + + + + + + + + + + () + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Proto/Invoicing/ExtendedSigner.proto.cs b/src/Proto/Invoicing/ExtendedSigner.proto.cs index 9a8fef7a..7e421408 100644 --- a/src/Proto/Invoicing/ExtendedSigner.proto.cs +++ b/src/Proto/Invoicing/ExtendedSigner.proto.cs @@ -402,7 +402,10 @@ public enum DocumentTitleType Utd970Seller = 12, [global::ProtoBuf.ProtoEnum(Name=@"Utd970Buyer", Value=13)] - Utd970Buyer = 13 + Utd970Buyer = 13, + + [global::ProtoBuf.ProtoEnum(Name=@"ProformaInvoice29", Value=14)] + ProformaInvoice29 = 14 } } \ No newline at end of file