EVOLUTION-NINJA
Edit File: New_stores.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class New_stores 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('store_model'); $this->load->model('outsource_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 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 session_data_pass() { if ($this->session->userdata('logged_in')) { return $this->yarn_model->get_userdata(); } } 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 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 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 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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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_inword() { $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); $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('new_stores/fabricinword',$data); $this->load->view('templates/footer_inside'); } public function details_fetch_sys_date() { $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'; // $details = $this->store_model->display_fabric_embroidryinspection_date(); $details = $this->store_model->display_fabric_inspection_order_embroidryinspection_date(); echo json_encode($details); } public function fabric_inspaection() { $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 == 'new_stores/fabric_inspaection?prop_id=1') { $data['url_val']='1'; $data['val']='new_stores/fabric_inspaection?prop_id=1'; $data['ref']='indent'; } else if($RT == 'new_stores/fabric_inspaection?prop_id=2') { $data['val']='new_stores/fabric_inspaection?prop_id=1'; $data['url_val']='2'; $data['ref']='today_dashboard'; } else if($RT == 'new_stores/fabric_inspaection?prop_id=3') { $data['url_val']='3'; $data['val']='new_stores/fabric_inspaection?prop_id=1'; $data['ref']='month_dashboard'; } else if($RT == 'new_stores/fabric_inspaection?prop_id=4') { $data['url_val']='4'; $data['val']='new_stores/fabric_inspaection?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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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); $data['val']='new_stores/fabric_inspaection?prop_id=1'; 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($url->reference_url == $data['val']) { $data['access_row']=$arr; } } } //----------tiill-------------------- $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $table='fabric_inspection_details'; $where=array('customer_id'=>''); $details_res = $this->store_model->get_data_fetch($table,$where); foreach($details_res as $res) { $osl=$res->po_no; $where=array('oslNo'=>$osl); $table='orders'; $orders_val = $this->store_model->fetch_where_subgrid_data($table,$where); if(empty($orders_val)) { } else { $where=array('id'=>$res->id); $dataa=array('customer_id'=>$orders_val->fileNo); $table='fabric_inspection_details'; $this->store_model->update_data($where,$table,$dataa); } } $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('new_stores/fabricinspection',$data); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function bar_code_generate() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $data['url_id']=$val; $table='fabric_inspection_details'; $where=array('id'=>$val); $data['fetch_goods_data']=$this->outsource_model->fetch_where_row_data($table,$where); $table='fabric_inspection'; $fetch_inspection_id=$this->outsource_model->max_select_indent_no_id($table); $table='fabric_inspection'; $v=$fetch_inspection_id->id; $where=array('id'=>$v); $data['fetch_inspection_data']=$this->outsource_model->fetch_where_row_data($table,$where); $in_wt=$data['fetch_inspection_data']->inspected_weight; $in_mtr=$data['fetch_inspection_data']->inspected_mtrs; // $data['weight_mtrs']=$in_wt / $in_mtr; if ($in_mtr != 0) { $data['weight_mtrs'] = $in_wt / $in_mtr; } else { $data['weight_mtrs'] = 0; } $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('out_source_master/bar_code',$data); $this->load->view('templates/footer_inside'); } public function details_fetch() { $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); $table='fabric_inspection_details'; $quantity = $this->vendor_model->get_data_customer($table); foreach($quantity as $q) { $y=$q->po_list_id; if($y == 0) { } else { $table='indent_po'; $where=array('id'=>$y); $des = $this->vendor_model->fetch_where_subgrid_data($table,$where); if(empty($des)) { } else { $yy=$des->indent_id; $table='indent_add_indent'; $where=array('id'=>$yy); $design = $this->vendor_model->fetch_where_subgrid_data($table,$where); if(empty($design)) { } else { $yyy=$design->purpose_shadeid; if($yyy == '0') { } else { $d=$this->vendor_model->fetch_design_subgrid_data($yyy); $where=array('id'=>$q->id); $data=array('design'=>$d->design); $table='fabric_inspection_details'; $this->vendor_model->update_data($where,$table,$data); } } } } } //die(); $table='fabric_inspection_details'; $details_data= $this->store_model->display_fabricinspectio1(); foreach($details_data as $a) { $r=$a->rec_goods.'CMS'; $where=array('id'=>$a->id); $data=array('rec_width'=>$r); $table='fabric_inspection_details'; $this->vendor_model->update_data($where,$table,$data); } $m=date('m'); $y=date('Y'); if($get == 'stoday_dashboard') { $input=date('d/m/Y'); $datee = explode('/', $input); $day = $datee[0]; $month = $datee[1]; $year = $datee[2]; $rr=substr($month, 0, 1); $rre1=substr($month, 0, 1); if($rre1 == 0) { $rr1=substr($month, 1, 2); } else { $rr1=substr($month, 0, 2); } $rrr=substr($day, 0, 1); $rrre1=substr($day, 0, 1); if($rrre1 == 0) { $rrr1=substr($day, 1, 2); } else { $rrr1=substr($day, 0, 2); } // $t=$rrr1 . '/' . $rr1 . '/' . $year; $t=date('d/m/Y'); $d1=date('d-m-Y'); $table='fabric_inspection_details'; $where=array('received_date'=>$t); $where1=array('received_date'=>$d1); $details=$this->vendor_model->fabric_inspection_result_count_amount_get_customerdata($table,$where,$where1); } else if($get == 'sindent') { $table='fabric_inspection_details'; $details = $this->store_model->display_fabricinspectio1(); } else if($get == 'smonth_dashboard') { $m=date('m'); $y=date('Y'); $table='fabric_inspection_details'; $details=$this->vendor_model->monthly_result_fabric_inspection_dashboard_po_list_id($table,$m,$y); } else if($get == 'syear_dashboard') { $m=date('m'); $y=date('Y'); $table='fabric_inspection_details'; $details=$this->vendor_model->year_result_fabric_inspection_dashboard_po_list_id($table,$y); } echo json_encode($details); } public function details_kumara_fetch1() { $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'; $details = $this->store_model->display_fabric_kumara_grid_embroidryinspection(); // print_r($details); // die(); echo json_encode($details); } public function add_received_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); $data['delete_id']=$this->input->post('delete_id'); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $where=array('id'=>$id['userid']); $table='employee_details'; $data['emp_loc']=$this->vendor_model-> get_customerdata($table,$where); $table='consumed_at'; $data['consumed_at']=$this->vendor_model->fetch_where_data($table); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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); $data['userdetails'] = $this->session_data_pass(); $this->load->view('templates/header_inside',$data); $this->load->view('vendor_master/recived_details',$data); $this->load->view('templates/footer_inside'); } public function details_ho_fetch1() { $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'; $details = $this->store_model->display_fabric_ho_grid_embroidryinspection(); echo json_encode($details); } public function details_fetch1() { $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('customer_id'=>''); $details_res = $this->store_model->get_data_fetch($table,$where); foreach($details_res as $res) { $osl=$res->po_no; $where=array('oslNo'=>$osl); $table='orders'; $orders_val = $this->store_model->fetch_where_subgrid_data($table,$where); if(empty($orders_val)) { } else { $where=array('id'=>$res->id); $data=array('customer_id'=>$orders_val->fileNo); $table='fabric_inspection_details'; $this->store_model->update_data($where,$table,$data); } } $table='fabric_inspection_details'; $where=array('customer_id'=>'','osl_like'=>'PO'); $details_res_po = $this->store_model->get_data_fetch($table,$where); foreach($details_res_po as $res_po) { if($res_po->po_list_id == 0) { } else { $where=$res_po->id; $orders_val = $this->store_model->get_stock_po_transfer_spares_row_data($where); if(empty($orders_val)) { } else { $where=array('id'=>$res_po->id); $data=array('customer_id'=>$orders_val->fileNo); $table='fabric_inspection_details'; $this->store_model->update_data($where,$table,$data); } } } $table='fabric_inspection_details'; $details = $this->store_model->display_fabric_embroidryinspection(); //print_r($details); echo json_encode($details); } public function details_peenya_fetch1() { $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'; $details = $this->store_model->display_fabric_peenya_grid_embroidryinspection(); //print_r($details); //die(); echo json_encode($details); } public function details_nandi_fetch1() { $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'; $details = $this->store_model->display_fabric_nandi_grid_embroidryinspection(); echo json_encode($details); } public function details_tailoring_fetch1() { $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'; $details = $this->store_model->display_fabric_tailoring_grid_embroidryinspection(); echo json_encode($details); } public function receive_quantity() { $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'; $id=$this->input->post("id"); $where=array('id'=>$id); $data['quantity'] = $this->vendor_model->fetch_where_subgrid_data($table,$where); $t=$data['quantity']->design; $data['design_val']=$data['quantity']->design; if($t == '') { $y=$data['quantity']->po_list_id; if($y == '0') { $data['design_val']=$data['quantity']->design; } else { $table='indent_po'; $where=array('id'=>$y); $data['des'] = $this->vendor_model->fetch_where_subgrid_data($table,$where); $data_des = $this->vendor_model->fetch_where_subgrid_data($table,$where); if(empty($data_des)) { } else { $yy=$data['des']->indent_id; $table='indent_add_indent'; $where=array('id'=>$yy); $data['design'] = $this->vendor_model->fetch_where_subgrid_data($table,$where); if(empty($data['design'])) { $data['design_val']=$data['quantity']->design; } else { $yyy=$data['design']->purpose_shadeid; if($yyy == '0') { $data['design_val']=$data['quantity']->design; } else { $d=$this->vendor_model->fetch_design_subgrid_data($yyy); $data['design_val']=$d->design; } } } //print_r($yyy); } } // print_r($data['design_val']); // die(); // $table='fabric_inspection'; // $indent=$this->store_model->max_select_sl_pc_no($table); // $data['sl_no']=$indent->sl_ssl_pc_no+1; $financial_y=$this->input->post("financial_y"); // if (date('m') <= 3) { // $financial_y = (date('y')-1) . '/' . date('y'); // } // else { // $financial_y = date('y') . '/' . (date('y') + 1); //} $table='fabric_inspection'; $where=array('fina_year'=>$financial_y); $indent=$this->store_model->max_years_select_sl_pc_no($table,$where); $data['sl_no']=$indent->sl_ssl_pc_no+1; echo json_encode($data); } public function add_goods_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'); $approved_by=$id['username']; $current_date = date("d-m-Y"); $goods_id = $this->input->post('goods_id'); $data = array( 'goods_id'=> $this->input->post('goods_id'), 'inspected_mtrs'=> $this->input->post('inspected_mtrs'), 'balanced_mtrs'=> $this->input->post('inspected_mtrs'), 'inspected_weight'=> $this->input->post('inspected_weight'), 'rejected_mtrs'=> $this->input->post('rejected_mtrs'), 'sys_date'=> $this->input->post('sys_date'), 'variance_mtrs'=> $this->input->post('variance_mtrs'), 'quantity'=> $this->input->post('ordered_quantity'), 'location'=> $this->input->post('location'), 'fina_year'=>$this->input->post('financial'), 'ssl_pc_no'=> $this->input->post('ssl_pc_no'), 'sl_ssl_pc_no'=> $this->input->post('sl_ssl_pc_no'), 'inspected_person'=> $this->input->post('inspected_person'), 'remarks'=> $this->input->post('remark'), 'created_date'=>$current_date, 'created_by'=>$approved_by, 'status'=>'1', ); $table='fabric_inspection'; $this->db->insert($table,$data); // $table='fabric_inspection_details'; // $where=array('id'=>$goods_id); // $row=$this->store_model->fetch_where_subgrid_data($table,$where); // // print_r($row); // $qty=$row->available_quantity; // $rec_gds=$row->rec_goods; // $minus_val=$qty - $rec_gds; // $data=array('available_quantity'=>$minus_val); // $table='fabric_inspection_details'; // $where=array('id'=>$goods_id); // $this->store_model->update_data($where,$table,$data); $table='fabric_inspection_details'; $id=$this->input->post("id"); $where=array('id'=>$id); // $d_val=array('status'=>0); $d_val=array('status'=>0,'new_ssl_piece_no'=>$this->input->post('ssl_pc_no'),); $this->store_model->update_data($where,$table,$d_val); } public function received_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"]; $RT = substr($uri, strpos($uri, "/") + 12); if($RT == 'new_stores/received_details?prop_id=1') { $data['url_val']='1'; $data['val']='new_stores/received_details?prop_id=1'; $data['ref']='indent'; } else if($RT == 'new_stores/received_details?prop_id=2') { $data['val']='new_stores/received_details?prop_id=1'; $data['url_val']='2'; $data['ref']='today_dashboard'; } else if($RT == 'new_stores/received_details?prop_id=3') { $data['url_val']='3'; $data['val']='new_stores/received_details?prop_id=1'; $data['ref']='month_dashboard'; } else if($RT == 'new_stores/received_details?prop_id=4') { $data['url_val']='4'; $data['val']='new_stores/received_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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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($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($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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('vendor_master/recived_details_grid'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function yarn_received_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"]; $RT = substr($uri, strpos($uri, "/") + 12); $m=date('m'); $y=date('Y'); if($RT == 'new_stores/yarn_received_details?prop_id=1') { $data['url_val']='1'; $data['val']='new_stores/yarn_received_details?prop_id=1'; $data['ref']='indent'; } else if($RT == 'new_stores/yarn_received_details?prop_id=2') { $data['val']='new_stores/yarn_received_details?prop_id=1'; $data['url_val']='2'; $data['ref']='today_dashboard'; $d1=date('d-m-Y'); $table='indent_yarn_goods_details'; $where=array('rec_date'=>$d1); $p1='Yarn - Raw'; $p2='Yarn - Twisted'; $p3='Yarn - Dyed'; $data['new_yarn_count1']=$this->vendor_model->news_dashboard_po_list_id($d1,$p1); $data['new_yarn_count2']=$this->vendor_model->news_dashboard_po_list_id($d1,$p2); $data['new_yarn_count3']=$this->vendor_model->news_dashboard_po_list_id($d1,$p3); } else if($RT == 'new_stores/yarn_received_details?prop_id=3') { $data['url_val']='3'; $data['val']='new_stores/yarn_received_details?prop_id=1'; $data['ref']='month_dashboard'; $d1=date('d-m-Y'); $table='indent_yarn_goods_details'; $where=array('rec_date'=>$d1); $p1='Yarn - Raw'; $p2='Yarn - Twisted'; $p3='Yarn - Dyed'; $data['new_yarn_count1']=$this->vendor_model->monthly_news_dashboard_po_list_id($table,$m,$y,$p1); $data['new_yarn_count2']=$this->vendor_model->monthly_news_dashboard_po_list_id($table,$m,$y,$p2); $data['new_yarn_count3']=$this->vendor_model->monthly_news_dashboard_po_list_id($table,$m,$y,$p3); } else if($RT == 'new_stores/yarn_received_details?prop_id=4') { $data['url_val']='4'; $data['val']='new_stores/yarn_received_details?prop_id=1'; $data['ref']='year_dashboard'; $d1=date('d-m-Y'); $table='indent_yarn_goods_details'; $where=array('rec_date'=>$d1); $p1='Yarn - Raw'; $p2='Yarn - Twisted'; $p3='Yarn - Dyed'; $data['new_yarn_count1']=$this->vendor_model->year_news_dashboard_po_list_id($table,$y,$p1); $data['new_yarn_count2']=$this->vendor_model->year_news_dashboard_po_list_id($table,$y,$p2); $data['new_yarn_count3']=$this->vendor_model->year_news_dashboard_po_list_id($table,$y,$p3); } $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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($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($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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('vendor_master/yarn_recieved_details_grid'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function yarn_add_received_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); $data['delete_id']=$this->input->post('delete_id'); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $where=array('id'=>$id['userid']); $table='employee_details'; $data['emp_loc']=$this->vendor_model-> get_customerdata($table,$where); $table='consumed_at'; $data['consumed_at']=$this->vendor_model->fetch_where_data($table); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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/yarn_recived_details',$data); $this->load->view('templates/footer_inside'); } public function consumable_received_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"]; $RT = substr($uri, strpos($uri, "/") + 12); $m=date('m'); $y=date('Y'); if($RT == 'new_stores/consumable_received_details?prop_id=1') { $data['url_val']='1'; $data['val']='new_stores/consumable_received_details?prop_id=1'; $data['ref']='indent'; } else if($RT == 'new_stores/consumable_received_details?prop_id=2') { $data['val']='new_stores/consumable_received_details?prop_id=1'; $data['url_val']='2'; $data['ref']='today_dashboard'; $d1=date('d-m-Y'); $table=' indent_cs_goods_details'; $where=array('rec_date'=>$d1); $p1='Consumables'; $p2='Spares'; $data['new_yarn_count1']=$this->vendor_model->news_dashboard_cs_list_id_res($d1,$p1); $data['new_yarn_count2']=$this->vendor_model->news_dashboard_cs_list_id_res($d1,$p2); } else if($RT == 'new_stores/consumable_received_details?prop_id=3') { $data['url_val']='3'; $data['val']='new_stores/consumable_received_details?prop_id=1'; $data['ref']='month_dashboard'; $d1=date('d-m-Y'); $table=' indent_cs_goods_details'; $where=array('rec_date'=>$d1); $p1='Consumables'; $p2='Spares'; $data['new_yarn_count1']=$this->vendor_model->monthly_news_cs_dashboard_po_list_id_res($table,$m,$y,$p1); $data['new_yarn_count2']=$this->vendor_model->monthly_news_cs_dashboard_po_list_id_res($table,$m,$y,$p2); } else if($RT == 'new_stores/consumable_received_details?prop_id=4') { $data['url_val']='4'; $data['val']='new_stores/consumable_received_details?prop_id=1'; $data['ref']='year_dashboard'; $d1=date('d-m-Y'); $table=' indent_cs_goods_details'; $where=array('rec_date'=>$d1); $p1='Consumables'; $p2='Spares'; $data['new_yarn_count1']=$this->vendor_model->year_news_cs_dashboard_po_list_id_res($table,$y,$p1); $data['new_yarn_count2']=$this->vendor_model->year_news_cs_dashboard_po_list_id_res($table,$y,$p2); } $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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($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($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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('vendor_master/cs_recieved_details_grid'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function cs_add_received_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); $data['approved_by']=$id['username']; $data['delete_id']=$this->input->post('deleteid'); $table='consumed_at'; $data['consumed_at']=$this->vendor_model->fetch_where_data($table); $where=array('id'=>$id['userid']); $table='employee_details'; $data['emp_loc']=$this->vendor_model-> get_customerdata($table,$where); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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/cs_recived_details',$data); $this->load->view('templates/footer_inside'); } public function fabric_preview() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $data_r=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('po_id'=>$data_r->po_id,'po_no'=>$data_r->po_no,'indent_no'=>$data_r->indent_no); // print_r($where); // die(); $table='indent_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); if(empty($goods_id)) { echo 'No po_id available'; } else { $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['goods_details']=$this->store_model->get_data_fetch($table,$where); $data['goods_details_rec_goods']=$this->store_model->count_get_data_fetch($table,$where); $data['goods_details_rec_wt_goods']=$this->store_model->count_get_rec_data_fetch($table,$where); $where=array('po_id'=>$po_id); $table='indent_goods_details'; //$data['goods_count_details']=$this->store_model->count_get_data_fetch($table,$where); $data['goods_count_details']=$this->store_model->count_get_data_fetch_new($table,$where); $table1='indent_po'; $where1=array('id'=>$po_id); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['product_details']=$this->store_model->getproduct_data_fetch($table,$where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='indent_preview'; $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('new_stores/goods_recived',$data); $this->load->view('templates/footer_inside'); } public function new_stores_fabric_preview() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); if(empty($goods_id)) { } else { $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['goods_details']=$this->store_model->get_data_fetch($table,$where); $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['goods_count_details']=$this->store_model->count_get_data_fetch($table,$where); $table1='indent_po'; $where1=array('po_id'=>$po_id); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['product_details']=$this->store_model->getproduct_data_fetch($table,$where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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); $data['indent_p']='today_preview'; $this->load->view('templates/header_inside',$data); $this->load->view('new_stores/goods_recived',$data); $this->load->view('templates/footer_inside'); } public function fabric_view() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); if(empty($goods_id)) { } else { $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['goods_details']=$this->store_model->get_data_fetch($table,$where); $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['goods_count_details']=$this->store_model->count_get_data_fetch($table,$where); $table1='indent_po'; $where1=array('po_id'=>$po_id); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['product_details']=$this->store_model->getproduct_data_fetch($table,$where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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); $data['indent_p']='monthly_preview'; $this->load->view('templates/header_inside',$data); $this->load->view('new_stores/goods_recived',$data); $this->load->view('templates/footer_inside'); } public function new_stores_fabric_view() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); if(empty($goods_id)) { } else { $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['goods_details']=$this->store_model->get_data_fetch($table,$where); $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['goods_count_details']=$this->store_model->count_get_data_fetch($table,$where); $table1='indent_po'; $where1=array('po_id'=>$po_id); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); $po_id=$goods_id->po_id; $where=array('po_id'=>$po_id); $table='indent_goods_details'; $data['product_details']=$this->store_model->getproduct_data_fetch($table,$where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='year_preview'; $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('new_stores/goods_recived',$data); $this->load->view('templates/footer_inside'); } public function yarn_raw_preview() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_yarn_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $po_id=$goods_id->po_list_id; $where=array('po_id'=>$val1); $table='indent_yarn_goods_details'; $data['goods_details']=$this->store_model->fetch_yarn_new_data($where); $data['goods_details_gross']=$this->store_model->count_get_data_gross_fetch($where); $data['goods_details_net']=$this->store_model->count_get_data_net_fetch($where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='indent_preview'; $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('new_stores/yarn_raw_goods_details',$data); $this->load->view('templates/footer_inside'); } public function new_stores_yarn_raw_preview() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_yarn_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $po_id=$goods_id->po_list_id; $where=array('po_id'=>$val1); $table='indent_yarn_goods_details'; $data['goods_details']=$this->store_model->fetch_yarn_new_data($where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='today_preview'; $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('new_stores/yarn_raw_goods_details',$data); $this->load->view('templates/footer_inside'); } public function yarn_raw_view() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_yarn_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $po_id=$goods_id->po_list_id; $where=array('po_id'=>$val1); $table='indent_yarn_goods_details'; $data['goods_details']=$this->store_model->fetch_yarn_new_data($where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='monthly_preview'; $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('new_stores/yarn_raw_goods_details',$data); $this->load->view('templates/footer_inside'); } public function new_stores_yarn_raw_view() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_yarn_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $po_id=$goods_id->po_list_id; $where=array('po_id'=>$val1); $table='indent_yarn_goods_details'; $data['goods_details']=$this->store_model->fetch_yarn_new_data($where); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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); $data['indent_p']='year_preview'; $this->load->view('templates/header_inside',$data); $this->load->view('new_stores/yarn_raw_goods_details',$data); $this->load->view('templates/footer_inside'); } public function spares_preview() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $table = 'indent_po'; $where = array('id'=>$val); $indent = $this->vendor_model->fetch_where_subgrid_data($table,$where); $data1=$indent->po_id; // print_r($data1); // die(); $table = 'indent_po'; $where = array('po_id'=>$data1,'confirm'=>'Yes'); $getalldata = $this->vendor_model->get_where_row($table,$where); $valw= $getalldata->po_id; $where=array('po_id'=>$valw); $table='indent_cs_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); // print_r($data['po_details1']); // die(); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details11']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $where=$goods_id->po_id; $data['goods_details']=$this->store_model->get_data_cs_fetch($where); $data['goods_detailss']=$this->store_model->get_data_cs_fetchs($where); $data['goods_details_rec']=$this->store_model->get_data_cs_res_fetch($where); $table1='indent_po'; $po_idd=$goods_id->po_list_id; $where1=array('id'=>$po_idd); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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); $data['indent_p']='indent_preview'; $this->load->view('templates/header_inside',$data); $this->load->view('new_stores/consumable_spares_preview',$data); $this->load->view('templates/footer_inside'); } public function new_stores_spares_preview() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $table = 'indent_po'; $where = array('id'=>$val); $indent = $this->vendor_model->fetch_where_subgrid_data($table,$where); $data1=$indent->po_id; // print_r($data1); // die(); $table = 'indent_po'; $where = array('po_id'=>$data1,'confirm'=>'Yes'); $getalldata = $this->vendor_model->get_where_row($table,$where); $valw= $getalldata->po_id; $where=array('po_id'=>$valw); $table='indent_cs_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); // print_r($data['po_details1']); // die(); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details11']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $where=$goods_id->po_id; $data['goods_details']=$this->store_model->get_data_cs_fetch($where); $table1='indent_po'; $po_idd=$goods_id->po_list_id; $where1=array('id'=>$po_idd); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='today_preview'; $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('new_stores/consumable_spares_preview',$data); $this->load->view('templates/footer_inside'); } public function spares_view() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $table = 'indent_po'; $where = array('id'=>$val); $indent = $this->vendor_model->fetch_where_subgrid_data($table,$where); $data1=$indent->po_id; // print_r($data1); // die(); $table = 'indent_po'; $where = array('po_id'=>$data1,'confirm'=>'Yes'); $getalldata = $this->vendor_model->get_where_row($table,$where); $valw= $getalldata->po_id; $where=array('po_id'=>$valw); $table='indent_cs_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); // print_r($data['po_details1']); // die(); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details11']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $where=$goods_id->po_id; $data['goods_details']=$this->store_model->get_data_cs_fetch($where); $table1='indent_po'; $po_idd=$goods_id->po_list_id; $where1=array('id'=>$po_idd); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='monthly_preview'; $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('new_stores/consumable_spares_preview',$data); $this->load->view('templates/footer_inside'); } public function new_stores_spares_view() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $table = 'indent_po'; $where = array('id'=>$val); $indent = $this->vendor_model->fetch_where_subgrid_data($table,$where); $data1=$indent->po_id; // print_r($data1); // die(); $table = 'indent_po'; $where = array('po_id'=>$data1,'confirm'=>'Yes'); $getalldata = $this->vendor_model->get_where_row($table,$where); $valw= $getalldata->po_id; $where=array('po_id'=>$valw); $table='indent_cs_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); // print_r($data['po_details1']); // die(); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details11']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $where=$goods_id->po_id; $data['goods_details']=$this->store_model->get_data_cs_fetch($where); $table1='indent_po'; $po_idd=$goods_id->po_list_id; $where1=array('id'=>$po_idd); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); } $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_notifications']; $data['access'] = $this->access_details(); $data['indent_p']='year_preview'; $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('new_stores/consumable_spares_preview',$data); $this->load->view('templates/footer_inside'); } public function spares_preview_old() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('po_list_id'=>$val); $table='indent_cs_goods_details'; $goods_id=$this->store_model->fetch_where_subgrid_data($table,$where); //print_r($goods_id); // die(); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details1']=$this->store_model->fetch_where_subgrid_data1($table,$where); // print_r($data['po_details1']); // die(); $val1=$data['po_details']->po_id; $where=array('po_id'=>$val1); $table='indent_po'; $data['po_details11']=$this->store_model->fetch_where_subgrid_data1($table,$where); if(empty($goods_id)) { } else { $where=$goods_id->po_id; $data['goods_details']=$this->store_model->get_data_cs_fetch($where); $table1='indent_po'; $po_idd=$goods_id->po_list_id; $where1=array('id'=>$po_idd); $data['prpose_details']=$this->store_model->get_data_fetch($table1,$where1); } //$data['back_fun']='grn_p'; $data['back_fun']='grn_p'; $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('new_stores/consumable_spares_preview',$data); $this->load->view('templates/footer_inside'); } public function fabric_inspaection_history() { $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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($result->reference_url == $data['val']) { $check=$data['val']; } } if($check != "") { $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('new_stores/fabric_inspection_history',$data); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function histroy_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 = 'fabric_inspection_details'; $where = array('id'=>$i); $indent = $this->vendor_model->fetch_where_subgrid_data($table,$where); $data1=$indent->id; $table = 'fabric_inspection'; $where = array('goods_id'=>$data1); $getalldata = $this->vendor_model->fetch_where_subgrid_data($table,$where); // print_r($getalldata); // die(); echo json_encode($getalldata); } public function edit_received_goods_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=$_REQUEST['id']; //$quantity=$_REQUEST['quantity']; $design=$_REQUEST['design']; $data = array( 'id' => $id, 'design' => $design, ); $table='fabric_inspection_details'; $where=array('id'=>$id); $this->vendor_model->update_po_list_confirm_purchase($table,$data,$where); } public function details_BYATRANPURA_fetch1() { $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'; $details = $this->store_model->display_fabric_BYATRANPURA_grid_embroidryinspection(); echo json_encode($details); } public function details_VIJAYAPURA_fetch1() { $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'; $details = $this->store_model->display_fabric_VIJAYAPURA_grid_embroidryinspection(); echo json_encode($details); } public function details_DODDAJALA_fetch1() { $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'; $details = $this->store_model->display_fabric_DODDAJALA_grid_embroidryinspection(); echo json_encode($details); } public function barcode_submit() { $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['username']; $created_At=date('d/m/Y'); $data=array('ref_id'=>$this->input->post('url_id'), 'defects1' => $this->input->post('defects1'), 'defects2' => $this->input->post('defects2'), 'defects3' => $this->input->post('defects3'), 'defects4' => $this->input->post('defects4'), 'end_float1' => $this->input->post('end_float1'), 'end_float2' => $this->input->post('end_float2'), 'end_float3' => $this->input->post('end_float3'), 'end_float4' => $this->input->post('end_float4'), 'stack_tight1' =>$this->input->post('stack_tight1'), 'stack_tight2' =>$this->input->post('stack_tight2'), 'stack_tight3' => $this->input->post('stack_tight3'), 'stack_tight4' =>$this->input->post('stack_tight4'), 'starting_m1' =>$this->input->post('starting_m1'), 'starting_m2' => $this->input->post('starting_m2'), 'starting_m3' => $this->input->post('starting_m3'), 'starting_m4' =>$this->input->post('starting_m4'), 'weft_bars1' =>$this->input->post('weft_bars1'), 'weft_bars2' =>$this->input->post('weft_bars2'), 'weft_bars3' =>$this->input->post('weft_bars3'), 'weft_bars4' =>$this->input->post('weft_bars4'), 'tight_pack1' =>$this->input->post('tight_pack1'), 'tight_pack2' =>$this->input->post('tight_pack2'), 'tight_pack3' =>$this->input->post('tight_pack3'), 'tight_pack4' =>$this->input->post('tight_pack4'), 'oil_mark1'=>$this->input->post('oil_mark1'), 'oil_mark2'=> $this->input->post('oil_mark2'), 'oil_mark3' => $this->input->post('oil_mark3'), 'oil_mark4'=>$this->input->post('oil_mark4'), 'contamination1'=>$this->input->post('contamination1'), 'contamination2'=>$this->input->post('contamination2'), 'contamination3'=>$this->input->post('contamination3'), 'contamination4'=>$this->input->post('contamination4'), 'holes1'=>$this->input->post('holes1'), 'holes2'=>$this->input->post('holes2'), 'holes3'=>$this->input->post('holes3'), 'holes4'=>$this->input->post('holes4'), 'wrinkles1'=>$this->input->post('wrinkles1'), 'wrinkles2'=> $this->input->post('wrinkles2'), 'wrinkles3' => $this->input->post('wrinkles3'), 'wrinkles4'=>$this->input->post('wrinkles4'), 'others1'=>$this->input->post('others1'), 'others2'=>$this->input->post('others2'), 'others3'=>$this->input->post('others3'), 'others4'=>$this->input->post('others4'), 'sub_total1'=>$this->input->post('val_sub_tol1'), 'sub_total2'=>$this->input->post('val_sub_tol2'), 'sub_total3'=>$this->input->post('val_sub_tol3'), 'sub_total4'=>$this->input->post('val_sub_tol4'), 'main_total'=>$this->input->post('main_total'), 'points'=>$this->input->post('points'), 'created_by'=>$approved_by, 'created_at'=>$created_At, ); $table='inspection_qc'; $this->db->insert($table,$data); } public function fabric_piece_card() { $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); $data2=$this->input->post('checked_ids'); if($data2 == '') { $data['result']=array(); } else { $data1=substr($data2, 0, -1); $exp=array(); $path = explode("|", $data1); $exp = array_merge($exp, $path); $expp = array_merge($exp, $path); $w_mtrs=array(); $osl_details=array(); foreach($exp as $val) { $arr=$this->store_model->fabric_inspection_history_piece_card($val); $in_wt=$arr->inspected_weight; $in_mtr=$arr->inspected_mtrs; if($in_mtr == 0) { $w=0; } else { $w=$in_wt / $in_mtr; } array_push($osl_details,$arr); array_push($w_mtrs,$w); } $data['result']=$osl_details; $data['weight_mtrs']=$w_mtrs; } //$f=$r; //print_r($data['weight_mtrs']); //die(); $id=$this->session->userdata('logged_in'); $where=array('id'=>$id); $data['approved_by']=$id['username']; $id=$this->session->userdata('logged_in'); $data['userdetails'] = $this->session_data_pass(); $data['user_type_id'] = $this->access_id(); $data['total_indent_notifications'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('new_stores/fabric_piece_card_preview',$data); $this->load->view('templates/footer_inside'); } public function services_received_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"]; $RT = substr($uri, strpos($uri, "/") + 12); $m=date('m'); $y=date('Y'); if($RT == 'new_stores/services_received_details') { $data['url_val']='1'; $data['val']='new_stores/services_received_details'; $data['ref']='indent'; } else if($RT == 'new_stores/services_received_details') { $data['val']='new_stores/services_received_details'; $data['url_val']='2'; $data['ref']='today_dashboard'; $d1=date('d-m-Y'); $table=' indent_cs_goods_details'; $where=array('rec_date'=>$d1); $p1='Consumables'; $p2='Spares'; $data['new_yarn_count1']=$this->vendor_model->news_dashboard_cs_list_id_res($d1,$p1); $data['new_yarn_count2']=$this->vendor_model->news_dashboard_cs_list_id_res($d1,$p2); } else if($RT == 'new_stores/services_received_details') { $data['url_val']='3'; $data['val']='new_stores/services_received_details'; $data['ref']='month_dashboard'; $d1=date('d-m-Y'); $table=' indent_cs_goods_details'; $where=array('rec_date'=>$d1); $p1='Consumables'; $p2='Spares'; $data['new_yarn_count1']=$this->vendor_model->monthly_news_cs_dashboard_po_list_id_res($table,$m,$y,$p1); $data['new_yarn_count2']=$this->vendor_model->monthly_news_cs_dashboard_po_list_id_res($table,$m,$y,$p2); } else if($RT == 'new_stores/services_received_details') { $data['url_val']='4'; $data['val']='new_stores/services_received_details'; $data['ref']='year_dashboard'; $d1=date('d-m-Y'); $table=' indent_cs_goods_details'; $where=array('rec_date'=>$d1); $p1='Consumables'; $p2='Spares'; $data['new_yarn_count1']=$this->vendor_model->year_news_cs_dashboard_po_list_id_res($table,$y,$p1); $data['new_yarn_count2']=$this->vendor_model->year_news_cs_dashboard_po_list_id_res($table,$y,$p2); } $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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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($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($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'] = $this->indent_page_notifications(); $data['total_stock_notifications']=$this->stock_page_notifications(); $data['total_split_notifications']=$this->split_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['total_rec_stock_notifications']=$this->rec_stock_page_notifications(); $data['marketing_totals']=$this->marketing_page_notifications(); $data['issue_fabric_insert_rows']=$this->issue_fabric_page_notifications(); $data['issue_cs_insert_rows']=$this->issue_cs_page_notifications(); $data['total_planning']=$this->planning_page_notifications(); $data['total_sample_notifications']= $this->sample_page_notifications(); $data['total_work_order_twisting_notifications']= $this->work_order_page_notifications(); $data['total_package_notifications']= $this->packing_page_notifications(); $data['total_design_notifications']=$this->design_weaving_page_notifications(); $data['yarn_count']=$this->masters_page_notifications(); $data['total_madeups_notifications']=$this->madeups_page_notifications(); $data['inward_purchases_notifications']= $this->inward_page_notifications(); $data['fabric_inpection_notifications']= $this->new_stores_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['issue_loom_notifications']= $this->issue_loom_page_notifications(); $data['total_rows_notifications']=$data['total_indent_notifications'] + $data['total_stock_notifications'] + $data['total_rec_stock_notifications'] + $data['marketing_totals'] + $data['issue_fabric_insert_rows'] + $data['issue_cs_insert_rows'] + $data['total_planning'] + $data['total_sample_notifications'] + $data['total_work_order_twisting_notifications'] + $data['total_package_notifications'] + $data['total_design_notifications'] + $data['yarn_count'] + $data['total_madeups_notifications'] + $data['fabric_inpection_notifications'] + $data['issue_loom_notifications'] + $data['inward_purchases_notifications'] + $data['total_split_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('vendor_master/services_details_grid'); $this->load->view('templates/footer_inside'); } else { $this->session->sess_destroy(); redirect(base_url()); } } public function details_fetch_with_zero() { $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('customer_id'=>''); $details_res = $this->store_model->get_data_fetch($table,$where); foreach($details_res as $res) { $osl=$res->po_no; $where=array('oslNo'=>$osl); $table='orders'; $orders_val = $this->store_model->fetch_where_subgrid_data($table,$where); if(empty($orders_val)) { } else { $where=array('id'=>$res->id); $data=array('customer_id'=>$orders_val->fileNo); $table='fabric_inspection_details'; $this->store_model->update_data($where,$table,$data); } } $table='fabric_inspection_details'; $where=array('customer_id'=>'','osl_like'=>'PO'); $details_res_po = $this->store_model->get_data_fetch($table,$where); foreach($details_res_po as $res_po) { if($res_po->po_list_id == 0) { } else { $where=$res_po->id; $orders_val = $this->store_model->get_stock_po_transfer_spares_row_data($where); if(empty($orders_val)) { } else { $where=array('id'=>$res_po->id); $data=array('customer_id'=>$orders_val->fileNo); $table='fabric_inspection_details'; $this->store_model->update_data($where,$table,$data); } } } $table='fabric_inspection_details'; $details = $this->store_model->display_fabric_embroidryinspection_with_zero(); //print_r($details); echo json_encode($details); } public function date_wise_inspected_details_new() { $table='fabric_inspection_details'; $details_r = $this->store_model->date_wise_inspected_reports_1(); //print_r($details_r); //die(); $detailss = $this->store_model->date_wise_inspected_reportss_2(); $details=array_merge($details_r,$detailss); echo json_encode($details); } public function fabric_inspection_detail() { $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"]; $val = substr($uri, strpos($uri, "=") + 1); $where=array('id'=>$val); $table='indent_po'; $data['po_details']=$this->store_model->fetch_where_subgrid_data($table,$where); $val1=$data['po_details']->po_id; $financ_year=$data['po_details']->financ_year; $wheres=array('po_id'=>$val1); $tables='fabric_inspection_details'; $data['po_detailss']=$this->store_model->inspected_reports($val1,$financ_year); $data['back_fun']='grn_p'; $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(); $data['indent_p']='indent_preview'; $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('new_stores/fabric_inspection_detail',$data); $this->load->view('templates/footer_inside'); } } ?>