function get_bid_responses_per_procurement($procurement_id) { $ci =& get_instance(); $ci->load->model('bid_invitation_m'); $bid_invitation_id = $ci->bid_invitation_m->get_bid_invitation_by_procurement_id($procurement_id); return get_bid_receipts_by_bid($bid_invitation_id); }
?> </td> <td ><?php echo get_procurement_plan_entry_info($row['procurement_id'], 'procurement_type'); ?> </td> <td ><?php echo get_procurement_plan_entry_info($row['procurement_id'], 'procurement_method'); ?> </td> <td style="text-align: right;"><?php echo get_procurement_plan_entry_info($row['procurement_id'], 'estimated_amount'); ?> </td> <td><?php echo count(get_bid_receipts_by_bid($row['id'])); ?> </td> </tr> <?php } } ?> <tr> <td></td> <td ></td> <td></td> <td ></td> <td ></td> <td style="text-align: right; border-top: solid 1px; font-weight: bold;"><?php
if ($row['final_contract_value'] <= $row['estimated_amount']) { $within_contract_value[] = $row['id']; } //contracts completed early if (strtotime($row['commencement_date']) > strtotime($row['actual_completion_date'])) { $contracts_completed_early[] = $row['id']; } //contracts completed on time if (strtotime($row['commencement_date']) == strtotime($row['actual_completion_date'])) { $contracts_completed_on_time[] = $row['id']; } //contracts completed on late if (strtotime($row['commencement_date']) < strtotime($row['actual_completion_date'])) { $contracts_completed_late[] = $row['id']; } $total_bid_receipts[] = count(get_bid_receipts_by_bid($row['id'])); if (!in_array($row['procurement_method'], $procurement_methods)) { $procurement_methods[$row['procurement_method']] = count(get_bid_receipts_by_procurement_method($row['procurement_method'], $from, $to)); } //better totals if (!in_array(get_procurement_method_info_by_id($row['procurement_method'], 'title'), $available_procurement_methods)) { $available_procurement_methods[] = get_procurement_method_info_by_id($row['procurement_method'], 'title'); } } //$occurence_procurement_types=array_count_values($procurement_types); $bids_by_procurement_method = array(); foreach ($procurement_methods as $key => $value) { $bids_by_procurement_method[] = $value; } $total_bids_by_procurement_method = array_sum($bids_by_procurement_method); //print_array($_POST);