From 145cdecf80ec00e7b7f4d77db65db7537e3369c8 Mon Sep 17 00:00:00 2001 From: Ajil Date: Fri, 18 Jan 2013 16:55:33 +0530 Subject: [PATCH] Fix for the copay issue in appointment encounter report. Signed-off-by: Ajil --- interface/reports/appt_encounter_report.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/reports/appt_encounter_report.php b/interface/reports/appt_encounter_report.php index 7040811dc..75ceed2a5 100644 --- a/interface/reports/appt_encounter_report.php +++ b/interface/reports/appt_encounter_report.php @@ -28,6 +28,7 @@ require_once("../globals.php"); require_once("$srcdir/patient.inc"); require_once("$srcdir/formatting.inc.php"); require_once("../../custom/code_types.inc.php"); +require_once("$srcdir/billing.inc"); $errmsg = ""; $alertmsg = ''; // not used yet but maybe later @@ -330,10 +331,7 @@ function postError($msg) { if ($code_types[$code_type]['just']) { if (! $brow['justify']) postError(xl('Needs Justify')); } - if ($code_type == 'COPAY') { - $copays -= $brow['fee']; - if ($brow['fee'] >= 0) postError(xl('Copay not positive')); - } else if ($code_types[$code_type]['fee']) { + if ($code_types[$code_type]['fee']) { $charges += $brow['fee']; if ($brow['fee'] == 0 && !$GLOBALS['ippf_specific']) postError(xl('Missing Fee')); } else { @@ -364,6 +362,8 @@ function postError($msg) { } // End IPPF stuff } // end while + + $copays -= getPatientCopay($patient_id,$encounter); // The following is removed, perhaps temporarily, because gcac reporting // no longer depends on gcac issues. -- Rod 2009-08-11 -- 2.11.4.GIT