Skip to content

Commit

Permalink
Fixing critical issues with Fees > Batch Payments (openemr#2656)
Browse files Browse the repository at this point in the history
* Fixing crtical issues in Issues with Fees > Batch Payments

Some code changes in the modernization of the UI rendered parts of
the Batch payemnts pages unusable/difficult to use

Changes are made to the following files:

interface/billing/edit_payment.php
interface/billing/new_payment.php
interface/billing/payment_master.inc.php
interface/billing/payment_pat_sel.inc.php
interface/billing/search_payments.php

with these changes the Batch payments section is once again functional

* made requested changes, modified billing_report.php to display highlighted provider name
modified billrep.inc to display list sorted first by provider_id
  • Loading branch information
zbig01 authored and stephenwaite committed Sep 12, 2019
1 parent fe2282c commit 85493f1
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 38 deletions.
8 changes: 4 additions & 4 deletions interface/billing/billing_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,14 @@ function set_button_states() {
f.bn_x12_support.disabled = !can_generate;
<?php if ($GLOBALS['support_encounter_claims']) { ?>
f.bn_x12_encounter.disabled = !can_generate;
<?php } ?>
<?php } ?>
f.bn_process_hcfa_support.disabled = !can_generate;
<?php if ($GLOBALS['preprinted_cms_1500']) { ?>
f.bn_process_hcfa_form.disabled = !can_generate;
<?php } ?>
<?php } ?>
<?php if ($GLOBALS['ub04_support']) { ?>
f.bn_process_ub04_support.disabled = !can_generate;
<?php } ?>
<?php } ?>
f.bn_hcfa_txt_file.disabled = !can_generate;
f.bn_reopen.disabled = !can_bill;
<?php } ?>
Expand Down Expand Up @@ -1342,7 +1342,7 @@ function divtoggle(spanid, divid) { //Called in the Expand, Collapse links(This
$rhtml .= text(oeFormatMoney($iter['fee']));
}
$rhtml .= "</span></td>\n";
$rhtml .= '<td><span style="font-size:8pt;">&nbsp;&nbsp;&nbsp;';
$rhtml .= '<td><span style="font-size:8pt; font-weight:900; background:#ffff9e">&nbsp;&nbsp;&nbsp;';
if ($iter['id']) {
$rhtml .= getProviderName(empty($iter['provider_id']) ? text($iter['enc_provider_id']) : text($iter['provider_id']));
}
Expand Down
19 changes: 18 additions & 1 deletion interface/billing/edit_payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -821,12 +821,15 @@ function DeletePaymentDistribution(DeleteId)
$Table='yes';
?>
<input id="HiddenRemainderTd<?php echo attr($CountIndex); ?>" name="HiddenRemainderTd<?php echo attr($CountIndex); ?>" type="hidden" value="<?php echo attr(round($RemainderJS, 2)); ?>">
<br>
<br>
<div class="col-xs-12">
<div class = "table-responsive">
<table class="table-condensed" id="TableDistributePortion" >
<thead bgcolor="#DDDDDD" class="text">
<td class="left top" >&nbsp;</td>
<td class="left top" ><?php echo xlt('Patient Name'); ?></td>
<td class="left top" ><?php echo xlt('Post For'); ?></td>
<td class="left top" style="width:75px"><?php echo xlt('Post For'); ?></td>
<td class="left top" ><?php echo xlt('Service Date'); ?></td>
<td class="left top" ><?php echo xlt('Encounter'); ?></td>
<td class="left top" ><?php echo xlt('Service Code'); ?></td>
Expand Down Expand Up @@ -1071,15 +1074,19 @@ function DeletePaymentDistribution(DeleteId)
}//End of if($RowSearchSub = sqlFetchArray($ResultSearchSub))
?>
</div>
</div>
<div class="col-sm-12">
<?php
require_once("payment_pat_sel.inc.php"); //Patient ajax section and listing of charges.
?>
</div>
<?php
}//End of if($payment_id*1>0)
?>
<?php //can change position of buttons by creating a class 'position-override' and adding rule text-align:center or right as the case may be in individual stylesheets ?>
<div class="form-group clearfix">
<div class="col-sm-12 text-left position-override">
<br>
<div class="btn-group" role="group">
<a class="btn btn-default btn-save" href="#" onclick="javascript:return ModifyPayments();"><span><?php echo xlt('Modify Payments');?></span></a>
<a class="btn btn-default btn-save" href="#" onclick="javascript:return FinishPayments();"><span><?php echo xlt('Finish Payments');?></span></a>
Expand All @@ -1104,4 +1111,14 @@ function DeletePaymentDistribution(DeleteId)
</div>
</div><!-- End of container div-->
</body>
<script>
function ResetForm()
{//Resets form used in the 'Cancel Changes' button in the master screen.
document.forms[0].reset();
document.getElementById('TdUnappliedAmount').innerHTML='0.00';
document.getElementById('div_insurance_or_patient').innerHTML='&nbsp;';
CheckVisible('yes');//Payment Method is made 'Check Payment' and the Check box is made visible.
PayingEntityAction();//Paying Entity is made 'insurance' and Payment Category is 'Insurance Payment'
}
</script>
</html>
7 changes: 5 additions & 2 deletions interface/billing/new_payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ function FillUnappliedAmount()
<form action="new_payment.php" id="new_payment" method='post' name='new_payment' onsubmit="
<?php
if ($payment_id*1==0) {
echo 'top.restoreSession();return SavePayment();';
echo 'top.restoreSession();';
} else {
echo 'return false;';
}?>" style="display:inline">
Expand All @@ -475,8 +475,10 @@ function FillUnappliedAmount()
if ($CountIndexBelow>0) {
?>
<?php //can change position of buttons by creating a class 'position-override' and adding rule text-align:center or right as the case may be in individual stylesheets ?>
<br>
<div class="form-group clearfix">
<div class="col-sm-12 text-left position-override">
<br>
<div class="btn-group btn-group-pinch" role="group">
<button class="btn btn-default btn-save" href="#" onclick="return PostPayments();"><?php echo xlt('Post Payments');?></button>
<button class="btn btn-default btn-save" href="#" onclick="return FinishPayments();"><?php echo xlt('Finish Payments');?></button>
Expand All @@ -491,7 +493,8 @@ function FillUnappliedAmount()
}
?>
</fieldset>
<input id="hidden_patient_code" name="hidden_patient_code" type="hidden" value="<?php echo attr($hidden_patient_code);?>"> <input id='mode' name='mode' type='hidden' value=''>
<input id="hidden_patient_code" name="hidden_patient_code" type="hidden" value="<?php echo attr($hidden_patient_code);?>">
<input id='mode' name='mode' type='hidden' value=''>
<input id='default_search_patient' name='default_search_patient' type='hidden' value='<?php echo attr($default_search_patient); ?>'>
<input id='ajax_mode' name='ajax_mode' type='hidden' value=''>
<input id="after_value" name="after_value" type="hidden" value="<?php echo attr($mode);?>">
Expand Down
29 changes: 16 additions & 13 deletions interface/billing/payment_master.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ function generate_list_payment_category($tag_name, $list_id, $currvalue, $title,
<div class="col-xs-12 oe-custom-line">
<div class="forms col-xs-3">
<label class="control-label" for="check_date"><?php echo xlt('Date'); ?>:</label>
<input class="form-control datepicker" id='check_date' name='check_date' type='text' value="<?php echo attr(oeFormatShortDate($CheckDate));?>">
<input class="form-control datepicker" id='check_date' name='check_date' type='text' value="<?php echo attr(oeFormatShortDate($CheckDate));?>" autocomplete="off">
</div>
<div class="forms col-xs-3">
<label class="control-label" for="post_to_date"><?php echo xlt('Post To Date'); ?>:</label>
<input class="form-control datepicker" id='post_to_date' name='post_to_date' type='text' value="<?php echo ($screen=='new_payment') ? attr(oeFormatShortDate(date('Y-m-d'))) : attr(oeFormatShortDate($PostToDate));?>">
<input class="form-control datepicker" id='post_to_date' name='post_to_date' type='text' value="<?php echo ($screen=='new_payment') ? attr(oeFormatShortDate(date('Y-m-d'))) : attr(oeFormatShortDate($PostToDate));?>" autocomplete="off">
</div>
<div class="forms col-xs-3">
<label class="control-label" for="payment_method"><?php echo xlt('Payment Method'); ?>:</label>
Expand Down Expand Up @@ -238,7 +238,7 @@ function generate_list_payment_category($tag_name, $list_id, $currvalue, $title,
<div class="col-xs-12 oe-custom-line">
<div class="col-xs-3">
<label class="control-label" for="deposit_date"><?php echo xlt('Deposit Date'); ?>:</label>
<input type='text' class='form-control datepicker' name='deposit_date' id='deposit_date' onKeyDown="PreventIt(event)" value="<?php echo attr(oeFormatShortDate($DepositDate));?>"/>
<input type='text' class='form-control datepicker' name='deposit_date' id='deposit_date' onKeyDown="PreventIt(event)" value="<?php echo attr(oeFormatShortDate($DepositDate));?>" autocomplete="off"/>
</div>
<div class="col-xs-6">
<label class="control-label" for="description"><?php echo xlt('Description'); ?>:</label>
Expand Down Expand Up @@ -285,10 +285,11 @@ function generate_list_payment_category($tag_name, $list_id, $currvalue, $title,
<input class="form-control" id='post_to_date' name='post_to_date' type='text' value="<?php echo ($screen=='new_payment') ? attr(oeFormatShortDate(date('Y-m-d'))) : attr(oeFormatShortDate($PostToDate));?>"disabled>
</div>
<div class="forms col-xs-3">
<label class="control-label" for="payment_method1"><?php echo xlt('Payment Method'); ?>:</label>
<input type="text" class="form-control" name="payment_method1" id="payment_method1" value="<?php $frow['data_type']=1;
$frow['list_id']='payment_method';
generate_print_field($frow, $PaymentMethod);?>" disabled />
<label class="control-label" for="payment_method"><?php echo xlt('Payment Method'); ?>:</label>
<input type="text" class="form-control" name="payment_method1" id="payment_method" value="<?php
$list='payment_method';
$option=$PaymentMethod;
echo getListItemTitle($list, $option);?>" disabled />
<input type="hidden" name="payment_method" value="<?php echo attr($PaymentMethod);?>"/>
</div>
<div class="forms col-xs-3">
Expand All @@ -304,16 +305,18 @@ function generate_list_payment_category($tag_name, $list_id, $currvalue, $title,
</div>
<div class="forms col-xs-3">
<label class="control-label" for="type_name"><?php echo xlt('Paying Entity'); ?>:</label>
<input type="text" class="form-control" name="type_name1" id="type_name1" value="<?php $frow['data_type']=1;
$frow['list_id']='payment_type';
generate_print_field($frow, $PaymentType);?>" disabled />
<input type="text" class="form-control" name="type_name1" id="type_name1" value="<?php
$list='payment_type';
$option=$PaymentType;
echo getListItemTitle($list, $option);?>" disabled />
<input type="hidden" name="type_name" id="type_name" value="<?php echo attr($PaymentType);?>"/>
</div>
<div class="forms col-xs-3">
<label class="control-label" for="adjustment_code"><?php echo xlt('Payment Category'); ?>:</label>
<input type="text" class="form-control" name="adjustment_code1" id="adjustment_code1" value="<?php $frow['data_type']=1;
$frow['list_id']='payment_adjustment_code';
generate_print_field($frow, $AdjustmentCode);?>" disabled />
<input type="text" class="form-control" name="adjustment_code1" id="adjustment_code1" value="<?php
$list='payment_adjustment_code';
$option=$AdjustmentCode;
echo getListItemTitle($list, $option);?>" disabled />
<input type="hidden" name="adjustment_code" value="<?php echo attr($AdjustmentCode);?>"/>
</div>
</div>
Expand Down
9 changes: 4 additions & 5 deletions interface/billing/payment_pat_sel.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
}
//===============================================================================
?>
<br>
<fieldset>
<legend class=""><?php echo xlt('Distribute')?></legend>
<div class="col-xs-12" style="padding-bottom:5px">
Expand Down Expand Up @@ -91,6 +92,7 @@
$PreviousPID=0;
if ($RowSearch = sqlFetchArray($ResultSearchNew)) {
?>
<div class="col-xs-12">
<div class = "table-responsive">
<table class="table-condensed" id="TableDistributePortion">
<thead class="" bgcolor="#dddddd">
Expand Down Expand Up @@ -258,11 +260,8 @@
</tr>
</table>
</div>
</div>
<br>
<?php
}//if($RowSearch = sqlFetchArray($ResultSearchNew))
?>
<!--</td>
</tr>
</table>
</div>-->
?>
Loading

0 comments on commit 85493f1

Please sign in to comment.