EVOLUTION-NINJA
Edit File: Stock_history.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class stock_history extends CI_Controller { public function __construct() { parent::__construct(); $this->check_islogin(); //check user login session exist or not $this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT'); $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); $this->output->set_header('Pragma: no-cache'); $this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); $this->load->model('yarn_model'); $this->load->model('marketing_model'); $this->load->model('planning_yarn'); $this->load->model('planning_shade'); $this->load->model('vendor_model'); $this->load->model('outsource_model'); $this->load->model('stock_model'); date_default_timezone_set('asia/kolkata'); } public function log() { echo $_REQUEST['name'];exit; echo "login"; } //Checking the Login or not private function check_islogin() { if (!$this->session->userdata('logged_in')) { redirect(base_url(), 'refresh'); } } public function session_data_pass() { if ($this->session->userdata('logged_in')) { return $this->yarn_model->get_userdata(); } } public function access_details_id() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_by=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_by); $d=$this->marketing_model->fetch_main_data($table,$where); $data['user_type_id']=$d->user_type_id; $table='swansilk_access_controls'; $where=array('department_id'=>$data['user_type_id']); return $this->marketing_model->fetch_main_data($table,$where); } public function issue_loom_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!------------------------ issue_loom ---------------------------------> if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'PPC Manager' || $data['emp_details']->designation == 'PPC Executive' ) { $d=date('d-m-Y'); $table='issue_loom'; $where=array('issued_date'=>$d,'insert_notification_status'=>0); $indent_insert_rows=$this->vendor_model->count_of_pcs($table,$where); $d=date('d-m-Y'); $table='issue_loom'; $where=array('rements_approved_date'=>$d,'update_notification_status'=>0); $indent_update_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='weaving_panel_planning_order'; $where=array('issue_approved_date'=>$d,'approval_notification_status'=>0); $indent_approval_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $indent_insert_rows=0; $indent_approval_rows=0; $indent_update_rows=0; } $r=$indent_insert_rows + $indent_approval_rows + $indent_update_rows; return $r; } public function indent_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!------------------------ indent ---------------------------------> if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'HO Purchase Admin' ) { $d=date('d-m-Y'); $table='indent_add_indent'; $where=array('indented_date'=>$d,'insert_notification_status'=>0); $indent_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='indent_add_indent'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $indent_update_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='indent_add_indent'; $where=array('approved_date'=>$d,'approval_notification_status'=>0); $indent_approval_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $indent_insert_rows=0; $indent_update_rows=0; $indent_approval_rows=0; } //<!------------------------ po ---------------------------------> if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { $d=date('d-m-Y'); $table='indent_po'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $indent_po_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $indent_po_insert_rows1=0; } if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'HO Purchase Admin' ) { $d=date('d-m-Y'); $table='indent_po'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $indent_po_update_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='indent_po'; $where=array('approved_date'=>$d,'approval_notification_status'=>0); $indent_po_approval_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $indent_po_update_rows1=0; $indent_po_approval_rows1=0; } $r=$indent_insert_rows + $indent_update_rows + $indent_approval_rows + $indent_po_insert_rows1 + $indent_po_update_rows1 + $indent_po_approval_rows1; return $r; } public function stock_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!------------------------ stock ---------------------------------> if($data['emp_details']->designation == 'PPC Manager' || $data['emp_details']->designation == 'PPC Executive' || $data['emp_details']->designation == 'ACCOUNTS' || $data['emp_details']->designation == 'Accounts') { $d=date('d-m-Y'); $table='fabric_transfer'; $where=array('transfer_date'=>$d,'insert_notification_status'=>0); $data['stoct_transfer_rows']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); $d=date('d-m-Y'); $table='swan_yarn_transfer'; $where=array('transfer_date'=>$d,'insert_notification_status'=>0); $data['stoct_transfer_rows1']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); $d=date('d-m-Y'); $table='yarn_transfer'; $where=array('transfer_date'=>$d,'insert_notification_status'=>0); $data['stoct_transfer_rows2']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); } else { $data['stoct_transfer_rows']=0; $data['stoct_transfer_rows1']=0; $data['stoct_transfer_rows2']=0; } if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { $ttt1=date('d/m/Y'); $ddd1=date('d-m-Y'); $table='fabric_inspection_details'; $where=array('received_date'=>$ttt1); $where1=array('received_date'=>$ddd1); $data['stock_split_data']=$this->vendor_model->fabric_inspection_split_count_amount_get_customerdata($table,$where,$where1); //"(status='live' OR status='dead')" $d=date('d-m-Y'); $table='cs_transfer'; $where=array('transfer_date'=>$d,'insert_notification_status'=>0); $data['stoct_transfer_rows3']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); } else { $data['stoct_transfer_rows3']=0; $data['stock_split_data']=0; } $stock=$data['stoct_transfer_rows'] + $data['stoct_transfer_rows1'] + $data['stoct_transfer_rows2'] + $data['stoct_transfer_rows3'] + $data['stock_split_data']; return $stock; } public function rec_stock_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { //<!---------------------- received stock ------------------------------> $d=date('d-m-Y'); $table='fabric_transfer'; $where=array('rec_date'=>$d,'update_notification_status'=>0); $data['rec_stoct_transfer_rows']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); $d=date('d-m-Y'); $table='swan_yarn_transfer'; $where=array('rec_date'=>$d,'update_notification_status'=>0); $data['rec_stoct_transfer_rows1']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); $d=date('d-m-Y'); $table='yarn_transfer'; $where=array('rec_date'=>$d,'update_notification_status'=>0); $data['rec_stoct_transfer_rows2']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); } else { $data['rec_stoct_transfer_rows']=0; $data['rec_stoct_transfer_rows1']=0; $data['rec_stoct_transfer_rows2']=0; } if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { $d=date('d-m-Y'); $table='cs_transfer'; $where=array('rec_date'=>$d,'update_notification_status'=>0); $data['rec_stoct_transfer_rows3']=$this->vendor_model->count_amount_notification_get_customerdata($table,$where); } else { $data['rec_stoct_transfer_rows3']=0; } //$data['total_rec_stock_notifications']=$data['rec_stoct_transfer_rows'] + $data['rec_stoct_transfer_rows1'] + $data['rec_stoct_transfer_rows2'] + $data['rec_stoct_transfer_rows3'] ; $rec_stock=$data['rec_stoct_transfer_rows'] + $data['rec_stoct_transfer_rows1'] + $data['rec_stoct_transfer_rows2'] + $data['rec_stoct_transfer_rows3']; return $rec_stock; } public function marketing_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { //<!---------------------- Marketing Module ------------------------------> $d=date('d-m-Y'); $where=$d; $data['marketing_rows']=$this->vendor_model->marketing_notification_getsuborder($where); $data['marketing_confirm_rows']=$this->vendor_model->marketing_notification_confirm_getsuborder($where); $data['marketing_update_num_rows']=$this->vendor_model->marketing_notification_update_getsuborder($where); $d=date('Y-m-d'); $where=$d; $data['marketing_on_date_rows']=$this->vendor_model->marketing_notification_delivery_date_getsuborder($where); $befdore_ten=date('Y-m-d',strtotime('+10 days')) . PHP_EOL; $data['marketing_ten_days_rows']=$this->vendor_model->marketing_notification_delivery_date_getsuborder($befdore_ten); $befdore_thirty=date('Y-m-d',strtotime('+30 days')) . PHP_EOL; $data['marketing_thirty_days_rows']=$this->vendor_model->marketing_notification_delivery_date_getsuborder($befdore_thirty); } else { $data['marketing_rows'] = 0; $data['marketing_confirm_rows'] = 0; $data['marketing_update_num_rows'] = 0; $data['marketing_on_date_rows'] = 0; $data['marketing_ten_days_rows'] = 0; $data['marketing_thirty_days_rows'] = 0; } $mark= $data['marketing_rows'] + $data['marketing_confirm_rows'] + $data['marketing_update_num_rows'] + $data['marketing_on_date_rows'] + $data['marketing_ten_days_rows'] + $data['marketing_thirty_days_rows']; return $mark; } public function issue_fabric_page_notifications() { //<!---------------------- issue fabric Module ------------------------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { $d=date('d-m-Y'); $table='fabric_addstock'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $f=$this->vendor_model->issue_fabric_count_amount_get_customerdata($table,$where); } else { $f=0; } // $mark= $data['marketing_rows'] + $data['marketing_confirm_rows'] + $data['marketing_update_num_rows'] + $data['marketing_on_date_rows'] + $data['marketing_ten_days_rows'] + $data['marketing_thirty_days_rows']; return $f; } public function issue_cs_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { //<!---------------------- issue cs Module ------------------------------> $d=date('d-m-Y'); $table='cs_addstock'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $cs=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $cs=0; } return $cs; } public function planning_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'MARKETING' || $data['emp_details']->designation == 'Marketing') { // //<!---------------------- Planning Module ------------------------------> $d=date('d-m-Y'); $data['planning_order_rows'] = $this->vendor_model->planning_notification_get_details($d); $dd=date('Y-m-d'); $where=$dd; $data['pallning_outsource_rows']=$this->vendor_model->outsource_planning_notification_get_details($where); $d=date('Y-m-d'); $where=$d; $data['planned_dyeing_on_date_rows']=$this->vendor_model->marketing_notification_deying_date_getsuborder($where); $data['planned_weaving_on_date_rows']=$this->vendor_model->marketing_notification_weaving_date_getsuborder($where); $befdore_seven=date('Y-m-d',strtotime('+7 days')) . PHP_EOL; $data['planned_dyeing_sevenn_days_rows']=$this->vendor_model->marketing_notification_deying_date_getsuborder($befdore_seven); $data['planned_weaving_sevenn_days_rows']=$this->vendor_model->marketing_notification_weaving_date_getsuborder($befdore_seven); $after_five=date('Y-m-d',strtotime('-5 days')) . PHP_EOL; $data['planned_dyeing_five_days_rows']=$this->vendor_model->marketing_notification_deying_date_getsuborder($after_five); $data['planned_weaving_five_days_rows']=$this->vendor_model->marketing_notification_weaving_date_getsuborder($after_five); } else { $data['planning_order_rows'] =0; $data['pallning_outsource_rows']=0; $data['planned_dyeing_on_date_rows'] =0; $data['planned_dyeing_sevenn_days_rows'] =0; $data['planned_dyeing_five_days_rows']=0; $data['planned_weaving_on_date_rows'] =0; $data['planned_weaving_sevenn_days_rows'] =0; $data['planned_weaving_five_days_rows']=0; } $p=$data['planning_order_rows'] + $data['pallning_outsource_rows'] + $data['planned_dyeing_on_date_rows'] + $data['planned_dyeing_sevenn_days_rows'] + $data['planned_dyeing_five_days_rows'] + $data['planned_weaving_on_date_rows'] + $data['planned_weaving_sevenn_days_rows'] + $data['planned_weaving_five_days_rows'] ; return $p; } public function sample_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $emp_details=$this->vendor_model->get_customerdata($table,$where); if($emp_details->designation == 'Super Admin' || $emp_details->designation == 'Admin') { //<!------------------------ Sample request ---------------------------------> $d=date('d-m-Y'); $table='sample_request'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $sample_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $sample_insert_rows=0; } if($emp_details->designation == 'Super Admin') { $d=date('d-m-Y'); $table='sample_request'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $sample_update_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $sample_update_rows=0; } $s= $sample_insert_rows + $sample_update_rows ; return $s; } public function work_order_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'PPC Manager') { //<!---------------------- work order ------------------------------> $d=date('d-m-Y'); $table='create_yarntwisting_work_order'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $data['work_order_twisting']=$this->vendor_model->count_amount_work_order_get_customerdata($table,$where); $d=date('d-m-Y'); $table='workorder_dyeing'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $data['work_order_dyeing']=$this->vendor_model->count_amount_work_order_get_customerdata($table,$where); $d=date('d-m-Y'); $table='workorder_dyeing_material'; $where=array('approved_date'=>$d,'insert_notification_status'=>0); $data['issue_work_order_dyeing_material_rows']=$this->vendor_model->count_amount_work_order_get_customerdata($table,$where); $d=date('d-m-Y'); $table='finishing_embroidry'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $data['work_order_fabric_finishing']=$this->vendor_model->count_amount_work_order_get_customerdata($table,$where); $d=date('d-m-Y'); $table='work_order_twisting'; $where=array('rec_date'=>$d,'insert_notification_status'=>0); $data['work_order_delivery_twisting_finishing']=$this->vendor_model->count_amount_work_order_delivery_twisting_get_customerdata($table,$where); $d=date('d-m-Y'); $table='work_order_dyeing'; $where=array('rec_date'=>$d,'insert_notification_status'=>0); $data['work_order_delivery_dyeing_finishing']=$this->vendor_model->count_amount_work_order_delivery_dyed_get_customerdata($table,$where); $d=date('d-m-Y'); $table='weaving_factory_stock'; $where=array('rec_date'=>$d,'insert_notification_status'=>0); $data['work_order_delivery_weaving_finishing']=$this->vendor_model->count_amount_work_order_delivery_weaving_fabric_get_customerdata($table,$where); $d=date('d/m/Y'); $table='finishing_embroidry_stock'; $where=array('received_date'=>$d,'insert_notification_status'=>0); $data['work_order_delivery_finishing_finishing']=$this->vendor_model->count_amount_work_order_delivery_fabric_finishing_emp_get_customerdata($table,$where); } else { $data['work_order_twisting']=0; $data['work_order_dyeing']=0; $data['work_order_fabric_finishing']=0; $data['work_order_delivery_twisting_finishing']=0; $data['work_order_delivery_dyeing_finishing']=0; $data['work_order_delivery_weaving_finishing']=0; $data['work_order_delivery_finishing_finishing']=0; $data['issue_work_order_dyeing_material_rows']=0; } $w=$data['work_order_twisting'] + $data['work_order_dyeing'] + $data['work_order_fabric_finishing'] + $data['work_order_delivery_twisting_finishing'] + $data['work_order_delivery_dyeing_finishing'] + $data['work_order_delivery_weaving_finishing'] + $data['work_order_delivery_finishing_finishing'] + $data['issue_work_order_dyeing_material_rows']; return $w; } public function packing_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!------------------------ package list ---------------------------------> if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'Marketing' || $data['emp_details']->designation == 'MARKETING' || $data['emp_details']->designation == 'HO Marketing' || $data['emp_details']->designation == 'HO Marketing') { $d=date('d/m/Y'); $table='packing_list_data'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $package_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='packing_list_data'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $package_update_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d/m/Y'); $table='madeups_list_data'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $package_madeups_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $package_insert_rows=0; $package_update_rows=0; $package_madeups_insert_rows=0; } $packing= $package_insert_rows + $package_update_rows + $package_madeups_insert_rows; return $packing; } public function design_weaving_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!------------------------ design weaving list ---------------------------------> if($data['emp_details']->designation == 'Super Admin') { $d=date('d-m-Y'); $table='design_weave'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $design_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='design_weave'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $design_update_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='design_weave'; $where=array('finalized_date'=>$d,'finalize_notification_status'=>0); $design_finalize_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='design_weave'; $where=array('approved_date'=>$d,'approval_notification_status'=>0); $design_approval_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $design_insert_rows=0; $design_update_rows=0; $design_finalize_rows=0; $design_approval_rows=0; } $design= $design_insert_rows + $design_update_rows + $design_finalize_rows + $design_approval_rows; return $design; } public function masters_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!----------------------------- Masters Module ---------------------------------------> if($data['emp_details']->designation == 'Super Admin' ) { $d=date('d-m-Y'); $table='import_yarn'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $yarn_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='import_yarn'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $yarn_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='article_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $article_updated_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='fabric_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $fabric_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='fabric_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $fabric_upadted_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='shade_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $shade_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='shade_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $shade_updated_row=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='color_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $color_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='color_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $color_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='customer_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $customer_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='box_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $box_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='madeups_box_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $madeups_box_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='product_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $product_master_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $yarn_insert_rows=0; $yarn_insert_rows1=0; $article_updated_rows=0; $fabric_insert_rows=0; $fabric_upadted_rows=0; $shade_insert_rows=0; $shade_updated_row=0; $color_insert_rows=0; $color_insert_rows1=0; $customer_insert_rows1=0; $box_insert_rows1=0; $madeups_box_insert_rows1=0; $product_master_insert_rows1=0; } if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'MARKETING' || $data['emp_details']->designation == 'Marketing' || $data['emp_details']->designation == 'Marketing' || $data['emp_details']->designation == 'HO Marketing' || $data['emp_details']->designation == 'HO Marketing') { $d=date('d-m-Y'); $table='article_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $article_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='design_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $design_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $article_insert_rows=0; $design_insert_rows=0; } if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'HO Purchase Admin') { $d=date('d-m-Y'); $table='indent_product'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $indent_product_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='indent_vendor_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $indent_vednor_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $indent_product_insert_rows1=0; $indent_vednor_insert_rows1=0; } if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { $d=date('d-m-Y'); $table='design_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $design_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='customer_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $customer_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='box_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $box_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='madeups_box_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $madeups_box_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='outsource_vendor_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $outsource_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='outsource_vendor_master'; $where=array('updated_on'=>$d,'update_notification_status'=>0); $outsource_insert_rows1=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='indent_vendor_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $indent_vednor_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='indent_product'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $indent_product_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d-m-Y'); $table='product_master'; $where=array('created_date'=>$d,'insert_notification_status'=>0); $product_master_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); } else { $design_insert_rows1=0; $customer_insert_rows=0; $box_insert_rows=0; $outsource_insert_rows=0; $outsource_insert_rows1=0; $indent_vednor_insert_rows=0; $indent_product_insert_rows=0; $product_master_insert_rows=0; $madeups_box_insert_rows=0; } $m=$yarn_insert_rows + $yarn_insert_rows1 + $article_insert_rows + $article_updated_rows + $fabric_insert_rows + $fabric_upadted_rows + $shade_updated_row + $design_insert_rows + $design_insert_rows1 + $color_insert_rows + $color_insert_rows1 + $customer_insert_rows + $customer_insert_rows1 + $box_insert_rows + $box_insert_rows1 + $outsource_insert_rows + $outsource_insert_rows1 + $indent_vednor_insert_rows + $indent_vednor_insert_rows1 + $indent_product_insert_rows + $indent_product_insert_rows1 + $product_master_insert_rows + $product_master_insert_rows1 + $madeups_box_insert_rows1 + $madeups_box_insert_rows; return $m; } public function madeups_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!------------------------ madeups list ---------------------------------> if($data['emp_details']->designation == 'HO Madeups') { $d=date('d/m/Y'); $table='fabric_madeups'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $madeups_list_insert_rows=$this->vendor_model->count_amount_get_customerdata($table,$where); $d=date('d/m/Y'); $table='consumable_madeups'; $where=array('created_at'=>$d,'insert_notification_status'=>0); $madeups_list_madeups_insert_rows=$this->vendor_model->madeups_count_amount_get_customerdata($table,$where); } else { $madeups_list_insert_rows=0; $madeups_list_madeups_insert_rows=0; } if($data['emp_details']->designation == 'PPC Manager' || $data['emp_details']->designation == 'PPC Executive') { $input=date('d/m/Y'); $datee = explode('/', $input); $day = $datee[0]; $month = $datee[1]; $year = $datee[2]; $rr=substr($month, 0, 1); $rr1=substr($month, 1, 2); $rrr=substr($day, 0, 1); $rrr1=substr($day, 1, 2); if($rr == '0' && $rrr == '0') { $t=$rrr1 . '/' . $rr1 . '/' . $year; //$t=$day . '/' . $rr1 . '/' . $year; $table='fabric_madeups_delivery_confirmation'; $where=array('rec_date'=>$t,'insert_notification_status'=>0); $madeups_list_madeups_delivery_insert_rows=$this->vendor_model->madeups_count_amount_get_customerdata($table,$where); } else if($rr == '0' && $rrr != '0') { //$t=$rrr1 . '/' . $rr1 . '/' . $year; $t=$day . '/' . $rr1 . '/' . $year; $table='fabric_madeups_delivery_confirmation'; $where=array('rec_date'=>$t,'insert_notification_status'=>0); $madeups_list_madeups_delivery_insert_rows=$this->vendor_model->madeups_count_amount_get_customerdata($table,$where); } else if($rr != '0' && $rrr == '0') { //$t=$rrr1 . '/' . $rr1 . '/' . $year; $t=$rrr1 . '/' . $month . '/' . $year; $table='fabric_madeups_delivery_confirmation'; $where=array('rec_date'=>$t,'insert_notification_status'=>0); $madeups_list_madeups_delivery_insert_rows=$this->vendor_model->madeups_count_amount_get_customerdata($table,$where); } else if($rr != '0' && $rrr != '0') { $table='fabric_madeups_delivery_confirmation'; $where=array('rec_date'=>$input,'insert_notification_status'=>0); $madeups_list_madeups_delivery_insert_rows=$this->vendor_model->madeups_count_amount_get_customerdata($table,$where); } } else { $madeups_list_madeups_delivery_insert_rows=0; } $madeups = $madeups_list_insert_rows + $madeups_list_madeups_insert_rows + $madeups_list_madeups_delivery_insert_rows; return $madeups; } public function inward_purchases_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $table='date_notification'; $where=array('status'=>0); $date_wise_data=$this->vendor_model->get_customerdata($table,$where); $data['date_rel_data']=$this->vendor_model->get_customerdata($table,$where); $d=$date_wise_data->req_date; if($date_wise_data->module_status == 'old') { if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'PPC Manager' ) { $table='indent_yarn_goods_details'; $where=array('received_date'=>$d); $data['yarn_delivery_inserted_rows']=$this->vendor_model->yarn_delivery1_insert_getsuborder1($d); $data['yarn_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where); //$d=date('d-m-Y'); $table='indent_cs_goods_details'; $where=array('received_date'=>$d); $data['cs_delivery_inserted_rows1']=$this->vendor_model->cs_delivery_insertt_getsuborder1($d); $data['cs_delivery_insert_rows1']=$this->vendor_model->count_amount_get_customerdata($table,$where); $newDate = date("d/m/Y", strtotime($d)); //$d=date('d/m/Y'); $table='indent_cs_goods_details'; $where=array('received_date'=>$newDate); $data['cs_delivery_inserted_rows']=$this->vendor_model->cs_delivery_insertt_getsuborder1($newDate); $data['cs_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where); $input=$newDate; $datee = explode('/', $input); $day = $datee[0]; $month = $datee[1]; $year = $datee[2]; $rr=substr($month, 0, 1); $rr1=substr($month, 1, 2); $rrr=substr($day, 0, 1); $rrr1=substr($day, 1, 2); $t1=$rrr1 . '/' . $rr1 . '/' . $year; $table='indent_goods_details'; $where=$t1; $where1=array('received_date'=>$t1); $data['fabric_delivery_inserted_rows1']=$this->vendor_model->fabric_delivery_goods_insertt_getsuborder1($where); $data['fabric_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $t2=$day . '/' . $rr1 . '/' . $year; $table='indent_goods_details'; $where=$t2; $where1=array('received_date'=>$t2); $data['fabric_delivery_inserted_rows2']=$this->vendor_model->fabric_delivery_goods_insertt_getsuborder1($where); $data['fabric_delivery_insert_rows2']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $t3=$rrr1 . '/' . $month . '/' . $year; $table='indent_goods_details'; $where=$t3; $where1=array('received_date'=>$t3); $data['fabric_delivery_inserted_rows3']=$this->vendor_model->fabric_delivery_goods_insertt_getsuborder1($where); $data['fabric_delivery_insert_rows3']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $table='indent_goods_details'; $where=$input; $where1=array('received_date'=>$input); $data['fabric_delivery_inserted_rows4']=$this->vendor_model->fabric_delivery_goods_insertt_getsuborder1($where); $data['fabric_delivery_insert_rows4']=$this->vendor_model->count_amount_get_customerdata($table,$where1); } else { $data['yarn_delivery_insert_rows']=0; $data['cs_delivery_insert_rows1']=0; $data['cs_delivery_insert_rows']=0; $data['fabric_delivery_insert_rows']=0; $data['fabric_delivery_insert_rows2']=0; $data['fabric_delivery_insert_rows3']=0; $data['fabric_delivery_insert_rows4']=0; } } else { if($data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin' || $data['emp_details']->designation == 'PPC Manager' ) { // $d=date('d-m-Y'); $table='indent_yarn_goods_details'; $where=array('received_date'=>$d,'insert_notification_status'=>0); $data['yarn_delivery_inserted_rows']=$this->vendor_model->yarn_delivery_insert_getsuborder1($d); $data['yarn_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where); //$d=date('d-m-Y'); $table='indent_cs_goods_details'; $where=array('received_date'=>$d,'insert_notification_status'=>0); $data['cs_delivery_inserted_rows1']=$this->vendor_model->cs_delivery_insert_getsuborder1($d); $data['cs_delivery_insert_rows1']=$this->vendor_model->count_amount_get_customerdata($table,$where); $newDate = date("d/m/Y", strtotime($d)); //$d=date('d/m/Y'); $table='indent_cs_goods_details'; $where=array('received_date'=>$newDate,'insert_notification_status'=>0); $data['cs_delivery_inserted_rows']=$this->vendor_model->cs_delivery_insert_getsuborder1($newDate); $data['cs_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where); $input=$newDate; $datee = explode('/', $input); $day = $datee[0]; $month = $datee[1]; $year = $datee[2]; $rr=substr($month, 0, 1); $rr1=substr($month, 1, 2); $rrr=substr($day, 0, 1); $rrr1=substr($day, 1, 2); $t1=$rrr1 . '/' . $rr1 . '/' . $year; $table='indent_goods_details'; $where=$t1; $where1=array('received_date'=>$t1,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows1']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $t2=$day . '/' . $rr1 . '/' . $year; $table='indent_goods_details'; $where=$t2; $where1=array('received_date'=>$t2,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows2']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows2']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $t3=$rrr1 . '/' . $month . '/' . $year; $table='indent_goods_details'; $where=$t3; $where1=array('received_date'=>$t3,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows3']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows3']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $table='indent_goods_details'; $where=$input; $where1=array('received_date'=>$input,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows4']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows4']=$this->vendor_model->count_amount_get_customerdata($table,$where1); } else { $data['yarn_delivery_insert_rows']=0; $data['cs_delivery_insert_rows1']=0; $data['cs_delivery_insert_rows']=0; $data['fabric_delivery_insert_rows']=0; $data['fabric_delivery_insert_rows2']=0; $data['fabric_delivery_insert_rows3']=0; $data['fabric_delivery_insert_rows4']=0; } } $data['total_res_inward_fabric']=$data['fabric_delivery_insert_rows'] + $data['fabric_delivery_insert_rows2'] + $data['fabric_delivery_insert_rows3'] + $data['fabric_delivery_insert_rows4'] + $data['yarn_delivery_insert_rows'] + $data['cs_delivery_insert_rows'] + $data['cs_delivery_insert_rows1']; $data['page_static']='inward_purchase'; $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications'];$data['access'] = $this->access_details(); $data['userdetails'] = $this->session_data_pass(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('vendor_master/notification_page',$data); $this->load->view('templates/footer_inside'); } public function inward_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $table='date_notification'; $where=array('status'=>0); $date_wise_data=$this->vendor_model->get_customerdata($table,$where); $data['date_rel_data']=$this->vendor_model->get_customerdata($table,$where); $d=$date_wise_data->req_date; //<!------------------------ new stores list ---------------------------------> // $d=date('d-m-Y'); $table='indent_yarn_goods_details'; $where=array('received_date'=>$d,'insert_notification_status'=>0); $data['yarn_delivery_inserted_rows']=$this->vendor_model->yarn_delivery_insert_getsuborder1($d); $data['yarn_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where); //$d=date('d-m-Y'); $table='indent_cs_goods_details'; $where=array('received_date'=>$d,'insert_notification_status'=>0); $data['cs_delivery_inserted_rows1']=$this->vendor_model->cs_delivery_insert_getsuborder1($d); $data['cs_delivery_insert_rows1']=$this->vendor_model->count_amount_get_customerdata($table,$where); $newDate = date("d/m/Y", strtotime($d)); //$d=date('d/m/Y'); $table='indent_cs_goods_details'; $where=array('received_date'=>$newDate,'insert_notification_status'=>0); $data['cs_delivery_inserted_rows']=$this->vendor_model->cs_delivery_insert_getsuborder1($newDate); $data['cs_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where); $input=$newDate; $datee = explode('/', $input); $day = $datee[0]; $month = $datee[1]; $year = $datee[2]; $rr=substr($month, 0, 1); $rr1=substr($month, 1, 2); $rrr=substr($day, 0, 1); $rrr1=substr($day, 1, 2); $t1=$rrr1 . '/' . $rr1 . '/' . $year; $table='indent_goods_details'; $where=$t1; $where1=array('received_date'=>$t1,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows1']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $t2=$day . '/' . $rr1 . '/' . $year; $table='indent_goods_details'; $where=$t2; $where1=array('received_date'=>$t2,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows2']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows2']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $t3=$rrr1 . '/' . $month . '/' . $year; $table='indent_goods_details'; $where=$t3; $where1=array('received_date'=>$t3,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows3']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows3']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $table='indent_goods_details'; $where=$input; $where1=array('received_date'=>$input,'insert_notification_status'=>0); $data['fabric_delivery_inserted_rows4']=$this->vendor_model->fabric_delivery_goods_insert_getsuborder1($where); $data['fabric_delivery_insert_rows4']=$this->vendor_model->count_amount_get_customerdata($table,$where1); $new=$data['fabric_delivery_insert_rows'] + $data['fabric_delivery_insert_rows2'] + $data['fabric_delivery_insert_rows3'] + $data['fabric_delivery_insert_rows4'] + $data['yarn_delivery_insert_rows'] + $data['cs_delivery_insert_rows'] + $data['cs_delivery_insert_rows1']; // $new = $fabric_inpection_insert_rows + $fabric_delivery_insert_rows + $yarn_delivery_insert_rows + $cs_delivery_insert_rows; // print_r($new); // die(); return $new; } public function new_stores_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $table='date_notification'; $where=array('status'=>0); $date_wise_data=$this->vendor_model->get_customerdata($table,$where); $data['date_rel_data']=$this->vendor_model->get_customerdata($table,$where); $d=$date_wise_data->req_date; //<!------------------------ new stores list ---------------------------------> if($data['emp_details']->designation == 'PPC Manager' || $data['emp_details']->designation == 'PPC Executive' ) { //$d=date('d-m-Y'); $table='fabric_inspection'; $where=$d; $where1=array('created_date'=>$d,'insert_notification_status'=>0); $data['fabric_inspection_inserted_rows']=$this->vendor_model->fabric_inspection_update_getsuborder1($where); $data['fabric_inspection_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where1); } else { $data['fabric_inspection_inserted_rows']=array(); $data['fabric_inspection_rows']=0; } $new= $data['fabric_inspection_rows'] ; // $new = $fabric_inpection_insert_rows + $fabric_delivery_insert_rows + $yarn_delivery_insert_rows + $cs_delivery_insert_rows; // print_r($new); // die(); return $new; } public function fabric_inspection_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $table='date_notification'; $where=array('status'=>0); $date_wise_data=$this->vendor_model->get_customerdata($table,$where); $data['date_rel_data']=$this->vendor_model->get_customerdata($table,$where); $d=$date_wise_data->req_date; if($date_wise_data->module_status == 'old') { if($data['emp_details']->designation == 'PPC Manager' || $data['emp_details']->designation == 'PPC Executive' ) { //$d=date('d-m-Y'); $table='fabric_inspection'; $where=$d; $where1=array('created_date'=>$d); $data['fabric_inspection_inserted_rows']=$this->vendor_model->fabric_inspections_update_getsuborder1($where); $data['fabric_inspection_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where1); } else { $data['fabric_inspection_inserted_rows']=array(); $data['fabric_inspection_rows']=0; } } else { if($data['emp_details']->designation == 'PPC Manager' || $data['emp_details']->designation == 'PPC Executive' ) { //$d=date('d-m-Y'); $table='fabric_inspection'; $where=$d; $where1=array('created_date'=>$d,'insert_notification_status'=>0); $data['fabric_inspection_inserted_rows']=$this->vendor_model->fabric_inspection_update_getsuborder1($where); $data['fabric_inspection_rows']=$this->vendor_model->count_amount_get_customerdata($table,$where1); } else { $data['fabric_inspection_inserted_rows']=array(); $data['fabric_inspection_rows']=0; } } $data['total_res_fabric']= $data['fabric_inspection_rows'] ; $data['page_static']='fabric_inspection'; $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications'];$data['access'] = $this->access_details(); $data['userdetails'] = $this->session_data_pass(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('vendor_master/notification_page',$data); $this->load->view('templates/footer_inside'); } public function access_details() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_by=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_by); $d=$this->marketing_model->fetch_main_data($table,$where); $data['user_type_id']=$d->user_type_id; $table='swansilk_access_controls'; $where=array('department_id'=>$data['user_type_id']); return $this->marketing_model->fetch_where_data($table,$where); } public function access_id() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_by=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_by); $d=$this->marketing_model->fetch_main_data($table,$where); return $d->user_type_id; } public function fabric_stock() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/fabric_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function fabric_stock_new() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/fabric_stock_new'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function yarn_stock() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/yarn_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function cs_stock() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/cs_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function twisting_stock() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/twisting_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function dyeing_stock() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/dyeing_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function weaving_fabric_stock() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/weaving_fabric_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function issued_to_loom() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/issued_to_loom_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function madeups_fabric() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/madeups_fabric_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function issued_to_loom_data() { $getalldata = $this->vendor_model->consuam_planned_stock_madeups_no_res_planned_details(); echo json_encode($getalldata); } public function madeups_fabric_data() { $getalldata = $this->vendor_model->stock_no_planned_details(); echo json_encode($getalldata); } public function fabric_fnishing_emp_details() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $data['val'] = substr($uri, strpos($uri, "/") + 12); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/fabric_emb_stock'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function fetch_fabric_emb_history_data() { $table='finishing_embroidry'; $keyword='DTL'; $osl_result=$this->vendor_model->Getsearch_fabric_numbers($keyword); $table='finishing_embroidry'; $keyword='SAM'; $sam_result=$this->vendor_model->Getsearch_fabric_numbers($keyword); $table='finishing_embroidry'; $keyword='STK'; $stk_result=$this->vendor_model->Getsearch_fabric_numbers($keyword); $table='finishing_embroidry'; $keyword='PO'; $po_result=$this->vendor_model->Getsearch_fabric_numbers($keyword); foreach($osl_result as $r) { $where=array('oslNo'=>$r->po_no); $table='orders'; $res=$this->vendor_model->get_customerdata($table,$where); if(empty($res)) { } else { $update_data=array('customer_id'=>$res->fileNo); $where=array('id'=>$r->id); $tables='finishing_embroidry'; $this->vendor_model->update_data($where,$tables,$update_data); } } foreach($sam_result as $r) { $where=array('oslNo'=>$r->po_no); $table='orders'; $res=$this->vendor_model->get_customerdata($table,$where); if(empty($res)) { } else { $update_data=array('customer_id'=>$res->fileNo); $where=array('id'=>$r->id); $tables='finishing_embroidry'; $this->vendor_model->update_data($where,$tables,$update_data); } } foreach($stk_result as $r) { $where=array('oslNo'=>$r->po_no); $table='orders'; $res=$this->vendor_model->get_customerdata($table,$where); if(empty($res)) { } else { $update_data=array('customer_id'=>$res->fileNo); $where=array('id'=>$r->id); $tables='finishing_embroidry'; $this->vendor_model->update_data($where,$tables,$update_data); } } foreach($po_result as $r) { $where=array('po_no'=>$r->po_no); $table='indent_po'; $po_res=$this->vendor_model->get_customerdata($table,$where); $where=array('oslNo'=>$po_res->purpose); $table='orders'; $res=$this->vendor_model->get_customerdata($table,$where); if(empty($res)) { } else { $update_data=array('customer_id'=>$res->fileNo); $where=array('id'=>$r->id); $tables='finishing_embroidry'; $this->vendor_model->update_data($where,$tables,$update_data); } } $data=$this->vendor_model->fetch_where_subgrid_data_history_data(); echo json_encode($data); } public function split_page_notifications() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); //<!------------------------ stock ---------------------------------> if($data['emp_details']->designation == 'PPC Manager' || $data['emp_details']->designation == 'PPC Executive' || $data['emp_details']->designation == 'ACCOUNTS' || $data['emp_details']->designation == 'Accounts' || $data['emp_details']->designation == 'Super Admin' || $data['emp_details']->designation == 'Admin') { $ttt1=date('d/m/Y'); $ddd1=date('d-m-Y'); $table='fabric_inspection_details'; $where=array('received_date'=>$ttt1,'split_noti'=>'Yes','insert_notification_status'=>0); $data['stock_split_data_res_count']=$this->vendor_model->fabric_inspection_split_count_amount_get_customerdata($table,$where); $ttt=date('d/m/Y'); $table='fabric_madeups_delivery_confirmation'; $where=array('rec_date'=>$ttt,'split_noti'=>'Yes','insert_notification_status'=>0); $data['stock_madeups_split_data_res_count']=$this->vendor_model->fabric_inspection_split_count_amount_get_customerdata($table,$where); } else { $data['stock_split_data_res_count']=0; $data['stock_madeups_split_data_res_count']=0; } $stock=$data['stock_split_data_res_count'] + $data['stock_madeups_split_data_res_count']; return $stock; } public function fabric_billing() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $uri = $_SERVER["REQUEST_URI"]; $RT = substr($uri, strpos($uri, "/") + 12); if($RT == 'stock_history/fabric_billing') { $data['url_val']='1'; $data['val']='stock_history/fabric_billing'; $data['ref']='indent'; } else if($RT == 'packing_list/paking_list_details?prop_id=2') { $data['val']='packing_list/paking_list_details?prop_id=1'; $data['url_val']='2'; $data['ref']='today_dashboard'; } else if($RT == 'packing_list/paking_list_details?prop_id=3') { $data['url_val']='3'; $data['val']='packing_list/paking_list_details?prop_id=1'; $data['ref']='month_dashboard'; } else if($RT == 'packing_list/paking_list_details?prop_id=4') { $data['url_val']='4'; $data['val']='packing_list/paking_list_details?prop_id=1'; $data['ref']='year_dashboard'; } $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); //print_r($arr); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //die(); //----------tiill-------------------- // $data['userdetails'] = $this->session_data_pass(); // $data['user_type_id'] = $this->access_id(); // $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $table='packing_list_data'; $where=array('customerID'=>''); $data_custom_ids=$this->vendor_model->get_data($table,$where); if(empty($data_custom_ids)) { } else { foreach($data_custom_ids as $c) { $where=array('customerName'=>$c->customer_name); $table='customer_master'; $custom_ids=$this->vendor_model->get_customerdata($table,$where); if(empty($custom_ids)) { } else { $table='packing_list_data'; $where=array('id'=>$c->id); $cus_data=array('customerID'=>$custom_ids->customerID); $this->vendor_model->update_data($where,$table,$cus_data); } } } $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/fabric_billing_history',$data); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function paking_list_grid_data() { $get = $this->uri->segment(3); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $m=date('m'); $y=date('Y'); if($get == 'sindent') { $table='packing_list_data'; $where=array('status'=>0); $details=$this->marketing_model->fetch_desc_where_invoice_data_history($table,$where); } echo json_encode($details); } public function recent_shipping_grid_data() { // $get = $this->uri->segment(3); $fileNo = $this->uri->segment(3); $orderType = $this->uri->segment(4); $order_id = $this->uri->segment(5); // print_r($fileNo); // die(); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $m=date('m'); $y=date('Y'); // if($get == 'sindent') // { $table='packing_list_data'; $where=array('status'=>0); $details=$this->marketing_model->recent_shipping_grid_data($fileNo,$orderType,$order_id); //print_r($details); // } echo json_encode($details); } public function dtl_shipping_grid_data() { // $get = $this->uri->segment(3); $fileNo = $this->uri->segment(3); $orderType = $this->uri->segment(4); $order_id = $this->uri->segment(5); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $po=$this->marketing_model->pooo($order_id); // if($get == 'sindent') // { $table='packing_list_data'; $where=array('status'=>0); $details=$this->marketing_model->dtl_shipping_grid_data($fileNo,$orderType,$order_id,$po); //print_r($details); // } echo json_encode($details); } public function dtl_data() { $get = $this->uri->segment(3); $fileNo = $this->uri->segment(4); $orderType = $this->uri->segment(5); $order_id = $this->uri->segment(6); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $po=$this->marketing_model->po($order_id); if($get == 'sindent') { $table='packing_list_data'; $where=array('status'=>0); $details=$this->marketing_model->dtl_shipping_grid_data($fileNo,$orderType,$order_id,$po); //print_r($details); } echo json_encode($details); } public function paking_list_grid_data_subgrid() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $get = $this->uri->segment(3); preg_match_all('!\d+!', $get, $matches); $id=""; foreach($matches as $matches) { $id=$matches; } $i= $id[0]; $table='invoice_packing'; $where=array('id'=>$i); $getalldata = $this->marketing_model->fetch_where_data($table,$where); echo json_encode($getalldata); } public function madeups_billing() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $table='fabric_inspection_details'; $where=array('osl_like'=>''); $keyword='DTL'; $osl_like_res=$this->vendor_model->get_po_num_types($table,$where,$keyword); foreach($osl_like_res as $osl) { $table='fabric_inspection_details'; $where=array('id'=>$osl->id); $update_data=array('osl_like'=>'DTL'); $this->vendor_model->update_data($where,$table,$update_data); } $table='fabric_inspection_details'; $where=array('osl_like'=>''); $keyword='PO'; $po_like_res=$this->vendor_model->get_po_num_types($table,$where,$keyword); foreach($po_like_res as $po) { $table='fabric_inspection_details'; $where=array('id'=>$po->id); $update_data=array('osl_like'=>'PO'); $this->vendor_model->update_data($where,$table,$update_data); } $table='fabric_inspection_details'; $where=array('osl_like'=>''); $keyword='SAM'; $sam_like_res=$this->vendor_model->get_po_num_types($table,$where,$keyword); foreach($sam_like_res as $sam) { $table='fabric_inspection_details'; $where=array('id'=>$sam->id); $update_data=array('osl_like'=>'SAM'); $this->vendor_model->update_data($where,$table,$update_data); } $table='fabric_inspection_details'; $where=array('osl_like'=>''); $keyword='STK'; $stk_like_res=$this->vendor_model->get_po_num_types($table,$where,$keyword); foreach($stk_like_res as $stk) { $table='fabric_inspection_details'; $where=array('id'=>$stk->id); $update_data=array('osl_like'=>'STK'); $this->vendor_model->update_data($where,$table,$update_data); } $uri = $_SERVER["REQUEST_URI"]; $RT = substr($uri, strpos($uri, "/") + 12); if($RT == 'stock_history/madeups_billing') { $data['url_val']='1'; $data['val']='stock_history/madeups_billing'; $data['ref']='indent'; } $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; //<!----add from-------------> $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $approved_id=$id['userid']; $table='employee_details'; $where=array('id'=>$approved_id); $dept_id_row=$this->vendor_model->get_where_row($table,$where); $user_type_id_row=$dept_id_row->user_type_id; //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $check=""; foreach($m_id as $menu_id) { $table='swansilk_menu'; $where=array('delete_status'=>'ACTIVE','menu_id'=>$menu_id); $result= $this->marketing_model->fetch_main_data($table,$where); if(!empty($result->reference_url)){ if($result->reference_url == $data['val']) { $check=$data['val']; } } } if($check != "") { //<!----add from -------------> $access_menu_id=$this->access_details_id(); $m_id=unserialize($access_menu_id->menu_id); $data1=array(); foreach($m_id as $menu_id) { $table='access_action_rights'; $where=array('menu_id'=>$menu_id,'department_id'=>$user_type_id_row); $arr=$this->vendor_model->get_where_row($table,$where); if(empty($arr)) { } else { //print_r($arr); $menu_id=$arr->menu_id; $table='swansilk_menu'; $where=array('menu_id'=>$menu_id); $url=$this->vendor_model->get_where_row($table,$where); if(!empty($url->reference_url)){ if($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } } //----------tiill-------------------- $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = 0; // $this->indent_page_notifications();notifications']; $data['access'] = $this->access_details(); $table='employee_details'; $data['user_list']=$this->vendor_model->fetch_where_data($table); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='chat_message'; $where=array('unread'=>'0','to_id'=>$emp_row); $data['chatting_count']=$this->vendor_model->count_amount_work_order_delivery_yarn_po_get_customerdata($table,$where); $this->load->view('templates/header_inside',$data); $this->load->view('stock_history/madeups_billing_history',$data); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function madeups_list_grid_data(){ ini_set('memory_limit', '512M'); $get = $this->uri->segment(3); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $m=date('m'); $y=date('Y'); if($get == 'sindent') { $table='madeups_list_data'; $where=array('status'=>0); $details=$this->marketing_model->fetch_desc_where_invoice_madeups_history($table,$where); } echo json_encode($details); } public function madeups_grid_data_subgrid() { $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $get = $this->uri->segment(3); preg_match_all('!\d+!', $get, $matches); $id=""; foreach($matches as $matches) { $id=$matches; } $i= $id[0]; $table='madeups_invoice_packing'; $where=array('id'=>$i); $getalldata = $this->marketing_model->fetch_where_data($table,$where); echo json_encode($getalldata); // $table='madeups_invoice_packing'; // $where=array('id'=>$i); // $pkg_data=$this->marketing_model->fetch_main_data($table,$where); // $table='madeups_packing'; // $where=array('osl_no'=>$pkg_data->osl_no); // $getalldata = $this->marketing_model->fetch_where_data_limit($table,$where); // echo json_encode($getalldata); } public function recent_madeups_list_grid_data() { // $get = $this->uri->segment(3); $fileNo = $this->uri->segment(3); $orderType = $this->uri->segment(4); $order_id = $this->uri->segment(5); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $m=date('m'); $y=date('Y'); // if($get == 'sindent') // { $table='madeups_list_data'; $where=array('status'=>0); $details=$this->marketing_model->recent_fetch_desc_where_invoice_madeups_history($fileNo,$orderType,$order_id); //print_r($details); // } echo json_encode($details); } public function dtl_madeups_list_grid_data() { // $get = $this->uri->segment(3); $fileNo = $this->uri->segment(3); $orderType = $this->uri->segment(4); $order_id = $this->uri->segment(5); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $emp_row=$id['userid']; $table='employee_details'; $where=array('id'=>$emp_row); $data['emp_details']=$this->vendor_model->get_customerdata($table,$where); $m=date('m'); $y=date('Y'); $po=$this->marketing_model->pooo($order_id); // if($get == 'sindent') // { $table='madeups_list_data'; $where=array('status'=>0); $details=$this->marketing_model->dtl_madeups_history($fileNo,$orderType,$order_id,$po); //print_r($details); // } echo json_encode($details); } } ?>