123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Transact;
- (function (Transact) {
- let Managers;
- (function (Managers) {
- class VoucherManager extends Unibase.Platform.Core.BaseManager {
- getJournalData(journalId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/vouchers/getjournaldata/journalid/' + journalId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getVoucherItems(voucherId, contactId, trnType) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/vouchers/voucheritems/voucherid/' + voucherId + '/contactid/' + contactId + '/entrytype/' + trnType;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getLedgerDetails(ledgerId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/ledgers/getledgerdetails/ledgerid/' + ledgerId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- deleteVoucher(voucherId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/vouchers/deletejournaldata/journalid/' + voucherId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getLedgerBalance(ledgerId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/ledgers/getledgerbalance/ledgerid/' + ledgerId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshTypes() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/vouchers/refreshtypes/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- getDefaultVoucherSeries() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/vouchers/getdefaultvoucherseries';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshApplyTypes() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/vouchers/refreshjournalapplytypes/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- PrintVouchers(journalId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/vouchers/getvouchershtml/journalid/' + journalId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new VoucherManager();
- return this._instance;
- }
- }
- Managers.VoucherManager = VoucherManager;
- })(Managers = Transact.Managers || (Transact.Managers = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|