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,371 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Integrations;
(function (Integrations) {
let EInvoice;
(function (EInvoice_1) {
let Components;
(function (Components) {
class EInvoice extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html() {
return null;
}
init() {
}
loadControl(containerid, prop) {
this.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js", "apps/transact/enums/enum.js"], function () {
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 tblgeteinvoicedata" id = "tblgeteinvoiceitems" >
<thead>
<tr>
<th>ItemAmt</th>
<th>BarCode</th>
<th>ItemCesAmt</th>
<th>ItemCesNonAdvlAmt</th>
<th>ItemCesrt</th>
<th>CGST Amt</th>
<th>ItemDiscount</th>
<th>ItemFreeQty</th>
</tr>
</thead>
<tbody id = "tblgeteinvoiceitems" >
</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() {
}
getEinvoiceForm(Pk_Value) {
let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
instance.fileCacheHelper.loadJsFiles(['platform/forms/managers/formmanager.js', 'platform/apps/managers/appmanager.js'], function () {
var FormUniqueId = 'Bizgaze_Extension_Transact_E-Invoice_App_E-Invoice_CreateForm';
Unibase.Platform.Forms.Managers.FormManager.Instance().getFormbyUniqueId(FormUniqueId).then(function (response) {
var onLoadCallBack = {
CallBack: function () {
instance.bindeinvoicedata(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();
});
});
}
bindeinvoicedata(Pk_Value) {
let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var invoiceId = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceid").Value);
var invoiceNo = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceno").Value);
var gstInvoiceType = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_gstinvoicetypeid").Value);
var isEWayBill = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_isewaybill").Value);
var einvoiceid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_einvoiceid").Value);
var ewaybillid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_ewaybillid").Value);
var invoice = new Option(invoiceNo, invoiceId, true);
;
let _einvoiceid = Pk_Value;
instance.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js", "apps/transact/enums/enum.js"], function () {
Bizgaze.Apps.Transact.Managers.EInvoiceManager.Instance().geteinvoicepayload(_einvoiceid).then(function (res) {
if (res.result != null) {
$('input[type=text]').parent().addClass("floating-label-form-group-with-value");
$(".txtAutoComplete_invoiceid").empty();
$(".txtAutoComplete_invoiceid").append(invoice);
$(".hfAutoCompleteId_invoiceid").val(invoiceId);
$('.txtAutoComplete_invoiceid').prop('disabled', true);
$(".hdn_einvoiceid").val(einvoiceid);
$(".hdn_ewaybillid").val(ewaybillid);
$(".hdn_einvoicestatusid").val("1");
$(".txt_gstinvoicetypeid").val(gstInvoiceType).prop("disabled", true);
$(".txt_buyeraddr1").val(res.result.BuyerDtls.Addr1).prop("disabled", true);
$(".txt_buyeraddr2").val(res.result.BuyerDtls.Addr2).prop("disabled", true);
$(".txt_buyergstin").val(res.result.BuyerDtls.Gstin).prop("disabled", true);
$(".txt_buyerlglnm").val(res.result.BuyerDtls.LglNm).prop("disabled", true);
$(".txt_buyerloc").val(res.result.BuyerDtls.Loc).prop("disabled", true);
$(".txt_buyerph").val(res.result.BuyerDtls.Ph).prop("disabled", true);
$(".txt_buyerpin").val(res.result.BuyerDtls.Pin).prop("disabled", true);
$(".txt_buyerpos").val(res.result.BuyerDtls.Pos).prop("disabled", true);
$(".txt_buyerstcd").val(res.result.BuyerDtls.Stcd).prop("disabled", true);
$(".txt_buyertrdnm").val(res.result.BuyerDtls.TrdNm).prop("disabled", true);
$(".txt_dispaddr1").val(res.result.DispDtls.Addr1).prop("disabled", true);
$(".txt_dispaddr2").val(res.result.DispDtls.Addr2).prop("disabled", true);
$(".txt_disploc").val(res.result.DispDtls.Loc).prop("disabled", true);
$(".txt_dispnm").val(res.result.DispDtls.Nm).prop("disabled", true);
$(".txt_disppin").val(res.result.DispDtls.Pin).prop("disabled", true);
$(".txt_dispstcd").val(res.result.DispDtls.Stcd).prop("disabled", true);
$(".date_docdt").val(res.result.DocDtls.Dt).prop("disabled", true);
$(".txt_docno").val(res.result.DocDtls.No).prop("disabled", true);
$(".txt_doctyp").val(res.result.DocDtls.Typ).prop("disabled", true);
$(".txt_expcntcode").val(res.result.ExpDtls.CntCode).prop("disabled", true);
$(".txt_expexpduty").val(res.result.ExpDtls.ExpDuty).prop("disabled", true);
$(".txt_expforcur").val(res.result.ExpDtls.ForCur).prop("disabled", true);
$(".txt_expport").val(res.result.ExpDtls.Port).prop("disabled", true);
$(".txt_exprefclm").val(res.result.ExpDtls.RefClm).prop("disabled", true);
$(".txt_expshipbdt").val(res.result.ExpDtls.ShipBDt).prop("disabled", true);
$(".txt_expshipbno").val(res.result.ExpDtls.ShipBNo).prop("disabled", true);
$(".txt_payaccdet").val(res.result.PayDtls.Accdet).prop("disabled", true);
$(".txt_paycrday").val(res.result.PayDtls.Crday).prop("disabled", true);
$(".txt_paycrtrn").val(res.result.PayDtls.Crtrn).prop("disabled", true);
$(".txt_paydirdr").val(res.result.PayDtls.Dirdr).prop("disabled", true);
$(".txt_payfininsbr").val(res.result.PayDtls.Fininsbr).prop("disabled", true);
$(".txt_paymode").val(res.result.PayDtls.Mode).prop("disabled", true);
$(".txt_paynm").val(res.result.PayDtls.Nm).prop("disabled", true);
$(".txt_paypaidamt").val(res.result.PayDtls.Paidamt).prop("disabled", true);
$(".txt_payinstr").val(res.result.PayDtls.Payinstr).prop("disabled", true);
$(".txt_paymtdue").val(res.result.PayDtls.Paymtdue).prop("disabled", true);
$(".txt_payterm").val(res.result.PayDtls.Payterm).prop("disabled", true);
$(".date_refdocperdinvenddt").val(res.result.RefDtls.DocPerdDtls.InvEndDt).prop("disabled", true);
$(".date_refdocperdinvstdt").val(res.result.RefDtls.DocPerdDtls.InvStDt).prop("disabled", true);
$(".txt_refinvrm").val(res.result.RefDtls.InvRm).prop("disabled", true);
$(".date_refprecdocinvdt").val();
$(".txt_refprecdocinvno").val();
$(".txt_refprecdocothrefno").val();
$(".txt_selleraddr1").val(res.result.SellerDtls.Addr1).prop("disabled", true);
$(".txt_selleraddr2").val(res.result.SellerDtls.Addr2).prop("disabled", true);
$(".txt_sellerem").val(res.result.SellerDtls.Em).prop("disabled", true);
$(".txt_sellergstin").val(res.result.SellerDtls.Gstin).prop("disabled", true);
$(".txt_sellerlglnm").val(res.result.SellerDtls.LglNm).prop("disabled", true);
$(".txt_sellerloc").val(res.result.SellerDtls.Loc).prop("disabled", true);
$(".txt_sellerph").val(res.result.SellerDtls.Ph).prop("disabled", true);
$(".txt_sellerpin").val(res.result.SellerDtls.Pin).prop("disabled", true);
$(".txt_sellerstcd").val(res.result.SellerDtls.Stcd).prop("disabled", true);
$(".txt_sellertrdnm").val(res.result.SellerDtls.TrdNm).prop("disabled", true);
$(".txt_shipaddr1").val(res.result.ShipDtls.Addr1).prop("disabled", true);
$(".txt_shipaddr2").val(res.result.ShipDtls.Addr2).prop("disabled", true);
$(".txt_shipgstin").val(res.result.ShipDtls.Gstin).prop("disabled", true);
$(".txt_shiplglnm").val(res.result.ShipDtls.LglNm).prop("disabled", true);
$(".txt_shiploc").val(res.result.ShipDtls.Loc).prop("disabled", true);
$(".txt_shippin").val(res.result.ShipDtls.Pin).prop("disabled", true);
$(".txt_shipstcd").val(res.result.ShipDtls.Stcd).prop("disabled", true);
$(".txt_shiptrdnm").val(res.result.ShipDtls.TrdNm).prop("disabled", true);
$(".txt_transecmgstin").val(res.result.TranDtls.EcmGstin).prop("disabled", true);
$(".txt_transigstonintra").val(res.result.TranDtls.IgstOnIntra).prop("disabled", true);
$(".txt_transregrev").val(res.result.TranDtls.RegRev).prop("disabled", true);
$(".txt_transsuptyp").val(res.result.TranDtls.SupTyp).prop("disabled", true);
$(".txt_transtaxsch").val(res.result.TranDtls.TaxSch).prop("disabled", true);
if (isEWayBill == "true") {
$(".hdn_isewaybill").val("true");
$(".section_E-WayBillDetails").removeClass("hidden");
$(".txt_frompincode").val(res.result.EwbDtls.FromPinCode).prop("disabled", true);
$(".txt_topincode").val(res.result.EwbDtls.ToPinCode).prop("disabled", true);
$(".hdn_frompincode").val(res.result.SellerDtls.Pin);
$(".hdn_topincode").val(res.result.BuyerDtls.Pin);
if (res.result.EwbDtls.ApproxDistance != 0)
$(".txt_approxdistance").val(res.result.EwbDtls.ApproxDistance);
$(".date_transporterdocdate").val(res.result.EwbDtls.TransdocDt).prop("disabled", true);
$(".txt_transporterdocno").val(res.result.EwbDtls.Transdocno).prop("disabled", true);
$(".txt_transportername").val(res.result.EwbDtls.Transname).prop("disabled", true);
$(".txt_transportergstin").val(res.result.EwbDtls.TransporterGstIn).prop("disabled", true);
$(".txt_vehicletype").val(res.result.EwbDtls.Vehtype).prop("disabled", true);
$(".txt_transmode").val(res.result.EwbDtls.TransporterMode).prop("disabled", true);
$(".txt_vehicleno").val(res.result.EwbDtls.Vehno).prop("disabled", true);
if (res.result.EwbDtls.Vehtype == 'R') {
$(".txt_vehicletype").val('Regular').prop("disabled", true);
}
if (res.result.EwbDtls.Vehtype == 'O') {
$(".txt_vehicletype").val('Over Dimensional Cargo').prop("disabled", true);
}
$(".dropdown_transmode").val(res.result.EwbDtls.TransMode).prop("disabled", true);
$(".txt_vehicleno").val(res.result.EwbDtls.Vehno).prop("disabled", true);
$(".txt_approxdistance").addClass("required");
}
else {
$(".section_E-WayBillDetails").addClass("hidden");
$(".txt_approxdistance").val("0").removeClass("required");
$(".hdn_isewaybill").val("false");
}
var dt = res.result;
var itemlists = dt.ItemList;
for (var i = 0; i < itemlists.length; i++) {
var data = itemlists[i];
var html = '<tr class="GeteinvoiceitemsDetails-list-items">' +
'<td>' + data.AssAmt + ' </td>' +
'<td>' + data.Barcde + ' </td>' +
'<td>' + data.CesAmt + ' </td>' +
'<td>' + data.CesNonAdvlAmt + ' </td>' +
'<td>' + data.CesRt + ' </td>' +
'<td>' + data.CgstAmt + ' </td>' +
'<td>' + data.Discount + ' </td>' +
'<td>' + data.FreeQty + ' </td>' +
'</tr>';
$("#tblgeteinvoiceitems").append(html);
}
instance.getDistance();
}
});
});
}
getInvoiceDetails() {
var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
$(".hdn_einvoicestatusid").val("1");
if (installedAppId != 0) {
var invoiceId = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceid").Value);
var ewaybillid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_ewaybillid").Value);
var invoiceNo = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceno").Value);
var vehicleNo = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_vehicleno").Value);
var transporterdocdate = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transporterdocdate").Value);
var transporterdocno = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transporterdocno").Value);
var transportername = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transportername").Value);
var transportergstin = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transportergstin").Value);
var vehicletype = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_vehicletype").Value);
var transmode = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transmode").Value);
$(".txtAutoComplete_invoiceid").empty();
$(".txtAutoComplete_invoiceid").append(new Option(invoiceNo, invoiceId, true));
$(".hfAutoCompleteId_invoiceid").val(invoiceId);
$(".hdn_ewaybillid").val(ewaybillid);
$(".txt_vehicleno").val(vehicleNo);
$(".date_transporterdocdate").val(transporterdocdate);
$(".txt_transporterdocno").val(transporterdocno);
$(".txt_transportername").val(transportername);
$(".txt_transportergstin").val(transportergstin);
$(".dropdown_vehicletype").val(vehicletype);
$(".dropdown_transmode").val(transmode);
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/transact/managers/invoicemanager.js,apps/transact/enums/enum.js"], function () {
Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().getInvoiceDetails(invoiceId).then(function (response) {
if (response.result != null) {
$(".txt_itemassamt").val();
$(".txt_itemattribnm").val();
$(".txt_itemattribval").val();
$(".txt_itembarcode").val();
$(".txt_itembchexpdt").val();
$(".txt_itembchnm").val();
$(".txt_itembchwrdt").val();
$(".txt_itemcesamt").val();
$(".txt_itemcesnonadvlamt").val();
$(".txt_itemcesrt").val();
$(".txt_itemcgstamt").val();
$(".txt_itemdiscount").val();
$(".txt_itemfreeqty").val();
}
});
});
}
$(".txt_vehicleno").keyup(function () {
$(".txt_vehicleno").val($(".txt_vehicleno").val().toString().toUpperCase());
});
}
getDistance() {
var fromplace = Number($('.txt_sellerpin').val());
var toplace = Number($('.txt_buyerpin').val());
var apikey = 'AIzaSyBGmahAAg3EVzAUJvttDZsjdZiJenJxGt8';
if (apikey == undefined) {
}
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);
}
}
}
checkstatus() {
let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var einvoiceid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_einvoiceid").Value);
instance.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js"], function () {
Bizgaze.Apps.Transact.Managers.EInvoiceManager.Instance().geteinvoicebyid(einvoiceid).then(function (res) {
if (res.result != null) {
if (res.result.EInvoiceStatusId == 2 || res.result.AckNo == null)
$(".DetailSetting_" + installedAppId + "_Cancele-invoice").addClass("hidden");
else
$(".DetailSetting_" + installedAppId + "_Cancele-invoice").removeClass("hidden");
if (res.result.AckNo != null && res.result.AckNo != "") {
$("#btn_Edite-Invoice").addClass("hidden");
}
else
$("#btn_Edite-Invoice").removeClass("hidden");
}
});
});
}
ShowOrHideEInvoiceButton() {
let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var invoiceid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceid").Value);
instance.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js"], function () {
Bizgaze.Apps.Transact.Managers.EInvoiceManager.Instance().geteinvoicebyinvoiceid(invoiceid).then(function (res) {
if (res.result != null) {
if (res.result.EInvoiceStatusId == 2 || res.result.AckNo == null)
$(".DetailSetting_" + installedAppId + "_e-Invoice").removeClass("hidden");
else
$(".DetailSetting_" + installedAppId + "_e-Invoice").addClass("hidden");
}
});
});
}
static Instance() {
if (this.instance === undefined) {
this.instance = new EInvoice();
}
return this.instance;
}
}
Components.EInvoice = EInvoice;
})(Components = EInvoice_1.Components || (EInvoice_1.Components = {}));
})(EInvoice = Integrations.EInvoice || (Integrations.EInvoice = {}));
})(Integrations = Apps.Integrations || (Apps.Integrations = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,44 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Integrations;
(function (Integrations) {
let EInvoice;
(function (EInvoice) {
let Components;
(function (Components) {
class EInvoice_Setting extends Unibase.Platform.Core.BaseComponent {
loadSettingHtml() {
return ``;
}
bindControlData(controldatajson) {
return "";
}
SaveControlData(controldatajson) {
return "";
}
loadControlPropertiesHtml(Container) {
return ``;
}
bindPropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
savePropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
static Instance() {
if (this.instance === undefined) {
this.instance = new EInvoice_Setting();
}
return this.instance;
}
}
Components.EInvoice_Setting = EInvoice_Setting;
})(Components = EInvoice.Components || (EInvoice.Components = {}));
})(EInvoice = Integrations.EInvoice || (Integrations.EInvoice = {}));
})(Integrations = Apps.Integrations || (Apps.Integrations = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"einvoice.settings.js","sourceRoot":"","sources":["einvoice.settings.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAwChB;AAxCD,WAAU,OAAO;IACb,IAAiB,IAAI,CAsCpB;IAtCD,WAAiB,IAAI;QACjB,IAAiB,YAAY,CAmC5B;QAnCD,WAAiB,YAAY;YACzB,IAAiB,QAAQ,CAiCxB;YAjCD,WAAiB,QAAQ;gBACrB,IAAiB,UAAU,CA+B1B;gBA/BD,WAAiB,UAAU;oBACvB,MAAa,gBAAiB,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBACrE,eAAe;4BACX,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,eAAe,CAAC,eAAoB;4BAChC,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,eAAe,CAAC,eAAoB;4BAChC,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,yBAAyB,CAAC,SAAS;4BAC/B,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,oBAAoB,CAAC,IAAgB;4BAEjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,oBAAoB,CAAC,IAAgB;4BACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBAED,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;gCAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAAC;6BAC1C;4BACD,OAAO,IAAI,CAAC,QAAQ,CAAC;wBACzB,CAAC;qBACJ;oBA7BY,2BAAgB,mBA6B5B,CAAA;gBACL,CAAC,EA/BgB,UAAU,GAAV,mBAAU,KAAV,mBAAU,QA+B1B;YACL,CAAC,EAjCgB,QAAQ,GAAR,qBAAQ,KAAR,qBAAQ,QAiCxB;QACL,CAAC,EAnCgB,YAAY,GAAZ,iBAAY,KAAZ,iBAAY,QAmC5B;IAEL,CAAC,EAtCgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAsCpB;AACL,CAAC,EAxCS,OAAO,KAAP,OAAO,QAwChB"}
@@ -0,0 +1,268 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Integrations;
(function (Integrations) {
let EWayBill;
(function (EWayBill_1) {
let Components;
(function (Components) {
class EWayBill extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return [];
}
cssFiles() {
return [];
}
html() {
return null;
}
load() {
Bizgaze.Apps.Integrations.EWayBill.Components.EWayBill.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.EWayBill.Instance().GetDistanceByPinCode();
});
}
getAddressById(id) {
let AutoComplete_branchid = Number($(".txtAutoComplete_branchid").val());
if (id != 0)
AutoComplete_branchid = id;
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/crm/contacts/managers/contactmanager.js", function () {
Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getAddressById(AutoComplete_branchid).then(function (response) {
if (response.result != null) {
$(".txt_frompincode").val(response.result.ZipCode).parent().addClass("floating-label-form-group-with-value");
;
$(".labelSection_FromGSTIN").html("<span>From GSTIN : " + response.result.GSTNO + "</span>");
Bizgaze.Apps.Integrations.EWayBill.Components.EWayBill.Instance().getDistance();
$(".hdn_fromplace").val(response.result.AliasName);
$(".hdn_fromstatecode").val(response.result.StateCode);
if (Number($(".txtAutoComplete_branchid").val()) == 0) {
let supplytype = new Option(response.result.AliasName, AutoComplete_branchid.toString(), true);
$(".txtAutoComplete_branchid").append(supplytype);
$(".hfAutoCompleteId_branchid").val(AutoComplete_branchid);
}
}
});
});
}
getInvoiceDetails() {
var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_invoiceid") != undefined) {
var invoiceid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_invoiceid").Value);
if (invoiceid != 0) {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/transact/managers/invoicemanager.js"], function () {
Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().getInvoiceDetails(invoiceid).then(function (response) {
if (response.result != null) {
$(".txt_frompincode").val(response.result.BillFromZipCode).parent().addClass("floating-label-form-group-with-value");
$(".txt_topincode").val(response.result.BillToZipCode).parent().addClass("floating-label-form-group-with-value");
$(".labelSection_ToGSTIN").html("<span>To GSTIN : " + response.result.GSTNo + "</span>");
$(".hdn_refid").val(invoiceid);
$(".hdn_dcid").val(response.result.DcId);
$(".hdn_invoiceid").val(invoiceid);
$(".hdn_refinstalledappid").val(response.result.InstalledAppId);
let supplytype = new Option("Outward", "1", true);
$(".txtAutoComplete_supplytypeid").append(supplytype).val(1).trigger("change");
Bizgaze.Apps.Integrations.EWayBill.Components.EWayBill.Instance().getAddressById(response.result.BillFromAddressId);
}
});
});
}
}
else {
if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_dcid") != undefined) {
var dcid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_dcid").Value);
if (dcid != 0) {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["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).addClass("floating-label-form-group-with-value");
;
$(".txt_topincode").val(response.result.ShipToZipCode).addClass("floating-label-form-group-with-value");
;
$(".labelSection_ToGSTIN").html("<span>To GSTIN : " + response.result.GSTInNo + "</span>");
$(".hdn_isdc").val("true");
$(".hdn_refid").val(dcid);
$(".hdn_invoiceid").val(response.result.InvoiceId);
$(".hdn_dcid").val(dcid);
$(".hdn_refinstalledappid").val(response.result.DcInstallAppId);
let supplytype = new Option("Inward", "2", true);
$(".txtAutoComplete_supplytypeid").append(supplytype).val(2).trigger("change");
;
Bizgaze.Apps.Integrations.EWayBill.Components.EWayBill.Instance().getAddressById(0);
}
});
});
}
}
}
}
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;
if (data.results.length > 0) {
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);
}
}
}
ShowPrintButton() {
debugger;
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 {
$('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_E-WayBill').addClass('hidden');
let ewaybillid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_ewaybillid") == undefined ? 0 : Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_ewaybillid").Value);
if (ewaybillid == 0)
$('.DetailSetting_' + Unibase.Themes.Providers.DetailHelper.installedAppId + '_E-WayBill').removeClass('hidden');
}
}
getdcdetails() {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/transact/managers/inventory/dcmanager.js"], function () {
Bizgaze.Apps.Transact.Managers.DCManager.Instance().getdc($(".txtAutoComplete_dcid").val()).then(function (response) {
if (response.result != null) {
$(".hfAutoCompleteId_invoiceid").val(response.result.InvoiceId);
$(".hdn_refid").val($(".txtAutoComplete_dcid").val());
}
});
});
}
GetInvoice() {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/transact/managers/invoicemanager.js"], function () {
Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().getInvoiceDetails($(".txtAutoComplete_invoiceid").val()).then(function (response) {
if (response.result != null) {
$(".hfAutoCompleteId_dcid").val(response.result.DcId);
$(".hdn_refid").val($(".txtAutoComplete_invoiceid").val());
}
});
});
}
checkstatus() {
var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var einvoiceid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_ewaybillid").Value);
var statusid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_statusid").Value);
if (statusid != undefined) {
if (statusid == 2) {
$(".DetailSetting_" + installedAppId + "_Cancele-WayBill").addClass("hidden");
$(".DetailSetting_" + installedAppId + "_UpdateVehicleNo").addClass("hidden");
$(".DetailSetting_" + installedAppId + "_e-waybill").addClass("hidden");
}
else {
$(".DetailSetting_" + installedAppId + "_Cancele-WayBill").removeClass("hidden");
$(".DetailSetting_" + installedAppId + "_UpdateVehicleNo").removeClass("hidden");
$(".DetailSetting_" + installedAppId + "_e-waybill").removeClass("hidden");
}
}
}
checkewaybillstatus() {
var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
var ewaybillno = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_ewaybillno").Value);
if (ewaybillno == " " || ewaybillno == "") {
$(".DetailSetting_" + installedAppId + "_e-waybill").removeClass("hidden");
}
$(".DetailSetting_" + installedAppId + "_e-waybill").addClass("hidden");
}
static Instance() {
if (this.instance === undefined) {
this.instance = new EWayBill();
}
return this.instance;
}
}
Components.EWayBill = EWayBill;
})(Components = EWayBill_1.Components || (EWayBill_1.Components = {}));
})(EWayBill = Integrations.EWayBill || (Integrations.EWayBill = {}));
})(Integrations = Apps.Integrations || (Apps.Integrations = {}));
})(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
@@ -0,0 +1,446 @@
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 = {}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,43 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Integrations;
(function (Integrations) {
let EWayBill;
(function (EWayBill) {
let Components;
(function (Components) {
class irnwithewaybillsettings {
loadControlPropertiesHtml(controlpropList, container) {
return ``;
}
bindPropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
savePropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
loadSettingHtml() {
return null;
}
bindControlData(controldatajson) {
return null;
}
SaveControlData(controldatajson) {
return controldatajson;
}
static Instance() {
if (this._instance === undefined)
this._instance = new irnwithewaybillsettings();
return this._instance;
}
}
Components.irnwithewaybillsettings = irnwithewaybillsettings;
})(Components = EWayBill.Components || (EWayBill.Components = {}));
})(EWayBill = Integrations.EWayBill || (Integrations.EWayBill = {}));
})(Integrations = Apps.Integrations || (Apps.Integrations = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"irnwithewaybillsettings.js","sourceRoot":"","sources":["irnwithewaybillsettings.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAyChB;AAzCD,WAAU,OAAO;IACb,IAAiB,IAAI,CAuCpB;IAvCD,WAAiB,IAAI;QACjB,IAAiB,YAAY,CAqC5B;QArCD,WAAiB,YAAY;YACzB,IAAiB,QAAQ,CAmCxB;YAnCD,WAAiB,QAAQ;gBACrB,IAAiB,UAAU,CAiC1B;gBAjCD,WAAiB,UAAU;oBAEvB,MAAa,uBAAuB;wBAChC,yBAAyB,CAAC,eAAsC,EAAE,SAAS;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,oBAAoB,CAAC,IAAgB;4BACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,oBAAoB,CAAC,IAAgB;4BACjC,IAAI,gBAAgB,GAA6B,IAAI,CAAC,gBAAgB,CAAC;4BACvE,OAAO,EAAE,CAAC;wBACd,CAAC;wBACD,eAAe;4BACX,OAAO,IAAI,CAAC;wBAChB,CAAC;wBACD,eAAe,CAAC,eAAoB;4BAChC,OAAO,IAAI,CAAC;wBAChB,CAAC;wBACD,eAAe,CAAC,eAAoB;4BAChC,OAAO,eAAe,CAAC;wBAC3B,CAAC;wBAID,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,uBAAuB,EAAE,CAAC;4BACnD,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBA7BY,kCAAuB,0BA6BnC,CAAA;gBAEL,CAAC,EAjCgB,UAAU,GAAV,mBAAU,KAAV,mBAAU,QAiC1B;YACL,CAAC,EAnCgB,QAAQ,GAAR,qBAAQ,KAAR,qBAAQ,QAmCxB;QACL,CAAC,EArCgB,YAAY,GAAZ,iBAAY,KAAZ,iBAAY,QAqC5B;IACL,CAAC,EAvCgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAuCpB;AACL,CAAC,EAzCS,OAAO,KAAP,OAAO,QAyChB"}
@@ -0,0 +1,24 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Integrations;
(function (Integrations) {
let EWayBill;
(function (EWayBill) {
let Infos;
(function (Infos) {
class irnewayOrderItems {
static Instance() {
if (this.instance === undefined) {
this.instance = new irnewayOrderItems();
}
return this.instance;
}
}
Infos.irnewayOrderItems = irnewayOrderItems;
})(Infos = EWayBill.Infos || (EWayBill.Infos = {}));
})(EWayBill = Integrations.EWayBill || (Integrations.EWayBill = {}));
})(Integrations = Apps.Integrations || (Apps.Integrations = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"irnewayOrderItems.js","sourceRoot":"","sources":["irnewayOrderItems.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA6BhB;AA7BD,WAAU,OAAO;IACb,IAAiB,IAAI,CA2BpB;IA3BD,WAAiB,IAAI;QACjB,IAAiB,YAAY,CAyB5B;QAzBD,WAAiB,YAAY;YACzB,IAAiB,QAAQ,CAuBxB;YAvBD,WAAiB,QAAQ;gBACrB,IAAiB,KAAK,CAqBrB;gBArBD,WAAiB,KAAK;oBAClB,MAAa,iBAAiB;wBAa1B,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;gCAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAiB,EAAE,CAAC;6BAC3C;4BACD,OAAO,IAAI,CAAC,QAAQ,CAAC;wBACzB,CAAC;qBACJ;oBAnBY,uBAAiB,oBAmB7B,CAAA;gBACL,CAAC,EArBgB,KAAK,GAAL,cAAK,KAAL,cAAK,QAqBrB;YACL,CAAC,EAvBgB,QAAQ,GAAR,qBAAQ,KAAR,qBAAQ,QAuBxB;QACL,CAAC,EAzBgB,YAAY,GAAZ,iBAAY,KAAZ,iBAAY,QAyB5B;IACL,CAAC,EA3BgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QA2BpB;AACL,CAAC,EA7BS,OAAO,KAAP,OAAO,QA6BhB"}
@@ -0,0 +1,408 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Integrations;
(function (Integrations) {
let GST;
(function (GST) {
let Components;
(function (Components) {
class GSTSubmission extends Unibase.Platform.Core.BaseComponent {
jsFiles() {
return ['apps/integrations/gst/managers/gstmanager.js'];
}
cssFiles() {
return [];
}
html() {
const html = `<div id="gst_Otp" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header mt-2 mb-2"><h5 class="modal-title pull-left">OTP</h5><button type="button" class="close pull-right" data-dismiss="modal" aria-hidden="true">&times;</button></div><div class="modal-body" id="div_modalbody"><div class="mb-10"><p class="lbl_Otp">Please Enter The OTP</p></div><div class="floating-label-form-group mb-2"><input class="form-control" id="txt_Otp" placeholder="Enter OTP" type="text"></div></div><div class="modal-footer mb-2" style="display:block"><button type="button" onclick="" class="btn btn-primary pull-right" id="btn_VerifyOtp">Ok</button></div></div></div></div>`;
$("#_bizgaze_modal").append(html);
$(".bootbox-input").keypress(function (e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
MessageHelper.Instance().showSuccess("Numbers only allowed", 'div_validationsummary');
return false;
}
});
return html;
}
load() {
}
saveHSNGSTRtoGSTPortal(taxclassificationId, gstNo, InvoiceTypeId) {
var instance = this;
let containerId = "#" + Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
let b2bCheckboxes = $(containerId).find('input.b2binvoices');
var invoiceids = $(containerId).find('.b2binvoices:checkbox:checked').map(function () {
return $(this).val();
}).get();
console.log(invoiceids);
$(containerId).find("#selectedinvoices_check").click(function () {
var checkBoxes = b2bCheckboxes.find('input.b2binvoices');
checkBoxes.prop("checked", !checkBoxes.prop("checked"));
});
b2bCheckboxes.click(function () {
if (!$(this).is(':checked')) {
$("#selectedinvoices_check").prop('checked', false);
}
else if (b2bCheckboxes.is(":checked")) {
$("#selectedinvoices_check").prop('checked', true);
}
});
bootbox.prompt("Please Enter OTP", function (result) {
if (result) {
instance._saveHSNGSTRtoGSTPortal(taxclassificationId, result, gstNo, InvoiceTypeId);
$(".bootbox-input").keypress(function (e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
MessageHelper.Instance().showSuccess("Numbers Only Allowed", 'div_validationsummary');
return false;
}
});
}
});
}
_saveHSNGSTRtoGSTPortal(taxclassificationId, otp, gstNo, InvoiceTypeId) {
var gstIntegratorId = 0;
var instance = this;
var integratorId = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_gstintegratorid").Value;
var returnPeriod = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_returnperiod").Value;
var fromDate = moment(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_fromdate").Value).format("YYYY-MM-DD");
var toDate = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_todate").Value;
var formattedfromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatServerDate(toDate);
toDate = moment(formattedfromDate).format("YYYY-MM-DD");
var gstNo = [];
$('.invoiceschk_selected:checked').each(function () {
var isChecked = $(this).prop("checked");
if (isChecked) {
gstNo.push($(this).parents('.body-tr').find(".fromgstno").text());
}
});
gstNo = gstNo.filter((value, index) => gstNo.indexOf(value) == index).toString();
var rdmNo = moment.utc(new Date()).local().format("YYYYMMDDHHmmss");
const rates = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-rate').text();
}).get();
const supplytype = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-supplytype').text();
}).get();
const pos = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-pos').text();
}).get();
const hsnCodes = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-hsncodes').text();
}).get();
const Uom = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-uom').text();
}).get();
var dynamicfilters = [{}];
var OTP = otp.replace(' ', '');
var taxClassificationData = [{
TaxclassificationId: taxclassificationId,
InvoiceId: [0],
Rates: rates,
SupplyType: supplytype,
Pos: pos,
HSNCodes: hsnCodes,
InvoiceTypeId: InvoiceTypeId,
UoM: Uom
}];
var postData = {
TaxClassificationData: taxClassificationData,
RtPeriod: returnPeriod,
GSTIntegratorId: integratorId,
ToDate: toDate,
FromDate: fromDate,
InvoiceTypeId: 1,
GstNo: gstNo,
Otp: OTP
};
instance.fileCacheHelper.loadJsFile("apps/integrations/gst/managers/gstmanager.js", function () {
Bizgaze.Apps.Integrations.GST.Managers.GSTManager.Instance().saveGSTRToPortal(postData).then(function (response) {
if (response.errors != null) {
MessageHelper.Instance().showError(response.message, "Unibase_ValidationSummary");
return false;
}
else {
alert(response.message);
var obj = Unibase.Themes.Compact.Components.Details.Instance();
obj._recordId = Unibase.Themes.Compact.Components.Details.Instance()._recordId;
obj._installedAppId = Unibase.Themes.Compact.Components.Details.Instance()._installedAppId;
obj.loadPortlets(obj);
Unibase.Platform.Helpers.NavigationHelper.IsListRefresh = true;
}
});
});
}
saveGSTRtoGSTPortal(taxclassificationId, gstNo, InvoiceTypeId) {
var instance = this;
let containerId = $("#" + instance.navigationHelper.getLastContainerId());
if (!$('input.invoiceschk_selected').is(':checked')) {
const errId = $('.gst-error-msg').last().attr('id');
MessageHelper.Instance().showError("Please Select One or More Records", errId);
return null;
}
let b2bCheckboxes = containerId.find('input.invoiceschk_selected');
var invoiceids = containerId.find('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).val();
}).get();
gstNo = $(containerId).find('.fromgstno').first().text() || $(containerId).find('.fromgstno').first().val();
console.log(invoiceids);
containerId.find("#selectedinvoices_check").click(function () {
var checkBoxes = b2bCheckboxes.find('input.invoiceschk_selected');
checkBoxes.prop("checked", !checkBoxes.prop("checked"));
});
b2bCheckboxes.click(function () {
if (!$(this).is(':checked')) {
$("#selectedinvoices_check").prop('checked', false);
}
else if (b2bCheckboxes.is(":checked")) {
$("#selectedinvoices_check").prop('checked', true);
}
});
bootbox.prompt("Please Enter OTP", function (result) {
if (result) {
instance._saveGSTRtoGSTPortal(taxclassificationId, result, gstNo, InvoiceTypeId);
$(".bootbox-input").keypress(function (e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
MessageHelper.Instance().showSuccess("Numbers only allowed", 'div_validationsummary');
return false;
}
});
}
});
}
DeleteGstrToGSTPortal(taxclassificationId, InvoiceTypeId) {
var instance = this;
let containerId = "#" + Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
let b2bCheckboxes = $(containerId).find('input.invoiceschk_selected');
var invoiceids = $(containerId).find('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).val();
}).get();
$(containerId).find("#selectedinvoices_check").click(function () {
var checkBoxes = b2bCheckboxes.find('input.invoiceschk_selected');
checkBoxes.prop("checked", !checkBoxes.prop("checked"));
});
b2bCheckboxes.click(function () {
if (!$(this).is(':checked')) {
$("#selectedinvoices_check").prop('checked', false);
}
else if (b2bCheckboxes.is(":checked")) {
$("#selectedinvoices_check").prop('checked', true);
}
});
bootbox.confirm("Are you sure you want to delete", function (result) {
if (result) {
instance._deleteGSTRtoGSTPortal(taxclassificationId, result, InvoiceTypeId);
}
});
}
getSelectedInvoices() {
$(".invoices_check");
}
generateOtp(gstNo) {
var gstIntegratorId = 0;
var instance = this;
instance.fileCacheHelper.loadJsFile("apps/integrations/gst/components/gstsubmission.js", null);
instance.fileCacheHelper.loadJsFile("apps/integrations/gst/managers/gstmanager.js", null);
bootbox.confirm("Are you sure, you want to continue", function (result) {
if (result == true) {
if (gstNo == undefined || gstNo == "") {
alert("Please select Gst No");
return false;
}
Bizgaze.Apps.Integrations.GST.Managers.GSTManager.Instance().getGstDetails(gstNo).then(function (response) {
if (response.status == Unibase.Data.Status.Success) {
var result = response.result[0];
var returnPeriod = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_returnperiod").Value;
var rdmNo = moment.utc(new Date()).local().format("YYYYMMDDHHmmss");
var postData = {
username: result.gstusername,
requestid: "Biz-" + rdmNo,
gstin: gstNo,
retperiod: returnPeriod
};
Bizgaze.Apps.Integrations.GST.Managers.GSTManager.Instance().generateOtp(postData).then(function (response) {
if (response.errors != null) {
instance.showGSTErrorMsg(response.message);
return false;
}
else {
alert(response.message);
}
});
}
else
MessageHelper.Instance().showSuccess(response.message, '');
});
}
});
}
_gstShowLog(taxclassificationId) {
var instance = this;
var gstNo;
var returnPeriod = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_returnperiod").Value;
var gstr1type = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_gstr1type").Value;
var gstintegratorId = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_gstintegratorid").Value;
var invoiceid = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_invoiceid").Value;
var invoiceno = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_invoiceno").Value;
gstNo = Unibase.Platform.Analytics.Viewers.TableViewer.Instance().Filter.find(x => x.ParameterName == "fromgstno");
if (gstNo == undefined || gstNo == "")
gstNo = Unibase.Platform.Analytics.Viewers.TemplateViewer.Instance().Filter.find(x => x.ParameterName == "fromgstno");
if (gstNo == undefined || gstNo == "") {
alert("Please select Gst No");
return false;
}
gstNo = gstNo.ParameterValue;
var Selectedinvoiceno = [];
Selectedinvoiceno.push("Invoiceno", Selectedinvoiceno);
var taxClassificationData = [];
taxClassificationData.push("TaxclassificationId", taxclassificationId);
taxClassificationData.push("InvoiceId", Selectedinvoiceno);
var postData = {
TaxClassificationData: taxClassificationData,
Invoiceid: invoiceid,
Invoiceno: invoiceno,
RtPeriod: returnPeriod,
GSTIntegratorid: gstintegratorId,
GSTR1type: gstr1type,
FromGSTNo: gstNo,
InvoiceTypeId: 1,
Selectedinvoiceno: invoiceno
};
instance.fileCacheHelper.loadJsFile("apps/integrations/gst/managers/gstShowLog.js", function () {
});
}
_saveGSTRtoGSTPortal(taxclassificationId, otp, gstNo, InvoiceTypeId) {
var gstIntegratorId = 0;
var instance = this;
var integratorId = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_gstintegratorid").Value;
var returnPeriod = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_returnperiod").Value;
var fromDate = moment(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_fromdate").Value).format("YYYY-MM-DD");
var toDate = moment(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_todate").Value).format("YYYY-MM-DD");
var formattedfromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatServerDate(toDate);
var rdmNo = moment.utc(new Date()).local().format("YYYYMMDDHHmmss");
var invoiceids = $('.invoiceschk_selected:checkbox:checked').map(function () {
var instance = this;
return Number(instance.value);
}).get();
if (isNaN(invoiceids.length))
invoiceids;
if (isNaN(invoiceids.length))
invoiceids.length = 0;
if (invoiceids.length == null) {
invoiceids.length = 0;
}
const rates = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-rate').text();
}).get();
const supplytype = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-supplytype').text();
}).get();
const pos = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-pos').text();
}).get();
const hsnCodes = $('.invoiceschk_selected:checkbox:checked').map(function () {
return $(this).closest('.body-tr').find('.gst-hsncodes').text();
}).get();
var dynamicfilters = [{}];
var OTP = otp.replace(' ', '');
var taxClassificationData = [{
TaxclassificationId: taxclassificationId,
InvoiceId: invoiceids,
Rates: rates,
SupplyType: supplytype,
Pos: pos,
HSNCodes: hsnCodes,
InvoiceTypeId: 1
}];
var postData = {
TaxClassificationData: taxClassificationData,
RtPeriod: returnPeriod,
GSTIntegratorId: integratorId,
ToDate: toDate,
FromDate: fromDate,
InvoiceTypeId: 1,
GstNo: gstNo,
Otp: OTP
};
instance.fileCacheHelper.loadJsFile("apps/integrations/gst/managers/gstmanager.js", function () {
Bizgaze.Apps.Integrations.GST.Managers.GSTManager.Instance().saveGSTRToPortal(postData).then(function (response) {
if (response.errors != null) {
instance.showGSTErrorMsg(response.message);
return false;
}
else {
MessageHelper.Instance().showSuccess(response.message, "");
var obj = Unibase.Themes.Compact.Components.Details.Instance();
obj._recordId = Unibase.Themes.Compact.Components.Details.Instance()._recordId;
obj._installedAppId = Unibase.Themes.Compact.Components.Details.Instance()._installedAppId;
obj.loadPortlets(obj);
Unibase.Platform.Helpers.NavigationHelper.IsListRefresh = true;
}
});
});
}
_deleteGSTRtoGSTPortal(taxclassificationId, otp, InvoiceTypeId) {
var gstIntegratorId = 0;
var instance = this;
var integratorId = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_gstintegratorid").Value;
var returnPeriod = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_returnperiod").Value;
var fromDate = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_fromdate").Value;
var toDate = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_todate").Value;
var gstNo = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_gstinno").Value;
var rdmNo = moment.utc(new Date()).local().format("YYYYMMDDHHmmss");
var invoiceids = $('.invoiceschk_selected:checkbox:checked').map(function () {
var instance = this;
return Number(instance.value);
}).get();
var DeletedInvoicesData = {
DeletedInvoiceIds: invoiceids
};
var taxClassificationData = [{
TaxclassificationId: taxclassificationId,
InvoiceTypeId: InvoiceTypeId,
DeleteInvoices: DeletedInvoicesData
}];
var postData = {
TaxClassificationData: taxClassificationData,
RtPeriod: returnPeriod,
GSTIntegratorId: integratorId,
ToDate: "'2022/08/01'",
FromDate: "'2022/08/01'",
InvoiceTypeId: 1,
GstNo: gstNo,
Otp: "575757"
};
instance.fileCacheHelper.loadJsFile("apps/integrations/gst/managers/gstmanager.js", function () {
Bizgaze.Apps.Integrations.GST.Managers.GSTManager.Instance().saveGSTRToPortal(postData).then(function (response) {
if (response.errors != null) {
instance.showGSTErrorMsg(response.message);
return false;
}
else {
MessageHelper.Instance().showSuccess(response.message, "");
var obj = Unibase.Themes.Compact.Components.Details.Instance();
obj._recordId = Unibase.Themes.Compact.Components.Details.Instance()._recordId;
obj._installedAppId = Unibase.Themes.Compact.Components.Details.Instance()._installedAppId;
obj.loadPortlets(obj);
Unibase.Platform.Helpers.NavigationHelper.IsListRefresh = true;
}
});
});
}
showGSTErrorMsg(message) {
const errId = $('.gst-error-msg').last().attr('id');
MessageHelper.Instance().showError(message, errId);
}
static Instance() {
if (this.instance === undefined) {
this.instance = new GSTSubmission();
}
return this.instance;
}
}
Components.GSTSubmission = GSTSubmission;
})(Components = GST.Components || (GST.Components = {}));
})(GST = Integrations.GST || (Integrations.GST = {}));
})(Integrations = Apps.Integrations || (Apps.Integrations = {}));
})(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
@@ -0,0 +1,66 @@
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 Integrations;
(function (Integrations) {
let GST;
(function (GST) {
let Managers;
(function (Managers) {
class GSTManager extends Unibase.Platform.Core.BaseManager {
getGstDetails(gstNo) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/integrations/gst/getgstdetails/gstno/' + gstNo;
return yield this.dataHelper().getAsync(url).then(function (response) {
if (response.result != null && response.result != "") {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
generateOtp(obj) {
return __awaiter(this, void 0, void 0, function* () {
const url = 'apis/v4/bizgaze/integrations/gst/generateotp';
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
if (response.result != null) {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
saveGSTRToPortal(obj) {
return __awaiter(this, void 0, void 0, function* () {
debugger;
const url = 'apis/v4/bizgaze/integrations/gst/savegstrtogstportal';
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
if (response.result != null) {
response.result = JSON.parse(response.result);
}
return response;
});
});
}
static Instance() {
if (this._instance === undefined)
this._instance = new GSTManager();
return this._instance;
}
}
Managers.GSTManager = GSTManager;
})(Managers = GST.Managers || (GST.Managers = {}));
})(GST = Integrations.GST || (Integrations.GST = {}));
})(Integrations = Apps.Integrations || (Apps.Integrations = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"gstmanager.js","sourceRoot":"","sources":["gstmanager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAU,OAAO,CAwDhB;AAxDD,WAAU,OAAO;IACb,IAAiB,IAAI,CAsDpB;IAtDD,WAAiB,IAAI;QACjB,IAAiB,YAAY,CAoD5B;QApDD,WAAiB,YAAY;YACzB,IAAiB,GAAG,CAkDnB;YAlDD,WAAiB,GAAG;gBAChB,IAAiB,QAAQ,CAgDxB;gBAhDD,WAAiB,QAAQ;oBACrB,MAAa,UAAW,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW;wBAEvD,aAAa,CAAC,KAAK;;gCAErB,MAAM,GAAG,GAAG,uDAAuD,GAAG,KAAK,CAAC;gCAC5E,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;oCAChE,IAAI,QAAQ,CAAC,MAAM,IAAI,IAAI,IAAI,QAAQ,CAAC,MAAM,IAAI,EAAE,EAAE;wCAClD,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;qCACjD;oCACD,OAAO,QAAQ,CAAC;gCACpB,CAAC,CAAC,CAAC;4BACP,CAAC;yBAAA;wBAEK,WAAW,CAAC,GAAQ;;gCAEtB,MAAM,GAAG,GAAG,8CAA8C,CAAC;gCAE3D,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;oCAEtE,IAAI,QAAQ,CAAC,MAAM,IAAI,IAAI,EAAE;wCACzB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;qCACjD;oCACD,OAAO,QAAQ,CAAC;gCACpB,CAAC,CAAC,CAAC;4BAEP,CAAC;yBAAA;wBACK,gBAAgB,CAAC,GAAQ;;gCAC3B,QAAQ,CAAA;gCACR,MAAM,GAAG,GAAG,sDAAsD,CAAC;gCAEnE,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;oCAEtE,IAAI,QAAQ,CAAC,MAAM,IAAI,IAAI,EAAE;wCACzB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;qCACjD;oCACD,OAAO,QAAQ,CAAC;gCACpB,CAAC,CAAC,CAAC;4BAEP,CAAC;yBAAA;wBAED,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,EAAE,CAAC;4BACtC,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBA7CY,mBAAU,aA6CtB,CAAA;gBAEL,CAAC,EAhDgB,QAAQ,GAAR,YAAQ,KAAR,YAAQ,QAgDxB;YACL,CAAC,EAlDgB,GAAG,GAAH,gBAAG,KAAH,gBAAG,QAkDnB;QACL,CAAC,EApDgB,YAAY,GAAZ,iBAAY,KAAZ,iBAAY,QAoD5B;IACL,CAAC,EAtDgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAsDpB;AACL,CAAC,EAxDS,OAAO,KAAP,OAAO,QAwDhB"}
+1
View File
@@ -0,0 +1 @@
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t extends Unibase.Platform.Core.BaseManager{getGstDetails(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/integrations/gst/getgstdetails/gstno/"+n;return yield this.dataHelper().getAsync(t).then(function(n){return n.result!=null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}generateOtp(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/integrations/gst/generateotp",n).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}saveGSTRToPortal(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/integrations/gst/savegstrtogstportal",n).then(function(n){return n.result!=null&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this._instance===undefined&&(this._instance=new t),this._instance}}n.GSTManager=t})(t=n.Managers||(n.Managers={}))})(t=n.GST||(n.GST={}))})(t=n.Integrations||(n.Integrations={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));
@@ -0,0 +1 @@
{"version":3,"file":"igstmanager.js","sourceRoot":"","sources":["igstmanager.ts"],"names":[],"mappings":""}