diff --git a/apps/geoproc/templates/report/report_j.html b/apps/geoproc/templates/report/report_j.html index f421b0e..255abf9 100644 --- a/apps/geoproc/templates/report/report_j.html +++ b/apps/geoproc/templates/report/report_j.html @@ -164,10 +164,13 @@ var DataStop = $("#id_datestop").val(); const checkbox = document.getElementById('AllSectors'); let AllSectors = false - // Проверяем состояние чекбокса + if (checkbox) { + // Проверяем состояние чекбокса if (checkbox.checked) { AllSectors = true } + } + console.log(AllSectors) if (DataStart.trim() == "") { $("#id_datestart").css('border', "3px solid #80bdff").focus(); diff --git a/apps/geoproc/templates/report/report_jc.html b/apps/geoproc/templates/report/report_jc.html index 6e4cfa7..5aed96d 100644 --- a/apps/geoproc/templates/report/report_jc.html +++ b/apps/geoproc/templates/report/report_jc.html @@ -173,10 +173,12 @@ function reportshow() { const checkbox = document.getElementById('AllSectors'); let AllSectors = false - // Проверяем состояние чекбокса + if (checkbox) { + // Проверяем состояние чекбокса if (checkbox.checked) { AllSectors = true } + } var DataStart = $("#id_datestart").val(); var DataStop = $("#id_datestop").val(); var variant = $("#id_variant").val();