本文整理汇总了PHP中oeFormatMoney函数的典型用法代码示例。如果您正苦于以下问题:PHP oeFormatMoney函数的具体用法?PHP oeFormatMoney怎么用?PHP oeFormatMoney使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oeFormatMoney函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bucks
function bucks($amount)
{
if ($amount) {
return oeFormatMoney($amount);
}
return "";
}
示例2: testAmericanTwoDecimal
/**
* @dataProvider example_american_two_decimal
*/
public function testAmericanTwoDecimal( $amount, $formatted )
{
$GLOBALS['currency_decimals'] = '2';
$GLOBALS['currency_dec_point'] = '.';
$GLOBALS['currency_thousands_sep'] = ',';
$this->assertEquals( $formatted, oeFormatMoney( $amount ), "'$amount' converts to '$formatted'" );
}
示例3: bucks
function bucks($amount)
{
if ($amount != 0) {
return oeFormatMoney($amount);
}
return '';
}
示例4: writeDetailLine
function writeDetailLine($bgcolor, $class, $ptname, $invnumber, $code, $date, $description, $amount, $balance)
{
global $last_ptname, $last_invnumber, $last_code;
if ($ptname == $last_ptname) {
$ptname = ' ';
} else {
$last_ptname = $ptname;
}
if ($invnumber == $last_invnumber) {
$invnumber = ' ';
} else {
$last_invnumber = $invnumber;
}
if ($code == $last_code) {
$code = ' ';
} else {
$last_code = $code;
}
if ($amount) {
$amount = sprintf("%.2f", $amount);
}
if ($balance) {
$balance = sprintf("%.2f", $balance);
}
$dline = " <tr bgcolor='{$bgcolor}'>\n" . " <td class='{$class}'>{$ptname}</td>\n" . " <td class='{$class}'>{$invnumber}</td>\n" . " <td class='{$class}'>{$code}</td>\n" . " <td class='{$class}'>" . oeFormatShortDate($date) . "</td>\n" . " <td class='{$class}'>{$description}</td>\n" . " <td class='{$class}' align='right'>" . oeFormatMoney($amount) . "</td>\n" . " <td class='{$class}' align='right'>" . oeFormatMoney($balance) . "</td>\n" . " </tr>\n";
echo $dline;
}
示例5: bucks
function bucks($amount)
{
if (empty($amount)) {
return '';
}
return oeFormatMoney($amount);
}
示例6: bucks
function bucks($amount)
{
if ($amount) {
$amount = oeFormatMoney($amount);
return $amount;
}
return '';
}
示例7: oeFormatMoney
echo $b['code_type'] . ":\t" . $b['code'] . " " . $b['modifier'] . " " . $b['code_text'] . " ";
echo "</td>\n";
echo "<td class=text>";
echo oeFormatMoney($b['fee']);
echo "</td>\n";
echo "</tr>\n";
$total += $b['fee'];
if ($b['code_type'] == "COPAY") {
$copays += $b['fee'];
}
}
}
echo "<tr><td> </td></tr>";
echo "<tr><td class=bold>" . xl('Sub-Total') . "</td><td class=text>" . oeFormatMoney($total + abs($copays)) . "</td></tr>";
echo "<tr><td class=bold>" . xl('Paid') . "</td><td class=text>" . oeFormatMoney(abs($copays)) . "</td></tr>";
echo "<tr><td class=bold>" . xl('Total') . "</td><td class=text>" . oeFormatMoney($total) . "</td></tr>";
echo "</table>";
echo "<pre>";
//print_r($billings);
echo "</pre>";
} else {
printPatientBilling($pid);
}
echo "</div>\n";
// end of billing DIV
/****
} elseif ($val == "allergies") {
print "<span class=bold>Patient Allergies:</span><br>";
printListData($pid, "allergy", "1");
示例8: bucks
function bucks($amt)
{
return $amt != 0.0 ? oeFormatMoney($amt) : '';
}
示例9: foreach
$ndcuom = $tmp[2];
$ndcqty = $tmp[3];
}
$billing_html[$iter["code_type"]] .= "<tr><td> </td><td class='small'>NDC: \n" . "<input type='hidden' name='ndc[{$ndclino}][code]' value='" . $iter[code] . "'>" . "<input type='text' name='ndc[{$ndclino}][ndcnum]' value='{$ndcnum}' " . "size='11' style='background-color:transparent'>" . " Qty: " . "<input type='text' name='ndc[{$ndclino}][ndcqty]' value='{$ndcqty}' " . "size='3' style='background-color:transparent;text-align:right'> " . "<select name='ndc[{$ndclino}][ndcuom]' style='background-color:transparent'>";
foreach ($ndc_uom_choices as $key => $value) {
$billing_html[$iter["code_type"]] .= "<option value='{$key}'";
if ($key == $ndcuom) {
$billing_html[$iter["code_type"]] .= " selected";
}
$billing_html[$iter["code_type"]] .= ">{$value}</option>";
}
$billing_html[$iter["code_type"]] .= "</select></td></tr>\n";
}
}
}
$billing_html["CPT4"] .= "<tr><td>" . xl('total') . ":</td><td>" . oeFormatMoney($total) . "</td></tr>\n";
foreach ($billing_html as $key => $val) {
print "<tr><td>{$key}</td><td><table>{$val}</table><td></tr><tr><td height=\"5\"></td></tr>\n";
}
}
?>
</tr></table>
</td>
</tr>
<input type="hidden" name="encounter_id" value="<?php
echo $encounter;
?>
">
<input type="hidden" name="patient_id" value="<?php
echo $pid;
?>
示例10: oeFormatMoney
echo '"' . $key . '",';
echo '"' . oeFormatMoney($val['charges']) . '",';
echo '"' . $val['visits'] . '",';
echo '"' . $val['patients'] . '",';
echo '"' . sprintf("%.1f", $val['patients'] * 100 / $patcount) . '"' . "\n";
} else {
?>
<tr>
<td>
<?php
echo $key;
?>
</td>
<td align='right'>
<?php
echo oeFormatMoney($val['charges']);
?>
</td>
<td align='right'>
<?php
echo $val['visits'];
?>
</td>
<td align='right'>
<?php
echo $val['patients'];
?>
</td>
<td align='right'>
<?php
printf("%.1f", $val['patients'] * 100 / $patcount);
示例11: oeFormatMoney
$justify .= " (<b>{$j}</b>)";
} else {
$justify .= " ({$j})";
}
$counter++;
}
}
}
$rhtml .= "<td><span class='text'>" . ($iter['code_type'] == 'COPAY' ? oeFormatMoney($iter['code']) : $iter['code']);
if ($iter['modifier']) {
$rhtml .= ":" . $iter['modifier'];
}
$rhtml .= "</span><span style='font-size:8pt;'>{$justify}</span></td>\n";
$rhtml .= '<td align="right"><span style="font-size:8pt;"> ';
if ($iter['id'] && $iter['fee'] > 0) {
$rhtml .= oeFormatMoney($iter['fee']);
}
$rhtml .= "</span></td>\n";
$rhtml .= '<td><span style="font-size:8pt;"> ';
if ($iter['id']) {
$rhtml .= getProviderName(empty($iter['provider_id']) ? $iter['enc_provider_id'] : $iter['provider_id']);
}
$rhtml .= "</span></td>\n";
$rhtml .= '<td width=100> <span style="font-size:8pt;">';
if ($iter['id']) {
$rhtml .= oeFormatSDFT(strtotime($iter["date"]));
}
$rhtml .= "</span></td>\n";
if ($iter['id'] && $iter['authorized'] != 1) {
$rhtml .= "<td><span class=alert>" . xl("Note: This code was not entered by an authorized user. Only authorized codes may be uploaded to the Open Medical Billing Network for processing. If you wish to upload these codes, please select an authorized user here.") . "</span></td>\n";
} else {
示例12: generate_receipt
//.........这里部分代码省略.........
$charges += sprintf('%01.2f', $inrow['fee']);
receiptDetailLine($inrow['sale_date'], $inrow['name'], $inrow['fee'], $inrow['quantity']);
}
// Service and tax items
$inres = sqlStatement("SELECT * FROM billing WHERE " . "pid = ? AND encounter = ? AND " . "code_type != 'COPAY' AND activity = 1 " . "ORDER BY id", array($patient_id, $encounter));
while ($inrow = sqlFetchArray($inres)) {
$charges += sprintf('%01.2f', $inrow['fee']);
receiptDetailLine($svcdate, $inrow['code_text'], $inrow['fee'], $inrow['units']);
}
// Adjustments.
$inres = sqlStatement("SELECT " . "a.code_type, a.code, a.modifier, a.memo, a.payer_type, a.adj_amount, a.pay_amount, " . "s.payer_id, s.reference, s.check_date, s.deposit_date " . "FROM ar_activity AS a " . "LEFT JOIN ar_session AS s ON s.session_id = a.session_id WHERE " . "a.pid = ? AND a.encounter = ? AND " . "a.adj_amount != 0 " . "ORDER BY s.check_date, a.sequence_no", array($patient_id, $encounter));
while ($inrow = sqlFetchArray($inres)) {
$charges -= sprintf('%01.2f', $inrow['adj_amount']);
$payer = empty($inrow['payer_type']) ? 'Pt' : 'Ins' . $inrow['payer_type'];
receiptDetailLine($svcdate, $payer . ' ' . $inrow['memo'], 0 - $inrow['adj_amount'], 1);
}
?>
<tr>
<td colspan='5'> </td>
</tr>
<tr>
<td><?php
echo text(oeFormatShortDate($svcdispdate));
?>
</td>
<td><b><?php
echo xlt('Total Charges');
?>
</b></td>
<td align='right'> </td>
<td align='right'> </td>
<td align='right'><?php
echo text(oeFormatMoney($charges, true));
?>
</td>
</tr>
<tr>
<td colspan='5'> </td>
</tr>
<?php
// Get co-pays.
$inres = sqlStatement("SELECT fee, code_text FROM billing WHERE " . "pid = ? AND encounter = ? AND " . "code_type = 'COPAY' AND activity = 1 AND fee != 0 " . "ORDER BY id", array($patient_id, $encounter));
while ($inrow = sqlFetchArray($inres)) {
$charges += sprintf('%01.2f', $inrow['fee']);
receiptPaymentLine($svcdate, 0 - $inrow['fee'], $inrow['code_text']);
}
// Get other payments.
$inres = sqlStatement("SELECT " . "a.code_type, a.code, a.modifier, a.memo, a.payer_type, a.adj_amount, a.pay_amount, " . "s.payer_id, s.reference, s.check_date, s.deposit_date " . "FROM ar_activity AS a " . "LEFT JOIN ar_session AS s ON s.session_id = a.session_id WHERE " . "a.pid = ? AND a.encounter = ? AND " . "a.pay_amount != 0 " . "ORDER BY s.check_date, a.sequence_no", array($patient_id, $encounter));
while ($inrow = sqlFetchArray($inres)) {
$payer = empty($inrow['payer_type']) ? 'Pt' : 'Ins' . $inrow['payer_type'];
$charges -= sprintf('%01.2f', $inrow['pay_amount']);
receiptPaymentLine($svcdate, $inrow['pay_amount'], $payer . ' ' . $inrow['reference']);
}
?>
<tr>
<td colspan='5'> </td>
</tr>
<tr>
<td> </td>
<td><b><?php
echo xlt('Balance Due');
?>
</b></td>
<td colspan='2'> </td>
示例13: generate_receipt
//.........这里部分代码省略.........
}
} else {
// Request all line items with money belonging to the invoice.
$inres = SLQuery("SELECT * FROM invoice WHERE " . "trans_id = {$trans_id} AND sellprice != 0 ORDER BY id");
if ($sl_err) {
die($sl_err);
}
for ($irow = 0; $irow < SLRowCount($inres); ++$irow) {
$row = SLGetRow($inres, $irow);
$amount = sprintf('%01.2f', $row['sellprice'] * $row['qty']);
$charges += $amount;
$desc = preg_replace('/^.{1,6}:/', '', $row['description']);
receiptDetailLine($svcdate, $desc, $amount, $row['qty']);
}
}
// end not $INTEGRATED_AR
?>
<tr>
<td colspan='5'> </td>
</tr>
<tr>
<td><?php
echo text(oeFormatShortDate($svcdispdate));
?>
</td>
<td><b><?php
echo xlt('Total Charges');
?>
</b></td>
<td align='right'> </td>
<td align='right'> </td>
<td align='right'><?php
echo text(oeFormatMoney($charges, true));
?>
</td>
</tr>
<tr>
<td colspan='5'> </td>
</tr>
<?php
if ($INTEGRATED_AR) {
// Get co-pays.
$inres = sqlStatement("SELECT fee, code_text FROM billing WHERE " . "pid = ? AND encounter = ? AND " . "code_type = 'COPAY' AND activity = 1 AND fee != 0 " . "ORDER BY id", array($patient_id, $encounter));
while ($inrow = sqlFetchArray($inres)) {
$charges += sprintf('%01.2f', $inrow['fee']);
receiptPaymentLine($svcdate, 0 - $inrow['fee'], $inrow['code_text']);
}
// Get other payments.
$inres = sqlStatement("SELECT " . "a.code, a.modifier, a.memo, a.payer_type, a.adj_amount, a.pay_amount, " . "s.payer_id, s.reference, s.check_date, s.deposit_date " . "FROM ar_activity AS a " . "LEFT JOIN ar_session AS s ON s.session_id = a.session_id WHERE " . "a.pid = ? AND a.encounter = ? AND " . "a.pay_amount != 0 " . "ORDER BY s.check_date, a.sequence_no", array($patient_id, $encounter));
$payer = empty($inrow['payer_type']) ? 'Pt' : 'Ins' . $inrow['payer_type'];
while ($inrow = sqlFetchArray($inres)) {
$charges -= sprintf('%01.2f', $inrow['pay_amount']);
receiptPaymentLine($svcdate, $inrow['pay_amount'], $payer . ' ' . $inrow['reference']);
}
} else {
$chart_id_cash = SLQueryValue("select id from chart where accno = '{$sl_cash_acc}'");
if ($sl_err) {
die($sl_err);
}
if (!$chart_id_cash) {
die("There is no COA entry for cash account '{$sl_cash_acc}'");
}
//
// Request all cash entries belonging to the invoice.
示例14: expand_collapse_widget
$forceExpandAlways = true;
} else {
$forceExpandAlways = false;
}
expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth, $forceExpandAlways);
?>
<br>
<?php
//PATIENT BALANCE,INS BALANCE naina@capminds.com
$patientbalance = get_patient_balance($pid, false);
//Debit the patient balance from insurance balance
$insurancebalance = get_patient_balance($pid, true) - $patientbalance;
$totalbalance = $patientbalance + $insurancebalance;
if ($GLOBALS['oer_config']['ws_accounting']['enabled']) {
// Show current balance and billing note, if any.
echo "<table border='0'><tr><td>" . "<table ><tr><td><span class='bold'><font color='red'>" . xlt('Patient Balance Due') . " : " . text(oeFormatMoney($patientbalance)) . "</font></span></td></tr>" . "<tr><td><span class='bold'><font color='red'>" . xlt('Insurance Balance Due') . " : " . text(oeFormatMoney($insurancebalance)) . "</font></span></td></tr>" . "<tr><td><span class='bold'><font color='red'>" . xlt('Total Balance Due') . " : " . text(oeFormatMoney($totalbalance)) . "</font></span></td></td></tr>";
if ($result['genericname2'] == 'Billing') {
echo "<tr><td><span class='bold'><font color='red'>" . xlt('Billing Note') . ":" . text($result['genericval2']) . "</font></span></td></tr>";
}
if ($result3['provider']) {
// Use provider in case there is an ins record w/ unassigned insco
echo "<tr><td><span class='bold'>" . xlt('Primary Insurance') . ': ' . text($insco_name) . "</span> ";
if ($result3['copay'] > 0) {
echo "<span class='bold'>" . xlt('Copay') . ': ' . text($result3['copay']) . "</span> ";
}
echo "<span class='bold'>" . xlt('Effective Date') . ': ' . text(oeFormatShortDate($result3['effdate'])) . "</span></td></tr>";
}
echo "</table></td></tr></td></tr></table><br>";
}
?>
</div> <!-- required for expand_collapse_widget -->
示例15: get_patient_balance
$colorend = "</span>";
}
//Display what the patient owes
$balance = get_patient_balance($patient_id);
?>
<?php
if ($billing_note || $balance) {
?>
<div style='margin-top:3px'>
<table width='80%'>
<?php
if ($balance != "0") {
// $formatted = sprintf((xl('$').'%01.2f'), $balance);
$formatted = oeFormatMoney($balance);
echo " <tr class='text billing'>\n";
echo " <td>" . $colorbeg . htmlspecialchars(xl('Balance Due'), ENT_NOQUOTES) . $colorend . " " . $colorbeg . htmlspecialchars($formatted, ENT_NOQUOTES) . $colorend . "</td>\n";
echo " </tr>\n";
}
if ($billing_note) {
echo " <tr class='text billing'>\n";
echo " <td>" . $colorbeg . htmlspecialchars(xl('Billing Note'), ENT_NOQUOTES) . $colorend . " " . $colorbeg . htmlspecialchars($billing_note, ENT_NOQUOTES) . $colorend . "</td>\n";
echo " </tr>\n";
}
?>
</table>
</div>
<br>
<?php
}