Built files from Bizgaze WebServer
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

paymentmanager.js 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. var _PaymentManager_region, _PaymentManager_endregion;
  19. class PaymentManager extends Unibase.Platform.Core.BaseManager {
  20. constructor() {
  21. super(...arguments);
  22. _PaymentManager_region.set(this, void 0);
  23. _PaymentManager_endregion.set(this, void 0);
  24. }
  25. getpayment(Id) {
  26. return __awaiter(this, void 0, void 0, function* () {
  27. const url = 'apis/v4/bizgaze/transact/payments/getpayment/paymentid/' + Id;
  28. return yield this.dataHelper().getAsync(url).then(function (response) {
  29. if (response.result !== null)
  30. response.result = JSON.parse(response.result);
  31. return response;
  32. });
  33. });
  34. }
  35. deletePayment(paymentId) {
  36. return __awaiter(this, void 0, void 0, function* () {
  37. const url = 'apis/v4/bizgaze/transact/payments/deletepayment/paymentid/' + paymentId;
  38. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  39. if (response.result !== null)
  40. response.result = JSON.parse(response.result);
  41. return response;
  42. });
  43. });
  44. }
  45. getPaymentModeSeriesSetting(paymenttypeid, paymentmodeid) {
  46. return __awaiter(this, void 0, void 0, function* () {
  47. var url = _appsettings.server_url() + '/apis/v4/bizgaze/transact/payments/getseriessetting/paymentmodeid/' + paymentmodeid + '/paymenttypeid/' + paymenttypeid;
  48. return yield this.dataHelper().getAsync(url).then(function (response) {
  49. if (response.result !== null && response.result != "")
  50. response.result = JSON.parse(response.result);
  51. return response;
  52. });
  53. });
  54. }
  55. getPendings(contactid, paymentid, query, journaltypeid, lobid, paymentdate, controltype) {
  56. return __awaiter(this, void 0, void 0, function* () {
  57. const url = 'apis/v4/bizgaze/transact/payments/getpendings/contactid/' + contactid + '/paymentid/' + paymentid + '/query/' + query + '/journaltypeid/' + journaltypeid + '/lobid/' + lobid + '/paymentdate/' + paymentdate + '/controltype/' + controltype;
  58. return yield this.dataHelper().getAsync(url).then(function (response) {
  59. if (response.result !== null)
  60. response.result = JSON.parse(response.result);
  61. return response;
  62. });
  63. });
  64. }
  65. getAdvancePaymentsByOrgId(ContactId) {
  66. return __awaiter(this, void 0, void 0, function* () {
  67. const url = 'apis/v4/bizgaze/transact/payments/getadvancepaymentsbyorgid/contactid/' + ContactId;
  68. return yield this.dataHelper().getAsync(url).then(function (response) {
  69. if (response.result != "" && response.result !== null)
  70. response.result = JSON.parse(response.result);
  71. return response;
  72. });
  73. });
  74. }
  75. getAllPendingPayments(ContactId) {
  76. return __awaiter(this, void 0, void 0, function* () {
  77. const url = 'apis/v4/bizgaze/transact/payments/getallpendingpayments/contactid/' + ContactId;
  78. return yield this.dataHelper().getAsync(url).then(function (response) {
  79. if (response.result != "" && response.result !== null)
  80. response.result = JSON.parse(response.result);
  81. return response;
  82. });
  83. });
  84. }
  85. getLastFivePaymentsByContactId(ContactId) {
  86. return __awaiter(this, void 0, void 0, function* () {
  87. const url = 'apis/v4/bizgaze/transact/payments/getlastfivepaymentsbycontactid/contactid/' + ContactId;
  88. return yield this.dataHelper().getAsync(url).then(function (response) {
  89. if (response.result != "" && response.result !== null)
  90. response.result = JSON.parse(response.result);
  91. return response;
  92. });
  93. });
  94. }
  95. getReturnedChequesBySpocId(SpocId) {
  96. return __awaiter(this, void 0, void 0, function* () {
  97. const url = 'apis/v4/bizgaze/transact/payments/getreturnedchequesbyspocid/spocid/' + SpocId;
  98. return yield this.dataHelper().getAsync(url).then(function (response) {
  99. if (response.result != "" && response.result !== null)
  100. response.result = JSON.parse(response.result);
  101. return response;
  102. });
  103. });
  104. }
  105. refreshPaymentModes() {
  106. return __awaiter(this, void 0, void 0, function* () {
  107. const url = 'apis/v4/bizgaze/transact/payments/refreshpaymentmodes/np';
  108. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  109. return response.message;
  110. });
  111. });
  112. }
  113. paymentPrint(paymentId) {
  114. return __awaiter(this, void 0, void 0, function* () {
  115. const url = 'apis/v4/bizgaze/transact/payments/getpaymenthtml/paymentid/' + paymentId;
  116. return yield this.dataHelper().getAsync(url).then(function (response) {
  117. if (response.result !== null)
  118. response.result = JSON.parse(response.result);
  119. return response;
  120. });
  121. });
  122. }
  123. getAccountSettingByPaymentType(paymentTypeId, settingTypeId) {
  124. return __awaiter(this, void 0, void 0, function* () {
  125. const url = 'apis/v4/bizgaze/transact/payments/getaccountsettingbypaymenttype/paymenttypeid/' + paymentTypeId + '/settingtypeid/' + settingTypeId;
  126. return yield this.dataHelper().getAsync(url).then(function (response) {
  127. if (response.result !== null && response.result !== "")
  128. response.result = JSON.parse(response.result);
  129. return response;
  130. });
  131. });
  132. }
  133. getAccountSettingsByPaymentType(paymentTypeId) {
  134. return __awaiter(this, void 0, void 0, function* () {
  135. const url = 'apis/v4/bizgaze/transact/payments/getaccountsettingbypaymenttype/paymenttypeid/' + paymentTypeId;
  136. return yield this.dataHelper().getAsync(url).then(function (response) {
  137. if (response.result !== null && response.result !== "")
  138. response.result = JSON.parse(response.result);
  139. return response;
  140. });
  141. });
  142. }
  143. changestatus(obj) {
  144. return __awaiter(this, void 0, void 0, function* () {
  145. debugger;
  146. const url = 'apis/v4/bizgaze/transact/payments/paymentstagechangebystatus/List';
  147. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  148. if (response.result !== null)
  149. response.result = JSON.parse(response.result);
  150. return response;
  151. });
  152. });
  153. }
  154. reverseentryforreceiptreject() {
  155. return __awaiter(this, void 0, void 0, function* () {
  156. debugger;
  157. const url = 'apis/v4/bizgaze/transact/payments/reverseentryforreceiptreject/np';
  158. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  159. if (response.result !== null)
  160. response.result = JSON.parse(response.result);
  161. return response;
  162. });
  163. });
  164. }
  165. reconcileEntry(paymentId) {
  166. return __awaiter(this, void 0, void 0, function* () {
  167. const url = 'apis/v4/bizgaze/transact/payments/reconcileentry/paymentid/' + paymentId;
  168. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  169. if (response.result !== null)
  170. response.result = JSON.parse(response.result);
  171. return response;
  172. });
  173. });
  174. }
  175. getPaymentByRemoteId(remoteId) {
  176. return __awaiter(this, void 0, void 0, function* () {
  177. const url = 'apis/v4/bizgaze/transact/payments/getpaymentbyremoteid/remoteid/' + remoteId;
  178. return yield this.dataHelper().getAsync(url).then(function (response) {
  179. if (response.result !== null && response.result !== "")
  180. response.result = JSON.parse(response.result);
  181. return response;
  182. });
  183. });
  184. }
  185. static Instance() {
  186. if (this.instance === undefined) {
  187. this.instance = new PaymentManager();
  188. }
  189. return this.instance;
  190. }
  191. }
  192. _PaymentManager_region = new WeakMap(), _PaymentManager_endregion = new WeakMap();
  193. Managers.PaymentManager = PaymentManager;
  194. })(Managers = Transact.Managers || (Transact.Managers = {}));
  195. })(Transact = Apps.Transact || (Apps.Transact = {}));
  196. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  197. })(Bizgaze || (Bizgaze = {}));