Subversion Repositories SmartDukaan

Rev

Rev 34508 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34508 Rev 34509
Line 339... Line 339...
339
 
339
 
340
    window.location.href = endPoint;
340
    window.location.href = endPoint;
341
 
341
 
342
 
342
 
343
});
343
});
-
 
344
 
-
 
345
 
-
 
346
// collection summary report ------------------
-
 
347
// collection summary report ------------------
-
 
348
// collection summary report ------------------
-
 
349
// collection summary report ------------------
-
 
350
 
-
 
351
 
-
 
352
$(document).on('click', ".analysis-partner-collection-summary", function () {
-
 
353
    var fofoId = $(this).data("fofoid");
-
 
354
    doGetAjaxRequestHandler(context + "/analysis-collectionSummaryFetchReport?fofoId=" + fofoId,
-
 
355
        function (response) {
-
 
356
            $('#' + 'main-content').html(response);
-
 
357
        });
-
 
358
});
-
 
359
 
-
 
360
 
-
 
361
$(document).on('click', '.analysis-download-collection-summary', function () {
-
 
362
    var fofoId = $(this).data("fofoid");
-
 
363
    var startDate = $("#analysis-startDate-collection-summary").val();
-
 
364
 
-
 
365
    var endDate = $("#analysis-endDate-collection-summary").val();
-
 
366
 
-
 
367
    if (startDate == "" || startDate == undefined) {
-
 
368
 
-
 
369
        alert("start date is not be empty!!");
-
 
370
        return;
-
 
371
    }
-
 
372
    if (endDate == "" || endDate == undefined) {
-
 
373
 
-
 
374
        alert("end date is not be empty!!");
-
 
375
        return;
-
 
376
    }
-
 
377
    let endPoint = `${context}/analysis-downloadCollectionSummary?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
-
 
378
 
-
 
379
    window.location.href = endPoint;
-
 
380
 
-
 
381
});
-
 
382
$(document).on('click', ".analysis-collection-summary-fetch-report", function () {
-
 
383
    var fofoId = $(this).data("fofoid");
-
 
384
    var startDate = $("#analysis-startDate-collection-summary").val();
-
 
385
 
-
 
386
    var endDate = $("#analysis-endDate-collection-summary").val();
-
 
387
 
-
 
388
    if (startDate == "" || startDate == undefined) {
-
 
389
        alert("start date is not be empty!!");
-
 
390
        return;
-
 
391
    }
-
 
392
    if (endDate == "" || endDate == undefined) {
-
 
393
 
-
 
394
        alert("end date is not be empty!!");
-
 
395
        return;
-
 
396
    }
-
 
397
    let endPoint = `${context}/analysis-collectionSummaryFetchReport?startDate=${startDate}&endDate=${endDate}&fofoId=${fofoId}`;
-
 
398
 
-
 
399
 
-
 
400
    doGetAjaxRequestHandler(endPoint,
-
 
401
        function (response) {
-
 
402
            $('#' + 'main-content').html(response);
-
 
403
        });
-
 
404
 
-
 
405
 
-
 
406
});
-
 
407
 
-
 
408
 
-
 
409
// credit note report .............
-
 
410
// credit note report .............
-
 
411
// credit note report .............
-
 
412
 
-
 
413
$(document).on('click', ".analysis-credit-note", function () {
-
 
414
    var fofoId = $(this).data("fofoid");
-
 
415
    doGetAjaxRequestHandler(context + "/analysis-report/credit-note?fofoId=" + fofoId,
-
 
416
        function (response) {
-
 
417
            $('#' + 'main-content').html(response);
-
 
418
        });
-
 
419
});
-
 
420
 
-
 
421
$(document).on('click', '.analysis-credit-not-list', function () {
-
 
422
    var selectedDate = $('input[name="analysis-creditNotePeriod"]').val(); // Get the selected year-month
-
 
423
    var fofoId = $(this).data("fofoid");
-
 
424
    if (!selectedDate) {
-
 
425
        alert("Month-Year selection cannot be empty!");
-
 
426
        return;
-
 
427
    }
-
 
428
    doGetAjaxRequestHandler(context + "analysis-credit/credit-note-report?yearMonth=" + selectedDate + "&fofoId=" + fofoId,
-
 
429
        function (response) {
-
 
430
            $('.credit-note-conatiner').html(response);
-
 
431
            $('#creditNoteList').DataTable({
-
 
432
                "scrollX": true,
-
 
433
                "bPaginate": true,
-
 
434
                "bLengthChange": true,
-
 
435
                "bFilter": true,
-
 
436
                "bInfo": false,
-
 
437
                "bAutoWidth": false
-
 
438
            });
-
 
439
        });
-
 
440
 
-
 
441
});
-
 
442
 
-
 
443
$(document).on('click', '.analysis-download-credit-note', function () {
-
 
444
    var cnNumber = $(this).data("creditnumber");
-
 
445
 
-
 
446
    if (!cnNumber) {
-
 
447
        alert("CN-Number cannot be empty!");
-
 
448
        return;
-
 
449
    }
-
 
450
 
-
 
451
    let endPoint = `${context}/analysis-credit-note/download?cnNumber=${cnNumber}`;
-
 
452
 
-
 
453
    window.location.href = endPoint; // Redirect to the download URL
-
 
454
});
-
 
455
 
-
 
456
$(document).on('click', '.analysis-download-credit-note-attachement', function () {
-
 
457
    var cnNumber = $(this).data("creditnumber");
-
 
458
 
-
 
459
    if (!cnNumber) {
-
 
460
        alert("CN-Number cannot be empty!");
-
 
461
        return;
-
 
462
    }
-
 
463
 
-
 
464
    let endPoint = `${context}/analysis-credit-note/attachements?cnNumber=${cnNumber}`;
-
 
465
 
-
 
466
    window.location.href = endPoint; // Redirect to the download URL
-
 
467
});