Beispiel #1
0
 function get_contract_price_info_by_contract($passed_id, $param)
 {
     //if NO ID
     if ($passed_id == '') {
         return NULL;
     } else {
         //get user info
         $query = $this->db->select()->from($this->_tablename)->where('contract_id', $passed_id)->get();
         //echo $this->db->last_query();
         if ($query->result_array()) {
             foreach ($query->result_array() as $row) {
                 //filter results
                 switch ($param) {
                     case 'id':
                         $result = $row['id'];
                         break;
                     case 'amount':
                         $result = $row['amount'];
                         break;
                     case 'xrate':
                         $result = $row['xrate'];
                         break;
                     case 'rate':
                         $result = $row['xrate'];
                         break;
                     case 'currency_id':
                         $result = $row['currency_id'];
                         break;
                     case 'currency':
                         $result = get_currency_info_by_id($row['currency_id'], 'abbrv');
                         break;
                     case 'dateadded':
                         $result = $row['dateadded'];
                         break;
                     default:
                         $result = $query->result_array();
                 }
             }
             return $result;
         }
     }
 }
                        <td><?php 
    echo $entry['subject_of_procurement'];
    ?>
</td>
                        <td><?php 
    echo get_procurement_type_info_by_id($entry['procurement_type'], 'title');
    ?>
</td>
                        <td><?php 
    echo get_procurement_method_info_by_id($entry['procurement_type'], 'title');
    ?>
</td>
                        <td><?php 
    echo get_source_funding_info_by_id($entry['funding_source'], 'title');
    ?>
</td>
                        <td style="text-align: right;"><?php 
    echo number_format($entry['estimated_amount']);
    ?>
   <?php 
    echo get_currency_info_by_id($entry['currency'], 'title');
    ?>
</td>
                    </tr>
            <?php 
}
?>
            </tbody>
        </table>
    </div>
</div>
Beispiel #3
0
                                    <td><?php 
        echo $entry['subject_of_procurement'];
        ?>
</td>
                                    <td class="hidden-480"><?php 
        echo get_procurement_type_info_by_id($entry['procurement_type'], 'title');
        ?>
</td>

                                    <td class="hidden-480"><?php 
        echo get_source_funding_info_by_id($entry['funding_source'], 'title');
        ?>
</td>
                                    <td><?php 
        echo $entry['estimated_amount'] . ' ' . get_currency_info_by_id($entry['currency'], 'abbrv');
        ?>
</td>
                                </tr>
                            <?php 
    }
    ?>


                            </tbody>
                        </table>

                    <?php 
} else {
    echo info_template('Plan has no entries yet');
    echo check_my_access('add_procurement_entry') == TRUE ? '<a class="btn btn-xs btn-primary" href="' . base_url() . $this->uri->segment(1) . '/new_entry/m/' . $this->uri->segment(3) . '">Add entry</a>' : '';
 function get_plan_entry_info_by_ref_num($id = '', $param = '')
 {
     if ($id == '') {
         return NULL;
     } else {
         $this->db->cache_on();
         $query = $this->db->select()->from($this->_tablename)->where('procurement_ref_no', $id)->get();
     }
     if ($query->result_array()) {
         foreach ($query->result_array() as $row) {
             switch ($param) {
                 case 'title':
                     $result = $row['subject_of_procurement'];
                     break;
                 case 'subject_of_procurement':
                     $result = $row['subject_of_procurement'];
                     break;
                 case 'procurement_type_id':
                     $result = $row['procurement_type'];
                     break;
                 case 'procurement_type':
                     $result = get_procurement_type_info_by_id($row['procurement_type'], 'title');
                     break;
                 case 'procurement_method_id':
                     $result = $row['procurement_method'];
                     break;
                 case 'procurement_method':
                     $result = get_procurement_method_info_by_id($row['procurement_method'], 'title');
                     break;
                 case 'department_id':
                     $result = $row['pde_department'];
                     break;
                 case 'department':
                     $result = get_pde_department_info_by_id($row['pde_department'], 'title');
                     break;
                 case 'funding_source_id':
                     $result = $row['funding_source'];
                     break;
                 case 'funding_source':
                     $result = get_source_funding_info_by_id($row['funding_source'], 'title');
                     break;
                 case 'source_funding_id':
                     $result = $row['funding_source'];
                     break;
                 case 'source_funding':
                     $result = get_source_funding_info_by_id($row['funding_source'], 'title');
                     break;
                 case 'id':
                     $result = $row['id'];
                     break;
                 case 'estimated_amount':
                     $result = $row['estimated_amount'];
                     break;
                 case 'currency':
                     $result = $result = get_currency_info_by_id($row['currency'], 'abbrv');
                     break;
                 case 'currency_id':
                     $result = $result = $row['currency'];
                     break;
                 case 'pre_bid_events_date':
                     $result = $row['pre_bid_events_date'];
                     break;
                 case 'pre_bid_events_duration':
                     $result = $row['pre_bid_events_duration'];
                     break;
                 case 'contracts_committee_approval_date':
                     $result = $row['contracts_committee_approval_date'];
                     break;
                 case 'contracts_committee_approval_date_duration':
                     $result = $row['contracts_committee_approval_date_duration'];
                     break;
                 case 'publication_of_pre_qualification_date':
                     $result = $row['publication_of_pre_qualification_date'];
                     break;
                 case 'publication_of_pre_qualification_date_duration':
                     $result = $row['publication_of_pre_qualification_date_duration'];
                     break;
                 case 'proposal_submission_date':
                     $result = $row['proposal_submission_date'];
                     break;
                 case 'proposal_submission_date_duration':
                     $result = $row['proposal_submission_date_duration'];
                     break;
                 case 'contracts_committee_approval_of_shortlist_date':
                     $result = $row['contracts_committee_approval_of_shortlist_date'];
                     break;
                 case 'contracts_committee_approval_of_shortlist_date_duration':
                     $result = $row['contracts_committee_approval_of_shortlist_date_duration'];
                     break;
                 case 'bid_issue_date_duration':
                     $result = $row['bid_issue_date_duration'];
                     break;
                 case 'bid_submission_opening_date':
                     $result = $row['bid_submission_opening_date'];
                     break;
                 case 'bid_submission_opening_date_duration':
                     $result = $row['bid_submission_opening_date_duration'];
                     break;
                 case 'bid_issue_date':
                     $result = $row['bid_issue_date'];
                     break;
                 case 'secure_necessary_approval_date':
                     $result = $row['secure_necessary_approval_date'];
                     break;
                 case 'secure_necessary_approval_date_duration':
                     $result = $row['secure_necessary_approval_date_duration'];
                     break;
                 case 'contract_award':
                     $result = $row['contract_award'];
                     break;
                 case 'contract_award_duration':
                     $result = $row['contract_award_duration'];
                     break;
                 case 'best_evaluated_bidder_date':
                     $result = $row['best_evaluated_bidder_date'];
                     break;
                 case 'best_evaluated_bidder_date_duration':
                     $result = $row['best_evaluated_bidder_date_duration'];
                     break;
                 case 'contract_sign_date':
                     $result = $row['bid_issue_date'];
                     break;
                 case 'contract_sign_date_duration':
                     $result = $row['contract_sign_duration'];
                     break;
                 case 'cc_approval_of_evaluation_report':
                     $result = $row['cc_approval_of_evaluation_report'];
                     break;
                 case 'cc_approval_of_evaluation_report_duration':
                     $result = $row['cc_approval_of_evaluation_report_duration'];
                     break;
                 case 'negotiation_date':
                     $result = $row['negotiation_date'];
                     break;
                 case 'negotiation_date_duration':
                     $result = $row['negotiation_date_duration'];
                     break;
                 case 'negotiation_approval_date':
                     $result = $row['negotiation_approval_date'];
                     break;
                 case 'negotiation_approval_date_duration':
                     $result = $row['negotiation_approval_date_duration'];
                     break;
                 case 'advanced_payment_date':
                     $result = $row['advanced_payment_date'];
                     break;
                 case 'advanced_payment_date_duration':
                     $result = $row['advanced_payment_date_duration'];
                     break;
                 case 'mobilise_advance_payment':
                     $result = $row['mobilise_advance_payment'];
                     break;
                 case 'mobilise_advance_payment_duration':
                     $result = $row['mobilise_advance_payment_duration'];
                     break;
                 case 'substantial_completion':
                     $result = $row['substantial_completion'];
                     break;
                 case 'substantial_completion_duration':
                     $result = $row['substantial_completion_duration'];
                     break;
                 case 'final_acceptance':
                     $result = $row['final_acceptance'];
                     break;
                 case 'final_acceptance_duration':
                     $result = $row['final_acceptance_duration'];
                     break;
                 case 'procurement_plan_id':
                     $result = $row['procurement_plan_id'];
                     break;
                 case 'procurement_plan':
                     $result = get_procurement_plan_info($row['procurement_plan_id'], 'title');
                     break;
                 case 'pde_id':
                     $result = get_procurement_plan_info($row['procurement_plan_id'], 'pde_id');
                     break;
                 case 'pde':
                     $result = get_procurement_plan_info($row['procurement_plan_id'], 'pde');
                     break;
                 case 'author_id':
                     $result = $row['author'];
                     break;
                 case 'updated_by':
                     $result = $row['updated_by'];
                     break;
                 case 'author':
                     $result = get_user_info($row['author'], 'fullname');
                     break;
                 case 'isactive':
                     $result = $row['active'];
                     break;
                 case 'dateadded':
                     $result = $row['dateadded'];
                     break;
                 default:
                     $result = $query->result_array();
             }
         }
         return $result;
     } else {
         return NULL;
     }
 }