Example #1
0
 public function get_disposal_contract_info_by_disposal_record($id = '', $param = '')
 {
     //if NO ID
     if ($id == '') {
         return NULL;
     } else {
         //get user info
         $query = $this->db->select()->from($this->_tablename)->where('disposalrecord', $id)->get();
         if ($query->result_array()) {
             foreach ($query->result_array() as $row) {
                 //filter results
                 switch ($param) {
                     case 'id':
                         $result = $row['id'];
                         break;
                     case 'beneficiary_id':
                         $result = $row['beneficiary'];
                         break;
                     case 'beneficiary':
                         $result = get_provider_info_by_id($row['beneficiary'], 'title');
                         break;
                     case 'contractamount':
                         $result = $row['contractamount'];
                         break;
                     case 'amount':
                         $result = $row['contractamount'];
                         break;
                     case 'isactive':
                         $result = $row['isactive'];
                         break;
                     case 'currency_id':
                         $result = $row['currency'];
                         break;
                     case 'currency':
                         $result = $row['currency'];
                         break;
                     default:
                         $result = $query->result_array();
                 }
             }
             return $result;
         }
     }
 }
Example #2
0
        //expired bids
        if (strtotime($row['bid_submission_deadline']) < now()) {
            $expired_bids[] = $row['id'];
        }
        //less than threshhold
        if (strtotime($row['bid_submission_deadline']) - strtotime($row['invitation_to_bid_date']) < $threshold) {
            $less_than_thresh_hold[] = $row['id'];
        }
        if (date('d', strtotime($row['bid_submission_deadline']) - strtotime($row['invitation_to_bid_date'])) != get_procurement_type_info_by_id(get_procurement_plan_entry_info($row['procurement_id'], 'procurement_type'), 'evaluation_time')) {
            $inconsitent_evalution[] = $row['id'];
        }
        //get suspended provoders
        if (check_live_server()) {
            foreach ($rop_suspended_providers as $provider) {
                //if names match
                if ($provider == get_provider_info_by_id($row['providerid'], 'title')) {
                    if (!in_array($row['providerid'], $suspended_providers)) {
                        $suspended_providers[] = $row['providerid'];
                    }
                }
            }
        }
    }
    $occurence_procurement_types = array_count_values($procurement_types);
    ?>

            <div id="print_this">
                <table class="table table-responsive " id="vertical-1">
                    <h2><?php 
    echo $report_heading;
    ?>
</td>
                                <td>
                                    <?php 
                        echo get_provider_info_by_id($row['providerid'], 'title');
                        ?>

                                </td>
                                <td>
                                    <?php 
                        echo $row['nationality'];
                        ?>
                                </td>
                                <td>
                                    <?php 
                        foreach ($rop_suspended_providers as $provider) {
                            if (in_array(get_provider_info_by_id($row['providerid'], 'title'), $suspended) && get_provider_info_by_id($row['providerid'], 'title') == $provider['orgname']) {
                                echo $provider['reason'];
                            }
                        }
                        ?>
                                </td>


                            </tr>

                        <?php 
                    }
                }
            }
        }
    }