4 * interface/billing/customize_log.php - starting point for customization of billing log
7 * @link http://www.open-emr.org
8 * @author Stephen Waite <stephen.waite@cmsvt.com>
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2014 Stephen Waite <stephen.waite@cmsvt.com>
11 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 require_once("../globals.php");
17 use OpenEMR\Common\Acl\AclMain
;
18 use OpenEMR\Common\Crypto\CryptoGen
;
19 use OpenEMR\Common\Twig\TwigContainer
;
21 //ensure user has proper access
22 if (!AclMain
::aclCheckCore('acct', 'eob', '', 'write') && !AclMain
::aclCheckCore('acct', 'bill', '', 'write')) {
23 echo (new TwigContainer(null, $GLOBALS['kernel']))->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => xl("Billing Log")]);
27 $filename = $GLOBALS['OE_SITE_DIR'] . '/documents/edi/process_bills.log';
29 if (!file_exists($filename)) {
30 echo xlt("Billing log is empty");
34 $fh = file_get_contents($filename);
36 $cryptoGen = new CryptoGen();
37 if ($cryptoGen->cryptCheckStandard($fh)) {
38 $fh = $cryptoGen->decryptStandard($fh, null, 'database');
42 echo nl2br(text($fh));
44 echo xlt("Billing log is empty");