Skip to content

Commit

Permalink
fix: era posting display floatval fix and typo in patient.inc (openem…
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwaite committed Jul 20, 2023
1 parent ea18352 commit c3a4ab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions interface/billing/sl_eob_process.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ function writeDetailLine(

$dline =
" <tr bgcolor='" . attr($bgcolor) . "'>\n" .
" <td class='" . attr($class) . "'>" . text($ptname) . "</td>\n" .
" <td class='" . attr($class) . "'>" . text($invnumber) . "</td>\n" .
" <td class='" . attr($class) . "'>" . text($code) . "</td>\n" .
" <td class='" . attr($class) . "'>" . (($ptname == '&nbsp;') ? '' : text($ptname)) . "</td>\n" .
" <td class='" . attr($class) . "'>" . (($invnumber == '&nbsp;') ? '' : text($invnumber)) . "</td>\n" .
" <td class='" . attr($class) . "'>" . (($code == '&nbsp;') ? '' : text($code)) . "</td>\n" .
" <td class='" . attr($class) . "'>" . text(oeFormatShortDate($date)) . "</td>\n" .
" <td class='" . attr($class) . "'>" . text($description) . "</td>\n" .
" <td class='" . attr($class) . "' align='right'>" . text(oeFormatMoney($amount)) . "</td>\n" .
Expand All @@ -133,7 +133,7 @@ function writeOldDetail(&$prev, $ptname, $invnumber, $dos, $code, $bgcolor)
$description = 'Service Item';
}

$amount = sprintf("%.2f", (int)($ddata['chg'] ?? '') - (int)($ddata['pmt'] ?? ''));
$amount = sprintf("%.2f", (floatval($ddata['chg'] ?? '')) - (floatval($ddata['pmt'] ?? '')));
$invoice_total = sprintf("%.2f", $invoice_total + $amount);
writeDetailLine(
$bgcolor,
Expand Down
2 changes: 1 addition & 1 deletion library/patient.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ function get_unallocated_payment_id($pid)
{
$query = "SELECT session_id " .
"FROM ar_session " .
"WHERE apatient_id = ? AND " .
"WHERE patient_id = ? AND " .
"adjustment_code = 'pre_payment' AND closed = 0 ORDER BY check_date ASC LIMIT 1";
$res = sqlQuery($query, array($pid));
if ($res['session_id']) {
Expand Down

0 comments on commit c3a4ab6

Please sign in to comment.