Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

einvoice.component.js 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Integrations;
  6. (function (Integrations) {
  7. let EInvoice;
  8. (function (EInvoice_1) {
  9. let Components;
  10. (function (Components) {
  11. class EInvoice extends Unibase.Platform.Core.BaseComponent {
  12. jsFiles() {
  13. return [];
  14. }
  15. cssFiles() {
  16. return [];
  17. }
  18. html() {
  19. return null;
  20. }
  21. init() {
  22. }
  23. loadControl(containerid, prop) {
  24. this.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js", "apps/transact/enums/enum.js"], function () {
  25. var html = `<div class="card">
  26. <div class="table-wrap card simple-scroll-bar bg-white-s bg-white-removed templateviewer-body" style = "height:100% !important" >
  27. <div class="table-responsive tableFixHead dropdown-menu-scrollbar" >
  28. <table class="table table-hover table-bordered mb-0 tblgeteinvoicedata" id = "tblgeteinvoiceitems" >
  29. <thead>
  30. <tr>
  31. <th>ItemAmt</th>
  32. <th>BarCode</th>
  33. <th>ItemCesAmt</th>
  34. <th>ItemCesNonAdvlAmt</th>
  35. <th>ItemCesrt</th>
  36. <th>CGST Amt</th>
  37. <th>ItemDiscount</th>
  38. <th>ItemFreeQty</th>
  39. </tr>
  40. </thead>
  41. <tbody id = "tblgeteinvoiceitems" >
  42. </tbody>
  43. </table>
  44. </div>
  45. <div>
  46. </div>`;
  47. $("#" + containerid).html(html);
  48. });
  49. }
  50. loadControlSettings(controlsettingjson, formpropertyid) {
  51. return null;
  52. }
  53. loadPropertySettings(propertysettings, formpropertyid) {
  54. return null;
  55. }
  56. bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
  57. var ewaybillid = Number(propval);
  58. var instance = this;
  59. }
  60. load() {
  61. }
  62. getEinvoiceForm(Pk_Value) {
  63. let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
  64. instance.fileCacheHelper.loadJsFiles(['platform/forms/managers/formmanager.js', 'platform/apps/managers/appmanager.js'], function () {
  65. var FormUniqueId = 'Bizgaze_Extension_Transact_E-Invoice_App_E-Invoice_CreateForm';
  66. Unibase.Platform.Forms.Managers.FormManager.Instance().getFormbyUniqueId(FormUniqueId).then(function (response) {
  67. var onLoadCallBack = {
  68. CallBack: function () {
  69. instance.bindeinvoicedata(Pk_Value);
  70. },
  71. Parameters: null,
  72. };
  73. var formviewerObj = {
  74. FormId: response.result.FormId,
  75. AppConfigurationId: 0,
  76. Pk_Value: 0,
  77. PortletWidgetId: 0,
  78. OnSuccess: null,
  79. OnFail: null,
  80. OnLoad: onLoadCallBack,
  81. };
  82. Unibase.Platform.Forms.Components.FormViewer.Instance().init(formviewerObj);
  83. instance.navigationHelper.hideLoading();
  84. });
  85. });
  86. }
  87. bindeinvoicedata(Pk_Value) {
  88. let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
  89. let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
  90. var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  91. var invoiceId = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceid").Value);
  92. var invoiceNo = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceno").Value);
  93. var gstInvoiceType = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_gstinvoicetypeid").Value);
  94. var isEWayBill = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_isewaybill").Value);
  95. var einvoiceid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_einvoiceid").Value);
  96. var ewaybillid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_ewaybillid").Value);
  97. var invoice = new Option(invoiceNo, invoiceId, true);
  98. ;
  99. let _einvoiceid = Pk_Value;
  100. instance.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js", "apps/transact/enums/enum.js"], function () {
  101. Bizgaze.Apps.Transact.Managers.EInvoiceManager.Instance().geteinvoicepayload(_einvoiceid).then(function (res) {
  102. if (res.result != null) {
  103. $('input[type=text]').parent().addClass("floating-label-form-group-with-value");
  104. $(".txtAutoComplete_invoiceid").empty();
  105. $(".txtAutoComplete_invoiceid").append(invoice);
  106. $(".hfAutoCompleteId_invoiceid").val(invoiceId);
  107. $('.txtAutoComplete_invoiceid').prop('disabled', true);
  108. $(".hdn_einvoiceid").val(einvoiceid);
  109. $(".hdn_ewaybillid").val(ewaybillid);
  110. $(".hdn_einvoicestatusid").val("1");
  111. $(".txt_gstinvoicetypeid").val(gstInvoiceType).prop("disabled", true);
  112. $(".txt_buyeraddr1").val(res.result.BuyerDtls.Addr1).prop("disabled", true);
  113. $(".txt_buyeraddr2").val(res.result.BuyerDtls.Addr2).prop("disabled", true);
  114. $(".txt_buyergstin").val(res.result.BuyerDtls.Gstin).prop("disabled", true);
  115. $(".txt_buyerlglnm").val(res.result.BuyerDtls.LglNm).prop("disabled", true);
  116. $(".txt_buyerloc").val(res.result.BuyerDtls.Loc).prop("disabled", true);
  117. $(".txt_buyerph").val(res.result.BuyerDtls.Ph).prop("disabled", true);
  118. $(".txt_buyerpin").val(res.result.BuyerDtls.Pin).prop("disabled", true);
  119. $(".txt_buyerpos").val(res.result.BuyerDtls.Pos).prop("disabled", true);
  120. $(".txt_buyerstcd").val(res.result.BuyerDtls.Stcd).prop("disabled", true);
  121. $(".txt_buyertrdnm").val(res.result.BuyerDtls.TrdNm).prop("disabled", true);
  122. $(".txt_dispaddr1").val(res.result.DispDtls.Addr1).prop("disabled", true);
  123. $(".txt_dispaddr2").val(res.result.DispDtls.Addr2).prop("disabled", true);
  124. $(".txt_disploc").val(res.result.DispDtls.Loc).prop("disabled", true);
  125. $(".txt_dispnm").val(res.result.DispDtls.Nm).prop("disabled", true);
  126. $(".txt_disppin").val(res.result.DispDtls.Pin).prop("disabled", true);
  127. $(".txt_dispstcd").val(res.result.DispDtls.Stcd).prop("disabled", true);
  128. $(".date_docdt").val(res.result.DocDtls.Dt).prop("disabled", true);
  129. $(".txt_docno").val(res.result.DocDtls.No).prop("disabled", true);
  130. $(".txt_doctyp").val(res.result.DocDtls.Typ).prop("disabled", true);
  131. $(".txt_expcntcode").val(res.result.ExpDtls.CntCode).prop("disabled", true);
  132. $(".txt_expexpduty").val(res.result.ExpDtls.ExpDuty).prop("disabled", true);
  133. $(".txt_expforcur").val(res.result.ExpDtls.ForCur).prop("disabled", true);
  134. $(".txt_expport").val(res.result.ExpDtls.Port).prop("disabled", true);
  135. $(".txt_exprefclm").val(res.result.ExpDtls.RefClm).prop("disabled", true);
  136. $(".txt_expshipbdt").val(res.result.ExpDtls.ShipBDt).prop("disabled", true);
  137. $(".txt_expshipbno").val(res.result.ExpDtls.ShipBNo).prop("disabled", true);
  138. $(".txt_payaccdet").val(res.result.PayDtls.Accdet).prop("disabled", true);
  139. $(".txt_paycrday").val(res.result.PayDtls.Crday).prop("disabled", true);
  140. $(".txt_paycrtrn").val(res.result.PayDtls.Crtrn).prop("disabled", true);
  141. $(".txt_paydirdr").val(res.result.PayDtls.Dirdr).prop("disabled", true);
  142. $(".txt_payfininsbr").val(res.result.PayDtls.Fininsbr).prop("disabled", true);
  143. $(".txt_paymode").val(res.result.PayDtls.Mode).prop("disabled", true);
  144. $(".txt_paynm").val(res.result.PayDtls.Nm).prop("disabled", true);
  145. $(".txt_paypaidamt").val(res.result.PayDtls.Paidamt).prop("disabled", true);
  146. $(".txt_payinstr").val(res.result.PayDtls.Payinstr).prop("disabled", true);
  147. $(".txt_paymtdue").val(res.result.PayDtls.Paymtdue).prop("disabled", true);
  148. $(".txt_payterm").val(res.result.PayDtls.Payterm).prop("disabled", true);
  149. $(".date_refdocperdinvenddt").val(res.result.RefDtls.DocPerdDtls.InvEndDt).prop("disabled", true);
  150. $(".date_refdocperdinvstdt").val(res.result.RefDtls.DocPerdDtls.InvStDt).prop("disabled", true);
  151. $(".txt_refinvrm").val(res.result.RefDtls.InvRm).prop("disabled", true);
  152. $(".date_refprecdocinvdt").val();
  153. $(".txt_refprecdocinvno").val();
  154. $(".txt_refprecdocothrefno").val();
  155. $(".txt_selleraddr1").val(res.result.SellerDtls.Addr1).prop("disabled", true);
  156. $(".txt_selleraddr2").val(res.result.SellerDtls.Addr2).prop("disabled", true);
  157. $(".txt_sellerem").val(res.result.SellerDtls.Em).prop("disabled", true);
  158. $(".txt_sellergstin").val(res.result.SellerDtls.Gstin).prop("disabled", true);
  159. $(".txt_sellerlglnm").val(res.result.SellerDtls.LglNm).prop("disabled", true);
  160. $(".txt_sellerloc").val(res.result.SellerDtls.Loc).prop("disabled", true);
  161. $(".txt_sellerph").val(res.result.SellerDtls.Ph).prop("disabled", true);
  162. $(".txt_sellerpin").val(res.result.SellerDtls.Pin).prop("disabled", true);
  163. $(".txt_sellerstcd").val(res.result.SellerDtls.Stcd).prop("disabled", true);
  164. $(".txt_sellertrdnm").val(res.result.SellerDtls.TrdNm).prop("disabled", true);
  165. $(".txt_shipaddr1").val(res.result.ShipDtls.Addr1).prop("disabled", true);
  166. $(".txt_shipaddr2").val(res.result.ShipDtls.Addr2).prop("disabled", true);
  167. $(".txt_shipgstin").val(res.result.ShipDtls.Gstin).prop("disabled", true);
  168. $(".txt_shiplglnm").val(res.result.ShipDtls.LglNm).prop("disabled", true);
  169. $(".txt_shiploc").val(res.result.ShipDtls.Loc).prop("disabled", true);
  170. $(".txt_shippin").val(res.result.ShipDtls.Pin).prop("disabled", true);
  171. $(".txt_shipstcd").val(res.result.ShipDtls.Stcd).prop("disabled", true);
  172. $(".txt_shiptrdnm").val(res.result.ShipDtls.TrdNm).prop("disabled", true);
  173. $(".txt_transecmgstin").val(res.result.TranDtls.EcmGstin).prop("disabled", true);
  174. $(".txt_transigstonintra").val(res.result.TranDtls.IgstOnIntra).prop("disabled", true);
  175. $(".txt_transregrev").val(res.result.TranDtls.RegRev).prop("disabled", true);
  176. $(".txt_transsuptyp").val(res.result.TranDtls.SupTyp).prop("disabled", true);
  177. $(".txt_transtaxsch").val(res.result.TranDtls.TaxSch).prop("disabled", true);
  178. if (isEWayBill == "true") {
  179. $(".hdn_isewaybill").val("true");
  180. $(".section_E-WayBillDetails").removeClass("hidden");
  181. $(".txt_frompincode").val(res.result.EwbDtls.FromPinCode).prop("disabled", true);
  182. $(".txt_topincode").val(res.result.EwbDtls.ToPinCode).prop("disabled", true);
  183. $(".hdn_frompincode").val(res.result.SellerDtls.Pin);
  184. $(".hdn_topincode").val(res.result.BuyerDtls.Pin);
  185. if (res.result.EwbDtls.ApproxDistance != 0)
  186. $(".txt_approxdistance").val(res.result.EwbDtls.ApproxDistance);
  187. $(".date_transporterdocdate").val(res.result.EwbDtls.TransdocDt).prop("disabled", true);
  188. $(".txt_transporterdocno").val(res.result.EwbDtls.Transdocno).prop("disabled", true);
  189. $(".txt_transportername").val(res.result.EwbDtls.Transname).prop("disabled", true);
  190. $(".txt_transportergstin").val(res.result.EwbDtls.TransporterGstIn).prop("disabled", true);
  191. $(".txt_vehicletype").val(res.result.EwbDtls.Vehtype).prop("disabled", true);
  192. $(".txt_transmode").val(res.result.EwbDtls.TransporterMode).prop("disabled", true);
  193. $(".txt_vehicleno").val(res.result.EwbDtls.Vehno).prop("disabled", true);
  194. if (res.result.EwbDtls.Vehtype == 'R') {
  195. $(".txt_vehicletype").val('Regular').prop("disabled", true);
  196. }
  197. if (res.result.EwbDtls.Vehtype == 'O') {
  198. $(".txt_vehicletype").val('Over Dimensional Cargo').prop("disabled", true);
  199. }
  200. $(".dropdown_transmode").val(res.result.EwbDtls.TransMode).prop("disabled", true);
  201. $(".txt_vehicleno").val(res.result.EwbDtls.Vehno).prop("disabled", true);
  202. $(".txt_approxdistance").addClass("required");
  203. }
  204. else {
  205. $(".section_E-WayBillDetails").addClass("hidden");
  206. $(".txt_approxdistance").val("0").removeClass("required");
  207. $(".hdn_isewaybill").val("false");
  208. }
  209. var dt = res.result;
  210. var itemlists = dt.ItemList;
  211. for (var i = 0; i < itemlists.length; i++) {
  212. var data = itemlists[i];
  213. var html = '<tr class="GeteinvoiceitemsDetails-list-items">' +
  214. '<td>' + data.AssAmt + ' </td>' +
  215. '<td>' + data.Barcde + ' </td>' +
  216. '<td>' + data.CesAmt + ' </td>' +
  217. '<td>' + data.CesNonAdvlAmt + ' </td>' +
  218. '<td>' + data.CesRt + ' </td>' +
  219. '<td>' + data.CgstAmt + ' </td>' +
  220. '<td>' + data.Discount + ' </td>' +
  221. '<td>' + data.FreeQty + ' </td>' +
  222. '</tr>';
  223. $("#tblgeteinvoiceitems").append(html);
  224. }
  225. instance.getDistance();
  226. }
  227. });
  228. });
  229. }
  230. getInvoiceDetails() {
  231. var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  232. $(".hdn_einvoicestatusid").val("1");
  233. if (installedAppId != 0) {
  234. var invoiceId = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceid").Value);
  235. var ewaybillid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_ewaybillid").Value);
  236. var invoiceNo = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceno").Value);
  237. var vehicleNo = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_vehicleno").Value);
  238. var transporterdocdate = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transporterdocdate").Value);
  239. var transporterdocno = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transporterdocno").Value);
  240. var transportername = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transportername").Value);
  241. var transportergstin = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transportergstin").Value);
  242. var vehicletype = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_vehicletype").Value);
  243. var transmode = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_transmode").Value);
  244. $(".txtAutoComplete_invoiceid").empty();
  245. $(".txtAutoComplete_invoiceid").append(new Option(invoiceNo, invoiceId, true));
  246. $(".hfAutoCompleteId_invoiceid").val(invoiceId);
  247. $(".hdn_ewaybillid").val(ewaybillid);
  248. $(".txt_vehicleno").val(vehicleNo);
  249. $(".date_transporterdocdate").val(transporterdocdate);
  250. $(".txt_transporterdocno").val(transporterdocno);
  251. $(".txt_transportername").val(transportername);
  252. $(".txt_transportergstin").val(transportergstin);
  253. $(".dropdown_vehicletype").val(vehicletype);
  254. $(".dropdown_transmode").val(transmode);
  255. Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/transact/managers/invoicemanager.js,apps/transact/enums/enum.js"], function () {
  256. Bizgaze.Apps.Transact.Managers.InvoiceManager.Instance().getInvoiceDetails(invoiceId).then(function (response) {
  257. if (response.result != null) {
  258. $(".txt_itemassamt").val();
  259. $(".txt_itemattribnm").val();
  260. $(".txt_itemattribval").val();
  261. $(".txt_itembarcode").val();
  262. $(".txt_itembchexpdt").val();
  263. $(".txt_itembchnm").val();
  264. $(".txt_itembchwrdt").val();
  265. $(".txt_itemcesamt").val();
  266. $(".txt_itemcesnonadvlamt").val();
  267. $(".txt_itemcesrt").val();
  268. $(".txt_itemcgstamt").val();
  269. $(".txt_itemdiscount").val();
  270. $(".txt_itemfreeqty").val();
  271. }
  272. });
  273. });
  274. }
  275. $(".txt_vehicleno").keyup(function () {
  276. $(".txt_vehicleno").val($(".txt_vehicleno").val().toString().toUpperCase());
  277. });
  278. }
  279. getDistance() {
  280. var fromplace = Number($('.txt_sellerpin').val());
  281. var toplace = Number($('.txt_buyerpin').val());
  282. var apikey = 'AIzaSyBGmahAAg3EVzAUJvttDZsjdZiJenJxGt8';
  283. if (apikey == undefined) {
  284. }
  285. if (toplace == 0) {
  286. $('.number_approxdistance').val(0);
  287. }
  288. else {
  289. $.ajax({
  290. url: "https://maps.googleapis.com/maps/api/geocode/json?address=" + fromplace + "%20%22&key=" + apikey + "&sensor=false",
  291. method: "POST",
  292. success: function (data) {
  293. let latitude, longitude, flatitude, flongitude;
  294. flatitude = data.results[0].geometry.location.lat;
  295. flongitude = data.results[0].geometry.location.lng;
  296. $.ajax({
  297. url: "https://maps.googleapis.com/maps/api/geocode/json?address=" + toplace + "%20%22&key=" + apikey + "&sensor=false",
  298. method: "POST",
  299. success: function (_data) {
  300. latitude = _data.results[0].geometry.location.lat;
  301. longitude = _data.results[0].geometry.location.lng;
  302. var dd = getDistanceFromLatLonInKm(flatitude, flongitude, latitude, longitude);
  303. $('.number_approxdistance').val(Math.round(dd));
  304. }
  305. });
  306. }
  307. });
  308. function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
  309. var R = 6371;
  310. var dLat = deg2rad(lat2 - lat1);
  311. var dLon = deg2rad(lon2 - lon1);
  312. var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
  313. Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
  314. Math.sin(dLon / 2) * Math.sin(dLon / 2);
  315. var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
  316. var d = R * c;
  317. return d;
  318. }
  319. function deg2rad(deg) {
  320. return deg * (Math.PI / 180);
  321. }
  322. }
  323. }
  324. checkstatus() {
  325. let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
  326. var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  327. var einvoiceid = String(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_einvoiceid").Value);
  328. instance.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js"], function () {
  329. Bizgaze.Apps.Transact.Managers.EInvoiceManager.Instance().geteinvoicebyid(einvoiceid).then(function (res) {
  330. if (res.result != null) {
  331. if (res.result.EInvoiceStatusId == 2 || res.result.AckNo == null)
  332. $(".DetailSetting_" + installedAppId + "_Cancele-invoice").addClass("hidden");
  333. else
  334. $(".DetailSetting_" + installedAppId + "_Cancele-invoice").removeClass("hidden");
  335. if (res.result.AckNo != null && res.result.AckNo != "") {
  336. $("#btn_Edite-Invoice").addClass("hidden");
  337. }
  338. else
  339. $("#btn_Edite-Invoice").removeClass("hidden");
  340. }
  341. });
  342. });
  343. }
  344. ShowOrHideEInvoiceButton() {
  345. let instance = Bizgaze.Apps.Integrations.EInvoice.Components.EInvoice.Instance();
  346. var installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  347. var invoiceid = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + installedAppId + "_invoiceid").Value);
  348. instance.fileCacheHelper.loadJsFiles(["apps/transact/managers/einvoice/einvoicemanager.js"], function () {
  349. Bizgaze.Apps.Transact.Managers.EInvoiceManager.Instance().geteinvoicebyinvoiceid(invoiceid).then(function (res) {
  350. if (res.result != null) {
  351. if (res.result.EInvoiceStatusId == 2 || res.result.AckNo == null)
  352. $(".DetailSetting_" + installedAppId + "_e-Invoice").removeClass("hidden");
  353. else
  354. $(".DetailSetting_" + installedAppId + "_e-Invoice").addClass("hidden");
  355. }
  356. });
  357. });
  358. }
  359. static Instance() {
  360. if (this.instance === undefined) {
  361. this.instance = new EInvoice();
  362. }
  363. return this.instance;
  364. }
  365. }
  366. Components.EInvoice = EInvoice;
  367. })(Components = EInvoice_1.Components || (EInvoice_1.Components = {}));
  368. })(EInvoice = Integrations.EInvoice || (Integrations.EInvoice = {}));
  369. })(Integrations = Apps.Integrations || (Apps.Integrations = {}));
  370. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  371. })(Bizgaze || (Bizgaze = {}));