Ejemplo n.º 1
0
                    </tr>

                    <tr class="text_danger">
                        <th>Bids below threshold (<?php 
    echo seconds_to_days($threshold);
    ?>
)</th>
                        <td class="number"><?php 
    echo count($less_than_thresh_hold);
    ?>
</td>
                    </tr>

                    <tr class="text_success">
                        <th>Bids above threshold (<?php 
    echo seconds_to_days($threshold);
    ?>
)</th>
                        <td class="number"><?php 
    echo count($results) - count($less_than_thresh_hold);
    ?>
</td>
                    </tr>

                    <tr class="text_success">
                        <th>Bids still active</th>
                        <td class="number"><?php 
    echo count($results) - count($expired_bids);
    ?>
</td>
                    </tr>
            echo get_pde_info_by_id($row['pde_id'], 'title');
            ?>
</td>
                                <?php 
        }
        ?>
                                <td><?php 
        echo $row['final_contract_value'];
        ?>
</td>
                                <td><?php 
        echo $row['total_actual_payments'];
        ?>
</td>
                                <td><?php 
        echo seconds_to_days(strtotime($row['completion_date']) - strtotime($row['commencement_date']));
        ?>
</td>

                                <td><?php 
        echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_ref_no');
        ?>
</td>
                                <td><?php 
        echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'subject_of_procurement');
        ?>
</td>
                                <td><?php 
        echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'procurement_method');
        ?>
</td>
</td>
                                <td><?php 
        echo get_procurement_method_info_by_id($row['procurement_method'], 'title');
        ?>
</td>

                                <td><?php 
        echo custom_date_format('d.F.Y', $row['dateofconfirmationoffunds']);
        ?>
</td>
                                <td><?php 
        echo custom_date_format('d.F.Y', $row['contract_award_date']);
        ?>
</td>
                                <td><?php 
        echo seconds_to_days(strtotime($row['dateofconfirmationoffunds']) - strtotime($row['contract_award_date']));
        ?>
</td>
                                <td><?php 
        echo $row['estimated_amount'];
        ?>
</td>
                                <td><?php 
        echo $row['final_contract_value'];
        ?>
</td>



                            </tr>
                        <?php 
                        <?php 
foreach ($completed_contracts_available_procurement_methods as $method) {
    //get values ny type
    //print_array($contracts_by_procurement_method)
    ?>
                            <tr>
                                <th><?php 
    echo get_procurement_method_info_by_id($method, 'title');
    ?>
</th>
                                <td>
                                    <?php 
    $lead_days = array();
    foreach ($completed_contracts as $row) {
        if ($row['procurement_method'] == $method) {
            $lead_days[] = seconds_to_days(strtotime($row['date_signed']) - strtotime($row['dateofconfirmationoffunds']));
            //echo seconds_to_days(strtotime($row['dateofconfirmationoffunds']) - strtotime($row['contract_award_date'])).'<br>';
            // print_array($lead_days);
        }
    }
    echo count($lead_days) . '<small> contracts</small>';
    ?>


                                </td>
                                <td>Average lead time:
                                    <?php 
    echo count($lead_days) > 0 ? round_up(array_sum($lead_days) / count($lead_days), 2) . ' <small>days</small>' : '';
    ?>

                                </td>