123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843 |
- 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 Unibase;
- (function (Unibase) {
- let Platform;
- (function (Platform) {
- let Series;
- (function (Series) {
- let Managers;
- (function (Managers) {
- class SeriesManager extends Platform.Core.BaseManager {
- getseries(appkeyid, installedappid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/seriesautocomplete/appkeyid/' + appkeyid + '/installedappid/' + installedappid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- var result = "";
- result = JSON.parse(response.result);
- return result;
- });
- });
- }
- createSeries(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/createseries';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getSeries(AppKeyId, InstalledAppId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/getserieslist/appKeyid/' + AppKeyId + '/installedappid/' + InstalledAppId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getActiveSeries(appkeyid, installedappId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/getactiveseries/appkeyid/' + appkeyid + '/installedappid/' + installedappId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changeSeriesStatus(SeriesId, Status) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/changeseriesformatstatus/seriesid/' + SeriesId + '/status/' + Status;
- return yield this.dataHelper().postAsync(url, null);
- });
- }
- getSeriesById(seriesid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/getseries/seriesid/' + seriesid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- updateSeries(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/updateseries';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveSeriesFormat(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/saveseriesformat';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getSeriesFormats(SeriesId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/getseriesformatlist/seriesid/' + SeriesId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getSeriesFormatBySeriesId(SeriesId, SeriesFormatId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/getseriesformatbyseriesandformatid/seriesid/' + SeriesId + '/seriesformatid/' + SeriesFormatId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getSeriesFormat(SeriesFormatId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/apps/getseriesformat/seriesformatid/' + SeriesFormatId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new SeriesManager();
- return this._instance;
- }
- }
- Managers.SeriesManager = SeriesManager;
- })(Managers = Series.Managers || (Series.Managers = {}));
- })(Series = Platform.Series || (Platform.Series = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
-
- 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 InvoiceManager extends Unibase.Platform.Core.BaseManager {
- getItemById(itemid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/transact/items/getitem/itemid/' + itemid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getLatestMrpByItemId(itemid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/getlatestmrp/itemid/' + itemid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getMrpById(mrpid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/getmrp/mrpid/' + mrpid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getlobsummary() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/loboutstandingsummary';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetMrpandBatchQty(url) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getItemDetails(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getItemDetails';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getItemDetailsList(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getItemDetailsList/List';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- gettaxpercentages(taxgroupid, branchid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/tax/gettaxpercentages/taxgroupid/' + taxgroupid + '/branchid/' + branchid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getPendingSalesInvoicesByContactId(ContactId, IsOverDue) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getpendingsalesinvoicesbycontactid/contactid/' + ContactId + '/isoverdue/' + IsOverDue;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getCreditNotesByContactId(ContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getcreditnotesbycontactid/contactid/' + ContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getRecentFiveInvoicesBySpocId(OrgContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getrecentfiveinvoicesbyspocid/orgcontactid/' + OrgContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getLastFiveClearedInvoices(OrgContactId, OrgId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getlastfiveclearedinvoices/orgcontactid/' + OrgContactId + '/orgid/' + OrgId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getorganization(OrgId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/organization/getorganization/organizationid/' + OrgId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getorgcontact(orgcontactid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/orgcontacts/getorgcontact/orgcontactid/' + orgcontactid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getbranche(branchid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/crm/companies/getbranchbybranchid/branchid/' + branchid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getInvoiceDetails(invoiceid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getinvoice/invoiceid/' + invoiceid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getInvoiceItems(url) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getMrps(itemid, dctypeid, branchid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelist/getmrpslistbyitemid/itemid/' + itemid + '/dctype/' + dctypeid + "/branchid/" + branchid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getBatches(itemid, dctypeid, branchid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelist/getbatchlistbyitemid/itemid/' + itemid + '/dctype/' + dctypeid + "/branchid/" + branchid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getPendingDiscountsForInvoice(dcid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getpendingdiscountsforinvoice/dcid/' + dcid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getOrderDcDetails(url) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getorderbranchsettings(OrderId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/orders/getordersettings/orderid/' + OrderId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getItemSetting(itemid, branchid, typeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/items/getitemsetting/itemid/' + itemid + '/branchid/' + branchid + '/type/' + typeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetSampleInvoiceNo(invoiceNo, invidate, seriesid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getsampleinvoiceno/invoiceno/' + invoiceNo + "/invoicedate/" + invidate + "/seriesid/" + seriesid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- gettemplates(installedappid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/templates/gettemplatesbyapp/installedappid/' + installedappid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- GetTemplateSetting(installedappid, branchid, lobid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/gettemplatesetting/installedappid/' + installedappid + '/branchid/' + branchid + '/lobid/' + lobid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getTempNextNumber(SeriesId, date) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getinvoicenextnumber/seriesid/' + SeriesId + '/invoicedate/' + date;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== "" && response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getprintinvoice(invoiceid, isprintpreview, ispos) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getprintinvoice/invoiceid/' + invoiceid + '/isprintpreview/' + isprintpreview + '/ispos/' + ispos;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- updateinvoiceseries(invoiceid, seriesid, invoiceno, templateid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/updateinvoiceseries/invoiceid/' + invoiceid + '/seriesid/' + seriesid + '/invoiceno/' + invoiceno + '/templateid/' + templateid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- Updateconnecteddc(dcid, invoiceid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/Updateconnecteddc/dcid/' + dcid + '/invoiceid/' + invoiceid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- UpdateInvoice(InvoiceId, salespersonid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/updateinvoicesalesperson/invoiceid/' + InvoiceId + '/salespersonid/' + salespersonid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- UpdateInvoiceItemTaxAllocs(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/updateinvoiceitemtaxallocs';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getinvoiceitems(invoiceid, itemid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getinvoiceitemsbyinvoiceid/invoiceid/' + invoiceid + '/isreturn/false/itemid' + itemid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getBatchByBatchId(BatchId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/getbatch/batchid/' + BatchId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getPlanVolume(ItemId, OrganizationId, InvoiceApplyType) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/offers/getplanvolumebyitem/itemid/' + ItemId + '/organizationid/' + OrganizationId + '/type/' + InvoiceApplyType;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getJournalWallets(invoicedate, invoiceid, contactid, invoicetype, lobId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getjournalwallets/invoicedate/' + invoicedate + '/invoiceid/' + invoiceid + '/contactid/' + contactid + '/invoicetype/' + invoicetype + '/lobid/' + lobId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getJournalAllocs(invoiceid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getjournalallocs/invoiceid/' + invoiceid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getSeries(installedappid, branchid, lobid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/seriessettings/getseriessettings/lobid/' + lobid + '/branchid/' + branchid + '/installedappid/' + installedappid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getInvoiceItemDetails(invoiceitemid, taxgroupid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getinvoiceitemdetails/invoiceitemid/' + invoiceitemid + '/taxgroupid/' + taxgroupid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getCustomerTurnOver(organizationid, excludeinvoiceid, invoicedate, applytype) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getcustomerturnover/organizationid/' + organizationid + '/excludeinvoiceid/' + excludeinvoiceid + "/invoicedate/" + invoicedate + "/applytype/" + applytype;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getTcsDeclaration(partitionid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/gettcsdeclarationbypartitionid/partitionid/' + partitionid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveTcsDeclaration(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/savetcsdeclaration';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- GetInvoicePermissions(invoicetypeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getinvoicepermissions/invoicetypeid/' + invoicetypeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- GetTenants(tenantid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/gettenant/tenantid/' + tenantid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- refreshInvoiceTypes() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/refreshinvoicetypes/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- GetTCSTaxgroupforReturn(invoiceid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/gettcstaxgroupforreturn/invoiceid/' + invoiceid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- GetFirstPendingInvoicesBySalesPerson(salespersonid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getfirstpendinginvoices/salespersionid/' + salespersonid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- changeManagers(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/changemanagers';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- changeManager(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/updatemanagerdetails';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getdcbydcno(dcno) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/dc/getdcbydcno/dcno/' + dcno;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== '')
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getproductsbyLobid(lobid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/items/getproductsbylobid/lobid/' + lobid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getItemsUnitPriceByProductId(productId, contactId, term) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/items/getitemsunitpricebyproductid/productid/' + productId + '/contactid/' + contactId + '/term/' + term;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getpricebyProductId(itemid, lobid, productId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/getlatestprices/itemids/' + itemid + '/lobid/' + lobid + '/productid/' + productId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getitemname(searchtext) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/items/getitemsbyterm/term/' + searchtext;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getOffersByItemIdWithPrice(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/items/getrelatedofferwithprice';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getInvoiceByDc(DcId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getinvoicebydc/dcid/' + DcId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- loadEbs(url1) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = url1;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getIsEnableSalesPipeline(url) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getPendingInvoicesByOrganizationName(OrganizationName) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getpendinginvoicesbyorganizationname/organizationname/' + OrganizationName;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getGSTRReport(gstno) {
- return __awaiter(this, void 0, void 0, function* () {
- var fromdate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_FromDate;
- var todate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_ToDate;
- var fromdatestring = moment(fromdate, "YYYY/MM/DD").format("YYYY-MM-DD");
- var todatestring = moment(todate, "YYYY/MM/DD").format("YYYY-MM-DD");
- const url = 'apis/v4/bizgaze/transact/invoices/exportgstr1returndetails/gstno/' + gstno + '/fromdate/' + fromdatestring + '/todate/' + todatestring;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- refreshTaxclassifications() {
- return __awaiter(this, void 0, void 0, function* () {
- var fromdate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_FromDate;
- var todate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_ToDate;
- var fromdatestring = moment(fromdate, "YYYY/MM/DD").format("YYYY-MM-DD");
- var todatestring = moment(todate, "YYYY/MM/DD").format("YYYY-MM-DD");
- const url = 'apis/v4/bizgaze/transact/invoices/refreshtaxclassificaions/fromdate/' + fromdatestring + '/todate/' + todatestring;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- RefreshEInvoice(irn) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transactintegrations/einvoice/refresheinvoices/irn/' + irn;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getInvoiceByorder(orderid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/invoices/getinvoicesbyorderid/orderid/' + orderid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getbulkprint(fromdate, todate, salespersonid, organizationid, invoicetype) {
- return __awaiter(this, void 0, void 0, function* () {
- debugger;
- var fromdatestring = moment(fromdate, "YYYY/MM/DD").format("YYYY-MM-DD");
- var todatestring = moment(todate, "YYYY/MM/DD").format("YYYY-MM-DD");
- const url = 'apis/v4/bizgaze/transact/invoices/getbulkinvoiceprint/organizationid/' + organizationid + '/salespersonid/' + salespersonid + '/fromdate/' + fromdatestring + '/todate/' + todatestring + '/invoicetype/' + invoicetype;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- debugger;
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new InvoiceManager();
- return this._instance;
- }
- }
- Managers.InvoiceManager = InvoiceManager;
- })(Managers = Transact.Managers || (Transact.Managers = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|