From 6c828682b9a19db36cc3a8c5303ea21fee4c7327 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Tue, 2 Jan 2018 17:18:44 -0800 Subject: [PATCH] updated sales by item report --- interface/reports/sales_by_item.php | 180 ++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 98 deletions(-) diff --git a/interface/reports/sales_by_item.php b/interface/reports/sales_by_item.php index 89a3a0a06..0b892ef7b 100644 --- a/interface/reports/sales_by_item.php +++ b/interface/reports/sales_by_item.php @@ -2,37 +2,25 @@ /** * This is a report of sales by item description. * - * Copyright (C) 2015-2016 Terry Hill - * 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 2 - * 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-2016 Terry Hill + * @copyright Copyright (c) 2017 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("$srcdir/patient.inc"); require_once("$srcdir/acl.inc"); require_once "$srcdir/options.inc.php"; +use OpenEMR\Core\Header; + $form_provider = $_POST['form_provider']; if ($_POST['form_refresh'] || $_POST['form_csvexport']) { $form_details = $_POST['form_details'] ? true : false; @@ -103,9 +91,10 @@ function thisLineItem($patient_id, $encounter_id, $rowcat, $description, $transd $catleft = " "; ?> - @@ -214,11 +203,12 @@ function thisLineItem($patient_id, $encounter_id, $rowcat, $description, $transd   - + + - + @@ -234,7 +224,7 @@ if ($GLOBALS['sales_report_invoice'] == 1) {   - + @@ -254,13 +244,12 @@ if ($GLOBALS['sales_report_invoice'] == 1) { } // end function if (! acl_check('acct', 'rep')) { - die(xl("Unauthorized access.")); + die(xlt("Unauthorized access.")); } - - $form_from_date = fixDate($_POST['form_from_date'], date('Y-m-d')); - $form_to_date = fixDate($_POST['form_to_date'], date('Y-m-d')); - $form_facility = $_POST['form_facility']; +$form_from_date = (isset($_POST['form_from_date'])) ? DateToYYYYMMDD($_POST['form_from_date']) : date('Y-m-d'); +$form_to_date = (isset($_POST['form_to_date'])) ? DateToYYYYMMDD($_POST['form_to_date']) : date('Y-m-d'); +$form_facility = $_POST['form_facility']; if ($_POST['form_csvexport']) { header("Pragma: public"); @@ -283,7 +272,7 @@ if ($_POST['form_csvexport']) { } if ($GLOBALS['sales_report_invoice'] == 1) { - echo '"ID",'; + echo '"ID",'; } echo '"Qty",'; @@ -300,61 +289,58 @@ else { - - - - - + /* specifically exclude some from the screen */ + @media screen { + #report_parameters_daterange { + visibility: hidden; + display: none; + } + } + table.mymaintable, table.mymaintable td { + border: 1px solid #aaaaaa; + border-collapse: collapse; + } + table.mymaintable td { + padding: 1pt 4pt 1pt 4pt; + } + + + <?php echo xlt('Sales by Item') ?> @@ -363,7 +349,7 @@ $('.datepicker').datetimepicker({ - -
+ @@ -482,9 +464,10 @@ if ($_POST['form_refresh'] || $_POST['form_csvexport']) { - + } ?> @@ -646,9 +629,10 @@ if ($_POST['form_refresh'] || $_POST['form_csvexport']) { $catleft = " "; ?> - -- 2.11.4.GIT