Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static GeneratedFile GenerateinvoiceXml(string authToken, string box, string tobox)
- {
- try
- {
- var content = new InvoiceInfo()
- {
- // заполняем согласно структуре InvoiceInfo
- InvoiceDate = "31.01.2016", // дата СФ
- InvoiceNumber = "11-012016-2410000000", // номер СФ
- Seller = {
- BoxId = box
- },
- Buyer = {
- BoxId = tobox
- },
- Signer = {
- SignerCertificate = ReadFileContent(FileWithCertName)
- },
- PaymentDocuments = {
- new PaymentDocumentInfo
- {
- DocumentDate = "08.08.2016",
- DocumentNumber = "№00243015140"
- }
- },
- Items = {
- new InvoiceItem
- {
- Product = "Горячая вода (компонент на тепловую энергию). Прочие",
- CountriesOfOrigin = { "23", "3243" } ,
- TaxRate = TaxRate.Fraction_10_110,
- Subtotal = "321231"
- }
- },
- AdditionalInfos = {
- new AdditionalInfo
- {
- Id = "2312321",
- Value = "32423423"
- }
- },
- Total = "1000"
- };
- return Api.GenerateInvoiceXml(authToken, content);
- }
- catch (Exception e)
- {
- logger.Debug("Except{0}", e, null);
- Console.Read();
- return null;
- }
- }
- Seller = new DiadocOrganizationInfo()
- {
- BoxId = box
- },
- Buyer = new DiadocOrganizationInfo()
- {
- BoxId = tobox
- },
- Signer = new Signer()
- {
- SignerCertificate = null
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement