Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. public static GeneratedFile GenerateinvoiceXml(string authToken, string box, string tobox)
  2. {
  3. try
  4. {
  5. var content = new InvoiceInfo()
  6. {
  7. // заполняем согласно структуре InvoiceInfo
  8. InvoiceDate = "31.01.2016", // дата СФ
  9. InvoiceNumber = "11-012016-2410000000", // номер СФ
  10. Seller = {
  11. BoxId = box
  12. },
  13. Buyer = {
  14. BoxId = tobox
  15. },
  16. Signer = {
  17. SignerCertificate = ReadFileContent(FileWithCertName)
  18. },
  19.  
  20. PaymentDocuments = {
  21. new PaymentDocumentInfo
  22. {
  23. DocumentDate = "08.08.2016",
  24. DocumentNumber = "№00243015140"
  25. }
  26. },
  27. Items = {
  28. new InvoiceItem
  29. {
  30. Product = "Горячая вода (компонент на тепловую энергию). Прочие",
  31. CountriesOfOrigin = { "23", "3243" } ,
  32. TaxRate = TaxRate.Fraction_10_110,
  33. Subtotal = "321231"
  34. }
  35. },
  36. AdditionalInfos = {
  37. new AdditionalInfo
  38. {
  39. Id = "2312321",
  40. Value = "32423423"
  41. }
  42. },
  43. Total = "1000"
  44. };
  45. return Api.GenerateInvoiceXml(authToken, content);
  46. }
  47. catch (Exception e)
  48. {
  49.  
  50. logger.Debug("Except{0}", e, null);
  51. Console.Read();
  52. return null;
  53. }
  54. }
  55.  
  56. Seller = new DiadocOrganizationInfo()
  57. {
  58. BoxId = box
  59. },
  60. Buyer = new DiadocOrganizationInfo()
  61. {
  62. BoxId = tobox
  63. },
  64. Signer = new Signer()
  65. {
  66. SignerCertificate = null
  67. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement