From f715eba1d7cd92c21afa501e2be07eddfae94e8f Mon Sep 17 00:00:00 2001 From: David Slater Date: Thu, 10 Oct 2024 11:12:15 -0500 Subject: [PATCH] Starting fixing fbs reports --- conf/settings.inc.php.dist | 5 +++++ html/report.php | 10 +++++++-- html/stats_monthly.php | 4 ++-- libs/data_functions.class.inc.php | 13 +++++++---- libs/job_functions.class.inc.php | 14 ++++++++---- libs/settings.class.inc.php | 36 +++++++++++++++++++++++++++++++ 6 files changed, 70 insertions(+), 12 deletions(-) diff --git a/conf/settings.inc.php.dist b/conf/settings.inc.php.dist index 8a3b7c6..dd3ce5d 100644 --- a/conf/settings.inc.php.dist +++ b/conf/settings.inc.php.dist @@ -57,5 +57,10 @@ define('CFOP_API_KEY',''); define('FBS_ACCESS_KEY',''); define('FBS_SECRET_KEY',''); define('FBS_FACILITY_ID',''); +define('FBS_FACILITY_CODE',''); +define('FBS_AREACODE',''); +define('FBS_LABCODE',''); +define('FBS_JOBS_SKUCODE',''); +define('FBS_DATA_SKUCODE',''); ?> diff --git a/html/report.php b/html/report.php index 48a50c3..2d9491a 100644 --- a/html/report.php +++ b/html/report.php @@ -41,7 +41,10 @@ $month = $_POST['month']; $year = $_POST['year']; $type = $_POST['report_type']; - $data = job_functions::get_jobs_fbs_bill($db,$month,$year); + $data = job_functions::get_jobs_fbs_bill($db,$month,$year, + settings::get_fbs_areacode(),settings::get_fbs_facility_code(), + settings::get_fbs_labcode(),settings::get_fbs_jobs_skucode() + ); $filename = $prefix . "-job-fbs-" . $month . "-" . $year . "." . $type; @@ -78,7 +81,10 @@ $month = $_POST['month']; $year = $_POST['year']; $type = $_POST['report_type']; - $data = data_functions::get_data_fbs_bill($db,$month,$year,settings::get_data_minimal_bill()); + $data = data_functions::get_data_fbs_bill($db,$month,$year,settings::get_data_minimal_bill(), + settings::get_fbs_areacode(),settings::get_fbs_facility_code(),settings::get_fbs_labcode(), + settings::get_fbs_data_skucode() + ); $filename = $prefix . "-data-fbs-" . $month . "-" . $year . "." . $type; diff --git a/html/stats_monthly.php b/html/stats_monthly.php index 9dd3b63..abc452b 100644 --- a/html/stats_monthly.php +++ b/html/stats_monthly.php @@ -65,7 +65,7 @@ $graph_image = ""; -$graph_form = "
format("Y") . "&month=" . $selected_month->format("m") . "'>"; $graph_form .= "