123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Integrations;
- (function (Integrations) {
- let EWayBill;
- (function (EWayBill) {
- let Components;
- (function (Components) {
- class irnwithewaybill extends Unibase.Platform.Core.BaseComponent {
- constructor() {
- super(...arguments);
- this.g_VisibleContainerId = 0;
- this.g_EwaybillItems = [];
- }
- jsFiles() {
- return ["apps/transact/managers/invoicemanager.js", "apps/transact/managers/inventory/dcmanager.js"];
- }
- cssFiles() {
- return [];
- }
- html() {
- return null;
- }
- loadControl(containerid, prop) {
- var html = `<div class="card">
- <div class="table-wrap card simple-scroll-bar bg-white-s bg-white-removed templateviewer-body" style = "height:100% !important" >
- <div class="table-responsive tableFixHead dropdown-menu-scrollbar" >
- <table class="table table-hover table-bordered mb-0 tblgetewaybilldata" id = "tblgetewaybillitems" >
- <thead>
- <tr>
- <th>ProductName</th>
- <th>ProductDesc</th>
- <th>Quantity</th>
- <th>HSNCode</th>
- <th>QtyUnit</th>
- <th>CgstRate</th>
- <th>SgstRate</th>
- <th>TaxableAmount</th>
- </tr>
- </thead>
- <tbody id = "tblgetewaybilliitems" >
- </tbody>
- </table>
- </div>
- <div>
- </div>`;
- $("#" + containerid).html(html);
- }
- loadControlSettings(controlsettingjson, formpropertyid) {
- return null;
- }
- loadPropertySettings(propertysettings, formpropertyid) {
- return null;
- }
- bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
- var ewaybillid = Number(propval);
- var instance = this;
- }
- load() {
- Bizgaze.Apps.Integrations.EWayBill.Components.irnwithewaybill.Instance().getInvoiceDetails();
- $(".txt_vehicleno").keyup(function () {
- $(".txt_vehicleno").val($(".txt_vehicleno").val().toString().toUpperCase());
- });
- $(".txt_topincode,.txt_frompincode").on("click", function () {
- Bizgaze.Apps.Integrations.EWayBill.Components.irnwithewaybill.Instance().GetDistanceByPinCode();
- });
- }
- getAddressById() {
- let AutoComplete_branchid = Number($(".txtAutoComplete_branchid").val());
- Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getAddressById(AutoComplete_branchid).then(function (response) {
- if (response.result != null) {
- $(".txt_frompincode").val(response.result.ZipCode);
- $(".labelSection_FromGSTIN").html("<span>From GSTIN : " + response.result.GSTNO + "</span>");
- Bizgaze.Apps.Integrations.EWayBill.Components.irnwithewaybill.Instance().getDistance();
- }
- });
- }
- getdcewaydetails() {
- let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
- let dcid = Number($(".txtAutoComplete_dcid").val());
- Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/transact/managers/inventory/dcmanager.js", function () {
- Bizgaze.Apps.Transact.Managers.DCManager.Instance().getdc(dcid).then(function (response) {
- if (response.result != null) {
- $(".txt_frompincode").val(response.result.ShipFromZipCode);
- $(".txt_topincode").val(response.result.ShipToZipCode);
- let branchid = Number(response.result.BranchId);
- $(".labelSection_ToGSTIN").html("<span>To GSTIN : " + response.result.GSTInNo + "</span>");
- $(".labelSection_FromGSTIN").html("<span>From GSTIN : " + response.result.GSTInNo + "</span>");
- $(".hfAutoCompleteId_invoiceid").val(response.result.InvoiceId);
- $(".hdn_refid").val($(".txtAutoComplete_dcid").val());
- Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/crm/companies/managers/companymanager.js", function () {
- Bizgaze.Apps.CRM.Companies.Managers.CompanyManager.Instance().getBranch(branchid).then(function (response) {
- if (response.result != null) {
- let BranchName = response.result.BranchName;
- let branch = new Option(BranchName, branchid.toString(), true);
- $("#" + VisibleContainerId).find(".txtAutoComplete_branchid").append(branch).val(branchid).trigger("change");
- }
- });
- });
- Bizgaze.Apps.Integrations.EWayBill.Components.irnwithewaybill.Instance().getDistance();
- }
- });
- });
- }
- getdc() {
- var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
- var recordid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_recordid").Value);
- var dcid = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_dcid").Value;
- Bizgaze.Apps.Transact.Managers.DCManager.Instance().getdc(dcid).then(function (response) {
- if (response.result != null) {
- $(".txt_frompincode").val(response.result.BillFromZipCode);
- $(".txt_topincode").val(response.result.BillToZipCode);
- $(".labelSection_ToGSTIN").html("<span>To GSTIN : " + response.result.GSTNo + "</span>");
- }
- });
- }
- getinvoiceewaydetails() {
- let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
- let Autocomplete_invoiceid = Number($(".txtAutoComplete_invoiceid").val());
- Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/transact/managers/invoicemanager.js", function () {
- Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().getInvoiceDetails(Autocomplete_invoiceid).then(function (response) {
- if (response.result != null) {
- $(".txt_frompincode").val(response.result.BillFromZipCode);
- $(".txt_topincode").val(response.result.BillToZipCode);
- let branchid = Number(response.result.BranchId);
- $(".labelSection_ToGSTIN").html("<span>To GSTIN : " + response.result.GSTNo + "</span>");
- $(".labelSection_FromGSTIN").html("<span>From GSTIN : " + response.result.GSTNo + "</span>");
- $(".hfAutoCompleteId_dcid").val(response.result.DcId);
- $(".hdn_refid").val($(".txtAutoComplete_invoiceid").val());
- Bizgaze.Apps.Integrations.EWayBill.Components.irnwithewaybill.Instance().getDistance();
- Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/crm/companies/managers/companymanager.js", function () {
- Bizgaze.Apps.CRM.Companies.Managers.CompanyManager.Instance().getBranch(branchid).then(function (response) {
- if (response.result != null) {
- let BranchName = response.result.BranchName;
- let branch = new Option(BranchName, branchid.toString(), true);
- $("#" + VisibleContainerId).find(".txtAutoComplete_branchid").append(branch).val(branchid).trigger("change");
- }
- });
- });
- }
- });
- });
- }
- getInvoiceDetails() {
- var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
- var recordid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_recordid").Value);
- var invoiceid = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_invoiceid").Value;
- Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().getInvoiceDetails(invoiceid).then(function (response) {
- if (response.result != null) {
- $(".txt_frompincode").val(response.result.BillFromZipCode);
- $(".txt_topincode").val(response.result.BillToZipCode);
- $(".labelSection_ToGSTIN").html("<span>To GSTIN : " + response.result.GSTNo + "</span>");
- }
- });
- }
- getDistance() {
- var fromplace = Number($('.txt_frompincode').val());
- var apikey = 'AIzaSyBGmahAAg3EVzAUJvttDZsjdZiJenJxGt8';
- if (apikey == undefined) {
- }
- var toplace = Number($('.txt_topincode').val());
- if (toplace == 0) {
- $('.number_approxdistance').val(0);
- }
- else {
- $.ajax({
- url: "https://maps.googleapis.com/maps/api/geocode/json?address=" + fromplace + "%20%22&key=" + apikey + "&sensor=false",
- method: "POST",
- success: function (data) {
- let latitude, longitude, flatitude, flongitude;
- flatitude = data.results[0].geometry.location.lat;
- flongitude = data.results[0].geometry.location.lng;
- $.ajax({
- url: "https://maps.googleapis.com/maps/api/geocode/json?address=" + toplace + "%20%22&key=" + apikey + "&sensor=false",
- method: "POST",
- success: function (_data) {
- latitude = _data.results[0].geometry.location.lat;
- longitude = _data.results[0].geometry.location.lng;
- var dd = getDistanceFromLatLonInKm(flatitude, flongitude, latitude, longitude);
- $('.number_approxdistance').val(Math.round(dd));
- }
- });
- }
- });
- function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
- var R = 6371;
- var dLat = deg2rad(lat2 - lat1);
- var dLon = deg2rad(lon2 - lon1);
- var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
- Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
- Math.sin(dLon / 2) * Math.sin(dLon / 2);
- var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
- var d = R * c;
- return d;
- }
- function deg2rad(deg) {
- return deg * (Math.PI / 180);
- }
- }
- }
- Checkout() {
- let instance = this;
- $(".modal-body").scrollTop(0);
- let cont_id = $("._bizgaze_popup_container:visible").attr("id");
- $("#" + cont_id).find("#btnDynamicSave").css("cursor", "pointer");
- $(".modal-body").scrollTop(0);
- $(".btn_Save_Form, .section_Default,.section_Part-B").removeClass("hidden");
- $("#btn_CloseForm_" + $("#hf_FormId").val()).removeClass('hidden');
- $(".CheckOutButton,.btn_back ").addClass('hidden');
- }
- backtoDetails() {
- $(".btn_Save_Form, .section_Default").removeClass('hidden');
- $(".section_Part-B,.CheckOutButton,.btn_back").addClass('hidden');
- $("#btn_CloseForm_" + $("#hf_FormId").val()).removeClass('hidden');
- }
- ShowPrintButton() {
- let instance = this;
- let InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
- let EWaybillId = Number(Unibase.Themes.Providers.DetailHelper.recordId);
- let detailContainer = "#" + Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
- $(detailContainer).find(".DetailSetting_" + InstalledAppId + "_Print").removeClass("btn-undefined").addClass("btn-warning");
- $(".btn-undefined").addClass("btn-success").removeClass("btn-undefined");
- instance.fileCacheHelper.loadJsFile("apps/transact/managers/ewaybill/ewaybillmanager.js", function (response) {
- Bizgaze.Apps.Transact.Managers.EWayBillManager.Instance().getEwayBill(EWaybillId).then(function (ewaybillresponse) {
- if (ewaybillresponse.result.Notes != null && ewaybillresponse.result.Notes != undefined && ewaybillresponse.result.Notes != "") {
- $(detailContainer).find(".li_DetailSetting_" + InstalledAppId + "_ApprovalError").remove();
- $(detailContainer).find('#div_App_DefaultWidgetSettings').append(`<div><div class="ActionsApprovalError mx-20 mb-2 rounded py-10 px-0 li_DetailSetting_` + InstalledAppId + `_ApprovalError" id="li_DetailSetting_` + InstalledAppId + `_ApprovalError" style="background-color:rgb(252 250 247);border-left: 3px solid #ff6060;padding:0.5rem 1rem 1rem;"> <p class="font-14 text-danger col-sm-12">` + ewaybillresponse.result.Notes + `</p> </div>`);
- $(detailContainer).find('#div_App_DefaultWidgetSettings').addClass('pb-0');
- }
- });
- });
- instance.Print();
- }
- Print() {
- let instance = this;
- let detailContainer = "#" + Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
- if ($(".printsetting").length != 0) {
- let printhtml = $(".printsetting")[0].outerHTML;
- $(".printsetting").remove();
- $(detailContainer).find("#div_App_DefaultWidgetSettings").find(".row").append(printhtml);
- $(".printsetting").find(".pull-right").removeClass("pull-right");
- }
- $('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Print').html('<span><i class=\"fa fa-print\"></i></span>');
- $(detailContainer).find('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_Print').click(function () {
- let EwaybillId = Unibase.Themes.Providers.DetailHelper.recordId;
- Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/transact/managers/ewaybill/ewaybillmanager.js", "platform/core/helpers/printhelper/printhelper.js"], function () {
- Bizgaze.Apps.Transact.Managers.EWayBillManager.Instance().getPrintEWayBill(EwaybillId).then(function (response) {
- Unibase.Platform.Helpers.PrintHelper.Instance().printPopup(response.result.PrintHTML);
- });
- });
- });
- }
- GetDistanceByPinCode() {
- let instance = this;
- var FromPinCode = $(".txt_frompincode").val().toString();
- var ToPinCode = $(".txt_topincode").val().toString();
- if (FromPinCode.length == 6 && ToPinCode.length == 6) {
- instance.getDistance();
- }
- }
- ShoworHideEWayBillButton() {
- let instance = this;
- let InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
- let detailContainer = "#" + Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
- let RefStatusId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_refstatusid").Value);
- if (RefStatusId == 1 || RefStatusId == 2 || RefStatusId == 6) {
- $(detailContainer).find('.li_DetailSetting_' + InstalledAppId + '_E-WayBill').addClass('hidden');
- }
- else {
- $(detailContainer).find('.li_DetailSetting_' + InstalledAppId + '_E-WayBill').removeClass('hidden');
- }
- }
- getEwayForm(Pk_Value) {
- let instance = Bizgaze.Apps.Integrations.EWayBill.Components.irnwithewaybill.Instance();
- instance.fileCacheHelper.loadJsFiles(['platform/forms/managers/formmanager.js', 'platform/apps/managers/appmanager.js'], function () {
- var FormUniqueId = 'Bizgaze_Extension_Transact_E-WayBill_App_E-WayBill_OrderDetails__CreateForm';
- Unibase.Platform.Forms.Managers.FormManager.Instance().getFormbyUniqueId(FormUniqueId).then(function (response) {
- var onLoadCallBack = {
- CallBack: function () {
- instance.bindewaydata(Pk_Value);
- },
- Parameters: null,
- };
- var formviewerObj = {
- FormId: response.result.FormId,
- AppConfigurationId: 0,
- Pk_Value: 0,
- PortletWidgetId: 0,
- OnSuccess: null,
- OnFail: null,
- OnLoad: onLoadCallBack,
- };
- Unibase.Platform.Forms.Components.FormViewer.Instance().init(formviewerObj);
- instance.navigationHelper.hideLoading();
- });
- });
- }
- bindewaydata(Pk_Value) {
- let instance = Bizgaze.Apps.Integrations.EWayBill.Components.irnwithewaybill.Instance();
- let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
- let _ewaybillid = Pk_Value;
- instance.fileCacheHelper.loadJsFiles(["apps/transact/managers/ewaybill/ewaybillmanager.js"], function () {
- Bizgaze.Apps.Transact.Managers.EWayBillManager.Instance().getewaybillpayload(_ewaybillid).then(function (res) {
- if (res.result != null) {
- $('input[type=text]').parent().addClass("floating-label-form-group-with-value");
- $(".txt_cessvalue").val(res.result.cessValue);
- $(".txt_cessvalue").attr("readonly", "readonly");
- $(".txt_cgstvalue").val(res.result.cgstValue);
- $(".txt_cgstvalue").attr("readonly", "readonly");
- $(".txt_transporterdocno").val(res.result.docNo);
- $(".txt_transporterdocno").attr("readonly", "readonly");
- $(".txt_dispatchfromgstin").val(res.result.fromGstin);
- $(".txt_dispatchfromgstin").attr("readonly", "readonly");
- $(".txt_fromaddr1").val(res.result.fromAddr1);
- $(".txt_fromaddr1").attr("readonly", "readonly");
- $(".txt_fromaddr2").val(res.result.fromAddr2);
- $(".txt_fromaddr2").attr("readonly", "readonly");
- $(".txt_frompincode").val(res.result.fromPincode);
- $(".txt_frompincode").attr("readonly", "readonly");
- $(".txt_fromplace").val(res.result.fromPlace);
- $(".txt_fromplace").attr("readonly", "readonly");
- $(".txt_fromstatecode").val(res.result.fromStateCode);
- $(".txt_fromstatecode").attr("readonly", "readonly");
- $(".txt_dispatchfromgstin").val(res.result.dispatchFromGSTIN);
- $(".txt_dispatchfromgstin").attr("readonly", "readonly");
- $(".txt_dispatchfromtradename").val(res.result.dispatchFromTradeName);
- $(".txt_dispatchfromtradename").attr("readonly", "readonly");
- $(".txt_igstvalue").val(res.result.igstValue);
- $(".txt_igstvalue").attr("readonly", "readonly");
- $(".txt_sgstvalue").val(res.result.sgstValue);
- $(".txt_sgstvalue").attr("readonly", "readonly");
- $(".txt_shiptogstin").val(res.result.shipToGSTIN);
- $(".txt_shiptogstin").attr("readonly", "readonly");
- $(".txt_shiptotradename").val(res.result.shipToTradeName);
- $(".txt_transportername").attr("readonly", "readonly");
- $(".txt_toaddr1").val(res.result.toAddr1);
- $(".txt_toaddr1").attr("readonly", "readonly");
- $(".txt_toaddr2").val(res.result.toAddr2);
- $(".txt_toaddr2").attr("readonly", "readonly");
- $(".txt_toplace").val(res.result.toPlace);
- $(".txt_toplace").attr("readonly", "readonly");
- $(".txt_tostatecode").val(res.result.toStateCode);
- $(".txt_tostatecode").attr("readonly", "readonly");
- $(".txt_toplace").attr("readonly", "readonly");
- $(".txt_topincode").val(res.result.toPincode);
- $(".txt_topincode").attr("readonly", "readonly");
- $(".txt_vehicleno").val(res.result.vehicleNo);
- $(".dropdown_vehicletype").val(res.result.vehicleType).prop("disabled", true);
- $(".dropdown_transmode").val(res.result.transMode).prop("disabled", true);
- $(".date_transporterdocdate").val(res.result.transDocDate).prop("disabled", true);
- $(".txt_vehicleno").attr("readonly", "readonly");
- $(".txt_totalvalue").val(res.result.totalValue);
- $(".txt_totalvalue").attr("readonly", "readonly");
- $(".txt_totinvvalue").val(res.result.totInvValue);
- $(".number_approxdistance").val(res.result.transDistance);
- $(".txt_totinvvalue").attr("readonly", "readonly");
- var dt = res.result;
- var itemlists = dt.itemList;
- for (var i = 0; i < itemlists.length; i++) {
- var data = itemlists[i];
- var html = '<tr class="GetewaybillitemsDetails-list-items">' +
- '<td>' + data.productName + ' </td>' +
- '<td>' + data.productDesc + ' </td>' +
- '<td>' + data.quantity + ' </td>' +
- '<td>' + data.hsnCode + ' </td>' +
- '<td>' + data.qtyUnit + ' </td>' +
- '<td>' + data.cgstRate + ' </td>' +
- '<td>' + data.sgstRate + ' </td>' +
- '<td>' + data.taxableAmount + ' </td>' +
- '</tr>';
- $("#tblgetewaybilliitems").append(html);
- }
- instance.fileCacheHelper.loadJsFile("apps/transact/managers/ewaybill/ewaybillmanager.js", function () {
- Bizgaze.Apps.Transact.Managers.EWayBillManager.Instance().getEwayBill(_ewaybillid).then(function (ewaybillresponse) {
- if (ewaybillresponse.result != null) {
- let SupplyTypeid = Number(ewaybillresponse.result.SupplyTypeId);
- let SupplyTypename = ewaybillresponse.result.SupplyTypeName;
- let supplytype = new Option(SupplyTypename, SupplyTypeid.toString(), true);
- $("#" + VisibleContainerId).find(".txtAutoComplete_supplytypeid").append(supplytype).prop("disabled", true);
- $("#" + VisibleContainerId).find(".hfAutoCompleteId_supplytypeid").val(ewaybillresponse.result.SupplyTypeId);
- let SubSupplyTypeid = Number(ewaybillresponse.result.SubSupplyTypeId);
- let SubSupplyTypeName = ewaybillresponse.result.SubSupplyType;
- let SubSupplyType = new Option(SubSupplyTypeName, SubSupplyTypeid.toString(), true);
- $("#" + VisibleContainerId).find(".ddl_cascading_subsupplytypeid").append(SubSupplyType).prop("disabled", true);
- $("#" + VisibleContainerId).find(".hfAutoCompleteId_subsupplytypeid").val(ewaybillresponse.result.SubSupplyTypeId);
- let DocTypeid = Number(ewaybillresponse.result.DocTypeId);
- let DocTypeName = ewaybillresponse.result.DocTypeName;
- let DocType = new Option(DocTypeName, DocTypeid.toString(), true);
- $("#" + VisibleContainerId).find(".ddl_cascading_doctypeid").append(DocType).prop("disabled", true);
- $("#" + VisibleContainerId).find(".hfAutoCompleteId_doctypeid").val(ewaybillresponse.result.DocTypeId);
- $(".hdn_ewaybillid").val(ewaybillresponse.result.EwayBillId);
- $(".hdn_ewaybilldate").val(ewaybillresponse.result.ewaybilldate);
- $(".hdn_ewaybillno").val(ewaybillresponse.result.ewaybillno);
- $(".hdn_validupto").val(ewaybillresponse.result.validupto);
- $(".hdn_refid").val(ewaybillresponse.result.validupto);
- let Invoiceid = Number(ewaybillresponse.result.RefId);
- instance.fileCacheHelper.loadJsFile("apps/transact/managers/invoicemanager.js", function () {
- Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().getInvoiceDetails(Invoiceid).then(function (response) {
- if (response.result != null) {
- let Invoiceno = response.result.InvoiceNo;
- let invoice = new Option(Invoiceno, Invoiceid.toString(), true);
- $("#" + VisibleContainerId).find(".txtAutoComplete_invoiceid").append(invoice).prop("disabled", true);
- }
- });
- });
- }
- });
- });
- }
- });
- });
- }
- getewaybillsavedata(Ewaybillid) {
- let instance = this;
- let EwayItemList = new Array();
- for (let i = 0; i < instance.g_EwaybillItems.length; i++) {
- let EwaybillItem = instance.g_EwaybillItems[i];
- EwayItemList.push({
- ProductName: EwaybillItem.productName,
- Ewaybillid: Ewaybillid,
- ProductDesc: EwaybillItem.productDesc,
- hsnCode: EwaybillItem.hsnCode,
- Quantity: EwaybillItem.quantity,
- QtyUnit: EwaybillItem.qtyUnit,
- cgstRate: EwaybillItem.cgstRate,
- igstRate: EwaybillItem.sgstRate,
- taxableAmount: EwaybillItem.taxableAmount,
- });
- }
- return EwayItemList;
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new irnwithewaybill();
- }
- return this.instance;
- }
- }
- Components.irnwithewaybill = irnwithewaybill;
- })(Components = EWayBill.Components || (EWayBill.Components = {}));
- })(EWayBill = Integrations.EWayBill || (Integrations.EWayBill = {}));
- })(Integrations = Apps.Integrations || (Apps.Integrations = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|