This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,658 @@
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 OrderManager extends Unibase.Platform.Core.BaseManager {
getDetails(OrganizationId, LobId, OrderTypeId, IsPointsOrder, IsLead = false) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getdetails/organizationid/' + OrganizationId + '/lobid/' + LobId + '/ordertypeid/' + OrderTypeId + '/ispointsorder/' + IsPointsOrder + '/branchid/0/islead/' + IsLead;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getClaimDetails(ClaimId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getclaimdetails/claimid/' + ClaimId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderDetails(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderbyorderid/id/' + OrderId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderByOrganization(OrganizationId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderbyorganizationid/organizationid/' + OrganizationId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getCustomerCreditHealth(OrgContactId, OrgId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getcustomercredithealth/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;
});
});
}
getSalesFrequency(OrgContactId, OrgId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getsalesfrequency/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;
});
});
}
getTotals(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/gettotals';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getPurchasePlanTotals(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpurchaseplantotals';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
duplicateOrder(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/duplicateorder/orderid/' + OrderId;
return yield this.dataHelper().postAsync(url, OrderId).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
confirmOrder(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/confirmorder/orderid/' + OrderId;
return yield this.dataHelper().postAsync(url, OrderId).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
voidOrder(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/voidorder/orderid/' + OrderId;
return yield this.dataHelper().postAsync(url, OrderId).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
checkOrderDcCompleted(OrderId, DcTypeId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/checkorderdccompleted/orderid/' + OrderId + '/dctypeid/' + DcTypeId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPermissions(installedappid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpermissions/installedappid/' + installedappid;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPendingQty(OrderId, ItemId, dctype, OrderItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getitempendingqty/orderid/' + OrderId + '/itemid/' + ItemId + '/dctype/' + dctype + '/orderitemid/' + OrderItemId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getItemTaxDetails(ItemId, AssessableAmount, OrderType, OrderPortalId, BillingAddressId, isCform, IsExcise) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getitemtaxdetails/itemid/' + ItemId + '/assessableamount/' + AssessableAmount + '/ordertype/' + OrderType + '/orderportalid/' + OrderPortalId + '/billingaddressid/' + BillingAddressId + '/iscform/' + isCform + '/isexcise/' + IsExcise;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
orderPrint(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderhtml/orderid/' + OrderId + '/templateid/0';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
reSaveOrder(OrderId, TenantId, FormId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/resaveorder/orderid/' + OrderId + '/tenantid/' + TenantId + '/formid/' + FormId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderItemsDetails(OrderItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderitem/orderitemid/' + OrderItemId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderItems(OrderId, ItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderitemsbyorderidanditemid/orderid/' + OrderId + '/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;
});
});
}
getOrderItemsByPrice(OrderId, ItemId, UnitPrice) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderitembyprice/orderid/' + OrderId + '/itemid/' + ItemId + '/unitprice/' + UnitPrice;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
adjustOrderItemQuantityByItem(orderitemid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/adjustorderitemquantitybyitem/orderitemid/' + orderitemid;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
adjustOrderItemQuantityByOrder(orderid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/adjustorderitemquantitybyorder/orderid/' + orderid;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPendingOrderItemsByItemAndCustomer(OrderType, ItemId, OrganizationId, Page, Rows, branchId, OrderId = 0) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpendingorderitemsbyitemandcustomer/ordertype/' + OrderType + '/itemid/' + ItemId + '/organizationid/' + OrganizationId + '/orderid/' + OrderId + '/page/' + Page + '/rows/' + Rows;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
saveOrderItems(postdata, IsDirectSave, OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/saveorderitems/isdirectsave/' + IsDirectSave + '/orderid/' + OrderId;
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
deleteOrderItem(OrderItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/deleteorderitem/orderitemid/' + OrderItemId;
return yield this.dataHelper().postAsync(url, OrderItemId).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
resetMoQ(LobId, BranchId, ContactId, EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/resetmoq/lobid/' + LobId + '/branchid/' + BranchId + '/contactid/' + ContactId + '/estimateid/' + EstimateId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
resetMoQ_Proc(EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/resetmoq_proc/estimateid/' + EstimateId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getReOrderItems(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getreorderitems';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
predictPurchasePlan(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/predictpurchaseplan';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
predictPurchasePlan_proc(EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/predictpurchaseplan_proc/estimateid/' + EstimateId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
refreshPurchasePlanCalculations_proc(EstimateId, ItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/refreshpurchaseplancalculations_proc/estimateid/' + EstimateId + '/itemid/' + ItemId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPurchasePlanCalculations(EstimateId, ItemId, Tenant_Id, Branch_Id) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpurchaseplancalculations/estimateid/' + EstimateId + '/itemid/' + ItemId + '/tenant_id/' + Tenant_Id + '/branch_id/' + Branch_Id;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getTenantWisePurchasePlanCalculations(EstimateId, ItemId, TenantId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/gettenantwisepurchaseplancalculations/estimateid/' + EstimateId + '/itemid/' + ItemId + '/tenantid/' + TenantId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPurchasePlanItems(EstimateId, LoadTypeId, SearchTerm, ItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpurchaseplanitems/estimateid/' + EstimateId + '/loadtypeid/' + LoadTypeId + '/searchterm/' + SearchTerm + '/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;
});
});
}
getOrderItemsSummary(url) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPendingOrderItems(OrderId, IsPending) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderitemsummary/orderid/' + OrderId + '/ispendingqty/' + IsPending;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPendingOrderItemQty(OrderItemId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpendingorderitemqty/orderitemid/' + OrderItemId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getPendingItemsForInvoice(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpendingitemsforinvoice/orderid/' + OrderId + '/ismergeorder/false';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderSettings(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 != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderSettingsByLob(SettingName, LobId, BranchId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getordersettingsbylob/settingname/' + SettingName + '/lobid/' + LobId + '/branchid/' + BranchId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
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/getbranchsettings/orderid/' + OrderId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderItemQuantity(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderitemquantity/orderid/' + OrderId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getClaimPendingQuantity(ClaimId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getclaimpendingquantity/claimid/' + ClaimId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getOrderByRefOrderId(RefOrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getorderbyreforderid/reforderid/' + RefOrderId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getCartItems(ContactId, LobId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getcartitems/contactid/' + ContactId + '/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;
});
});
}
getInventoryApplyType(LobId, Type, BranchId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/settings/getinventoryapplytype/lobid/' + LobId + '/type/' + Type + '/branchid/' + BranchId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getEmployeeLeverage(EmployeeId, LobId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/employeeleverages/getemployeeleverage/employeeid/' + EmployeeId + '/lobid/' + LobId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getSeriesSettings(LobId, BranchId, InstalledAppId) {
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 != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
createOrderItems(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/integrations/subscription/createorder';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
updatePurchasePlanDetails(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/updatepurchaseplandetails';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
savePurchasePlanOrder(EstimateId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/savepurchaseplanorder/estimateid/' + EstimateId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
saveROQ(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/saveroq';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
updateTokensToLowerCase(TemplateIds, Columns) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/updatetokenstolowercase/templateids/' + TemplateIds + '/columns/' + Columns;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
replaceTokens(postdata) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/replacetokens';
return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
refreshTokens(TemplateIds) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/refreshtokens/templateids/' + TemplateIds;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result != "" && response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
getLastOrder(ContactId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getlastorder/contactid/' + ContactId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null)
response.result = JSON.parse(response.result);
return response;
});
});
}
RefreshInvoiceQty(orderid) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/refreshinvoicedqty/orderid/' + orderid;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
RefreshDeliveredQty(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/refreshdeliveredqty/orderid/' + OrderId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
RefreshDCAndInvoiceQty(OrderId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/refreshdcandinvoiceqty/orderid/' + OrderId;
return yield this.dataHelper().postAsync(url, null).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
purchaseIndentPrint(PurchaseIndentId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpurchaseindenthtml/purchaseindentid/' + PurchaseIndentId + '/templateid/0';
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getPurchaseIndentDetails(PurchaseIndentId, Type) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpurchaseindentdetails/purchaseindentid/' + PurchaseIndentId + '/type/' + Type;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getPendingPurchaseIndentItems(PurchaseIndentId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpendingpurchaseindentitems/purchaseindentid/' + PurchaseIndentId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
getPendingPurchaseIndentEstimateItems(PurchaseIndentId) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/transact/orders/getpendingpurchaseindentestimateitems/purchaseindentid/' + PurchaseIndentId;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result !== null && response.result != "")
response.result = JSON.parse(response.result);
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new OrderManager();
return this._instance;
}
}
Managers.OrderManager = OrderManager;
})(Managers = Transact.Managers || (Transact.Managers = {}));
})(Transact = Apps.Transact || (Apps.Transact = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long