public function get_record_list() { $CI =& get_instance(); $CI->db->from($CI->config->item('table_product_assign') . ' pa'); $CI->db->select('pa.id,pa.received_by,pa.status,pa.assign_date,pa.return_date,pa.remarks,user.name_en user_name,product.product_name,received_by.name_en receiver_name'); $CI->db->join($CI->config->item('table_users') . ' user', 'user.id = pa.user_id', 'LEFT'); $CI->db->join($CI->config->item('table_users') . ' received_by', 'received_by.id = pa.received_by', 'LEFT'); $CI->db->join($CI->config->item('table_product') . ' product', 'product.id = pa.product_id', 'LEFT'); $CI->db->where('pa.status = 1'); $results = $this->db->get()->result_array(); foreach ($results as &$result) { $result['edit_link'] = $CI->get_encoded_url('asset_management/product_assign/index/edit/' . $result['id']); $result['assign_date'] = System_helper::display_date($result['assign_date']); $result['return_date'] = System_helper::display_date($result['return_date']); if ($result['status'] == $this->config->item('STATUS_ACTIVE')) { $result['status_text'] = $CI->lang->line('ACTIVE'); } else { if ($result['status'] == $this->config->item('STATUS_INACTIVE')) { $result['status_text'] = $CI->lang->line('INACTIVE'); } else { $result['status_text'] = $result['status']; } } } return $results; }
public function get_product_name($str) { $CI =& get_instance(); //$this->db->select('*'); $CI->db->from($CI->config->item('table_product')); $this->db->like('product_name', $str, 'after'); // $CI->db->where(); $CI->db->select("CONCAT(product_name, '.',product_code) as label", FALSE); $CI->db->select('product_name as product_name,product_code as product_code,serial_number as serial_numb,unit_price as unit_price,model_no as model_no,warranty_start_date as warranty_start_date,warranty_end_date as warranty_end_date,condition as status'); $results = $this->db->get()->result_array(); foreach ($results as &$val) { if ($val['status'] == 0) { $val['status'] = "সক্রিয়"; } else { $val['status'] = "ত্রুটিপূর্ণ"; } if ($val['warranty_start_date'] > 0) { $val['warranty_start_date'] = System_helper::display_date($val['warranty_start_date']); } if ($val['warranty_end_date'] > 0) { $val['warranty_end_date'] = System_helper::display_date($val['warranty_end_date']); } } return $results; }
" class="form-control"> </div> </div> <div class="form-group has-success row"> <div class="col-lg-4"> <label class="control-label bold" for="purchase_order_no"><?php echo $CI->lang->line('PURCHASE_DATE'); ?> </label> </div> <div class="col-lg-8"> <input type="text" name="product[purchase_date]" value="<?php echo System_helper::display_date($product['purchase_date']); ?> " placeholder="<?php echo $CI->lang->line('PURCHASE_DATE'); ?> " class="form-control date-picker"> </div> </div> <div class="form-group has-success row"> <div class="col-lg-4"> <label class="control-label bold"><?php echo $CI->lang->line('OTHERS'); ?>
<td><?php echo $product['contact_person']; ?> </td> <td><?php echo $product['contact_person_phone']; ?> </td> <td><?php echo System_helper::display_date($product['purchase_date']); ?> </td> <td><?php echo System_helper::display_date($product['warranty_end_date']); ?> </td> <td><?php echo $product['condition'] ? 'ত্রুটিপূর্ণ' : 'ভাল'; ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div>
?> </td> <td><?php echo $product->product_code; ?> </td> <td><?php echo System_helper::display_date($product->warranty_end_date); ?> </td> <td><?php echo System_helper::display_date($product->assign_date); ?> </td> <td><?php echo System_helper::display_date($product->return_date); ?> </td> <td><button type="button" class="btn btn-success" onclick="deleteIt(<?php echo $product->product_id; ?> ,this)">প্রোডাক্টটি ফেরত নিন</button> <button type="button" class="btn btn-danger" onclick="rejectProduct(<?php echo $product->product_id; ?> ,this)">বাতিল করুন</button></td> </tr> <?php }
</b>:<?php echo " " . $product_info['warehouse_name']; ?> </p> <p><b><?php echo $CI->lang->line('WARRANTY_START_DATE'); ?> </b>:<?php echo " " . System_helper::display_date($product_info['warranty_start_date']); ?> </p> <p><b><?php echo $CI->lang->line('WARRANTY_END_DATE'); ?> </b>:<?php echo " " . System_helper::display_date($product_info['warranty_end_date']); ?> </p> <p><b><?php echo $CI->lang->line('STATUS'); ?> </b>:<?php echo " "; if ($product_info['condition'] == 0) { echo "ভাল"; } else { echo 'ত্রুটিপূর্ণ'; } ?> </p> <hr/>
?> </td> <td><?php echo System_helper::display_date($product['purchase_date']); ?> </td> <td><?php echo $product['username']; ?> </td> <td><?php echo System_helper::display_date($product['create_date']); ?> </td> <td><?php echo System_helper::display_date($product['update_date']); ?> </td> <td><?php echo $product['condition'] ? 'ত্রুটিপূর্ণ' : 'ভাল'; ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div>
echo $ticket['product_name']; ?> </td> <td><?php echo $ticket['user_name']; ?> </td> <td title="<?php echo $ticket['ticket_issue_description']; ?> "><?php echo $ticket['ticket_issue_description']; ?> </td> <td><?php echo System_helper::display_date($ticket['create_date']); ?> </td> <td> <?php if ($ticket['status'] == $this->config->item('STATUS_INACTIVE')) { echo $CI->lang->line('PENDING'); } else { if ($ticket['status'] == $this->config->item('STATUS_ACTIVE')) { echo $CI->lang->line('RESOLVE'); } else { if ($ticket['status'] == $this->config->item('STATUS_ASSIGN')) { echo $CI->lang->line('ASSIGN'); } else { if ($ticket['status'] == $this->config->item('STATUS_RESOLVE')) { echo $CI->lang->line('RESOLVE');