Iniit
This commit is contained in:
@@ -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">×</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
+1
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 = {}));
|
||||
@@ -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
@@ -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":""}
|
||||
Reference in New Issue
Block a user