/** * Created by PhpStorm. * User: cengkuru * Date: 5/12/2015 * Time: 10:17 AM */ function pdf_create($html, $report_title = '') { $ci =& get_instance(); //load the profile model $ci->load->library('dompdf_gen'); if (!$report_title) { $report_title = custom_date_format('d_F_Y', mysqldate()) . '_' . substr(base_url(), 7) . '_report'; } // Convert to PDF $ci->dompdf->load_html($html); $ci->dompdf->render(); $ci->dompdf->stream($report_title . ".pdf", array("Attachment" => true)); }
public function saveEdit() { $all = Input::all(); $id = $all['id']; unset($all['id']); //Lets update the table Bankentry::find($id)->update($all); //Lets fetch the updated data and return it through ajax //$update = Bankentry::where('id', $id)->get()->toArray(); $all['id'] = $id; if (isset($all['deposit_date'])) { $all['deposit_date'] = custom_date_format('M j, Y', $all['deposit_date']); } if (isset($all['amount'])) { $all['amount'] = format_money($all['amount']); } $data['status'] = 'success'; $data['message'] = $all; return Response::json($data); }
<b>Reason for Suspension</b> </div> </div><hr>'; while ($row = mysqli_fetch_array($suspendedlist)) { $today = date('Y-m-d'); //strtotime($row['datesuspended']) $diff = abs(strtotime($row['endsuspension']) - strtotime($today)); $years = floor($diff / (365 * 60 * 60 * 24)); $months = floor(($diff - $years * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24)); $days = floor($diff / (60 * 60 * 24)); print '<div class="row">' . '<div class="col-md-3">' . $row['orgname'] . '</div>' . '<div class="col-md-2"><b>' . custom_date_format('d M, Y', $row['datesuspended']) . '</b></div>' . '<div class="col-md-2">'; if ($row['indefinite'] == 'Y') { echo '<span class="label label-info "> INDEFINITE</span>'; } else { echo '<b>' . custom_date_format('d M, Y', $row['endsuspension']) . '</b>'; } echo '</div>' . '<div class="col-md-2">'; if ($row['indefinite'] == 'Y') { echo 'Not Applicable'; } else { echo $days; } echo '</div>' . '<div class="col-md-3">' . $row['reason'] . '</div>' . '</div>' . '<hr>'; } // if($row['indefinite']=='Y') // { // echo '<span class="label label-info "> indefinite Suspension </span>'; // }else /* print '<div class="pagination pagination-mini pagination-centered">'. pagination($this->session->userdata('search_total_results'), $page_list['rows_per_page'], $page_list['current_list_page'], base_url().
function weeklyreport($level, $data = array()) { switch ($level) { case 'ppda': $search_str = ' '; #Get the paginated list of bid invitations $results = paginate_list($this, $data, 'weekly_IFB_report', array('orderby' => '', 'searchstring' => '' . $search_str), 1000); # print_r($results); exit(); $table = "<div>"; if (!empty($results['page_list'])) { $table .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">Subject of procurement</th>' . '<th class="hidden-480">Bid security</th>' . '<th class="hidden-480">Bid invitation date</th>' . '<th class="hidden-480">Addenda</th>' . '<th>Status</th>' . '<th>Published by</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($results['page_list'] as $row) { $this->session->unset_userdata('pdeid'); $status_str = ''; $addenda_str = '[NONE]'; $delete_str = ''; $edit_str = ''; if (!empty($level) && $level == 'active') { $delete_str = '<a title="Delete bid invitation" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>'; $edit_str = '<a title="Edit bid details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['bidinvitation_id']) . '"><i class="icon-edit"></i></a>'; } if ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') < 0) { $status_str = 'Bid evaluation | <a title="Select BEB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Select BEB]</a>'; } elseif ($row['bid_approved'] == 'N') { $status_str = 'Not published | <a title="Publish IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Publish IFB]</a>'; } elseif ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) { $status_str = 'Bidding closes in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days | <a title="view IFB document" href="' . base_url() . 'bids/view_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[View IFB]</a>'; $addenda_str = '<a title="view addenda list" href="' . base_url() . 'bids/view_addenda/b/' . encryptValue($row['bidinvitation_id']) . '">[View Addenda]</a> | <a title="Add addenda" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . encryptValue($row['bidinvitation_id']) . '">[Add Addenda]</a>'; } else { } $table .= '<tr>' . '<td></td>' . '<td>' . format_to_length($row['procurement_ref_no'], 40) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . (is_numeric($row['bid_security_amount']) ? number_format($row['bid_security_amount'], 0, '.', ',') . ' ' . $row['bid_security_currency_title'] : (empty($row['bid_security_amount']) ? '<i>N/A</i>' : $row['bid_security_amount'])) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td>' . $addenda_str . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . (empty($row['approver_fullname']) ? 'N/A' : $row['approver_fullname']) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['bid_dateadded']) . '</td>' . '</tr>'; } $table .= '</tbody></table>'; $table .= '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $results['rows_per_page'], $results['current_list_page'], base_url() . "bids/manage_bid_invitations/" . $level . "/p/%d") . '</div>'; } else { $table .= format_notice('WARNING: No bid invitations expiring this week'); } $table .= "</div>"; $adons = ''; //$entity = $records['pdeid']; //$this->session->set_userdata('pdeid',$entity); $datasx = $this->session->set_userdata('level', 'ppda'); $entityname = ''; $entityname = ''; $adons = date('d-m'); $level = "Procurement"; # exit('moooooo'); $titles = "Weekly report on expiring IFBs of ITP"; $body = " " . html_entity_decode($table); $permission = "view_bid_invitations"; $xcv = 0; push_permission($titles, $body, $level, $permission); #end break; case 'ifb': $search_str = ''; # code... $querys = $this->db->query("select distinct b.pdeid,b.pdename,a.* from pdes b inner join users a on a.pde = b.pdeid ")->result_array(); foreach ($querys as $row => $records) { #get the PDE ID " Idividual Pde Ids ";" $search_str = ' AND procurement_plans.pde_id="' . $records['pdeid'] . '"'; $results = paginate_list($this, $data, 'weekly_IFB_report', array('orderby' => '', 'searchstring' => '' . $search_str), 1000); # print_r($results); exit(); $table = "<div>"; if (!empty($results['page_list'])) { $table .= '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">Subject of procurement</th>' . '<th class="hidden-480">Bid security</th>' . '<th class="hidden-480">Bid invitation date</th>' . '<th class="hidden-480">Addenda</th>' . '<th>Status</th>' . '<th>Published by</th>' . '<th>Date Added</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($results['page_list'] as $row) { $this->session->unset_userdata('pdeid'); $status_str = ''; $addenda_str = '[NONE]'; $delete_str = ''; $edit_str = ''; if (!empty($level) && $level == 'active') { $delete_str = '<a title="Delete bid invitation" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '\', \'Are you sure you want to delete this bid invitation?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>'; $edit_str = '<a title="Edit bid details" href="' . base_url() . 'bids/load_bid_invitation_form/i/' . encryptValue($row['bidinvitation_id']) . '"><i class="icon-edit"></i></a>'; } if ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') < 0) { $status_str = 'Bid evaluation | <a title="Select BEB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Select BEB]</a>'; } elseif ($row['bid_approved'] == 'N') { $status_str = 'Not published | <a title="Publish IFB" href="' . base_url() . 'bids/approve_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[Publish IFB]</a>'; } elseif ($row['bid_approved'] == 'Y' && get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') > 0) { $status_str = 'Bidding closes in ' . get_date_diff(date('Y-m-d'), $row['bid_submission_deadline'], 'days') . ' days | <a title="view IFB document" href="' . base_url() . 'bids/view_bid_invitation/i/' . encryptValue($row['bidinvitation_id']) . '">[View IFB]</a>'; $addenda_str = '<a title="view addenda list" href="' . base_url() . 'bids/view_addenda/b/' . encryptValue($row['bidinvitation_id']) . '">[View Addenda]</a> | <a title="Add addenda" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . encryptValue($row['bidinvitation_id']) . '">[Add Addenda]</a>'; } else { } $table .= '<tr>' . '<td></td>' . '<td>' . format_to_length($row['procurement_ref_no'], 40) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . (is_numeric($row['bid_security_amount']) ? number_format($row['bid_security_amount'], 0, '.', ',') . ' ' . $row['bid_security_currency_title'] : (empty($row['bid_security_amount']) ? '<i>N/A</i>' : $row['bid_security_amount'])) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td>' . $addenda_str . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . (empty($row['approver_fullname']) ? 'N/A' : $row['approver_fullname']) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['bid_dateadded']) . '</td>' . '</tr>'; } $table .= '</tbody></table>'; $table .= '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $results['rows_per_page'], $results['current_list_page'], base_url() . "bids/manage_bid_invitations/" . $level . "/p/%d") . '</div>'; } else { $table .= format_notice('WARNING: No bid invitations expiring this week'); } $table .= "</div>"; $adons = ''; $entity = $records['pdeid']; $this->session->set_userdata('pdeid', $entity); if ($records['usergroup'] > 0) { $level = $records['usergroup']; $this->session->set_userdata('usergroup', $records['usergroup']); // else // $datasx = $this->session->set_userdata('level','ppda'); } $entityname = $records['pdename']; $adons = date('d-m'); $level = "Procurement"; $titles = "Weekly report on expiring IFBs of " . $entityname . $adons; $body = " " . html_entity_decode($table); $permission = "view_bid_invitations"; $xcv = 0; push_permission($titles, $body, $level, $permission, $records['pdeid']); } break; default: # code... break; # exit(); } }
function monthly_procurement_reports() { check_user_access($this, 'monthly_procurement_reports', 'redirect'); $data['pdes'] = $this->db->get_where('pdes', array('isactive' => 'Y', 'status' => 'in'))->result_array(); $data['pdes'] = array_merge(array(array('pdeid' => 'ALL', 'pdename' => 'View All')), $data['pdes']); $data['financial_years'] = $this->financial_years; //if form is posted if ($this->input->post('generate_report')) { //print_array($_POST); /* * [report_type] => [pde] => [financial_year] => [from_date] => [to_date] => [generate_report] => view-report ) */ //derive financial year if ($this->input->post('financial_year')) { $data['financial_year'] = $this->input->post('financial_year'); } else { //if no financial is chosen assume current year $data['financial_year'] = date('Y') . '-' . (date('Y') + 1); } $config = array(array('field' => 'report_type', 'label' => 'Report type', 'rules' => 'required')); $this->form_validation->set_rules($config); if ($this->form_validation->run() == FALSE) { $data['errors'] = validation_errors(); } else { //PRELIMINARY CALCULATIONS //if a report type is chosen $data['all_post_params'] = $_POST; //determine selected pde if ($this->session->userdata('isadmin') == 'Y') { //if admin has selected pde if ($this->input->post('pde')) { $data['selected_pde'] = $this->input->post('pde'); } else { //if no pde is selected $data['selected_pde'] = ''; } } else { //for regular users pde is derived from session $data['selected_pde'] = $this->session->userdata('pdeid'); } //handling date ranges //if from is chosen if ($this->input->post('from_date') && !$this->input->post('to_date')) { $data['errors'] = 'Select an end date range'; } if ($this->input->post('to_date') && !$this->input->post('from_date')) { $data['errors'] = 'Select a start date range'; } //if both date ranges are selected if ($this->input->post('to_date') && $this->input->post('from_date')) { //ensure that end date is not greater than start range if (strtotime($this->input->post('to_date')) < $this->input->post('to_date')) { $data['errors'] = 'End date range can not be less that start date range'; } else { $data['from_date'] = $this->input->post('from_date'); $data['to_date'] = $this->input->post('to_date'); } } $from = $this->input->post('from_date'); $to = $this->input->post('to_date'); //SWITCH BY SELECTED REPORT TYPE switch ($this->input->post('report_type')) { //case of contracts awarded except micro procurement case 'contracts_awarded': $micro_procurement_limit = 5000000; $data['notes'] = 'Only contracts whose value is above <b><small>UGX</small> ' . number_format($micro_procurement_limit) . '</b> were considered'; $data['page_title'] = 'Contracts Awarded (except Micro Procurement) '; $data['report_heading'] = $data['page_title']; $data['reporting_period'] = '<b>' . custom_date_format('d M, Y', $from) . '</b>  <i> to </i> <b>    ' . custom_date_format('d M, Y', $to) . '</b>'; $data['current_menu'] = 'monthly_procurement_reports'; $data['view_data']['form_title'] = $data['page_title']; $data['report_view'] = 'reports/monthly_procurement_reports/contracts_awarded_v'; //results depending on who is logged in //get_contracts_awarded_except_micro_procurements($from,$to,$pde='',$micro_limit) if ($this->session->userdata('isadmin') == 'Y') { //if admin has selected pde if ($this->input->post('pde')) { $data['selected_pde'] = $this->input->post('pde'); } else { //if no pde is selected $data['selected_pde'] = ''; } $pde = $this->input->post('pde'); $data['results'] = $this->contracts_m->get_contracts_awarded_except_micro_procurements($from, $to, $pde, $micro_procurement_limit); $data['all_contracts'] = $this->contracts_m->get_contracts_all_awarded($from, $to, $pde); } else { $data['selected_pde'] = $this->session->userdata('pdeid'); //for regular users pde is derived from session $pde = $this->session->userdata('pdeid'); $data['results'] = $this->contracts_m->get_contracts_awarded_except_micro_procurements($from, $to, $pde, $micro_procurement_limit); $data['all_contracts'] = $this->contracts_m->get_contracts_all_awarded($from, $to, $pde); } break; //case of contracts awarded except micro procurement //case of contracts awarded except micro procurement case 'micro_procurements': $micro_procurement_limit = 5000000; $data['notes'] = 'Only contracts whose value is below <b><small>UGX</small> ' . number_format($micro_procurement_limit) . '</b> were considered'; $data['page_title'] = 'Report On Micro Procurements '; $data['report_heading'] = $data['page_title']; $data['reporting_period'] = '<b>' . custom_date_format('d M, Y', $from) . '</b>  <i> to </i> <b>    ' . custom_date_format('d M, Y', $to) . '</b>'; $data['current_menu'] = 'monthly_procurement_reports'; $data['view_data']['form_title'] = $data['page_title']; $data['report_view'] = 'reports/monthly_procurement_reports/micro_procurements_v'; //results depending on who is logged in //get_contracts_awarded_except_micro_procurements($from,$to,$pde='',$micro_limit) if ($this->session->userdata('isadmin') == 'Y') { //if admin has selected pde if ($this->input->post('pde')) { $data['selected_pde'] = $this->input->post('pde'); } else { //if no pde is selected $data['selected_pde'] = ''; } $pde = $this->input->post('pde'); $data['results'] = $this->contracts_m->get_contracts_awarded_only_micro_procurements($from, $to, $pde, $micro_procurement_limit); $data['all_contracts'] = $this->contracts_m->get_contracts_all_awarded($from, $to, $pde); } else { $data['selected_pde'] = $this->session->userdata('pdeid'); //for regular users pde is derived from session $pde = $this->session->userdata('pdeid'); $data['results'] = $this->contracts_m->get_contracts_awarded_only_micro_procurements($from, $to, $pde, $micro_procurement_limit); $data['all_contracts'] = $this->contracts_m->get_contracts_all_awarded($from, $to, $pde); } break; //case of contracts awarded except micro procurement //case of contracts awarded except micro procurement case 'contracts_completed': $data['notes'] = 'Only awarded contracts whose <b>Actual date of completion less than today <span>' . date('d.F.Y', now()) . '</span></b> were considered'; $data['page_title'] = 'Contracts Completed '; $data['report_heading'] = $data['page_title']; $data['reporting_period'] = '<b>' . custom_date_format('d M, Y', $from) . '</b>  <i> to </i> <b>    ' . custom_date_format('d M, Y', $to) . '</b>'; $data['current_menu'] = 'monthly_procurement_reports'; $data['view_data']['form_title'] = $data['page_title']; $data['report_view'] = 'reports/monthly_procurement_reports/contracts_completed_v'; //results depending on who is logged in //get_contracts_awarded_except_micro_procurements($from,$to,$pde='',$micro_limit) if ($this->session->userdata('isadmin') == 'Y') { //if admin has selected pde if ($this->input->post('pde')) { $data['selected_pde'] = $this->input->post('pde'); } else { //if no pde is selected $data['selected_pde'] = ''; } $pde = $this->input->post('pde'); $data['results'] = $this->contracts_m->get_completed_contracts($from, $to, $pde); $data['all_contracts'] = $this->contracts_m->get_contracts_all_awarded($from, $to, $pde); } else { $data['selected_pde'] = $this->session->userdata('pdeid'); //for regular users pde is derived from session $pde = $this->session->userdata('pdeid'); $data['results'] = $this->contracts_m->get_completed_contracts($from, $to, $pde); $data['all_contracts'] = $this->contracts_m->get_contracts_all_awarded($from, $to, $pde); } break; default: $data['page_title'] = 'Monthly Report On Procurement '; $data['current_menu'] = 'monthly_procurement_reports'; $data['view_data']['form_title'] = $data['page_title']; $data['report_view'] = 'reports/monthly_procurement_reports/monthly_procurement_reports_home_v'; } } } else { //by default show splash page $data['page_title'] = 'Monthly Report On Procurement '; $data['current_menu'] = 'monthly_procurement_reports'; $data['view_data']['form_title'] = $data['page_title']; $data['report_view'] = 'reports/monthly_procurement_reports/monthly_procurement_reports_home_v'; } $data['report_form'] = 'reports/monthly_procurement_reports/forms/monthly_procurement_reports_f'; $data['view_to_load'] = 'reports/monthly_procurement_reports/monthly_procurement_reports_v'; $this->load->view('dashboard_v', $data); }
$dsremaing = $days_remaining / (60 * 60 * 24); if ($dsremaing < 0) { echo "expired by " . ltrim($dsremaing, '-') . " days"; } else { if ($dsremaing == 0) { echo "Expring today"; } else { echo $dsremaing; } } ?> </td> <td> <?php echo custom_date_format('d M, Y', $value['dateadded']); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <!-- end --> </div>
<div class="col-md-2"> <b>BEB Price </b> </div> </div><hr>'; #print_r($page_list['page_list']); foreach ($page_list['page_list'] as $row) { $expirydate = date("d M, Y", strtotime($row['dateadded']) + 60 * 60 * 24 * 10); $todaydate = date("d M Y"); $status = $row['isreviewed']; if (strtotime($expirydate) < strtotime($todaydate)) { if ($status == 'N') { continue; } } print '<div class="row col-md-13">' . '<div class="col-md-1">' . custom_date_format('d M, Y', $row['dateadded']) . '</div>' . '<div class="col-md-2 procurement_pde"> ' . $row['pdename'] . ' </div>' . '<div class="col-md-2">' . $row['procurement_ref_no'] . '</div>' . '<div class="col-md-2 procurement_pde">'; # $row['providernames'] if (strpos($row['providernames'], ",") !== false || preg_match('/[0-9]+/', $row['providernames'])) { $label = ''; $providers = rtrim($row['providernames'], ","); $rows = mysql_query("SELECT * FROM `providers` where providerid in ({$providers}) ") or die("" . mysql_error()); $provider = ""; $x = 0; $xl = 0; while ($vaue = mysql_fetch_array($rows)) { $x++; if (mysql_num_rows($rows) > 1) { $lead = ''; #print_r($provider_array); if ($row['providerlead'] == $vaue['providerid']) { $lead = ' <span class="label" title="Project Lead " style="cursor:pointer;background:#fff;color:orange;padding:0px;margin:0px; margin-left:-15px; font-size:18px; " >*</span>';
</td> <td><?php echo $row['subject_of_procurement']; ?> </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>
$table_HTML .= '<table width="100%" cellspacing="0" cellpadding="5">' . '<thead>' . '<tr>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">#</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">PDE Name</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Financial Year</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Procurement Ref. No</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Invitation to bid date</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Actual IFB date</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Days delayed</th>' . '</tr>' . '</thead>' . '</tbody>'; $count = 0; foreach ($page_list as $row) { $table_HTML .= '<tr>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . ++$count . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['pdename'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['financial_year'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['procurement_ref_no'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['bid_issue_date']) . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['days_delayed'] . '</td>' . '</tr>'; } $table_HTML .= '</tbody></table>'; } elseif (!empty($formdata)) { $table_HTML .= format_notice('Your search criteria does not match any results'); } } else { if (!empty($area) && $area == 'invitation_for_bids_reports') { if (!empty($page_list)) { $table_HTML .= "<table width='100%' border=0 cellpadding=5>\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t<td nowrap><strong>IFB report</strong></td>\n\t\t\t\t\t\t\t<td rowspan='3'>" . "</td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t</table>"; $table_HTML .= '<table width="100%" cellspacing="0" cellpadding="5">' . '<thead>' . '<tr>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">PDE Name</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Financial Year</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Procurement ref. no.</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Subject of procurement</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">IFB Date</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">Bid submission dead line</th>' . '<th style="font-size: 12px; vertical-align:middle; text-align: left; border-bottom: 2px solid #000; padding-bottom:5px;font-family: Calibri, arial, sans-serif;">No. of bids</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($page_list as $row) { $table_HTML .= '<tr>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['pdename'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['financial_year'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['procurement_ref_no'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['subject_of_procurement'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['bid_submission_deadline']) . ' at ' . custom_date_format('h:i A', $row['bid_submission_deadline']) . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['numOfBids'] . '</td>' . '</tr>'; } $table_HTML .= '</tbody></table>'; } elseif (!empty($formdata)) { $table_HTML .= format_notice('Your search criteria does not match any results'); } } else { if (!empty($area) && $area == 'procurement_record_details') { if (!empty($procurement_details)) { $table_HTML .= '<div class="control-group">' . '<label class="control-label">Financial year:</label>' . '<div class="controls">' . (!empty($procurement_details['financial_year']) ? $procurement_details['financial_year'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[financial_year]" value="' . $procurement_details['financial_year'] . '" />' . '</div>' . '</div>' . '<div class="control-group">' . '<label class="control-label">Type of procurement:</label>' . '<div class="controls">' . (!empty($procurement_details['procurement_type']) ? $procurement_details['procurement_type'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[procurement_type]" value="' . $procurement_details['procurement_type'] . '" />' . '</div>' . '</div>' . '<div class="control-group">' . '<label class="control-label">Method of procurement:</label>' . '<div class="controls">' . (!empty($procurement_details['procurement_method']) ? $procurement_details['procurement_method'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[procurement_method]" value="' . $procurement_details['procurement_method'] . '" />' . '</div>' . '</div>' . '<input type="hidden" name="proc_no" value="' . encryptValue($procurement_details['procurement_id']) . '" />' . '<div class="control-group">' . '<label class="control-label">Subject of procurement:</label>' . '<div class="controls">' . (!empty($procurement_details['subject_of_procurement']) ? $procurement_details['subject_of_procurement'] : '<i>undefined</i>') . '</div>' . '</div>' . '<div class="control-group">' . '<label class="control-label">Source of funding:</label>' . '<div class="controls">' . (!empty($procurement_details['funding_source']) ? $procurement_details['funding_source'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[funding_source]" value="' . $procurement_details['funding_source'] . '"/>' . '</div>' . '</div>'; } else { $table_HTML .= format_notice("ERROR: Could not find the procurement record details."); } } else { if (!empty($area) && $area == 'pde_list') { # print_r($page_list);
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> <div style="margin-left: 24px;" class="card "> <div class="card-body text-default-light"> <div class="text-divider hidden-md hidden-lg"><span>Email</span></div> <p> <a class="btn ink-reaction btn-floating-action btn-primary" href="<?= base_url() . $this->uri->segment(1) . '/admin_sitemail' ?>"><i class="md md-list"></i></a> </p> <?php foreach($mail_details as $row){ $subject=$row['subject']; $sender=$row['sender_name']; $send_date=custom_date_format('d / F / Y',$row['dateadded']); $content=html_entity_decode($row['content']); } ?> <h1 class="no-margin"><?=ucwords($subject)?></h1> <div class="btn-group stick-top-right"> <a href="<?= base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/reply/' . $this->uri->segment(4) ?>" class="btn btn-icon-toggle btn-default"><i class="md md-reply"></i></a> </div> <span class="pull-right text-default-light"><?=$send_date?></span> <strong><?=$sender?></strong> <hr/> <?=$content?> </div><!--end .card-body -->
</td> <td><?php echo get_procurement_type_info_by_id($row['procurement_type'], 'title'); ?> </td> <td><?php echo get_beb_by_bid($row['bidinvitation_id'], 'title'); ?> </td> <td><?php echo custom_date_format('d.F.Y', $row['dateofconfirmationoffunds']); ?> </td> <td> <?php echo custom_date_format('d.F.Y', $row['date_signed']); ?> </td> <td><?php echo my_date_diff($row['dateofconfirmationoffunds'], $row['date_signed']); ?> </td> <td style="text-align: right;"><?php echo number_format($row['estimated_amount']); ?> </td> <td style="text-align: right;"><?php echo number_format($row['amount'] * $row['xrate']); ?>
</script><div class="widget"> <div class="widget-title"> <h4><i class="fa fa-reorder"></i> Manage user groups</h4> <span class="tools"> <a href="javascript:;" class="fa fa-chevron-down"></a> <a href="javascript:;" class="fa fa-remove"></a> </span> </div> <div class="widget-body" id="results"> <?php if (!empty($page_list)) { print '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="50px"></th>' . '<th>User group</th>' . '<th class="hidden-480">No. of Members</th>' . '<th class="hidden-480">Author</th>' . '<th class="hidden-480">Date added</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($page_list as $row) { $delete_str = $edit_str = ''; if ($row['usergroupid'] != 14) { $delete_str = '<a title="Delete user group" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'admin/delete_user_group/i/' . encryptValue($row['usergroupid']) . '\', \'Are you sure you want to delete this user group?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="fa fa-trash"></i></a>'; $edit_str = '<a title="Edit user group details" href="' . base_url() . 'admin/user_group_form/i/' . encryptValue($row['usergroupid']) . '"><i class="fa fa-edit"></i></a>'; } $permissions_str = '<a title="View user group permissions" href="' . base_url() . 'admin/user_group_permissions/i/' . encryptValue($row['usergroupid']) . '"><i class="fa fa-lock"></i></a>'; print '<tr>' . '<td>' . $delete_str . ' ' . $edit_str . ' ' . $permissions_str . '</td>' . '<td>' . $row['groupname'] . '</td>' . '<td>' . $row['numOfUsers'] . '</td>' . '<td>' . $row['authorname'] . '</td>' . '<td>' . custom_date_format('d M, Y', $row['dateadded']) . '</td>' . '</tr>'; } print '</tbody></table>'; } else { print format_notice('WARNING: No user groups have been added to the system'); } ?> </div> </div>
$status_str = ''; $completion_str = ''; if (!empty($row['actual_completion_date']) && str_replace('-', '', $row['actual_completion_date']) > 0) { $status_str = '<span class="label label-success label-mini">Completed</span>'; $completion_str = '<a title="Click to view contract completion details" href="' . base_url() . 'contracts/contract_completion_form/c/' . encryptValue($row['id']) . '/v/' . encryptValue('view') . '"><i class="fa fa-eye"></i></a>'; } else { $status_str = '<span class="label label-warning label-mini">Awarded</span>'; $completion_str = '<a title="Click to enter contract completion details"" href="' . base_url() . 'contracts/contract_completion_form/c/' . encryptValue($row['id']) . '"><i class="fa fa-check"></i></a>'; } $termintate_str = '<a href="#"><i class="fa fa-times-circle"></i></a>'; $more_actions = '<div class="btn-group" style="font-size:10px"> <a href="#" class="btn btn-primary">more</a><a href="javascript:void(0);" data-toggle="dropdown" class="btn btn-primary dropdown-toggle"><span class="fa fa-caret-down"></span></a> <ul class="dropdown-menu"> <li><a href="#"><i class="fa fa-times-circle"></i></a></li> <li class="divider"></li> <li>' . $completion_str . '</li> </ul> </div>'; print '<tr>' . '<td>'; if ($this->session->userdata('isadmin') == 'N') { print $delete_str . ' ' . $edit_str . ' ' . $termintate_str . ' ' . $completion_str; } print ' </td>' . '<td>' . custom_date_format('d M, Y', $row['date_signed']) . '</td>' . '<td>' . format_to_length($row['procurement_ref_no'], 30) . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 30) . '</td>' . '<td>' . $status_str . '</td>' . '<td style="text-align:right; font-family:Georgia; font-size:14px">' . addCommas($row['total_price'], 0) . '</td>' . '<td>' . custom_date_format('d M, Y', $row['dateadded']) . ' by ' . format_to_length($row['authorname'], 10) . '</td>' . '</tr>'; } print '</tbody></table>'; } else { print format_notice('WARNING: No contracts have been signed in the system'); } ?> </div> </div>
if ($this->session->userdata('isadmin') == 'Y') { ?> <td> <?php echo get_pde_info_by_id($row['pdeid'], 'title'); ?> </td> <?php } ?> <td> <?php echo custom_date_format('d.F.Y', $row['actual_completion_date']); ?> </td> <td> <?php echo $row['total_actual_payments']; ?> </td> <td> <?php echo $row['amount']; ?> </td>
function weeklybebreport($level) { switch ($level) { case 'ppda': # code... //fetch beb weekly report :: $urldata = $this->uri->uri_to_assoc(3, array('m')); # Pick all assigned data $data = assign_to_data($urldata); $searchstring = ''; $querys = $this->db->query("select distinct b.pdeid,b.pdename,a.* from pdes b inner join users a on a.pde = b.pdeid ")->result_array(); foreach($querys as $row => $records ) { #get the PDE ID " Idividual Pde Ids ";" $searchstring = ' AND a.pde_id='. $records['pdeid'] .' AND ( bestevaluatedbidder.beb_expiry_date > DATE_SUB(NOW() - INTERVAL 7 DAY , INTERVAL 1 WEEK) AND bestevaluatedbidder.beb_expiry_date <= CURDATE() ) '; $query = $this->Query_reader->get_query_by_code('fetchbebs', array('SEARCHSTRING' => $searchstring.' and bestevaluatedbidder.ispublished = "Y" and receipts.beb="Y" order by bestevaluatedbidder.dateadded DESC','limittext'=>'')); # print_r($query); # exit(); $result = $this ->db->query($query)->result_array(); if(!empty($result)) { $st = ' <table><tr> <th> <b>Date Posted</b> </th> <th > <b>Procuring/Disposing Entity</b></th> <th> <b>Procurement Reference Number</b> </th> <th> <b>Selected Provider</b> </th> <th > <b>Subject </b> </th> <th> <b>Date BEB Expires</b> </th> <th > <b>Status</b> </th><th> <b>BEB Price </b></th> </tr>'; foreach ($result as $key => $row) { # code... $st .= '<tr><td >'. custom_date_format('d M, Y', $row['dateadded']). '</td> <td class="col-md-2">'.$row['pdename']. '</td><td class="col-md-2">'.$row['procurement_ref_no']. ' </td> <td class="col-md-2">'; if(((strpos($row['providernames'] ,",")!== false)) || (preg_match('/[0-9]+/', $row['providernames'] ))) { $label = ''; $providers = rtrim($row['providernames'],","); $rows= mysql_query("SELECT * FROM `providers` where providerid in ($providers) ") or die("".mysql_error()); $provider = ""; $x = 0; $xl = 0; while($vaue = mysql_fetch_array($rows)) { $x ++; if(mysql_num_rows($rows) > 1) { $lead = ''; #print_r($provider_array); if ($row['providerlead'] == $vaue['providerid']) { $lead = ' <span class="label" title="Project Lead " style="cursor:pointer;background:#fff;color:orange;padding:0px;margin:0px; margin-left:-15px; font-size:18px; " >*</span>'; #break; } else{ $lead = ''; } $provider .= "<li>"; $provider .= strpos($vaue['providernames'] ,"0") !== false ? '' : $lead.$vaue['providernames']; $provider .= "</li>"; }else{ $provider .=strpos($vaue['providernames'] ,"0") !== false ? '' : $vaue['providernames']; } } if(mysql_num_rows($rows) > 1){ $provider .= "</ul>";} else{ $provider = rtrim($provider,' ,'); } if($x > 1) $label = '<span class="label label-info">Joint Venture</span>'; $st .=$provider.' '.$label; $x = 0 ; $label = ''; } else{ $st .=$row['providernames'];} $st .= '</td> <td class="col-md-1">'.$row['subject_of_procurement']. ' </td> <td class="col-md-1">'; $st .= $row['beb_expiry_date']. // date("d M, Y",strtotime($row['beb_expiry_date'])). '</td> <td class="col-md-1">'; switch($row['isreviewed']) { case 'Y': $st .=" <span class='label label-info '> For Admin Review </span> <br/> <span class='label label-success'>".$row['review_level']." </span> <br/>"; # print "<span class='label label-info'".$row['review_level']."</span>"; //class="label label-info" break; case 'N': $st .=" <span class='btn btn-xs btn-success'> Active </span>"; break; default: $st .="-"; break; } $st .= '</td> <td class="col-md-2">'; $readout = mysql_query("SELECT * FROM readoutprices WHERE receiptid=".$row['receiptid'].""); if(mysql_num_rows($readout) > 0 ) { $st .="<ul>"; while ( $valsue = mysql_fetch_array($readout)) { if($valsue['readoutprice']<=0) continue; # code... $st .= "<li>".number_format($valsue['readoutprice']).$valsue['currence']."</li>"; } $st .= "</ul>"; } $st .= ' </td> </tr>'; } $st .='</table></div>'; print_r($st); //push notificationss :: $entity = $records['pdeid']; $this->session->set_userdata('pdeid',$entity); if($records['usergroup'] > 0){ $level =$records['usergroup']; $this->session->set_userdata('usergroup',$records['usergroup']); // else // $datasx = $this->session->set_userdata('level','ppda'); } $entityname = $records['pdename']; $adons = date('d-m'); $level = "Procurement"; $titles = "Weekly report on expiring Best Evaluated Bidders of ".$entityname.$adons; $body = " ".html_entity_decode($st); $permission = "view_bid_invitations"; $xcv = 0; push_permission($titles,$body,$level,$permission,$records['pdeid']); } else { } // print_r($result); } break; default: # code... break; } }
?> </select> </div> </div> <div class="control-group"> <label class="control-label">Date of actual completion:<span>*</span></label> <div class="controls"> <div class="input-append date date-picker" data-date="<?php echo !empty($formdata['actual_completion_date']) && str_replace('-', '', $formdata['actual_completion_date']) > 0 ? custom_date_format('Y-m-d', $formdata['actual_completion_date']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days"> <input name="actual_completion_date" data-date="<?php echo !empty($formdata['actual_completion_date']) && str_replace('-', '', $formdata['actual_completion_date']) > 0 ? custom_date_format('Y-m-d', $formdata['actual_completion_date']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days" class="m-ctrl-medium date-picker" type="text" value="<?php echo !empty($formdata['actual_completion_date']) && str_replace('-', '', $formdata['actual_completion_date']) > 0 ? custom_date_format('Y-m-d', $formdata['actual_completion_date']) : ''; ?> "> <span class="add-on"> <i class="fa fa-calendar"></i> </span> </div> </div> </div> <div class="control-group"> <label class="control-label">Performance rating of provider:<span>*</span></label> <div class="controls"> <input required="" value="<?php if (!empty($formdata['performance_rating'])) { echo $formdata['performance_rating']; }
<div class="control-group <?php echo in_array('cc_approval_date', $requiredfields) ? 'error' : ''; ?> "> <label class="control-label">Contract Committee approval date:</label> <div class="controls"> <div class="input-append date date-picker" data-date="<?php echo !empty($formdata['cc_approval_date']) && str_replace('-', '', $formdata['cc_approval_date']) > 0 ? custom_date_format('Y-m-d', $formdata['cc_approval_date']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days"> <input name="cc_approval_date" data-date="<?php echo !empty($formdata['cc_approval_date']) && str_replace('-', '', $formdata['cc_approval_date']) > 0 ? custom_date_format('Y-m-d', $formdata['cc_approval_date']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days" class="m-ctrl-medium date-picker" type="text" value="<?php echo !empty($formdata['cc_approval_date']) && str_replace('-', '', $formdata['cc_approval_date']) > 0 ? custom_date_format('Y-m-d', $formdata['cc_approval_date']) : ''; ?> "> <span class="add-on"> <i class="fa fa-calendar"></i> </span> </div> </div> </div> <div class="form-actions"> <button id="approve-bid-invitation" type="submit" name="save" value="save" class="btn blue"> <i class="fa fa-ok"></i> Publish IFB </button> <button type="button" name="cancel" value="cancel" class="btn"><i class="fa fa-remove"></i> Cancel</button> </div> </form>
<div class="widget"> <div class="widget-title"> <h4><i class="icon-reorder"></i> Awarded Contracts</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a> </span> </div> <div class="widget-body" id="results"> <?php if (!empty($page_list)) { print '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="50px"></th>' . '<th>Date awarded</th>' . '<th>Procurement Ref #</th>' . '<th>Subject of procurement</th>' . '<th>Status</th>' . '<th class="hidden-480">Date added</th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($page_list as $row) { //$delete_str = '<a title="Delete contract details" href="javascript:void(0);" onclick="confirmDeleteEntity(\''.base_url().'admin/delete_user/i/'.encryptValue($row['id']).'\', \'Are you sure you want to delete this contract?\nClick OK to confirm, \nCancel to cancel this operation and stay on this page.\')"><i class="icon-trash"></i></a>'; //$edit_str = '<a title="Edit contract details" href="'. base_url() .'contracts/award_contract/i/'.encryptValue($row['id']).'"><i class="icon-edit"></i></a>'; $status_str = ''; if (!empty($row['actual_completion_date']) && str_replace('-', '', $row['actual_completion_date']) > 0) { $status_str = '<span class="label label-success label-mini">Completed</span> <a title="Click to view contract completion details" href="' . base_url() . 'contracts/contract_completion_form/c/' . encryptValue($row['id']) . '/v/' . encryptValue('view') . '">View completion details</a>'; } else { $status_str = '<span class="label label-warning label-mini">In progress</span> <a title="Click to enter contract completion details"" href="' . base_url() . 'contracts/contract_completion_form/c/' . encryptValue($row['id']) . '">Complete contract</a>'; } print '<tr>' . '<td> </td>' . '<td>' . custom_date_format('d M, Y', $row['final_award_notice_date']) . '</td>' . '<td>' . $row['procurement_ref_no'] . '</td>' . '<td>' . $row['subject_of_procurement'] . '</td>' . '<td>' . $status_str . '</td>' . '<td>' . custom_date_format('d M, Y', $row['dateawarded']) . ' by ' . $row['authorname'] . '</td>' . '</tr>'; } print '</tbody></table>'; } else { print format_notice('WARNING: No contracts have been signed in the system'); } ?> </div> </div>
?> </td> <td style="text-align: right;"><?php echo get_procurement_plan_entry_info($row['procurement_ref_id'], 'estimated_amount'); ?> </td> <td class="hidden-480"><?php echo date('d-F-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60); ?> </td> <td class="hidden-480"><?php echo custom_date_format('d-M-Y', $row['completion_date']); ?> </td> <td class="hidden-480"><?php echo (strtotime(date('d-M-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60)) - strtotime(custom_date_format('d-M-Y', $row['completion_date']))) / 86400 < 0 ? substr((strtotime(date('d-M-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60)) - strtotime(custom_date_format('d-M-Y', $row['completion_date']))) / 86400, 1) . '<span class="label label-important pull-right"> late</span>' : (strtotime(date('d-F-Y', strtotime($row['commencement_date']) + $row['days_duration'] * 24 * 60 * 60)) - strtotime(custom_date_format('d-F-Y', $row['completion_date']))) / 86400 . ' <span class="label label-success pull-right"> early</span>'; ?> </td> </tr> <?php } } ?> </tbody> </table> <?php } } else {
<div class="widget"> <div class="widget-title"> <h4><i class="icon-reorder"></i> Manage addenda</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a> </span> </div> <div class="widget-body" id="results"> <?php if (!empty($page_list)) { print '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th width="5%"></th>' . '<th>Financial year</th>' . '<th>Procurement Ref. No</th>' . '<th class="hidden-480">Procurement subject</th>' . '<th class="hidden-480">Addenda title</th>' . '<th class="hidden-480">Author</th>' . '<th class="hidden-480">Date added</th>' . '<th></th>' . '</tr>' . '</thead>' . '</tbody>'; foreach ($page_list as $row) { $delete_str = '<a title="Delete addenda" href="javascript:void(0);" onclick="confirmDeleteEntity(\'' . base_url() . 'bids/delete_addenda/b/' . encryptValue($row['bidid']) . '/i/' . encryptValue($row['addenda_id']) . '\', \'Are you sure you want to delete this addenda?\\nClick OK to confirm, \\nCancel to cancel this operation and stay on this page.\')"><i class="fa fa-trash"></i></a>'; $edit_str = '<a title="Edit addenda details" href="' . base_url() . 'bids/load_ifb_addenda_form/i/' . encryptValue($row['addenda_id']) . '/b/' . encryptValue($row['bidid']) . '"><i class="fa fa-edit"></i></a>'; $addenda_url = empty($row['fileurl']) ? '<i>N/A</i>' : '<a target="_new" href="' . base_url() . 'uploads/documents/addenda/' . $row['fileurl'] . '">Download current file</a>'; print '<tr>' . '<td>' . $delete_str . ' ' . $edit_str . '</td>' . '<td>' . $row['financial_year'] . '</td>' . '<td>' . $row['procurement_ref_no'] . '</td>' . '<td>' . format_to_length($row['subject_of_procurement'], 50) . '</td>' . '<td>' . format_to_length($row['title'], 50) . '</td>' . '<td>' . $row['authorname'] . '</td>' . '<td>' . custom_date_format('d M, Y', $row['dateadded']) . '</td>' . '<td>' . $addenda_url . '</td>' . '</tr>'; } print '</tbody></table>'; print '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "bids/manage_bid_invitations/p/%d") . '</div>'; } else { print format_notice('WARNING: No addenda has been added for the selected IFB. Click <i><a title="view IFB document" href="' . base_url() . 'bids/load_ifb_addenda_form/b/' . $b . '">here</a></i> to add an addendum'); } ?> </div> </div>
?> " /> <span class="add-on"><i class="icon-calendar"></i></span> </div> </div> </div> <div class="form-actions"> <button type="submit" name="view" value="view-report" class="btn blue"><i class="icon-ok"></i> View report</button> <button type="submit" name="view_pdf" value="view-pdf" class="btn"><i class="icon-file"></i> View PDF</button> </div> </form> <!-- END FORM--> <div id="report-results"> <?php if (!empty($page_list)) { print '<div class="row-fluid">' . '<div class="span" style="text-align:center"><h4>' . $report_heading . '</h4></div>' . '</div>' . (!empty($sub_heading) ? '<div class="row-fluid">' . '<div class="span" style="text-align:center"><h5><i>' . $sub_heading . '</i></h5></div>' . '</div>' : '') . '<div class="row-fluid">' . '<div class="span2 pull-left" style="text-align:right; font-weight:bold">Financial year:</div>' . '<div class="span6 pull-left" style="text-align:left">' . $financial_year . '</div>' . '</div>' . (!empty($report_period) ? '<div class="row-fluid">' . '<div class="span2 pull-left" style="text-align:right; font-weight:bold">Reporting period:</div>' . '<div class="span6 pull-left" style="text-align:left">' . $report_period . '</div>' . '</div>' : ''); print '<table class="table table-striped table-hover">' . '<thead>' . '<tr>' . '<th align="left">PDE name</th>' . '<th class="hidden-480">Procurement ref. no.</th>' . '<th class="hidden-480">Subject of procurement</th>' . ($formdata['ifb_report_type'] == 'BER' ? '<th>Procurement method <br /> (Threshhold)</th>' : '') . ($formdata['ifb_report_type'] == 'PIFB' ? '<th style="text-align:right">Estimated cost(UGX)</th>' : '') . ($formdata['ifb_report_type'] == 'PIFB' ? '<th>IFB Date</th>' : '') . '<th>Bid submission dead line</th>' . ($formdata['ifb_report_type'] == 'BER' ? '<th>Bid submission duration</th>' : '') . ($formdata['ifb_report_type'] == 'PIFB' ? '<th>No. of bids received</th>' : '') . '</tr>' . '</thead>' . '</tbody>'; foreach ($page_list as $row) { print '<tr>' . '<td>' . $row['pdename'] . '</td>' . '<td>' . $row['procurement_ref_no'] . '</td>' . '<td>' . $row['subject_of_procurement'] . '</td>' . ($formdata['ifb_report_type'] == 'BER' ? '<td>' . $row['procurement_method_title'] . ' (' . $row['biddingperiod'] . ')</td>' : '') . ($formdata['ifb_report_type'] == 'PIFB' ? '<td style="text-align: right">' . (is_numeric($row['estimated_amount']) ? number_format($row['estimated_amount'] * $row['exchange_rate'], 0, '.', ',') : $row['estimated_amount']) . '</td>' : '') . ($formdata['ifb_report_type'] == 'PIFB' ? '<td style="white-space: nowrap">' . custom_date_format('d M, Y', $row['invitation_to_bid_date']) . '</td>' : '') . '<td>' . custom_date_format('d M, Y', $row['bid_submission_deadline']) . ' at ' . custom_date_format('h:i A', $row['bid_submission_deadline']) . '</td>' . ($formdata['ifb_report_type'] == 'BER' ? '<td>' . $row['proposal_submission_date_duration'] . '</td>' : '') . ($formdata['ifb_report_type'] == 'PIFB' ? '<td>' . $row['numOfBids'] . '</td>' : '') . '</tr>'; } print '</tbody></table>'; print '<div class="pagination pagination-mini pagination-centered">' . pagination($this->session->userdata('search_total_results'), $rows_per_page, $current_list_page, base_url() . "admin/manage_users/p/%d") . '</div>'; } elseif (!empty($formdata)) { print format_notice('WARNING: Your search criteria does not match any results'); } ?> </div> </div> </div>
</ul> </div> <label> <div class="col-md-3"> <a href="<?= base_url() . 'uploads/events/' . get_event_info($trend['item_id'],'image')?>" class="fancybox" title="<?= get_event_info($trend['item_id'],'title') ?>"> <img class="img-circle" width="32px" height="32px" src="<?= base_url() ?>uploads/events/<?= get_thumbnail(get_event_info($trend['item_id'],'image')) ?>"> </a> </div> <div class="col-md-9"> <span><?=get_event_info($trend['item_id'],'title')?></span><br> <small><b>From:</b> <?=custom_date_format('d / M ',$trend['start_date'])?> <br><b>To:</b> <?=custom_date_format('d / M ',$trend['end_date'])?></small> </div> </label> </div> </li> <?php break; } } } ?>
<div class="col-md-2"> <b>Subject Of Procurement</b> </div> <div class="col-md-2"> <b>Service Provider</b> </div> <div class="col-md-1"> </div> </div><hr>'; foreach ($page_list as $row) { #if multiple providers.. $providername = $row['providernames']; if (!empty($row['joint_venture'])) { $providername = ''; $jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = "' . $row['joint_venture'] . '"')->result_array(); if (!empty($jv_info[0]['providers'])) { $providers = $this->db->query('SELECT * FROM providers WHERE providerid IN (' . rtrim($jv_info[0]['providers'], ',') . ')')->result_array(); foreach ($providers as $provider) { $providername .= (!empty($providername) ? ', ' : '') . $provider['providernames']; } } } print '<div class="row">' . '<div class="col-md-2"><strong>' . custom_date_format('d M, Y', $row['date_signed']) . '</strong></div>' . '<div class="col-md-2 procurement_pde">' . $row['pdename'] . '</div>' . '<div class="col-md-2">' . $row['procurement_ref_no'] . '</div>' . '<div class="col-md-2 procurement_subject">' . $row['subject_of_procurement'] . '</div>' . '<div class="col-md-2 procurement_pde">' . $providername . '</div>' . '<div class="col-md-1"> <a data-toggle="modal" class="btn btn-xs btn-primary" role="button" href="' . base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/details/' . encryptValue($row['id']) . '" id="modal-703202"> Contract details</a></div>' . '</div>' . '<hr>'; } } else { print format_notice("ERROR: No contracts have been signed"); } ?> </div> </div>
#if multiple providers.. $providername = $row['providernames']; if (!empty($row['joint_venture'])) { $providername = ''; $jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = "' . $row['joint_venture'] . '"')->result_array(); if (!empty($jv_info[0]['providers'])) { $providers = $this->db->query('SELECT * FROM providers WHERE providerid IN (' . rtrim($jv_info[0]['providers'], ',') . ')')->result_array(); foreach ($providers as $provider) { $providername .= (!empty($providername) ? ', ' : '') . $provider['providernames']; } } } print '<div class="row">' . '<div class="col-md-2 procurement_pde">' . $row['pdename'] . '</div>' . '<div class="col-md-2 procurement_subject">' . $row['subject_of_procurement'] . '<br/><label class="procurement_pde">[' . $row['procurement_ref_no'] . ']</label> <br/> <a data-toggle="modal" class="btn btn-xs btn-primary" role="button" href="' . base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/details/' . encryptValue($row['id']) . '" id="modal-703202"> Contract Details</a></div>' . '<div class="col-md-2 procurement_pde">' . $providername . '</div>' . '<div class="col-md-1"><strong>' . custom_date_format('d M, Y', $row['date_signed']) . '</strong></div>' . '<div class="col-md-2"> ' . custom_date_format('d M, Y', $row['commencement_date']) . ' <br/> <b>[' . custom_date_format('d M, Y', $row['completion_date']) . ']</b>'; if (!empty($row['actual_completion_date'])) { echo "<br/><a class='btn btn-xs btn-primary' role='button' href='javascript:void(0);' style='background:#ddd;color:#000; border:none; '> Final: " . custom_date_format('d M, Y', $row['actual_completion_date']) . "</a>"; } else { } // (!empty($row['actual_completion_date'])) ? $row['actual_completion_date'] : ''. echo '</div>' . '<div class="col-md-2" style="font-family:Georgia; font-size:13px;">'; #number_format($row['id']). $query = $this->db->query("select a.amount,b.title from contract_prices a inner join currencies b on a.currency_id = b.id where a.contract_id =" . $row['id'] . " ORDER BY a.dateadded DESC ")->result_array(); #currency_id if (!empty($query)) { echo "<ul>"; foreach ($query as $key => $rowvalue) { #code... echo "<li>" . number_format($rowvalue['amount']) . " " . $rowvalue['title'] . "</li>"; } echo "</ul>"; }
?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days" placeholder="From" class="m-ctrl-medium date-picker" type="text" value="<?php echo !empty($formdata['date_posted_from']) ? custom_date_format('Y-m-d', $formdata['date_posted_from']) : ''; ?> " style="width:90px;"/> <span class="add-on"><i class="icon-calendar"></i></span> </div> <div class="input-append date date-picker col-md-6" data-date="<?php echo !empty($formdata['date_posted_to']) ? custom_date_format('Y-m-d', $formdata['bid_evaluation_to']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days"> <input name="date_posted_to" placeholder="To" data-date="<?php echo !empty($formdata['date_posted_to']) ? custom_date_format('Y-m-d', $formdata['date_posted_to']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days" class="m-ctrl-medium date-picker" type="text" value="<?php echo !empty($formdata['date_posted_to']) ? custom_date_format('Y-m-d', $formdata['date_posted_to']) : ''; ?> " style="width:90px;"/> <span class="add-on"><i class="icon-calendar"></i></span> </div> </div> </div><br/> <div class="col-md-12 "> <label class="control-label"></label> <div class="controls"> <!-- <button type="button" class="btn btn-default" type="submit">Search</button> --> <input class="btn btn-default bet" value="Search" name="search_btn" id="sumitbutton" type="submit"> </div> </div> </div>
} else { $status_str = 'IN PROGRESS'; } #if multiple providers.. $providername = $row['providernames']; if (!empty($row['joint_venture'])) { $providername = ''; $jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = "' . $row['joint_venture'] . '"')->result_array(); if (!empty($jv_info[0]['providers'])) { $providers = $this->db->query('SELECT * FROM providers WHERE providerid IN (' . rtrim($jv_info[0]['providers'], ',') . ')')->result_array(); foreach ($providers as $provider) { $providername .= (!empty($providername) ? ', ' : '') . $provider['providernames']; } } } $table_HTML .= '<tr>' . ($formdata['contracts_report_type'] == 'AC' ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['date_signed']) . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CDC', 'LC')) ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['completion_date']) . '</td>' : '') . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . format_to_length($row['pdename'], 30) . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['procurement_ref_no'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $row['subject_of_procurement'] . '</td>' . '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . $providername . '</td>' . (in_array($formdata['contracts_report_type'], array('LC')) ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . get_date_diff(empty($row['actual_completion_date']) ? date('Y-m-d') : $row['actual_completion_date'], $row['completion_date'], 'days') . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align: left; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . custom_date_format('d M, Y', $row['actual_completion_date']) . '</td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align: right; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . addCommas($row['total_amount_paid'], 0) . '</td>' : '') . '<td style="text-align: right; border-bottom: solid #000 1px; font-size:12px; font-family: Calibri, arial, sans-serif;">' . addCommas($row['total_price'], 0) . '</td>' . '</tr>'; $grand_contracts_value += $row['total_price']; $grand_total_amount_paid += $row['total_amount_paid']; } $table_HTML .= '<tr>' . ($formdata['contracts_report_type'] == 'AC' ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CDC', 'LC')) ? '<td> </td>' : '') . '<td> </td>' . '<td> </td>' . '<td> </td>' . '<td> </td>' . (in_array($formdata['contracts_report_type'], array('LC')) ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td> </td>' : '') . (in_array($formdata['contracts_report_type'], array('CC')) ? '<td style="text-align:right; font-weight:bold; font-size: 14px; font-family: Georgia">' . addCommas($grand_total_amount_paid, 0) . '</td>' : '') . '<td style="text-align:right; font-weight:bold; font-size: 16px; font-family: Georgia">' . addCommas($grand_contracts_value, 0) . '</td>' . '</tr>'; $table_HTML .= '</tbody></table>'; } elseif (!empty($formdata)) { $table_HTML .= format_notice('Your search criteria does not match any results'); } } else { if (!empty($area) && $area == 'procurement_record_details') { if (!empty($procurement_details)) { $table_HTML .= '<div class="control-group subject_of_procurement">' . '<label class="control-label">Subject of procurement:</label>' . '<div class="controls">' . (!empty($procurement_details['subject_of_procurement']) ? $procurement_details['subject_of_procurement'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[subject_of_procurement]" value="' . $procurement_details['subject_of_procurement'] . '" />' . '</div>' . '</div>' . '<div class="control-group">' . '<label class="control-label">Financial year:</label>' . '<div class="controls">' . (!empty($procurement_details['financial_year']) ? $procurement_details['financial_year'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[financial_year]" value="' . $procurement_details['financial_year'] . '" />' . '</div>' . '</div>' . '<div class="control-group">' . '<label class="control-label">Source of funding:</label>' . '<div class="controls">' . (!empty($procurement_details['funding_source']) ? $procurement_details['funding_source'] : '<i>undefined</i>') . '<input type="hidden" name="procurement_details[funding_source]" value="' . $procurement_details['funding_source'] . '"/>' . '</div>' . '</div>'; if (!empty($procurement_details['quantity'])) { $total_ifb_q = $procurement_details['quantity'] - $procurement_details['total_ifb_quantity']; $table_HTML .= '<div class="control-group">' . '<label class="control-label">Quantity:</label>' . '<div class="controls">' . (!empty($total_ifb_q) ? $total_ifb_q : '<i>undefined</i>') . '<input type="hidden" id="procurement_details_quantity" name="procurement_details_quantity" value="' . $total_ifb_q . '"/>' . '</div>' . '</div>';
function to_date_picker_format($date) { return custom_date_format('m/d/Y', $date); }
</tr> <tr> <td>d.</td> <td>Evaluation process</td> <td><?php echo 'From ' . custom_date_format('l, d M, Y', $formdata['bid_evaluation_from']) . ' to ' . custom_date_format('l, d M, Y', $formdata['bid_evaluation_to']); ?> </td> </tr> <tr> <td>e.</td> <td>Display and communication of best evaluated bidder notice</td> <td><?php echo custom_date_format('l, d M, Y', $formdata['display_of_beb_notice']); ?> </td> </tr> <tr> <td>f.</td> <td>Contract award and signature</td> <td><?php echo custom_date_format('l, d M, Y', $formdata['contract_award_date']); ?> </td> </tr> </table> </ul> </div> </div> </div> </div>
?> </td> <td class="hidden-480"><?php echo get_procurement_plan_entry_info($row['procurement_id'], 'title'); ?> </td> <td class="hidden-480"><?php echo number_format(get_procurement_plan_entry_info($row['procurement_id'], 'estimated_amount')); ?> </td> <td><?php echo custom_date_format('d-M-Y', $row['invitation_to_bid_date']); ?> </td> <td><?php echo custom_date_format('d-M-Y', $row['bid_submission_deadline']); ?> </td> </tr> <?php } ?> </tbody> </table> </p> <p>
</div> <!-- end of validity period --> <!-- bid validity period --> <div class="control-group bidvalidatey hidden"> <label class="control-label"> Date </label> <div class="controls"> <div class="input-append date date-picker" data-date="<?php echo !empty($formdata['bidvalidtity']) ? custom_date_format('Y-m-d', $formdata['bidvalidtity']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days"> <input name="bidvalidtity" data-date="<?php echo !empty($formdata['bidvalidtity']) ? custom_date_format('Y-m-d', $formdata['bidvalidtity']) : date('Y-m-d'); ?> " data-date-format="yyyy-mm-dd" data-date-viewmode="days" class=" m-ctrl-medium date-picker" type="text" value="<?php echo !empty($formdata['bidvalidtity']) ? custom_date_format('Y-m-d', $formdata['bidvalidtity']) : ''; ?> " /> <span class="add-on"><i class="fa fa-calendar"></i></span> </div> <!-- <input name="bidvalidtity" placeholder="Days" class="input-large" value="0" type="text" /> --> </div> </div> <!-- end of validity period --> <div class="form-actions"> <button type="button" name="cancel" value="cancel" class="btn"><i class="fa fa-remove"></i> Cancel</button> <button type="submit" name="save" value="save" class="btn blue"><i class="fa fa-ok"></i> Save</button>