コード例 #1
0
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
* 
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$results = $node->data[0];
if ($results) {
    $total_annual_salary = custom_number_formatter_format($results['total_annual_salary'], 2, '$');
    $total_gross_pay = custom_number_formatter_format($results['total_gross_pay'], 2, '$');
    $total_base_pay = custom_number_formatter_format($results['total_base_pay'], 2, '$');
    $total_other_payments = custom_number_formatter_format($results['total_other_payments'], 2, '$');
    $total_overtime_pay = custom_number_formatter_format($results['total_overtime_pay'], 2, '$');
    $total_salaried_employees = number_format($results['total_salaried_employees@checkbook:payroll_year']);
    $total_hourly_employees = number_format($results['total_hourly_employees@checkbook:payroll_year']);
    $total_employees = number_format($results['total_employees@checkbook:payroll_year']);
    $year = $results['year_year'];
    $yearType = $results['year_type_year_type'];
    if (_getRequestParamValue('smnid') == 322) {
        $total_overtime_employees = number_format($results['total_overtime_employees']);
        $total_overtime_employees_label = WidgetUtil::getLabel('total_no_of_ot_employees') . ':';
    }
    $table = "\r\n<div id='payroll-tx-static-content'>\r\n    <table id='payroll-tx-static-content-table'>\r\n        <tr>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('annual_salary') . "</strong>: {$total_annual_salary}</td>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('total_no_of_employees') . "</strong>: {$total_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('gross_pay_ytd') . "</strong>: {$total_gross_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_sal_employees') . "</strong>: {$total_salaried_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('base_pay_ytd') . "</strong>: {$total_base_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_non_sal_employees') . "</strong>: {$total_hourly_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('other_pay_1_ytd') . "</strong>: {$total_other_payments}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('overtime_pay_1_ytd') . "</strong>: {$total_overtime_pay}</td>\r\n        </tr>";
    if (isset($total_overtime_employees)) {
        $table .= "<tr>";
        $table .= "<td><strong>{$total_overtime_employees_label} </strong> {$total_overtime_employees}</td>";
        $table .= "</tr>";
    }
    $table .= "</table></div>";
    print $table;
}
コード例 #2
0
    $total_other_payments = custom_number_formatter_format($results['total_other_payments'], 2, '$');
    $total_overtime_pay = custom_number_formatter_format($results['total_overtime_pay'], 2, '$');
    $total_salaried_employees = number_format($results['total_salaried_employees@checkbook:payroll_year_month']);
    $total_hourly_employees = number_format($results['total_hourly_employees@checkbook:payroll_year_month']);
    $total_employees = number_format($results['total_employees@checkbook:payroll_year_month']);
    $year = $results['year_year'];
    $month = $results['month_month'];
    $yearType = $results['year_type_year_type'];
    $year_value = _getYearValueFromID($year);
    $month_num = _getMonthValueFromId($month);
    if (isset($month_num)) {
        $dateObj = DateTime::createFromFormat('!m', $month_num);
        $month_value = $dateObj->format('F');
    }
    $yeartype = 'FY';
    if (_getRequestParamValue('yeartype') == 'C') {
        $yeartype = 'CY';
    }
    if (_getRequestParamValue('smnid') == 491) {
        $total_overtime_employees_label = WidgetUtil::getLabel('total_no_of_ot_employees') . ':';
        $overtime_employees_value = number_format($results['total_overtime_employees']);
    }
    $table = "\r\n<div id='payroll-tx-static-content'>\r\n<div class='payroll-year-month'><span class='label'>" . WidgetUtil::getLabel('month') . ": </span><span class='data'> {$month_value} </span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class='label'>" . WidgetUtil::getLabel('year') . ":</span><span class='data'> {$yeartype} {$year_value}</span></div>\r\n    <table id='payroll-tx-static-content-table'>\r\n        <tr>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('annual_salary') . "</strong>: {$total_annual_salary}</td>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('total_no_of_employees') . "</strong>: {$total_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('gross_pay') . "</strong>: {$total_gross_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_sal_employees') . "</strong>: {$total_salaried_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('base_pay') . "</strong>:{$total_base_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_non_sal_employees') . "</strong>: {$total_hourly_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('other_pay') . "</strong>: {$total_other_payments}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('overtime_pay') . "</strong>: {$total_overtime_pay}</td>\r\n        </tr>";
    if (isset($overtime_employees_value)) {
        $table .= "<tr>";
        $table .= "<td><strong>{$total_overtime_employees_label} </strong> {$overtime_employees_value}</td>";
        $table .= "</tr>";
    }
    $table .= "</table></div>";
    print $table;
}
コード例 #3
0
ファイル: sub_contract.tpl.php プロジェクト: ecs-hk/Checkbook
if (is_array($records)) {
    $row = $records[0];
    $originalAmount = custom_number_formatter_format($row['original_amount_sum'], 2, '$');
    $currentAmount = custom_number_formatter_format($row['current_amount_sum'], 2, '$');
    $spentToDateAmount = custom_number_formatter_format($row['spending_amount_sum'], 2, '$');
    $cont_id = WidgetUtil::getLabel("contract_id");
    $spnttodt = WidgetUtil::getLabel("spent_to_date");
    $oamnt = WidgetUtil::getLabel("original_amount");
    $camnt = WidgetUtil::getLabel("current_amount");
    $purpose = WidgetUtil::getLabel("contract_purpose");
    $agency = WidgetUtil::getLabel("contract_agency");
    $vendor = WidgetUtil::getLabel("sub_vendor_name");
    if (_getRequestParamValue('smnid') == 721) {
        $purpose = WidgetUtil::getLabel("sub_contract_purpose");
        $associated_prime_vendor_value = strtoupper($row['vendor_vendor_legal_name']);
        $associated_prime_vendor = WidgetUtil::getLabel("associated_prime_vendor");
    }
    $agency_value = strtoupper($row['agency_agency_agency_name']);
    $purpose_value = strtoupper($row['contract_purpose_contract_purpose']);
    $vendor_value = strtoupper($row['subvendor_subvendor_legal_name']);
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$node->widgetConfig->summaryView->templateTitle}</h2>
\t</div>
\t<div class="dollar-amounts">
\t\t<div class="spent-to-date">
\t\t\t{$spentToDateAmount}
            <div class="amount-title">{$spnttodt}</div>
\t\t</div>
\t\t<div class="original-amount">
コード例 #4
0
ファイル: expense.tpl.php プロジェクト: ecs-hk/Checkbook
    }
    if ($smnid == 370 || $smnid == 786 || $smnid == 727) {
        $dynamicLabel = WidgetUtil::getLabel("contract_agency");
    }
    if ($smnid == 454 || $smnid == 787 || $smnid == 728) {
        $dynamicLabel = WidgetUtil::getLabel("industry_name");
    }
    if ($smnid == 453 || $smnid == 788 || $smnid == 729) {
        $dynamicLabel = WidgetUtil::getLabel("contract_size");
    }
    $originalAmount = custom_number_formatter_format($row['original_amount_sum'], 2, '$');
    $currentAmount = custom_number_formatter_format($row['current_amount_sum'], 2, '$');
    $spentToDateAmount = custom_number_formatter_format($row['spending_amount_sum'], 2, '$');
    $spnttodt = WidgetUtil::getLabel("spent_to_date");
    $oamnt = WidgetUtil::getLabel("original_amount");
    $camnt = WidgetUtil::getLabel("current_amount");
    $totalContracts = number_format($row['total_contracts']);
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$node->widgetConfig->summaryView->templateTitle}</h2>
\t</div>
\t<div class="dollar-amounts">
\t\t<div class="spent-to-date">
\t\t\t{$spentToDateAmount}
            <div class="amount-title">{$spnttodt}</div>
\t\t</div>
\t\t<div class="original-amount">
\t\t    {$originalAmount}
            <div class="amount-title">{$oamnt}</div>
\t\t</div>
コード例 #5
0
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
* 
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$records = $node->data;
if (is_array($records)) {
    $row = $records[0];
    $title = eval($node->widgetConfig->summaryView->templateTitleEval);
    $label = $node->widgetConfig->summaryView->templateLabel;
    $value = eval($node->widgetConfig->summaryView->templateLabelEval);
    $ytdspending = WidgetUtil::getLabel("ytd_spending");
    $expcat = WidgetUtil::getLabel("expense_category");
    $percent_spending = WidgetUtil::getLabel("percent_spending");
    $percent_spending_value = $row['percent_spending'];
    if (_getRequestParamValue('smnid') == 22) {
        $percent_spending = '';
        $percent_spending_value = '';
    }
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$title}</h2>
\t\t<div class="spending-tx-subtitle"><b>{$label}</b>: {$value}</div>
\t</div>
\t<div class="dollar-amounts">
        <div class="ytd-spending-amount">
            {$row['formatted_check_amount_sum']}
            <div class="amount-title">{$ytdspending}</div>
コード例 #6
0
    $pdiff = WidgetUtil::getLabel("percent_diff");
    $purpose = WidgetUtil::getLabel("contract_purpose");
    $agency = WidgetUtil::getLabel("contract_agency");
    $vendor = WidgetUtil::getLabel("vendor_name");
    $vendor_value = $row['vendor_vendor_legal_name'];
    $smnid = _getRequestParamValue('smnid');
    if ($smnid == 722) {
        $purpose = WidgetUtil::getLabel("sub_contract_purpose");
        $vendor = WidgetUtil::getLabel("sub_vendor_name");
        $vendor_value = strtoupper($row['subvendor_subvendor_legal_name']);
    } else {
        if ($smnid == 782) {
            $vendor = WidgetUtil::getLabel("associated_prime_vendor");
        } else {
            if ($smnid == 366 || $smnid == 480) {
                $vendor = WidgetUtil::getLabel("prime_vendor");
            }
        }
    }
    $purpose_value = strtoupper($row['contract_purpose_contract_purpose']);
    $agency_value = strtoupper($row['agency_agency_agency_name']);
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$node->widgetConfig->summaryView->templateTitle}</h2>
\t</div>
\t<div class="dollar-amounts">
\t\t<div class="spent-to-date">
\t\t\t{$spentToDateAmount}
            <div class="amount-title">{$spnttodt}</div>
\t\t</div>
コード例 #7
0
<?php

/**
* This file is part of the Checkbook NYC financial transparency software.
* 
* Copyright (C) 2012, 2013 New York City
* 
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
* 
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$output = '';
foreach ($node->data as $key => $value) {
    $output .= '<div class="field-label">' . WidgetUtil::getLabel('contract_id') . ': </div><div class="field-items">' . $value['contract_id'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('contract_status') . ': </div><div class="field-items">' . $value['status'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('vendor_name') . ': </div><div class="field-items">' . $value['vendor_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('current_amount') . ': </div><div class="field-items">' . custom_number_formatter_format($value['current_amount'], 2, '$') . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('original_amount') . ': </div><div class="field-items">' . custom_number_formatter_format($value['original_amount'], 2, '$') . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('contract_purpose') . ': </div><div class="field-items">' . $value['description'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('start_date') . ': </div><div class="field-items">' . $value['start_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('end_date') . ': </div><div class="field-items">' . $value['end_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('contract_type') . ': </div><div class="field-items">' . $value['agreement_type_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('spent_to_date') . ': </div><div class="field-items">' . $value['spent_to_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('recv_date') . ': </div><div class="field-items">' . $value['receive_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('agency_name') . ': </div><div class="field-items">' . $value['agency_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('voucher_amount') . ': </div><div class="field-items">' . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('reg_date') . ': </div><div class="field-items">' . $value['registered_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('award_method') . ': </div><div class="field-items">' . $value['award_method_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('encumbered_amount') . ': </div><div class="field-items">' . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('version_number') . ': </div><div class="field-items">' . $value['document_version'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('apt_pin') . ': </div><div class="field-items">' . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('pin') . ': </div><div class="field-items">' . $value['pin'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('loc_site') . ': </div><div class="field-items">' . $value['worksites_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('sol_per_cont') . ': </div><div class="field-items">' . $value['number_solicitation'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('fms_doc') . ': </div><div class="field-items">' . $value['document_code'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('resp_per_sol') . ': </div><div class="field-items">' . $value['number_responses'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('fms_doc_id') . ': </div><div class="field-items">' . $value['parent_contract_id'] . '</div>';
}
print $output;
コード例 #8
0
ファイル: contract.tpl.php プロジェクト: ecs-hk/Checkbook
if (is_array($records)) {
    $row = $records[0];
    $originalAmount = custom_number_formatter_format($row['original_amount_sum'], 2, '$');
    $currentAmount = custom_number_formatter_format($row['current_amount_sum'], 2, '$');
    $spentToDateAmount = custom_number_formatter_format($row['spending_amount_sum'], 2, '$');
    $cont_id = WidgetUtil::getLabel("contract_id");
    $spnttodt = WidgetUtil::getLabel("spent_to_date");
    $oamnt = WidgetUtil::getLabel("original_amount");
    $camnt = WidgetUtil::getLabel("current_amount");
    $purpose = WidgetUtil::getLabel("contract_purpose");
    $agency = WidgetUtil::getLabel("contract_agency");
    $smnid = _getRequestParamValue('smnid');
    $dynamicLabel = $node->widgetConfig->summaryView->entityColumnLabel;
    $dynamicValue = strtoupper($row[$node->widgetConfig->summaryView->entityColumnName]);
    if (!isset($dynamicLabel)) {
        $dynamicLabel = WidgetUtil::getLabel("vendor_name");
    }
    $agency_value = strtoupper($row['agency_agency_agency_name']);
    $purpose_value = strtoupper($row['contract_purpose_contract_purpose']);
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$node->widgetConfig->summaryView->templateTitle}</h2>
\t</div>
\t<div class="dollar-amounts">
\t\t<div class="spent-to-date">
\t\t\t{$spentToDateAmount}
            <div class="amount-title">{$spnttodt}</div>
\t\t</div>
\t\t<div class="original-amount">
\t\t    {$originalAmount}
コード例 #9
0
    if (_getRequestParamValue('smnid') == 719) {
        $percent_spending_value = '';
        $percent_spending = '';
        $associated_prime_vendor_value = $row['prime_vendor_prime_vendor_legal_name'];
        $associated_prime_vendor = WidgetUtil::getLabel("associated_prime_vendor");
        $associated_prime_vendor = '<br><b>' . $associated_prime_vendor . ':</b> ' . $associated_prime_vendor_value;
        $no_of_subcontracts_value = $row['total_sub_contracts'];
        $no_of_subcontracts = WidgetUtil::getLabel("num_sub_contracts");
        $totcontamnt_value = '';
        $totcontamnt = '';
    }
    if (_getRequestParamValue('smnid') == 763 || _getRequestParamValue('smnid') == 748) {
        $percent_spending_value = $row['percent_spending'];
        $percent_spending = WidgetUtil::getLabel("percent_spending");
        $no_of_subcontracts_value = $row['total_sub_contracts'];
        $no_of_subcontracts = WidgetUtil::getLabel("num_sub_contracts");
    }
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$title}</h2>
\t\t<div class="spending-tx-subtitle"><b>{$label}</b>: {$value}<br><b>{$mwbe_category_label}</b>: {$mwbe_category} {$associated_prime_vendor}</div>
\t</div>
\t<div class="dollar-amounts">
\t    <div class="total-spending-contract-amount">
            {$totcontamnt_value}
            <div class="amount-title">{$totcontamnt}</div>
        </div>
        <div class="ytd-spending-amount">
            {$row['formatted_check_amount_sum']}
            <div class="amount-title">{$ytdspending}</div>
コード例 #10
0
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
* 
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$output = '';
$output .= '<table><tr><th>' . WidgetUtil::getLabel('fiscal_year') . '</th>
                       <th>' . WidgetUtil::getLabel('no_of_transactions') . '</th>
                       <th>' . WidgetUtil::getLabel('contract_status') . 'Amount spent to Date</th>
                   </tr>';
$transactions = array();
$count = 1;
foreach ($node->data as $key => $value) {
    $transactions[$value['fiscal_year']][$count]['fiscal_year'] = $value['fiscal_year'];
    $transactions[$value['fiscal_year']][$count]['date'] = $value['date'];
    $transactions[$value['fiscal_year']][$count]['expense_id'] = $value['expense_id'];
    $transactions[$value['fiscal_year']][$count]['check_amount'] = $value['check_amount'];
    $count++;
}
foreach ($transactions as $key => $value) {
    $show_data .= '<tbody id="hidden_data" style="display:none"><tr><th>Date</th><th>Expense ID</th><th>Amount</th></tr>';
    foreach ($value as $a => $b) {
        $amount_spent += $b['check_amount'];
        $show_data .= '<tr><td>' . $b['date'] . '</td>
コード例 #11
0
    $agency_name = WidgetUtil::getLabel("agency_name");
    $ytdspending = WidgetUtil::getLabel("ytd_spending");
    if (_getRequestParamValue('smnid') == 759 || _getRequestParamValue('smnid') == 746 || _getRequestParamValue('smnid') == 780) {
        $percent_spending_value = $row['percent_spending'];
        $percent_spending = WidgetUtil::getLabel("percent_spending");
    }
    if (_getRequestParamValue('smnid') == 716) {
        $percent_spending_value = '';
        $percent_spending = '';
        $ytdspending = WidgetUtil::getLabel("ytd_spending_sub_vendors");
        $percent_paid_value = $row['sub_vendors_percent_paid_formatted'];
        $percent_paid = WidgetUtil::getLabel("sub_vendors_percent_paid");
        $no_of_subvendors_value = $row['sub_vendor_count'];
        $no_of_subvendors = WidgetUtil::getLabel("num_sub_vendors");
        $ytd_spending_agency_value = $row['ytd_spending_agency_formatted'];
        $ytd_spending_agency = WidgetUtil::getLabel("ytd_spending_agency");
    }
    //sub_vendors_percent_paid_formatted
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$title}</h2>
\t\t<div class="spending-tx-subtitle"><b>{$label}</b>: {$value}</div>
\t</div>
\t<div class="dollar-amounts">
        <div class="ytd-spending-amount">
            {$row['formatted_check_amount_sum']}
            <div class="amount-title">{$ytdspending}</div>
        </div>
        <div class="number-of-subvendors">
            {$no_of_subvendors_value}
コード例 #12
0
* 
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$records = $node->data;
if (is_array($records)) {
    $row = $records[0];
    $title = eval($node->widgetConfig->summaryView->templateTitleEval);
    $label = $node->widgetConfig->summaryView->templateLabel;
    $value = eval($node->widgetConfig->summaryView->templateLabelEval);
    $ytdspending = WidgetUtil::getLabel("ytd_spending");
    $oamnt = WidgetUtil::getLabel("original_amount");
    $camnt = WidgetUtil::getLabel("current_amount");
    $puprose = WidgetUtil::getLabel("contract_purpose");
    $vendor = WidgetUtil::getLabel("prime_vendor");
    $agency = WidgetUtil::getLabel("contract_agency");
    $purpose_value = strtoupper($row['contract_purpose_contract_purpose']);
    $agency_value = strtoupper($row['agency_agency_agency_name']);
    $summaryContent = <<<EOD
<div class="contract-details-heading">
\t<div class="contract-id">
\t\t<h2 class="contract-title">{$title}</h2>
\t</div>
\t<div class="dollar-amounts">
        <div class="total-spending-contract-amount">
            {$row['formatted_total_contract_amount_sum']}
            <div class="amount-title">Total Contract<div align="center">{$amount}Amount</div></div>
        </div>
        <div class="ytd-spending-amount">
            {$row['formatted_check_amount_sum']}
            <div class="amount-title">{$ytdspending}</div>
コード例 #13
0
    }
    $employeeData .= "<div id='emp-agency-detail-records'>";
    foreach ($node->data as $data) {
        $typeOfEmployment = $data['employment_type_employment_type'];
        $year = $data['year_year'];
        $yearType = $data['year_type_year_type'];
        $agency = strtoupper($data['agency_agency_agency_name']);
        $agencyUrl = "<a href='/payroll/agency/{$data['agency_agency']}/yeartype/{$yearType}/year/{$year}'>{$agency}</a>";
        $title = strtolower($data['employee_employee_civil_service_title']);
        //$title = str_replace('( ', '(', ucwords(str_replace('(', '( ', $title)));
        $title = mb_convert_case($title, MB_CASE_TITLE, "UTF-8");
        //this works too
        $table = "<div class='emp-agency-detail-record'><table id='emp-agency-detail-record-table'>";
        $table .= '<div id="payroll-emp-trans-name">
                        <span class="payroll-label">Title: </span>
                        <span class="payroll-value" >' . $title . '</span>
                    </div>';
        $table .= "<tr>\r\n                        <td width='60%'><strong>" . WidgetUtil::getLabel('agency_name') . "</strong>: {$agencyUrl}</td>\r\n                        <td width='40%'><strong>" . WidgetUtil::getLabel('gross_pay_ytd') . "</strong>:\$" . number_format($data['total_gross_pay'], 2) . "</td>\r\n                   </tr>";
        $table .= "<tr>\r\n                        <td><strong>" . WidgetUtil::getLabel('payroll_type') . "</strong>: " . strtoupper($data['employment_type_employment_type']) . "</td>\r\n                        <td><strong>" . WidgetUtil::getLabel('base_pay_ytd') . "</strong>: \$" . number_format($data['total_base_salary'], 2) . "</td>\r\n                   </tr>";
        $table .= "<tr>\r\n                        <td><strong>" . ($typeOfEmployment == 'Salaried' ? WidgetUtil::getLabel('annual_salary') : WidgetUtil::getLabel('pay_rate')) . "</strong>: \$" . number_format($data['max_annual_salary'], 2) . "</td>\r\n                        <td><strong>" . WidgetUtil::getLabel('other_pay_1_ytd') . "</strong>: \$" . number_format($data['total_other_payments'], 2) . "</td>\r\n                   </tr>";
        $table .= "<tr>\r\n                        <td ><strong>" . WidgetUtil::getLabel('overtime_pay_1_ytd') . "</strong>: \$" . number_format($data['total_overtime_amount'], 2) . "</td>\r\n                    </tr>";
        $table .= "</table></div>";
        $employeeData .= $table;
    }
    if (count($node->data) > 1) {
        $employeeData .= "</div><div id='next-emp' href='#'></div></div>";
    } else {
        $employeeData .= "</div></div>";
    }
    print $employeeData;
}