From 297a245e5884d541ba9ebf61aed0c310b9d75f21 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Sat, 14 Oct 2017 23:57:36 -0700 Subject: [PATCH] ongoing internationalization of date widget --- interface/reports/unique_seen_patients_report.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/interface/reports/unique_seen_patients_report.php b/interface/reports/unique_seen_patients_report.php index 50d36b281..8bca036e8 100644 --- a/interface/reports/unique_seen_patients_report.php +++ b/interface/reports/unique_seen_patients_report.php @@ -28,8 +28,8 @@ use OpenEMR\Core\Header; require_once("../globals.php"); require_once("$srcdir/patient.inc"); - $from_date = fixDate($_POST['form_from_date'], date('Y-01-01')); - $to_date = fixDate($_POST['form_to_date'], date('Y-12-31')); +$form_from_date = (!empty($_POST['form_from_date'])) ? DateToYYYYMMDD($_POST['form_from_date']) : date('Y-01-01'); +$form_to_date = (!empty($_POST['form_to_date'])) ? DateToYYYYMMDD($_POST['form_to_date']) : date('Y-12-31'); if ($_POST['form_labels']) { header("Pragma: public"); @@ -82,7 +82,7 @@ $(document).ready(function() { $('.datepicker').datetimepicker({ - + }); @@ -123,7 +123,7 @@ $(document).ready(function() { -
- +
@@ -143,15 +143,13 @@ $(document).ready(function() { : - + : - + @@ -215,8 +213,8 @@ if ($_POST['form_refresh'] || $_POST['form_labels']) { "FROM patient_data AS p " . "JOIN form_encounter AS e ON " . "e.pid = p.pid AND " . - "e.date >= '$from_date 00:00:00' AND " . - "e.date <= '$to_date 23:59:59' " . + "e.date >= '$form_from_date 00:00:00' AND " . + "e.date <= '$form_to_date 23:59:59' " . "LEFT OUTER JOIN insurance_data AS i1 ON " . "i1.pid = p.pid AND i1.type = 'primary' " . "LEFT OUTER JOIN insurance_companies AS c1 ON " . -- 2.11.4.GIT