From a96cc674f8295c7a9a3f16746c7d6e42c967d28a Mon Sep 17 00:00:00 2001 From: "JP-DEV\\sjpad" Date: Sun, 14 Oct 2018 12:23:28 -0400 Subject: [PATCH] Add both user and global disable auto calc adjustments. - when invoice posting is called from past encounters- global takes precedent over user setting. - from posting then user setting has precedent. From past encounters return from invoice automatically returns to billing view regardless of Global. Minor bug fix. --- interface/billing/sl_eob_invoice.php | 263 ++++++++++++++++++----------------- interface/billing/sl_eob_search.php | 2 +- 2 files changed, 140 insertions(+), 125 deletions(-) diff --git a/interface/billing/sl_eob_invoice.php b/interface/billing/sl_eob_invoice.php index ba74c277b..dd4c4d23c 100644 --- a/interface/billing/sl_eob_invoice.php +++ b/interface/billing/sl_eob_invoice.php @@ -33,12 +33,20 @@ require_once("$srcdir/forms.inc"); require_once("$srcdir/sl_eob.inc.php"); require_once("$srcdir/invoice_summary.inc.php"); require_once("../../custom/code_types.inc.php"); +require_once "$srcdir/user.inc"; use OpenEMR\Core\Header; $debug = 0; // set to 1 for debugging mode $save_stay = $_REQUEST['form_save'] == '1' ? true : false; - +$g_posting_adj_disable = $GLOBALS['posting_adj_disable'] ? 'checked' : ''; +$posting_adj_disable = prevSetting('sl_eob_search.', 'posting_adj_disable', 'posting_adj_disable', $g_posting_adj_disable); +$from_posting = (0 + $_REQUEST['isPosting']) ? 1 : 0; +if (!$from_posting) { + // this means from past encounters so go with the global + // otherwise posting search user setting is followed. + $posting_adj_disable = $g_posting_adj_disable; +} // If we permit deletion of transactions. Might change this later. $ALLOW_DELETE = true; @@ -90,147 +98,154 @@ function row_delete($table, $where) <?php echo xlt('EOB Posting - Invoice') ?>