From 7d831c4ff13d4804b5956618f6857d8698ce640e Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Mon, 15 Jan 2018 04:59:25 -0800 Subject: [PATCH] cleanup collections report --- interface/reports/collections_report.php | 276 +++++++++++++------------------ 1 file changed, 116 insertions(+), 160 deletions(-) diff --git a/interface/reports/collections_report.php b/interface/reports/collections_report.php index 92b2f9a8c..ad084e275 100644 --- a/interface/reports/collections_report.php +++ b/interface/reports/collections_report.php @@ -1,52 +1,37 @@ - * Copyright (C) 2006-2016 Rod Roark - * Copyright (C) 2017 Brady Miller - * - * LICENSE: This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see ;. - * - * @package OpenEMR - * @author Rod Roark - * @author Terry Hill - * @author Brady Miller - * @link http://www.open-emr.org + * @package OpenEMR + * @link http://www.open-emr.org + * @author Rod Roark + * @author Terry Hill + * @author Brady Miller + * @copyright Copyright (c) 2006-2016 Rod Roark + * @copyright Copyright (c) 2015 Terry Hill + * @copyright Copyright (c) 2017-2018 Brady Miller + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ - -use OpenEMR\Core\Header; - require_once("../globals.php"); require_once("../../library/patient.inc"); require_once("../../library/invoice_summary.inc.php"); require_once("../../library/sl_eob.inc.php"); require_once "$srcdir/options.inc.php"; +use OpenEMR\Core\Header; $alertmsg = ''; $bgcolor = "#aaaaaa"; $export_patient_count = 0; $export_dollars = 0; -$today = date("Y-m-d"); - -$form_date = fixDate($_POST['form_date'], ""); -$form_to_date = fixDate($_POST['form_to_date'], ""); +$form_date = (isset($_POST['form_date'])) ? DateToYYYYMMDD($_POST['form_date']) : ""; +$form_to_date = (isset($_POST['form_to_date'])) ? DateToYYYYMMDD($_POST['form_to_date']) : ""; $is_ins_summary = $_POST['form_category'] == 'Ins Summary'; $is_due_ins = ($_POST['form_category'] == 'Due Ins') || $is_ins_summary; $is_due_pt = $_POST['form_category'] == 'Due Pt'; @@ -167,7 +152,7 @@ for ($c = 0; $c < $form_age_cols; function bucks($amount) { if ($amount) { - echo oeFormatMoney($amount); // was printf("%.2f", $amount); + return oeFormatMoney($amount); // was printf("%.2f", $amount); } } @@ -229,11 +214,11 @@ function endPatient($ptrow) if ($form_age_cols) { for ($c = 0; $c < $form_age_cols; ++$c) { echo "  " . - oeFormatMoney($ptrow['agedbal'][$c]) . " \n"; + text(oeFormatMoney($ptrow['agedbal'][$c])) . " \n"; } } else { echo "  " . - oeFormatMoney($pt_balance) . " \n"; + text(oeFormatMoney($pt_balance)) . " \n"; } if ($form_cb_idays) { @@ -276,19 +261,19 @@ function endInsurance($insrow) echo " \n"; echo " " . text($insrow['insname']) . "\n"; echo "  " . - oeFormatMoney($insrow['charges']) . " \n"; + text(oeFormatMoney($insrow['charges'])) . " \n"; echo "  " . - oeFormatMoney($insrow['adjustments']) . " \n"; + text(oeFormatMoney($insrow['adjustments'])) . " \n"; echo "  " . - oeFormatMoney($insrow['paid']) . " \n"; + text(oeFormatMoney($insrow['paid'])) . " \n"; if ($form_age_cols) { for ($c = 0; $c < $form_age_cols; ++$c) { echo "  " . - oeFormatMoney($insrow['agedbal'][$c]) . " \n"; + text(oeFormatMoney($insrow['agedbal'][$c])) . " \n"; } } else { echo "  " . - oeFormatMoney($ins_balance) . " \n"; + text(oeFormatMoney($ins_balance)) . " \n"; } echo " \n"; @@ -321,61 +306,58 @@ if ($_POST['form_csvexport']) { - - -<?php echo xlt('Collections Report')?> - + <?php echo xlt('Collections Report')?> - + /* specifically exclude some from the screen */ + @media screen { + #report_parameters_daterange { + visibility: hidden; + display: none; + } + } + + + @@ -383,7 +365,7 @@ function checkAll(checked) { - -
+
@@ -405,71 +387,49 @@ function checkAll(checked) { -
@@ -990,8 +946,8 @@ if ($_POST['form_refresh'] || $_POST['form_export'] || $_POST['form_csvexport']) -   - +   +   @@ -1054,7 +1010,7 @@ if ($form_age_cols) { ?>   - + @@ -1131,95 +1087,95 @@ if ($form_age_cols) {  " . attr($insname) ."\n"; + echo "  " . text($insname) ."\n"; } - echo "  " . attr($ptname) ."\n"; + echo "  " . text($ptname) ."\n"; if ($form_cb_ssn) { - echo "  " . attr($row['ss']) . "\n"; + echo "  " . text($row['ss']) . "\n"; } if ($form_cb_dob) { - echo "  " . attr(oeFormatShortDate($row['DOB'])) . "\n"; + echo "  " . text(oeFormatShortDate($row['DOB'])) . "\n"; } if ($form_cb_pubpid) { - echo "  " . attr($row['pubpid']) . "\n"; + echo "  " . text($row['pubpid']) . "\n"; } if ($form_cb_policy) { - echo "  " . attr($row['policy']) . "\n"; + echo "  " . text($row['policy']) . "\n"; } if ($form_cb_phone) { - echo "  " . attr($row['phone']) . "\n"; + echo "  " . text($row['phone']) . "\n"; } if ($form_cb_city) { - echo "  " . attr($row['city']) . "\n"; + echo "  " . text($row['city']) . "\n"; } if ($form_cb_ins1 || $form_payer_id) { - echo "  " . attr($row['ins1']) . "\n"; + echo "  " . text($row['ins1']) . "\n"; } if ($form_provider) { - echo "  " . attr($provider_name) . "\n"; + echo "  " . text($provider_name) . "\n"; } if ($form_cb_referrer) { - echo "  " . attr($row['referrer']) . "\n"; + echo "  " . text($row['referrer']) . "\n"; } } else { - echo " "; + echo " "; echo " \n"; } ?>   + target="_blank"> -   +   -   +   -   +   -   +   -   +   "; if ($c == $agecolno) { - bucks($balance); + echo text(bucks($balance)); } echo " \n"; } } else { ?> -  +  "; - echo attr($row['inactive_days']) . " \n"; + echo text($row['inactive_days']) . " \n"; } ?> - +  " . - oeFormatMoney($grand_total_charges) . " \n"; + text(oeFormatMoney($grand_total_charges)) . " \n"; echo "  " . - oeFormatMoney($grand_total_adjustments) . " \n"; + text(oeFormatMoney($grand_total_adjustments)) . " \n"; echo "  " . - oeFormatMoney($grand_total_paid) . " \n"; + text(oeFormatMoney($grand_total_paid)) . " \n"; if ($form_age_cols) { for ($c = 0; $c < $form_age_cols; ++$c) { echo " " . - oeFormatMoney($grand_total_agedbal[$c]) . " \n"; + text(oeFormatMoney($grand_total_agedbal[$c])) . " \n"; } } else { echo " " . - oeFormatMoney($grand_total_charges + - $grand_total_adjustments - $grand_total_paid) . " \n"; + text(oeFormatMoney($grand_total_charges + + $grand_total_adjustments - $grand_total_paid)) . " \n"; } if ($form_cb_idays) { -- 2.11.4.GIT