PageSourceSearch

https://coalitiongreenwich.crisil.com/apps/crisil-www/crisil-www/clientlib-js/js/ratingdetail.js

js crisil.com collected 2026-10-02 02:57:12 UTC 39,318 bytes, 792 lines download raw bytes

1var reportAmount = 0;
2var reportCount = 0;
3var prodList;
4var repBasePrice=0;
5var companyList=[];
6var currentIndustryId=0;
7if(digitalData !== undefined){
8    if(digitalData['transaction'] !== undefined){
9        digitalData['transaction'] = {};
10    }
11}
12
13//var historicalSfPrIds=[];
14//var historicalMfPrIds = [];
15
16$(document).ready(function(){
17    localStorage.removeItem('maxCapValue');
18    if($('.rating-rational-companyFactsheet').length <= 0 && $('.structure-finance-companyFactsheet').length <= 0){
19        $('.redirection-link').hide();
20    }
21    if($('.credit-rating-report-crr').length > 0 || $('.credit-rating-sf-report-crr').length > 0){
22
23        $(".credit-rating-report-checkbox").prop("checked", false);
24        $(".profile_Agreement_3").prop("checked", false);
25        $(".profile_Agreement_4").prop("checked", false);
26
27        repBasePrice = $('.credit-rating-report-crr').attr('data-basePrice');
28        var validLogin = localStorage.getItem("loginStatus");
29        var sample = JSON.parse(validLogin);
30        if(sample){
31            var userId = sample.userId;
32            prodList = $('.creditRating-productList').attr('data-prodList');
33            console.log(userId);
34            console.log(prodList);
35            if(userId){
36                if(prodList){
37                    $.ajax({
38                        url : '/bin/crisil/validatePaymentCrrServlet',
39                        type : 'GET',
40                        dataType : "JSON",
41                        contentType : "application/json",
42                        data : {
43                            'userId' : userId,
44                            'productIdList' : prodList,
45                            'opType': '0'
46                        },
47                        success : function(response) {
48                            if(response)
49                            {
50                                if(response.errorCode == 1)
51                                {
52                                    $('.lbContent .form-error-msg').remove('');
53                                    $('.lbContent .form-success-msg').remove('');
54                                    var htmlErrorText = '';
55                                    htmlErrorText += '<div class="form-error-msg">';
56                                    htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
57                                    htmlErrorText += '<p> Internal Error, Please try again.</p>';
58                                    htmlErrorText += '<div class="btn-wrap">';
59                                    htmlErrorText += '<a href="#" class="forward-arrow">Ok</a>';
60                                    htmlErrorText += '</div>';
61                                    htmlErrorText += '</div>';
62                                    formReset();
63                                    $('.lbContent').append(htmlErrorText);
64                                    lightboxbtn();
65                                }else{
66                                    var obj = JSON.parse(response.purchasedProdListCount);
67                                    if($(".reportProduct").length > 0){
68                                        for(var i=0;i < $(".reportProduct").length;i++){
69                                            var obj = JSON.parse(response.purchasedProdListCount);
70                                            for (var key in obj) {
71                                                if($($(".reportProduct")[i]).val() == key){
72                                                    if(obj[key] == 1){
73                                                        $($(".reportProduct")[i]).parent().find('.credit-rating-report-checkbox').hide();
74                                                        $($(".reportProduct")[i]).parent().find('.credit-rating-report-latest-report-txt').hide();
75                                                    }else{
76                                                        $($(".reportProduct")[i]).parent().find('.credit-rating-report-latest-report-txt').hide();
77                                                        $($(".reportProduct")[i]).parent().find('.credit-rating-report-previous-report-txt').hide();
78                                                    }
79                                                }
80                                            }
81                                        }
82                                    }
83                                }
84                            }
85                        }
86                    });
87                }else{
88                    console.log('Something went wrong with the product');
89                }
90            }else{
91                $('.lbContent .form-error-msg').remove('');
92                $('.lbContent .form-success-msg').remove('');
93                $('.login-dropdown').trigger( "click" );
94            }
95        }else{
96            console.log("User is not logged in");
97        }
98    }
99
100    $('.credit-report-payment').click(function(e) {
101        var validate = true;
102        if($('.selected-reports-list li').size()<=0 && productList.length<=0){
103            var validate = false;
104            $(".disclaimer-check-2").find("span.error-txt").text('Please select some report to purchase');
105            $(".disclaimer-check-2").find("span.error-txt").attr('style', 'display: block');
106        }else if($('.selected-reports-list li').size()>$('#maxCapValue').val() && productList.length>$('#maxCapValue').val()){
107            var validate = false;
108            $(".disclaimer-check-2").find("span.error-txt").text('Please select less than 5 report for purchase');
109            $(".disclaimer-check-2").find("span.error-txt").attr('style', 'display: block');
110        }else if ($('#agreeText1').length > 0 && !$('#agreeText1').is(":checked")) {
111            var validate = false;
112            $(".disclaimer-check-1").find("span.error-txt").text('Please select check box');
113            $(".disclaimer-check-1").find("span.error-txt").attr('style', 'display: block');
114        }else if ($('#agreeText2').length > 0 && !$('#agreeText2').is(":checked")) {
115            var validate = false;
116            $(".disclaimer-check-2").find("span.error-txt").text('Please select check box');
117            $(".disclaimer-check-2").find("span.error-txt").attr('style', 'display: block');
118        }
119        if(validate){
120            var finalProdIdList='';
121            for(i =0;i < productList.length;i++){
122                finalProdIdList = finalProdIdList + productList[i] + '/';
123            }
124            var validLogin = localStorage.getItem("loginStatus");
125            var sample = JSON.parse(validLogin);
126            if(sample){
127                $('.loader-page-icon-brochure-download').show();
128                sessionStorage.setItem("failure_pagepath", location.href);
129                var userId = sample.userId;
130                if(userId){
131                    $.ajax({
132                        url : '/bin/crisil/validatePaymentCrrServlet',
133                        type : 'GET',
134                        dataType : "JSON",
135                        data : {
136                            'userId' : userId,
137                            'productIdList' : finalProdIdList,
138                            'opType': '1'
139                        },
140                        contentType : "application/json",
141                        success : function(response) {
142                            if(response)
143                            {
144                                $('.loader-page-icon-brochure-download').hide();
145                                if(response.errorCode == 1)
146                                {
147                                    $('.lbContent .form-error-msg').remove('');
148                                    $('.lbContent .form-success-msg').remove('');
149                                    var htmlErrorText = '';
150                                    htmlErrorText += '<div class="form-error-msg">';
151                                    htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
152                                    htmlErrorText += '<p> Internal Error, Please try again.</p>';
153                                    htmlErrorText += '<div class="btn-wrap">';
154                                    htmlErrorText += '</div>';
155                                    htmlErrorText += '</div>';
156                                    $('.lbContent').append(htmlErrorText);
157                                    lightboxbtn();
158                                }else if(response.errorCode == 2){
159                                    $('.lbContent .form-error-msg').remove('');
160                                    $('.lbContent .form-success-msg').remove('');
161                                    var htmlErrorText = '';
162                                    htmlErrorText += '<div class="form-error-msg">';
163                                    htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
164                                    htmlErrorText += '<p> Please use only official/business email id for your purchases </p>';
165                                    htmlErrorText += '<div class="btn-wrap">';
166                                    htmlErrorText += '</div>';
167                                    htmlErrorText += '</div>';
168                                    $('.lbContent').append(htmlErrorText);
169                                    // anlytics code for crr validation failure start
170                                     var failedUserId = userId;
171                                     var failedDomain;
172
173                                     if(failedUserId)
174                                     {
175                                        splitArray = failedUserId.split('@');
176
177                                        if(splitArray && splitArray.length > 1)
178                                        {
179                                           failedDomain = splitArray[1];
180                                        }
181                                     }
182                                     if(failedDomain)
183                                     {
184                                        digitalData['crrValidation'] = {};
185                                        digitalData['crrValidation']['userDomain'] = failedDomain;
186                                         if (typeof (_satellite) != 'undefined') {
187                                                    _satellite.track("crrDomainValidation");
188                                                }
189                                     }
190
191                                    // anlytics code for crr validation failure end
192                                    lightboxbtn();
193                                } else if(response.errorCode == 3){
194                                    $('.lbContent .form-error-msg').remove('');
195                                    $('.lbContent .form-success-msg').remove('');
196                                    var htmlErrorText = '';
197                                    htmlErrorText += '<div class="form-error-msg">';
198                                    htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
199                                    htmlErrorText += '<p> Applicable for users who are domiciled in India and using India based payment methods </p>';
200                                    htmlErrorText += '<div class="btn-wrap">';
201                                    htmlErrorText += '</div>';
202                                    htmlErrorText += '</div>';
203                                    $('.lbContent').append(htmlErrorText);
204                                    lightboxbtn();
205                                } else if(response.errorCode == 4){
206                                    $('.lbContent .form-error-msg').remove('');
207                                    $('.lbContent .form-success-msg').remove('');
208                                    var htmlErrorText = '';
209                                    htmlErrorText += '<div class="form-error-msg">';
210                                    htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
211                                    htmlErrorText += '<p> You have reached the max limit to purchase reports. You have purchased '+ response.purchasedCntPerOrg+ '/' +response.maxcapPerOrg + ' reports</p>';
212                                    htmlErrorText += '<div class="btn-wrap">';
213                                    htmlErrorText += '</div>';
214                                    htmlErrorText += '</div>';
215                                    $('.lbContent').append(htmlErrorText);
216                                    lightboxbtn();
217                                }else if(response.errorCode == 5){
218                                     $('.lbContent .form-error-msg').remove('');
219                                     $('.lbContent .form-success-msg').remove('');
220                                     var htmlErrorText = '';
221                                     htmlErrorText += '<div class="form-error-msg">';
222                                     htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
223                                     htmlErrorText += '<p> You have reached the max limit to purchase reports. You have purchased '+ response.purchasedCntPerUser+ '/' +response.maxCapPerUser + ' reports</p>';
224                                     htmlErrorText += '<div class="btn-wrap">';
225                                     htmlErrorText += '</div>';
226                                     htmlErrorText += '</div>';
227                                     $('.lbContent').append(htmlErrorText);
228                                     lightboxbtn();
229                                }else if(response.errorCode == 7)
230                                {
231                                  $('.lbContent .form-error-msg').remove('');
232                                  $('.lbContent .form-success-msg').remove('');
233                                  var htmlErrorText = '';
234                                  htmlErrorText += '<div class="form-error-msg">';
235                                  htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
236                                  htmlErrorText += '<p>Oops. There was an unexpected error. Please get in touch by writing to us at '+ response.senderMailAdress +'</p>';
237                                  htmlErrorText += '<div class="btn-wrap">';
238                                  htmlErrorText += '</div>';
239                                  htmlErrorText += '</div>';
240                                  $('.lbContent').append(htmlErrorText);
241                                  lightboxbtn();
242                             }
243                             else{
244                                    var redirectionLink = $('.credit-report-payment').find('a.crrPayNowButton').attr('data-payNowButton');
245                                 if(digitalData['transaction']['CRR'] === undefined){
246                                     digitalData['transaction']['CRR'] = {};
247                                 }
248                                    $('.credit-report-payment').find('a.crrPayNowButton').attr('href',redirectionLink);
249                                 	digitalData['transaction']['productName'] = productList;
250                                 	digitalData['transaction']['CRR']['baseprice'] = $('#basePrice').text().replace('Base Price: ₹ ','');
251                                    digitalData['transaction']['CRR']['discount'] = $('#discount').text().replace('Disounts: ₹ ','');
252                                    digitalData['transaction']['CRR']['GST'] = $('#gstAmount').text().replace('GST: ₹ ','');
253                                    digitalData['transaction']['CRR']['totalprice'] = $('#totalPrice b').text().replace('Total Amount: ₹ ','');
254                                    digitalData['transaction']['step'] = 'Transaction Start';
255                                    digitalData['transaction']['category'] = 'CRR';
256                                    if (typeof (_satellite) != 'undefined') {
257                                        _satellite.track("transaction-start");
258                                    }
259                                    window.open(encodeURI(redirectionLink + '.html?productId='+finalProdIdList), "_self");
260                                }
261                            }
262                        }
263                    });
264                }else{
265                    $('.lbContent .form-error-msg').remove('');
266                    $('.lbContent .form-success-msg').remove('');
267                    $('.login-dropdown').trigger( "click" );
268                }
269            }
270        }
271    });
272
273    // storing PrId of CGBI historical rating so that Historical rating link is not shown in archival page for same prId
274    if($('.hist-cgblr-status').length>0) {
275        var prId = $('.historical-cgblr').data('prid');
276        localStorage.setItem("prId", prId);
277    }
278
279
280    //CRR Bundles Changes Java Script
281
282
283if($(".CRR-bundled").length>0){
284    var compCode
285    var autocomplete;
286    var length = location.href.split('/').length;
287    var splitIndex = length -1;
288    var compCodeDetails = window.location.href.split('/')[splitIndex];
289    if(compCodeDetails.indexOf("sme-rating.") > -1 && compCodeDetails.indexOf(".html") > -1){
290        compCode = compCodeDetails.replace("sme-rating.","").replace(".html","");
291    }else{
292       compCode =  compCodeDetails.split('.html')[0].split('.')[1];
293    }
294    var industryId;
295    var industryText;
296    $.ajax({
297        url : '/bin/crisil/currentIndustryList',
298        type : 'GET',
299        dataType : "JSON",
300        contentType : "application/json",
301        data : {
302            companyCode:compCode
303        },
304        success : function(response) {
305            if(response)
306            {
307                if (typeof response == 'string') {
308                    response = JSON.parse(response);
309                }
310                if(response.msg !== undefined && response.msg === "faliure")
311                {
312                   industryId="No";
313                   currentIndustryId="No";
314                }else{
315                    industryId=response.industryId;
316                    industryText=response.industryName;
317                    currentIndustryId=response.industryId;
318                    $('.instryAutoDropDown').val(industryText);
319                }
320                industryList();
321            }
322        }
323    });
324}
325
326
327    function industryList(){
328        $.ajax({
329            url : '/bin/crisil/industryList',
330            type : 'GET',
331            dataType : "JSON",
332            contentType : "application/json",
333            data : {
334            },
335            success : function(response) {
336                if(response)
337                {
338                    if (typeof response == 'string') {
339                        response = JSON.parse(response);
340                    }
341                    var industryDetailsId;
342                    var industryValueMap = {};
343                    var industryArray=[];
344                    for (var industryData in response) {
345                        industryValueMap[response[industryData]] = industryData;
346                        industryArray.push(response[industryData]);
347                    }
348                    $('.instryAutoDropDown').autocomplete({
349                        source: industryArray,
350                        open: function() {
351                            $('.ui-autocomplete').css('z-index', 99999999999999);
352                        },
353                        select: function(e, ui) {
354                          industryDetailsId = industryValueMap[ui.item.value];
355                          $('.loader-page-icon-brochure-download').show();
356                          currentIndustryId=industryDetailsId;
357                          $.ajax({
358                              url : '/bin/crisil/getCompanyListByIndustrySelected',
359                              type : 'GET',
360                              dataType : "JSON",
361                              contentType : "application/json",
362                              data : {
363                                  industryId:industryDetailsId
364                              },
365                              success : function(response) {
366                                  if(response)
367                                  {
368                                      if (typeof response == 'string') {
369                                          response = JSON.parse(response);
370                                      }
371                                      var dropDownData=[];
372                                      var defaultValue=[" "];
373                                      this.tempJsonObj = {};
374                                      this.tempJsonObj.label=" ";
375                                      this.tempJsonObj.value=" ";
376                                      dropDownData.push(this.tempJsonObj);
377                                      $.each(response, function(k, v) {
378                                          var key=v.prIfId+","+v.companyCode+","+v.companyName+","+v.productCategory+","+v.heading+","+v.crrdate+","+v.crrDocument+","+v.outlookDesc+","+v.rating+","+v.instrumentCategory+","+v.isNoncooperative+","+v.industryId+","+v.industryName;
379                                          var value=v.companyName;
380                                          this.tempJsonObj = {};
381                                          this.tempJsonObj.label=value;
382                                          this.tempJsonObj.value=key;
383                                          dropDownData.push(this.tempJsonObj);
384                                      });
385                                      if(selectedOption.length>0){
386                                        for(var i=0;i<selectedOption.length;i++){
387                                            this.tempJsonObj = {};
388                                            this.tempJsonObj.label=selectedOption[i].textContent;
389                                            this.tempJsonObj.value=selectedOption[i].getAttribute("data-value");
390                                            dropDownData.push(this.tempJsonObj);
391                                            defaultValue.push(selectedOption[i].getAttribute("data-value"));
392                                        }
393                                      }
394                                      $('.autocomplete-select').html('');
395                                      autocomplete = new SelectPure(".autocomplete-select", {
396                                         options: dropDownData,
397                                         value: defaultValue,
398                                         multiple: true,
399                                         autocomplete: true,
400                                         icon: "fa fa-times",
401                                         onChange: function(value) { console.log(value); },
402                                      });
403                                      $('.select-pure__label').after('<div class="report-tooltip"><span class="report-tooltiptext">Click to Add More Reports</span>+</div>');
404                                      addOperation();
405                                      $( ".select-pure__options" ).find('div').each(function( index ) {
406                                        var indutryIdCurrentDiv=$(this).attr('data-value').split(",")[11];
407                                        if(industryDetailsId !== indutryIdCurrentDiv){
408                                        	$(this).css('display','none');
409                                        }
410                                      });
411                                      $('.loader-page-icon-brochure-download').hide();
412                                  }
413                              }
414                          });
415                        }
416                    }).focus(function() {
417
418                    });
419
420                    $(".instryAutoDropDown").autocomplete({
421                        minLength: 0
422                    }).bind('focus', function() {
423                        $(this).autocomplete("search");
424                    });
425                    if(industryId !== "No"){
426                        $('#industryDropDown').find('li[industryId='+industryId+']').addClass('selected');
427                        $('#industryDropDownDiv span').html(industryText);
428                    }
429                    currentIndusrtyDetails();
430                }
431            }
432        });
433    }
434
435
436    function currentIndusrtyDetails(){
437        if(industryId !== "No"){
438            $.ajax({
439                url : '/bin/crisil/getCompanyListByIndustrySelected',
440                type : 'GET',
441                dataType : "JSON",
442                contentType : "application/json",
443                data : {
444                    industryId:industryId
445                },
446                success : function(response) {
447                    if(response)
448                    {
449                        if (typeof response == 'string') {
450                            response = JSON.parse(response);
451                        }
452                        var dropDownData=[];
453                        this.tempJsonObj = {};
454                        this.tempJsonObj.label=" ";
455                        this.tempJsonObj.value=" ";
456                        dropDownData.push(this.tempJsonObj);
457                        $.each(response, function(k, v) {
458                            var key=v.prIfId+","+v.companyCode+","+v.companyName+","+v.productCategory+","+v.heading+","+v.crrdate+","+v.crrDocument+","+v.outlookDesc+","+v.rating+","+v.instrumentCategory+","+v.isNoncooperative+","+v.industryId+","+v.industryName;
459                            var value=v.companyName;
460                            this.tempJsonObj = {};
461                            this.tempJsonObj.label=value;
462                            this.tempJsonObj.value=key;
463                            dropDownData.push(this.tempJsonObj);
464                        });
465                        $('.autocomplete-select').html('');
466                        autocomplete = new SelectPure(".autocomplete-select", {
467                           options: dropDownData,
468                           value: [" "],
469                           multiple: true,
470                           autocomplete: true,
471                           icon: "fa fa-times",
472                           onChange: function(value) { console.log(value); },
473                        });
474                        $('.select-pure__label').after('<div class="report-tooltip"><span class="report-tooltiptext">Click to Add More Reports</span>+</div>');
475                        addOperation();
476                    }
477                }
478            });
479        }
480    }
481
482
483
484
485
486    //storing PrId of SF historical rating so that Historical rating link is not shown in archival page for same prId
487    /*if($('.historical-sFrating-shown').length>=0) {
488       var listOfRatingShown = $('.structure-finance-companyFactsheet').find('ul li.historical-sFrating-shown');
489       if(listOfRatingShown.length > 0) {
490           for(var i =0; i<listOfRatingShown.length; i++) {
491                var prId =listOfRatingShown[i].getAttribute('data-prid');
492                if(historicalSfPrIds.length==0) {
493                    historicalSfPrIds.push(prId);
494                } else {
495                    if(historicalSfPrIds.indexOf(prId) === -1 ) {
496                        historicalSfPrIds.push(prId);
497                    }
498                }
499           }
500
501           localStorage.setItem("SfPrId",historicalSfPrIds);
502       }
503
504
505    }
506*/
507    //storing PrId of MF historical rating so that Historical rating link is not shown in archival page for same prId
508        /*if($('.historical-mFrating-shown').length>=0) {
509          var listOfRatingShown = $('.mutual-fund-companyFactsheet').find('ul li.historical-mFrating-shown');
510           if(listOfRatingShown.length > 0) {
511               for(var i =0; i<listOfRatingShown.length; i++) {
512                    var prId =listOfRatingShown[i].getAttribute('data-prid');
513                    if(historicalMfPrIds.length==0) {
514                        historicalMfPrIds.push(prId);
515                    } else {
516                        if(historicalMfPrIds.indexOf(prId) === -1 ) {
517                            historicalMfPrIds.push(prId);
518                        }
519                    }
520               }
521
522               localStorage.setItem("MfPrId",historicalMfPrIds);
523           }
524
525
526        }*/
527
528});
529
530function reportCheckbox(_self){
531    var isChecked;
532    var isFirefox = typeof InstallTrigger !== 'undefined';
533    if(isFirefox){
534        if($(_self).hasClass('notChecked')){
535            $(_self).removeClass('notChecked');
536            $(_self).addClass('checked');
537            isChecked=true;
538        }else{
539            $(_self).removeClass('checked');
540            $(_self).addClass('notChecked');
541            isChecked=false;
542        }
543    }else{
544        isChecked=$(event.currentTarget).is(':checked');
545    }
546
547    $('.totalAmount').empty();
548    if(isChecked){
549        if(repBasePrice){
550            reportAmount = parseInt(reportAmount) + parseInt(repBasePrice);
551            reportCount = ++reportCount;
552        }else{
553            reportAmount = 0;
554        }
555
556        if(isFirefox){
557            productId = $(_self).parent().find('input:hidden').val();
558        }else{
559            productId = $(event.currentTarget).parent().find('input:hidden').val();
560         }
561        productList.push(productId);
562        var html="";
563        html += '<b>Total Amount: ₹ '+ reportAmount +'</b>';
564        $('.totalAmount').append(html);
565        $('input.crrAmount').val(reportAmount);
566    } else{
567        $('.totalAmount').empty();
568        if(repBasePrice){
569            reportAmount = parseInt(reportAmount) - parseInt(repBasePrice);
570            reportCount = --reportCount;
571        }else{
572            reportAmount = 0;
573        }
574
575        var removeProduct;
576        if(isFirefox){
577            removeProduct = $(_self).parent().find('input:hidden').val();
578        }else{
579            removeProduct = $(event.currentTarget).parent().find('input:hidden').val();
580        }
581        var index = productList.indexOf(removeProduct);
582        if (index > -1) {
583            productList.splice(index, 1);
584        }
585        var html="";
586        html += '<b>Total Amount: ₹ '+ reportAmount +'</b>';
587        $('.totalAmount').append(html);
588        $('input.crrAmount').val(reportAmount);
589    }
590}
591
592function crrReportCheckbox(_self){
593    var isChecked;
594    var isFirefox = typeof InstallTrigger !== 'undefined';
595    var numberOfReportinCart = 0;
596    var productId;
597    if(isFirefox){
598        if($(_self).hasClass('notChecked')){
599            $(_self).removeClass('notChecked');
600            $(_self).addClass('checked');
601            isChecked=true;
602        }else{
603            $(_self).removeClass('checked');
604            $(_self).addClass('notChecked');
605            isChecked=false;
606        }
607    }else{
608        isChecked=$(event.currentTarget).is(':checked');
609    }
610    if(isChecked && $('#selectedReportList').find('li').size() < $('#maxCapValue').val()){
611        $('#selectedReportList').append('<li id="cgblrRepot">'+$('#compName').val()+' '+$('#productName').val()+'<span id="cgbrRemoveSpan"></span></li>');
612        numberOfReportinCart=$('#selectedReportList li').size();
613        repBasePrice=parseInt($('#maxCapValue').val());
614        var totalBaseAmount=0;
615        if(repBasePrice){
616            $.ajax({
617                url : '/bin/crisil/calculateTotalPrice',
618                type : 'GET',
619                dataType : "JSON",
620                contentType : "application/json",
621                data : {
622                    'totalBaseAmount' : totalBaseAmount,
623                    'numberOfReports' : numberOfReportinCart
624                },
625                success : function(response) {
626                    if(response)
627                    {
628                        removeData();
629                        $('#totalPrice').append('<b>Total Amount: ₹ '+response.totalPrice+'</b>')
630                        $('#basePrice').html('Base Price: ₹ '+response.basePrice);
631                        $('#gstAmount').html('GST: ₹ '+response.gstAmount);
632                        $('#discount').html('Disounts: ₹ '+response.discountAmount);
633                    }
634                }
635            });
636            productId="CRR_"+$('#productId').val();
637            productList.push(productId);
638        }
639    }else{
640         $('#cgblrRepot').remove();
641         if($('#selectedReportList').find('li').size() == $('#maxCapValue').val() && (!isChecked || isChecked)){
642			 localStorage.setItem("maxCapValue", "reached");
643             $('#creditCheckbox').attr('checked', false);
644             $('.lbContent .form-error-msg').remove('');
645             $('.lbContent .form-success-msg').remove('');
646             var htmlErrorText = '';
647             htmlErrorText += '<div class="form-error-msg">';
648             htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
649             htmlErrorText += '<p> You have reached the max limit to purchase reports.</p>';
650             htmlErrorText += '<div class="btn-wrap">';
651             htmlErrorText += '</div>';
652             htmlErrorText += '</div>';
653             $('.lbContent').append(htmlErrorText);
654             lightboxbtn();
655         }else{
656             localStorage.removeItem('maxCapValue');
657             $('#cgblrRepot').remove();
658             var totalBaseAmount=0;
659             numberOfReportinCart=$('#selectedReportList li').size();
660             if(numberOfReportinCart > 0){
661                $.ajax({
662                    url : '/bin/crisil/calculateTotalPrice',
663                    type : 'GET',
664                    dataType : "JSON",
665                    contentType : "application/json",
666                    data : {
667                        'totalBaseAmount' : totalBaseAmount,
668                        'numberOfReports' : numberOfReportinCart
669                    },
670                    success : function(response) {
671                        if(response)
672                        {
673                            removeData();
674                            $('#totalPrice').append('<b>Total Amount: ₹ '+response.totalPrice+'</b>')
675                            $('#basePrice').html('Base Price: ₹ '+response.basePrice);
676                            $('#gstAmount').html('GST: ₹ '+response.gstAmount);
677                            $('#discount').html('Disounts: ₹ '+response.discountAmount);
678                        }
679                    }
680                });
681             }else if(numberOfReportinCart == 0){
682                removeData();
683                $('#totalPrice').append('<b>Total Amount: ₹ 0</b>')
684                $('#basePrice').html('Base Price: ₹ 0');
685                $('#discount').html('Disounts: ₹ 0');
686                $('#gstAmount').html('GST: ₹ 0');
687                $('#crrButtonDiv').css('pointer-events','none');
688             }
689             productId="CRR_"+$('#productId').val();
690             var index = productList.indexOf(productId);
691             if (index > -1) {
692                 productList.splice(index, 1);
693             }
694         }
695    }
696}
697
698function removeData(){
699    $('#totalPrice').empty()
700    $('#basePrice').html(' ');
701    $('#discount').html(' ');
702    $('#gstAmount').html(' ');
703}
704
705function addOperation(){
706    $( ".select-pure__options" ).find('div').click(function() {
707        var numberOfReportinCart = 0;
708        if($('#selectedReportList').find('li').size() < $('#maxCapValue').val()){
709
710        }else{
711             localStorage.setItem("maxCapValue", "reached");
712			 $('.lbContent .form-error-msg').remove('');
713             $('.lbContent .form-success-msg').remove('');
714             var htmlErrorText = '';
715             htmlErrorText += '<div class="form-error-msg">';
716             htmlErrorText += '<h3><span class="errorIcon"></span></span>Error</h3>';
717             htmlErrorText += '<p> You have reached the max limit to purchase reports.</p>';
718             htmlErrorText += '<div class="btn-wrap">';
719             htmlErrorText += '</div>';
720             htmlErrorText += '</div>';
721             $('.lbContent').append(htmlErrorText);
722             lightboxbtn();
723        }
724    });
725}
726
727$('.strcut-finance').click(function(e) {
728
729    var redPath = $(this).data('redirection-path');
730    var prodCategory = $(this).data('product-categroy');
731    var tranceName = $(this).data('tranchename');
732    var transaction = $(this).data('transaction');
733
734    var length = location.href.split('/').length;
735    var splitIndex = length - 1;
736    var companyCode = location.href.split('/')[splitIndex].split('.html')[0].split('.')[1];
737    //var queryParameter=prodCategory+'_'+tranceName+'_'+companyCode+'_'+transaction;
738
739    var queryParameter = 'prodCategory=' + prodCategory + '&' + 'companyCode=' + companyCode + '&' +
740        'transaction=' + transaction;
741
742    location.href = redPath + '.html' + '?' + queryParameter;
743
744
745});
746
747
748$('.archive-cgblr').click(function(e) {
749
750    var queryParameter;
751
752    var redPath = $(this).data('redirection-path');
753    var prodCategory = $(this).data('prod-cgblr');
754
755    var length = location.href.split('/').length;
756    var splitIndex = length - 1;
757    var companyCode = location.href.split('/')[splitIndex].split('.html')[0].split('.')[1];
758
759    //queryParameter=prodCategory+'_'+"NA"+'_'+companyCode+'_'+"NA";
760    queryParameter = 'prodCategory=' + prodCategory + '&' + 'companyCode=' + companyCode;
761
762    location.href = redPath + '.html' + '?' + queryParameter;
763
764
765});
766
767$('.mutual-fund-archive').click(function(e) {
768    var redPath = $(this).data('redirection-path');
769    var prodCategory = $(this).data('product-mf');
770
771    //schmea not dere*************||||
772
773    var schemaName = $(this).data('product-schema');
774
775    var length = location.href.split('/').length;
776    var splitIndex = length - 1;
777    var companyCode = location.href.split('/')[splitIndex].split('.html')[0].split('.')[1];
778
779    //var queryParameter=prodCategory+'_'+"NA"+'_'+companyCode+'_'+"NA";
780
781    queryParameter = 'prodCategory=' + prodCategory + '&' + 'companyCode=' + companyCode+'&'+'schemaName='+schemaName;
782
783    location.href = redPath + '.html' + '?' + queryParameter;
784
785
786});
787
788$(document).on('click', '.historical-cgblr', function() {
789    var basePath = $(this).data("mountpath");
790    var fileName = $(this).data("filename");
791    window.open(basePath + fileName, "_blank", "width=700,height=800")
792});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.