From 450be923152eafcfdee82a42a368bf3ce6129b98 Mon Sep 17 00:00:00 2001 From: vsdevjassim <66199077+vsdevjassim@users.noreply.github.com> Date: Thu, 5 Aug 2021 13:13:13 +0300 Subject: [PATCH] Update collections_report.php (#4556) * Update collections_report.php in export to csv with selecting payor, the exported file generated with headers only * Update collections_report.php * Update collections_report.php * Update collections_report.php * Update collections_report.php * Update collections_report.php --- interface/reports/collections_report.php | 48 +++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/interface/reports/collections_report.php b/interface/reports/collections_report.php index 06e45b68a..c37cde279 100644 --- a/interface/reports/collections_report.php +++ b/interface/reports/collections_report.php @@ -312,6 +312,34 @@ function getInsName($payerid) return $tmp['name']; } +$ins_co_name = ''; +function insuranceSelect() +{ + global $ins_co_name; + $insurancei = getInsuranceProviders(); + if ($_POST['form_csvexport']) { + foreach ($insurancei as $iid => $iname) { + if ($iid == $_POST['form_payer_id']) { + $ins_co_name = $iname; + } + } + } else { + // added dropdown for payors (TLH) + echo " \n"; + } +} // In the case of CSV export only, a download will be forced. if (!empty($_POST['form_csvexport'])) { header("Pragma: public"); @@ -320,6 +348,7 @@ if (!empty($_POST['form_csvexport'])) { header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=collections_report.csv"); header("Content-Description: File Transfer"); + insuranceSelect(); } else { ?> @@ -529,23 +558,8 @@ if (!empty($_POST['form_csvexport'])) { : - \n"; - echo " \n"; - foreach ($insurancei as $iid => $iname) { - echo "\n"; - if (!empty($_POST['form_payer_id']) && ($iid == $_POST['form_payer_id'])) { - $ins_co_name = $iname; - } - } - - echo " \n"; + -- 2.11.4.GIT