Skip to content

Commit

Permalink
Merge pull request #1184 from diadoc/DDCORE-9656-update-ucd736
Browse files Browse the repository at this point in the history
DDCORE-9656 update ucd 736
  • Loading branch information
majorro authored Feb 10, 2025
2 parents 3ae43d8 + 7772cee commit f1c5251
Show file tree
Hide file tree
Showing 4 changed files with 6,901 additions and 57 deletions.
21 changes: 10 additions & 11 deletions Samples/Diadoc.Samples/PostUniversalCorrectionDocument736.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
using System.Security.Cryptography.X509Certificates;
using Diadoc.Api;
using Diadoc.Api.Cryptography;
using Diadoc.Api.DataXml;
using Diadoc.Api.DataXml.Ucd736;
using Diadoc.Api.DataXml.ON_NKORSCHFDOPPR_UserContract_1_996_03_05_01_03;
using Diadoc.Api.Proto.Events;

namespace Diadoc.Samples
Expand Down Expand Up @@ -137,15 +136,15 @@ private static UniversalCorrectionDocument BuildUserDataContract()
Function = UniversalCorrectionDocumentFunction.КСЧФ,
DocumentDate = "01.01.2020",
DocumentNumber = "134",
CurrencyName = UniversalCorrectionDocumentCurrencyName.GetCurrencyNameByCode,
CurrencyName = UniversalCorrectionDocumentCurrencyName.Item1,
Seller = new ExtendedOrganizationInfo_ForeignAddress1000
{
Item = new ExtendedOrganizationDetails_ForeignAddress1000
{
Inn = "7750370238",
Kpp = "770100101",
OrgName = "ЗАО Очень Древний Папирус",
OrgType = OrganizationType.LegalEntity,
OrgType = OrganizationType.Item1,
Address = new Address_ForeignAddress1000
{
Item = new RussianAddress
Expand All @@ -161,7 +160,7 @@ private static UniversalCorrectionDocument BuildUserDataContract()
{
Inn = "9500000005",
Kpp = "667301001",
OrgType = OrganizationType.LegalEntity,
OrgType = OrganizationType.Item1,
OrgName = "ООО Тестовое Юрлицо обычное",
Address = new Address_ForeignAddress1000
{
Expand Down Expand Up @@ -198,12 +197,12 @@ private static UniversalCorrectionDocument BuildUserDataContract()
},
Subtotal = new ExtendedInvoiceCorrectionItemSubtotal
{
ItemElementName = ExtendedInvoiceCorrectionItemSubtotalDiffType.AmountsInc,
ItemElementName = ItemChoiceType3.AmountsInc,
Item = (decimal)10
},
TaxRate = new ExtendedInvoiceCorrectionItemTaxRate
{
OriginalValue = TaxRateWithTwentyPercentAndTaxedByAgent.TaxedByAgent
OriginalValue = TaxRateUcd736AndUtd820.НДСисчисляетсяналоговымагентом
}
},
},
Expand Down Expand Up @@ -234,22 +233,22 @@ private static UniversalCorrectionDocument BuildUserDataContract()

// Передадим информацию о подписанте документа, т.е. персональные данные подписываемого сотрудника,
// которые осядут в самом xml:
universalCorrectionDocument.UseSignerDetails(new[]
universalCorrectionDocument.Signers = new[]
{
new ExtendedSignerDetails_CorrectionSellerTitle
{
SignerType = ExtendedSignerDetailsBaseSignerType.LegalEntity,
SignerType = ExtendedSignerDetailsBaseSignerType.Item1,
FirstName = "Иван",
MiddleName = "Иванович",
LastName = "Иванов",
SignerOrganizationName = "ЗАО Очень Древний Папирус",
Inn = "7750370238",
Position = "директор"
}
});
};
// Альтернативный способ заполнения данных подписанта:
// отправить в хранилище Диадока аналогичный набор данных через метод PostExtendedSignerDetails
// и затем использовать universalCorrectionDocument.UseSignerReferences(new SignerReference[])
// и затем использовать universalCorrectionDocument.Signers = new SignerReference[]

return universalCorrectionDocument;
}
Expand Down
Loading

0 comments on commit f1c5251

Please sign in to comment.