forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openemr#2647 for clear billing log feature
Clear billing log feature
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,11 @@ | |
* @author Terry Hill <[email protected]> | ||
* @author Brady Miller <[email protected]> | ||
* @author Jerry Padgett <[email protected]> | ||
* @author Sherwin Gaddis <[email protected]> | ||
* @copyright Copyright (c) 2016 Terry Hill <[email protected]> | ||
* @copyright Copyright (c) 2017-2019 Brady Miller <[email protected]> | ||
* @copyright Copyright (c) 2018-2019 Jerry Padgett <[email protected]> | ||
* @copyright Copyright (c) 2019 Sherwin Gaddis <[email protected]> | ||
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 | ||
*/ | ||
|
||
|
@@ -520,6 +522,9 @@ function divtoggle(spanid, divid) { //Called in the Expand, Collapse links(This | |
ul > li { | ||
line-height: 1.86em; | ||
} | ||
ul { | ||
list-style-type: none; | ||
} | ||
a, a:visited, a:hover { | ||
text-decoration: none; | ||
color: #000000; | ||
|
@@ -720,9 +725,13 @@ function divtoggle(spanid, divid) { //Called in the Expand, Collapse links(This | |
title='<?php echo xla('See messages from the last set of generated claims'); ?>'><strong><?php echo xlt('View Log'); ?></strong></a> | ||
</li> | ||
<?php } ?> | ||
<li><a href="<?php echo $webroot ?>/interface/billing/customize_log.php" rel="noopener" target="_blank" onclick="top.restoreSession()"><strong><?php echo xlt('Tab Log') ?></strong></a> | ||
</li> | ||
<li><a class="link_submit" | ||
href="JavaScript:void(0);" onclick="select_all(); return false;"><strong><?php echo xlt('Select All'); ?></strong></a> | ||
</li> | ||
<li><a id="clear-log" href="#" title='<?php xla('Clear the log'); ?>'><strong><?php echo xlt('Clear Log') ?></strong></a> | ||
</li> | ||
</ul> | ||
<ul> | ||
</div> | ||
|
@@ -1459,6 +1468,15 @@ function divtoggle(spanid, divid) { //Called in the Expand, Collapse links(This | |
top.restoreSession(); | ||
dlgopen('customize_log.php', '_blank', 750, 400); | ||
}); | ||
$("#clear-log").click( function(){ | ||
var checkstr = confirm(<?php echo xlj("Do you really want to clear the log?"); ?>); | ||
if(checkstr == true){ | ||
top.restoreSession(); | ||
dlgopen("clear_log.php?csrf_token_form=" + <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>, '_blank', 500, 400); | ||
}else{ | ||
return false; | ||
} | ||
}); | ||
|
||
$('button[type="submit"]').click(function () { | ||
top.restoreSession(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* interface/billing/clear_log.php - backup, then clear billing log | ||
* | ||
* @package OpenEMR | ||
* @link http:https://www.open-emr.org | ||
* @author Brady Miller <[email protected]> | ||
* @author Sherwin Gaddis <[email protected]> | ||
* @copyright Copyright (c) 2019 Brady Miller <[email protected]> | ||
* @copyright Copyright (c) 2019 Sherwin Gaddis <[email protected]> | ||
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 | ||
*/ | ||
|
||
|
||
require_once("../globals.php"); | ||
|
||
use OpenEMR\Common\Csrf\CsrfUtils; | ||
|
||
if (!CsrfUtils::verifyCsrfToken($_GET["csrf_token_form"])) { | ||
CsrfUtils::csrfNotVerified(); | ||
} | ||
|
||
$filename = $GLOBALS['OE_SITE_DIR'] . '/documents/edi/process_bills.log'; | ||
if (file_exists($filename)) { | ||
$newlog = $GLOBALS['OE_SITE_DIR'] . '/documents/edi/' . date("Y-m-d-His") . '_process_bills.log'; | ||
rename($filename, $newlog); | ||
echo xlt("Log is cleared. Please close window."); | ||
} else { | ||
echo xlt("Log was already empty. Please close window."); | ||
} |