Built files from Bizgaze WebServer
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

paymenttermmanager.js 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 PaymentTermManager extends Unibase.Platform.Core.BaseManager {
  19. deletePaymentTermItem(paymentTermItemId) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/bizgaze/transact/paymentterms/deletepaymenttermitem/id/' + paymentTermItemId;
  22. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  23. if (response.result != null) {
  24. response.result = JSON.parse(response.result);
  25. }
  26. return response;
  27. });
  28. });
  29. }
  30. getallpaymentterms(id) {
  31. return __awaiter(this, void 0, void 0, function* () {
  32. const url = 'apis/v4/bizgaze/transact/paymentterms/allpaymentterms/' + id + '';
  33. return yield this.dataHelper().getAsync(url).then(function (response) {
  34. if (response.result !== null)
  35. response.result = JSON.parse(response.result);
  36. return response;
  37. });
  38. });
  39. }
  40. getWallets(contactid, paymentid, query, journaltypeid, lobid, paymentdate) {
  41. return __awaiter(this, void 0, void 0, function* () {
  42. const url = 'apis/v4/bizgaze/transact/payments/getwallets/contactid/' + contactid + '/paymentid/' + paymentid + '/query/' + query + '/journaltypeid/' + journaltypeid + '/lobid/' + lobid + '/paymentdate/' + paymentdate;
  43. return yield this.dataHelper().getAsync(url).then(function (response) {
  44. if (response.result !== null)
  45. response.result = JSON.parse(response.result);
  46. return response;
  47. });
  48. });
  49. }
  50. getDues(contactid, paymentid, query, journaltypeid, lobid, paymentdate) {
  51. return __awaiter(this, void 0, void 0, function* () {
  52. const url = 'apis/v4/bizgaze/transact/payments/getwallets/contactid/' + contactid + '/paymentid/' + paymentid + '/query/' + query + '/journaltypeid/' + journaltypeid + '/lobid/' + lobid + '/paymentdate/' + paymentdate;
  53. return yield this.dataHelper().getAsync(url).then(function (response) {
  54. if (response.result !== null)
  55. response.result = JSON.parse(response.result);
  56. return response;
  57. });
  58. });
  59. }
  60. getPaymentTerm(paymenttermid) {
  61. return __awaiter(this, void 0, void 0, function* () {
  62. const url = 'apis/v4/bizgaze/transact/paymentterms/getpaymentterm/paymenttermid/' + paymenttermid;
  63. return yield this.dataHelper().getAsync(url).then(function (response) {
  64. if (response.result !== null && response.result != "")
  65. response.result = JSON.parse(response.result);
  66. return response;
  67. });
  68. });
  69. }
  70. getPaymentTermByOrg(OrganizationId, LobId) {
  71. return __awaiter(this, void 0, void 0, function* () {
  72. const url = 'apis/v4/bizgaze/transact/paymentterms/getpaymenttermbyorg/organizationid/' + OrganizationId + '/lobid/' + LobId;
  73. return yield this.dataHelper().getAsync(url).then(function (response) {
  74. if (response.result !== null && response.result != "")
  75. response.result = JSON.parse(response.result);
  76. return response;
  77. });
  78. });
  79. }
  80. refreshPaymentTermTypes() {
  81. return __awaiter(this, void 0, void 0, function* () {
  82. const url = 'apis/v4/bizgaze/transact/paymentterms/refreshtermtypes/np';
  83. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  84. if (response.result !== null && response.result != "")
  85. response.result = JSON.parse(response.result);
  86. return response;
  87. });
  88. });
  89. }
  90. static Instance() {
  91. if (this.instance === undefined) {
  92. this.instance = new PaymentTermManager();
  93. }
  94. return this.instance;
  95. }
  96. }
  97. Managers.PaymentTermManager = PaymentTermManager;
  98. })(Managers = Transact.Managers || (Transact.Managers = {}));
  99. })(Transact = Apps.Transact || (Apps.Transact = {}));
  100. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  101. })(Bizgaze || (Bizgaze = {}));