Built files from Bizgaze WebServer
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vouchermanager.js 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  2. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  3. return new (P || (P = Promise))(function (resolve, reject) {
  4. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  5. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  6. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  7. step((generator = generator.apply(thisArg, _arguments || [])).next());
  8. });
  9. };
  10. var Bizgaze;
  11. (function (Bizgaze) {
  12. let Apps;
  13. (function (Apps) {
  14. let Transact;
  15. (function (Transact) {
  16. let Managers;
  17. (function (Managers) {
  18. class VoucherManager extends Unibase.Platform.Core.BaseManager {
  19. getJournalData(journalId) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/bizgaze/transact/vouchers/getjournaldata/journalid/' + journalId;
  22. return yield this.dataHelper().getAsync(url).then(function (response) {
  23. if (response.result !== null)
  24. response.result = JSON.parse(response.result);
  25. return response;
  26. });
  27. });
  28. }
  29. getVoucherItems(voucherId, contactId, trnType) {
  30. return __awaiter(this, void 0, void 0, function* () {
  31. const url = 'apis/v4/bizgaze/transact/vouchers/voucheritems/voucherid/' + voucherId + '/contactid/' + contactId + '/entrytype/' + trnType;
  32. return yield this.dataHelper().getAsync(url).then(function (response) {
  33. if (response.result !== null)
  34. response.result = JSON.parse(response.result);
  35. return response;
  36. });
  37. });
  38. }
  39. getLedgerDetails(ledgerId) {
  40. return __awaiter(this, void 0, void 0, function* () {
  41. const url = 'apis/v4/bizgaze/transact/ledgers/getledgerdetails/ledgerid/' + ledgerId;
  42. return yield this.dataHelper().getAsync(url).then(function (response) {
  43. if (response.result !== null)
  44. response.result = JSON.parse(response.result);
  45. return response;
  46. });
  47. });
  48. }
  49. deleteVoucher(voucherId) {
  50. return __awaiter(this, void 0, void 0, function* () {
  51. const url = 'apis/v4/bizgaze/transact/vouchers/deletejournaldata/journalid/' + voucherId;
  52. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  53. if (response.result !== null)
  54. response.result = JSON.parse(response.result);
  55. return response;
  56. });
  57. });
  58. }
  59. getLedgerBalance(ledgerId) {
  60. return __awaiter(this, void 0, void 0, function* () {
  61. const url = 'apis/v4/bizgaze/transact/ledgers/getledgerbalance/ledgerid/' + ledgerId;
  62. return yield this.dataHelper().getAsync(url).then(function (response) {
  63. if (response.result !== null)
  64. response.result = JSON.parse(response.result);
  65. return response;
  66. });
  67. });
  68. }
  69. refreshTypes() {
  70. return __awaiter(this, void 0, void 0, function* () {
  71. const url = 'apis/v4/bizgaze/transact/vouchers/refreshtypes/np';
  72. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  73. return response.message;
  74. });
  75. });
  76. }
  77. getDefaultVoucherSeries() {
  78. return __awaiter(this, void 0, void 0, function* () {
  79. const url = 'apis/v4/bizgaze/transact/vouchers/getdefaultvoucherseries';
  80. return yield this.dataHelper().getAsync(url).then(function (response) {
  81. if (response.result !== null)
  82. response.result = JSON.parse(response.result);
  83. return response;
  84. });
  85. });
  86. }
  87. refreshApplyTypes() {
  88. return __awaiter(this, void 0, void 0, function* () {
  89. const url = 'apis/v4/bizgaze/transact/vouchers/refreshjournalapplytypes/np';
  90. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  91. return response.message;
  92. });
  93. });
  94. }
  95. PrintVouchers(journalId) {
  96. return __awaiter(this, void 0, void 0, function* () {
  97. const url = 'apis/v4/bizgaze/transact/vouchers/getvouchershtml/journalid/' + journalId;
  98. return yield this.dataHelper().getAsync(url).then(function (response) {
  99. if (response.result !== null)
  100. response.result = JSON.parse(response.result);
  101. return response;
  102. });
  103. });
  104. }
  105. static Instance() {
  106. if (this._instance === undefined)
  107. this._instance = new VoucherManager();
  108. return this._instance;
  109. }
  110. }
  111. Managers.VoucherManager = VoucherManager;
  112. })(Managers = Transact.Managers || (Transact.Managers = {}));
  113. })(Transact = Apps.Transact || (Apps.Transact = {}));
  114. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  115. })(Bizgaze || (Bizgaze = {}));