} $amount_fields = array("adopted_amount", "current_budget_amount", "total_expenditure", "pre_encumbered_amount", "encumbered_amount", "accrued_expense_amount", "cash_expense_amount", "post_closing_adjustment_amount"); $count = 1; $row = array(); $rows = array(); foreach ($budget_parameter_mapping as $key => $title) { $value = $budget_results[$key]; if ($key == 'expenditure_object_name') { $value = $budget_results[$key][0]; } if ($key == 'fiscal_year') { $value = $budget_results[$key][0]; } $temp = substr($value, strpos(strtoupper($value), strtoupper($SearchTerm)), strlen($SearchTerm)); $value = str_ireplace($SearchTerm, '<em>' . $temp . '</em>', $value); $value = _checkbook_smart_search_str_html_entities($value); if (in_array($key, $amount_fields)) { $value = custom_number_formatter_format($value, 2, '$'); } else { if (array_key_exists($key, $linkable_fields)) { $value = "<a href='" . $linkable_fields[$key] . "'>" . $value . "</a>"; } } if ($count % 2 == 0) { if ($title) { $row[] = '<div class="field-label">' . $title . ':</div><div class="field-content">' . $value . '</div>'; } $rows[] = $row; $row = array(); } else { if ($title) {
$amount_fields = array("annual_salary", "gross_pay", "base_pay", "other_payments", "overtime_pay"); $count = 1; $row = array(); $rows = array(); foreach ($payroll_parameter_mapping as $key => $title) { $value = $payroll_results[$key]; $temp = substr($value, strpos(strtoupper($value), strtoupper($SearchTerm)), strlen($SearchTerm)); $value = str_ireplace($SearchTerm, '<em>' . $temp . '</em>', $value); if (in_array($key, $amount_fields)) { $value = custom_number_formatter_format($value, 2, '$'); } else { if (in_array($key, $date_fields)) { $value = date("F j, Y", strtotime($value)); } else { if (array_key_exists($key, $linkable_fields)) { $value = "<a href='" . $linkable_fields[$key] . "/year/" . $year_id . "/yeartype/B'>" . _checkbook_smart_search_str_html_entities($value) . "</a>"; } } } if ($count % 2 == 0) { if ($title) { $row[] = '<div class="field-label">' . $title . ':</div><div class="field-content">' . html_entity_decode($value) . '</div>'; } $rows[] = $row; $row = array(); } else { if ($title) { $row[] = '<div class="field-label">' . $title . ':</div><div class="field-content">' . html_entity_decode($value) . '</div>'; } } $count++;