{"id":14769,"date":"2026-05-27T00:19:05","date_gmt":"2026-05-26T18:49:05","guid":{"rendered":"https:\/\/abkaritoday.com\/?page_id=14769"},"modified":"2026-05-27T00:19:42","modified_gmt":"2026-05-26T18:49:42","slug":"fl5db-mgr-lifting-report","status":"publish","type":"page","link":"https:\/\/abkaritoday.com\/?page_id=14769","title":{"rendered":"FL5DB MGR Lifting Report"},"content":{"rendered":"<div class=\"excise-shortcode-wrap\">        <form class=\"excise-search-form\" method=\"get\" autocomplete=\"off\" action=\"https:\/\/abkaritoday.com\/index.php\" onsubmit=\"return window.fl5dbMgrLiftingSearchSubmit ? window.fl5dbMgrLiftingSearchSubmit(this) : true;\">\n                        <input type=\"hidden\" name=\"excise_do_search\" value=\"1\">\n            <div class=\"excise-search-grid\">\n                <label>Financial Year\n                    <select name=\"financial_year\" data-excise-filter=\"financial_year\">\n                        <option value=\"\">Select Financial Year<\/option><option value=\"2026-2027\" >2026-2027<\/option>                    <\/select>\n                <\/label>\n                <label>Month\n                    <select name=\"report_month\" data-excise-filter=\"report_month\">\n                        <option value=\"\">Select Month<\/option><option value=\"May-2026\" >May-2026<\/option>                    <\/select>\n                <\/label>\n                <label>District\n                    <select name=\"district_name\" data-excise-filter=\"district_name\">\n                        <option value=\"\">Select District<\/option><option value=\"PRAYAGRAJ\" >PRAYAGRAJ<\/option>                    <\/select>\n                <\/label>\n                <label>Sector \/ Circle Name\n                    <select name=\"circle_name\" data-excise-filter=\"circle_name\">\n                        <option value=\"\">Select Sector \/ Circle<\/option>                    <\/select>\n                <\/label>\n                <label>Licence Type\n                    <input type=\"text\" class=\"excise-fixed-field\" value=\"FL5DB\" readonly aria-readonly=\"true\">\n                    <input type=\"hidden\" name=\"license_type\" value=\"FL5DB\">\n                <\/label>\n                <label>Shop Name\n                    <select name=\"shop_id\" data-excise-filter=\"shop_id\">\n                        <option value=\"\">All Shops<\/option>                    <\/select>\n                <\/label>\n                <label>Type Shop Name \/ Code\n                    <input type=\"text\" name=\"shop_search\" data-excise-filter=\"shop_search\" data-excise-shop-search=\"1\" list=\"excise-shop-suggestions\" value=\"\" placeholder=\"Type shop name or code\">\n                    <datalist id=\"excise-shop-suggestions\"><\/datalist>\n                <\/label>\n                <label>Product\n                    <select name=\"product_type\" data-excise-filter=\"product_type\">\n                        <option value=\"FL\"  selected='selected'>FL<\/option>                        <option value=\"BEER\" >BEER<\/option>                    <\/select>\n                <\/label>\n                <label>Status\n                    <select name=\"status\" data-excise-filter=\"status\">\n                        <option value=\"pending\"  selected='selected'>Pending Only<\/option>                        <option value=\"completed\" >Completed Only<\/option>                        <option value=\"all\" >All<\/option>                    <\/select>\n                <\/label>\n            <\/div>\n            <div class=\"excise-search-actions\">\n                <button type=\"button\" name=\"excise_do_search\" value=\"1\" class=\"button button-primary excise-search-submit\" onclick=\"return window.fl5dbMgrLiftingSearchSubmit ? window.fl5dbMgrLiftingSearchSubmit(this.form, event) : false;\">SEARCH<\/button>\n                <button type=\"button\" class=\"button excise-clear-filters\">CLEAR<\/button>\n                <button type=\"button\" class=\"button button-primary excise-print-report-btn excise-desktop-only\">PRINT REPORT<\/button>\n                                    <button type=\"button\" class=\"button button-primary excise-download-excel-btn excise-desktop-only\" data-desktop-only=\"1\">DOWNLOAD EXCEL<\/button>\n                            <\/div>\n        <\/form>\n        <script>\n        (function(){\n            if (window.fl5dbFilenameForceV100) return;\n            window.fl5dbFilenameForceV100 = true;\n            function cleanPart(value){\n                value = (value === undefined || value === null) ? '' : String(value);\n                value = value.replace(\/&nbsp;\/gi, ' ');\n                value = value.replace(\/[\\\\\\\/:*?\"<>|&]+\/g, ' ');\n                value = value.replace(\/\\s*-\\s*\/g, '_');\n                value = value.replace(\/\\s+\/g, '_');\n                value = value.replace(\/_+\/g, '_');\n                value = value.replace(\/^[_\\.\\-]+|[_\\.\\-]+$\/g, '');\n                return value;\n            }\n            function fieldText(form, name){\n                var el = form ? form.querySelector('[name=\"'+name+'\"]') : null;\n                if (!el) return '';\n                if (el.tagName && el.tagName.toLowerCase() === 'select') {\n                    var val = el.value || '';\n                    if (!val) return '';\n                    var opt = el.options && el.selectedIndex >= 0 ? el.options[el.selectedIndex] : null;\n                    return (opt && opt.text ? opt.text : val) || '';\n                }\n                return el.value || '';\n            }\n            function statusText(form){\n                return fieldText(form, 'status') || 'Pending Only';\n            }\n            function dateTimeParts(){\n                var d = new Date();\n                function pad(n){ return String(n).padStart(2, '0'); }\n                var date = pad(d.getDate()) + pad(d.getMonth() + 1) + d.getFullYear();\n                var h = d.getHours();\n                var ampm = h >= 12 ? 'pm' : 'am';\n                h = h % 12; if (h === 0) h = 12;\n                var time = pad(h) + '.' + pad(d.getMinutes()) + '_' + ampm;\n                return {date: date, time: time};\n            }\n            function buildFilenameBase(form){\n                var dt = dateTimeParts();\n                var parts = ['FL5DB','MGR','Lifting','Report'];\n                var district = cleanPart(fieldText(form, 'district_name'));\n                var circle = cleanPart(fieldText(form, 'circle_name'));\n                var product = cleanPart(fieldText(form, 'product_type') || 'FL');\n                var status = cleanPart(statusText(form));\n                if (district) parts.push(district);\n                if (circle) parts.push(circle);\n                if (product) parts.push(product);\n                if (status) parts.push(status);\n                parts.push(dt.date, dt.time);\n                return parts.map(cleanPart).filter(Boolean).join('_').replace(\/_+\/g, '_').replace(\/^[_\\.\\-]+|[_\\.\\-]+$\/g, '');\n            }\n            function postUrl(form, actionName, filenameBase){\n                var adminPost = \"https:\\\/\\\/abkaritoday.com\\\/wp-admin\\\/admin-post.php\";\n                var params = new URLSearchParams(new FormData(form));\n                params.set('action', actionName);\n                params.set('excise_do_search', '1');\n                params.set('license_type', 'FL5DB');\n                var productEl = form.querySelector('[name=\"product_type\"]');\n                if (productEl && productEl.value) { params.set('product_type', productEl.value); } else { params.delete('product_type'); }\n                params.set('export_filename_base', filenameBase);\n                if (actionName === 'fl5db_mgr_lifting_print') {\n                    params.set('return_url', window.location.href.split('#')[0] + '#excise-search-results');\n                    params.set('print_save_name', filenameBase);\n                }\n                return adminPost + '?' + params.toString();\n            }\n            function downloadBlob(blob, filename){\n                var url = URL.createObjectURL(blob);\n                var a = document.createElement('a');\n                a.href = url;\n                a.download = filename;\n                document.body.appendChild(a);\n                a.click();\n                setTimeout(function(){ URL.revokeObjectURL(url); a.remove(); }, 1500);\n            }\n            document.addEventListener('click', function(e){\n                var excelBtn = e.target && e.target.closest ? e.target.closest('.excise-download-excel-btn') : null;\n                var printBtn = e.target && e.target.closest ? e.target.closest('.excise-print-report-btn') : null;\n                if (!excelBtn && !printBtn) return;\n                var form = (excelBtn || printBtn).closest('form');\n                if (!form) return;\n                var districtEl = form.querySelector('[name=\"district_name\"]');\n                if (!districtEl || !districtEl.value) {\n                    alert(excelBtn ? 'Please select District first, then download Excel.' : 'Please select District first, then print the report.');\n                    e.preventDefault();\n                    e.stopPropagation();\n                    if (e.stopImmediatePropagation) e.stopImmediatePropagation();\n                    return false;\n                }\n                var filenameBase = buildFilenameBase(form);\n                if (excelBtn) {\n                    var excelUrl = postUrl(form, 'fl5db_mgr_lifting_export', filenameBase);\n                    e.preventDefault();\n                    e.stopPropagation();\n                    if (e.stopImmediatePropagation) e.stopImmediatePropagation();\n                    if (window.fetch && window.URL && window.Blob) {\n                        fetch(excelUrl, {credentials:'same-origin', cache:'no-store'})\n                            .then(function(resp){ if(!resp.ok) throw new Error('download failed'); return resp.blob(); })\n                            .then(function(blob){ downloadBlob(blob, filenameBase + '.xlsx'); })\n                            .catch(function(){ window.location.href = excelUrl; });\n                    } else {\n                        window.location.href = excelUrl;\n                    }\n                    return false;\n                }\n                if (printBtn) {\n                    var printUrl = postUrl(form, 'fl5db_mgr_lifting_print', filenameBase);\n                    try { sessionStorage.setItem('fl5dbLastPrintFilenameBase', filenameBase); sessionStorage.setItem('fl5dbLastPdfFilenameBase', filenameBase); localStorage.setItem('fl5dbLastPrintFilenameBase', filenameBase); localStorage.setItem('fl5dbLastPdfFilenameBase', filenameBase); } catch (err) {}\n                    e.preventDefault();\n                    e.stopPropagation();\n                    if (e.stopImmediatePropagation) e.stopImmediatePropagation();\n                    window.location.href = printUrl;\n                    return false;\n                }\n            }, true);\n        })();\n        <\/script>\n        <script>\n        window.fl5dbMgrLiftingSearchSubmit = window.fl5dbMgrLiftingSearchSubmit || function(form, evt){\n            if (evt && evt.preventDefault) evt.preventDefault();\n            if (evt && evt.stopPropagation) evt.stopPropagation();\n            try {\n                if (!form) return false;\n                var results = document.getElementById('excise-search-results');\n                var fd = new FormData(form);\n                fd.set('action','fl5db_mgr_lifting_search_results');\n                fd.set('excise_do_search','1');\n                fd.set('license_type','FL5DB');\n                var productEl = form.querySelector('[name=\"product_type\"]');\n                if (productEl && productEl.value) { fd.set('product_type', productEl.value); } else { fd.delete('product_type'); }\n                if (results) {\n                    results.innerHTML = '<div class=\"excise-backend-only-note\"><strong>Searching...<\/strong> Please wait.<\/div>';\n                    results.scrollIntoView({behavior:'smooth', block:'start'});\n                }\n                var ajaxUrl = 'https:\/\/abkaritoday.com\/wp-admin\/admin-ajax.php';\n                var publicBase = 'https:\/\/abkaritoday.com\/index.php';\n                var directParams = new URLSearchParams();\n                fd.forEach(function(value, key){\n                    if (key !== 'action' && key && value !== null && value !== undefined) directParams.set(key, value);\n                });\n                directParams.set('excise_do_search','1');\n                function directGo(){\n                    var u = new URL(publicBase, window.location.href);\n                    u.search = directParams.toString();\n                    u.hash = 'excise-search-results';\n                    window.location.href = u.toString();\n                }\n                if (!window.fetch) { directGo(); return false; }\n                fetch(ajaxUrl, {\n                    method: 'POST',\n                    body: fd,\n                    credentials: 'same-origin',\n                    cache: 'no-store'\n                }).then(function(resp){\n                    if (!resp.ok) throw new Error('Search request failed');\n                    return resp.json();\n                }).then(function(json){\n                    if (!json || !json.success || !json.data || typeof json.data.html === 'undefined') throw new Error('Invalid search response');\n                    if (results) results.innerHTML = json.data.html;\n                    var u = new URL(publicBase, window.location.href);\n                    u.search = directParams.toString();\n                    u.hash = 'excise-search-results';\n                    if (window.history && window.history.pushState) window.history.pushState(null, '', u.toString());\n                    if (results) results.scrollIntoView({behavior:'smooth', block:'start'});\n                }).catch(function(){\n                    directGo();\n                });\n                return false;\n            } catch(err) {\n                return false;\n            }\n        };\n        <\/script>\n\n        <div id=\"excise-search-results\" class=\"excise-print-area\">\n                    <div class=\"excise-backend-only-note\"><strong>Data is saved in backend.<\/strong> Select filters and click <strong>Search<\/strong> to view the report.<br><strong>Latest Data Uploaded On:<\/strong> 27-05-2026 05:32 PM<\/div>\n                <\/div>\n        <div id=\"excise-empty-results-template\" style=\"display:none;\">\n                        <div class=\"excise-backend-only-note\"><strong>Data is saved in backend.<\/strong> Select filters and click <strong>Search<\/strong> to view the report.<br><strong>Latest Data Uploaded On:<\/strong> 27-05-2026 05:32 PM<\/div>\n                <\/div>\n        <\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_regular_price":[],"currency_symbol":[],"footnotes":""},"class_list":["post-14769","page","type-page","status-publish","hentry"],"post_slider_layout_featured_media_urls":{"thumbnail":"","post_slider_layout_landscape_large":"","post_slider_layout_portrait_large":"","post_slider_layout_square_large":"","post_slider_layout_landscape":"","post_slider_layout_portrait":"","post_slider_layout_square":"","full":""},"publishpress_future_action":{"enabled":false,"date":"2026-06-04 00:46:50","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/abkaritoday.com\/index.php?rest_route=\/wp\/v2\/pages\/14769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abkaritoday.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/abkaritoday.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/abkaritoday.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abkaritoday.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14769"}],"version-history":[{"count":2,"href":"https:\/\/abkaritoday.com\/index.php?rest_route=\/wp\/v2\/pages\/14769\/revisions"}],"predecessor-version":[{"id":14771,"href":"https:\/\/abkaritoday.com\/index.php?rest_route=\/wp\/v2\/pages\/14769\/revisions\/14771"}],"wp:attachment":[{"href":"https:\/\/abkaritoday.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}