コード例 #1
0
* 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/>.
*/
//Main table header
$tbl['header']['title'] = "<div class='tableHeader'><h3>Prime Vendor Information</h3> <span class='contCount'>Number of Prime Vendors: " . count($node->vendors_list) . " </span></div>";
$tbl['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("prime_vendor_name"), 'type' => 'text'), array('value' => $node->widget_count_label, 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("spent_to_date"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("prime_vendor_address"), 'type' => 'text'));
$vendor_cont_count = array();
foreach ($node->vendor_contracts_count as $vendor_cont) {
    $vendor_cont_count[$vendor_cont['vendor_id']]['count'] = $vendor_cont['count'];
    $vendor_cont_count[$vendor_cont['vendor_id']]['count'] = $vendor_cont['count'];
}
$count = 0;
if (count($node->vendors_list) > 0) {
    foreach ($node->vendors_list as $vendor) {
        $spending_link = "/spending/transactions/vendor/" . $vendor['vendor_id'] . "/datasource/checkbook_oge/newwindow";
        if (preg_match("/newwindow/", $_GET['q'])) {
            $vendor_name = $vendor['vendor_name'];
        } else {
            $vendor_name = "<a href='/contracts_landing/status/A/year/" . _getCurrentYearID() . "/yeartype/B/agency/" . $vendor['agency_id'] . "/datasource/checkbook_oge/vendor/" . $vendor['vendor_id'] . "?expandBottomCont=true'>" . $vendor['vendor_name'] . "</a>";
        }
        $spent_to_date_value = custom_number_formatter_format($vendor['check_amount_sum'], 2, '$');
コード例 #2
0
 * 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/>.
 */
/* SPENDING BY PRIME VENDOR */
//Main table header
$tbl_spending = array();
$tbl_spending['header']['title'] = "<h3>SPENDING BY PRIME VENDOR</h3>";
$tbl_spending['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("prime_vendor_name"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("current_amount"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("original_amount"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("spent_to_date"), 'type' => 'number'));
$contract_vendor_details = '';
$spending_vendor_details = '';
$index_spending = 0;
foreach ($node->results_prime_vendor_info as $vendor => $vendor_summary) {
    $open = $index_spending == 0 ? '' : 'open';
    //Main table columns
    $tbl_spending['body']['rows'][$index_spending]['columns'] = array(array('value' => "<a class='showHide " . $open . " expandTwo' ></a>" . $vendor_summary['vendor_name'], 'type' => 'text'), array('value' => custom_number_formatter_format($vendor_summary['current_amount'], 2, '$'), 'type' => 'number'), array('value' => custom_number_formatter_format($vendor_summary['original_amount'], 2, '$'), 'type' => 'number'), array('value' => custom_number_formatter_format($vendor_summary['spent_to_date'], 2, '$'), 'type' => 'number'));
    if (_getRequestParamValue("datasource") != "checkbook_oge") {
        $contract_vendor_details = '<div id = "contract_history">';
        $nid = 426;
        $node = node_load($nid);
        node_build_content($node);
        $contract_vendor_details .= drupal_render($node->content);
        $contract_vendor_details .= '</div>';
        $spending_vendor_details = '<div id = "spending_transactions">';
コード例 #3
0
* 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/>.
*/
if (_getRequestParamValue("datasource") == "checkbook_oge") {
    $datasource = "/datasource/checkbook_oge";
}
//Main table header
$tbl['header']['title'] = "<h3>Spending by Expense Category</h3>";
$tbl['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("expense_category"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("encumbered_amount"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("spent_to_date"), 'type' => 'number'));
$count = 0;
if (count($node->data) > 0) {
    foreach ($node->data as $row) {
        $spent_to_date_value = custom_number_formatter_format($row['spending_amount'], 2, '$');
        $spent_to_date = custom_number_formatter_format($row['spending_amount'], 2, '$');
        //Main table columns
        $tbl['body']['rows'][$count]['columns'] = array(array('value' => $row['expenditure_object_name'], 'type' => 'text'), array('value' => custom_number_formatter_format($row['encumbered_amount'], 2, '$'), 'type' => 'number'), array('value' => $spent_to_date_value, 'type' => 'number_link', 'link_value' => $spent_to_date));
        $count += 1;
    }
}
$html = WidgetUtil::generateTable($tbl);
echo $html;
コード例 #4
0
     $index_contract_history++;
 }
 /* SPENDING TRANSACTIONS BY PRIME VENDOR */
 //Main table header
 $tbl_spending_transaction = array();
 $tbl_spending_transaction['header']['title'] = "<h3>SPENDING TRANSACTIONS BY PRIME VENDOR</h3>";
 $tbl_spending_transaction['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("fiscal_year"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("no_of_transactions"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("amount_spent"), 'type' => 'number'));
 $index_spending_transaction = 0;
 if (count($vendor_spending_yearly_summary[$vendor]) > 0) {
     foreach ($vendor_spending_yearly_summary[$vendor] as $year => $results_spending_history_fy) {
         $open = $index_spending_transaction == 0 ? '' : 'open';
         //Main table columns
         $tbl_spending_transaction['body']['rows'][$index_spending_transaction]['columns'] = array(array('value' => "<a class='showHide " . $open . "' ></a>FY " . $year, 'type' => 'text'), array('value' => $results_spending_history_fy['no_of_trans'], 'type' => 'number'), array('value' => custom_number_formatter_format($results_spending_history_fy['amount_spent'], 2, '$'), 'type' => 'number'));
         //Inner table header
         $tbl_spending_transaction_inner = array();
         $tbl_spending_transaction_inner['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv('check_amount'), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv('expense_category'), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv('agency_name'), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv('dept_name'), 'type' => 'text'));
         $index_spending_transaction_inner = 0;
         foreach ($node->results_spending as $contract_spending) {
             if ($contract_spending['fiscal_year'] == $year && $contract_spending['vendor_name'] == $vendor) {
                 //Inner table columns
                 $tbl_spending_transaction_inner['body']['rows'][$index_spending_transaction_inner]['columns'] = array(array('value' => custom_number_formatter_format($contract_spending['check_amount'], 2, '$'), 'type' => 'number'), array('value' => $contract_spending['expenditure_object_name'], 'type' => 'text'), array('value' => $contract_spending['agency_name'], 'type' => 'text'), array('value' => $contract_spending['department_name'], 'type' => 'text'));
                 $index_spending_transaction_inner++;
             }
         }
         $index_spending_transaction++;
         $tbl_spending_transaction['body']['rows'][$index_spending_transaction]['inner_table'] = $tbl_spending_transaction_inner;
         $index_spending_transaction++;
     }
 }
 $index_spending++;
 $tbl_spending['body']['rows'][$index_spending]['child_tables'] = array($tbl_contract_history, $tbl_spending_transaction);