controller description given
This commit is contained in:
parent
2b0ba149c9
commit
4465382a54
@ -53,8 +53,6 @@ $route['reports']='reportlistcontroller';
|
||||
|
||||
$route['userListing'] = 'user/userListing';
|
||||
$route['userListing/(:num)'] = "user/userListing/$1";
|
||||
//$route['purchaseorderListing'] = 'purchaseorder/purchaseorderListing';
|
||||
//$route['purchaseorderListing/(:num)'] = "purchaseorder/purchaseorderListing/$1";
|
||||
$route['supplierListing'] = 'supplier/supplierListing';
|
||||
$route['supplierListing/(:num)'] = "supplier/supplierListing/$1";
|
||||
|
||||
@ -80,8 +78,7 @@ $route['attendance'] = 'monthlypay/attendanceLoad';
|
||||
$route['publicholidays'] = 'monthlypay/loadPublicholidays';
|
||||
$route['loanreports'] = 'payslip/loadLoanReport';
|
||||
$route['qualityreportlist'] = "quality/reportList";
|
||||
|
||||
|
||||
$route['qualityreportlistinward'] = "quality/reportListInward";
|
||||
|
||||
//<-----------Application Add Routes------------>
|
||||
$route['addNew'] = "user/addNew";
|
||||
@ -182,13 +179,12 @@ $route['POApproval'] = "purchaseorder/poapproval";
|
||||
|
||||
|
||||
//<!-- Store Requisition Flow ---------------->
|
||||
|
||||
$route['storerequisition']="storerequisitionlist/addstore";
|
||||
$route['approvalstorerequisitionslip']="storerequisitionlist/SearchRequistLists";
|
||||
$route['storerequisitionlisting']="storerequisitionlist/addstorerequisitionlist";
|
||||
$route['EditStoreRequisition'] = "storerequisitionlist/EditStoreRequistion";
|
||||
|
||||
|
||||
|
||||
//<-------------IGR page----------------->
|
||||
$route['Addigr'] = "inwardgateregister/addinwardgateregister";
|
||||
$route['ViewigrDetails'] = "inwardgateregister/viewIGRDetails";
|
||||
@ -209,6 +205,11 @@ $route['ViewIncomeExpense'] = "cashbook/incomeExpenseList";
|
||||
$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
||||
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
||||
|
||||
// permission slip//
|
||||
|
||||
$route['permission'] = 'monthlypay/permissionslip';
|
||||
$route['permissionlist'] = 'monthlypay/addper';
|
||||
|
||||
//<-------------Reports page----------------->
|
||||
$route['reportpending'] = "report/pending_report";
|
||||
$route['releasedpo'] = "report/releasedPO";
|
||||
@ -233,8 +234,7 @@ $route['Report_consolidate_inward'] = "report/iconsolidate";
|
||||
$route['Report_cumulative_inward'] = "report/icumulative";
|
||||
$route['Report_cumulative_raw'] = "report/rawi_cumulative";
|
||||
$route['Report_consolidate_category'] = "report/rawi_consolidate";
|
||||
$route['Report_cumulative_raw'] = "report/rawi_cumulative";
|
||||
$route['Report_consolidate_category'] = "report/rawi_consolidate";
|
||||
|
||||
|
||||
// Company Information
|
||||
$route['companyview'] = 'companycontroller/companyview';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@ class assetdetails extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* default function of the assetdetails class
|
||||
* Index Page for this controller(default function of the class)
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
@ -93,11 +93,11 @@ class cashbook extends BaseController
|
||||
$accounttype = $this->input->post('myradio');
|
||||
if($accounttype == 1)
|
||||
{
|
||||
$accounttype = 'INCOME';
|
||||
$accounttype = 'RECEIPT';
|
||||
}
|
||||
else
|
||||
{
|
||||
$accounttype = 'EXPENSE';
|
||||
$accounttype = 'PAYMENT';
|
||||
}
|
||||
$accountcode = $this->input->post('accode');
|
||||
$date = $this->input->post('Date');
|
||||
@ -254,11 +254,17 @@ class cashbook extends BaseController
|
||||
}
|
||||
|
||||
echo "Successfully Saved!";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* For edit cashbook screen
|
||||
*/
|
||||
public function editcashbook()
|
||||
{
|
||||
|
||||
$this->load->model('cashbook_model');
|
||||
$this->loadViews("editincomeexpenses", $this->global, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -366,7 +366,6 @@ class monthlypay extends BaseController
|
||||
{
|
||||
$this->session->set_flashdata('error', 'updation failed');
|
||||
}
|
||||
//echo success;
|
||||
|
||||
redirect('monthlyListings');
|
||||
}
|
||||
@ -374,7 +373,75 @@ class monthlypay extends BaseController
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To load employee payment details for permission screen
|
||||
**/
|
||||
function permissionslip()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Permission Slip';
|
||||
|
||||
$data['emplists']=$this->monthlypay_model->emplist();
|
||||
|
||||
$this->loadviews('permission',$this->global,$data,NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* To store new permission details into DB.
|
||||
**/
|
||||
function addper()
|
||||
{
|
||||
$EmpID = $this->input->post('emp');
|
||||
$Date =$this->input->post('date');
|
||||
$From = $this->input->post('timepicker1');
|
||||
$To = $this->input->post('timepicker2');
|
||||
$Shift = $this->input->post('shift');
|
||||
$Permission = $this->input->post('Pretime');
|
||||
$Reason= $this->input->post('Reason');
|
||||
$Createdby = $this->session->userdata('userId');
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$Createdtime = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$Permissiondata = array('EmpID'=>$EmpID,'Date'=>$Date,'From'=>$From,'To'=>$To,'Shift'=>$Shift,'Permission'=>$Permission,'Reason'=>$Reason,'Createby'=>$Createdby,'Createdtime'=>$Createdtime);
|
||||
|
||||
$result = $this->monthlypay_model->addper($Permissiondata);
|
||||
redirect('monthlypay/permissionlist');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To get permission slip details for listing
|
||||
*/
|
||||
function permissionlist(){
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Permission Listing';
|
||||
$data['permissionlist']=$this->monthlypay_model->perlist();
|
||||
$this->loadviews('permissionlist',$this->global,$data,NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* To display permissionslip details for PDF
|
||||
*/
|
||||
function permissionpdf($SNO){
|
||||
|
||||
$data['per'] = $this->monthlypay_model->pdf($SNO);
|
||||
|
||||
$this->load->view($this->config->item('admin_folder') .'/permissionpdf',$data);
|
||||
|
||||
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 38, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
|
||||
$html = $this->load->view('permissionpdf',$data,true);
|
||||
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
$mpdf->WriteHTML($html);
|
||||
$mpdf->Output("Permission".$data.'.pdf','I',$php);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To load pagenotfound view
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
/**
|
||||
* Class : quality (Quality Controller)
|
||||
* quality Class to control all quality related operations.
|
||||
* @author : VenbaInfoTech -
|
||||
* @author : Venba Info Tech
|
||||
* @version : 1.1
|
||||
* @since : 09 December 2017
|
||||
*/
|
||||
@ -30,6 +30,7 @@ class quality extends BaseController
|
||||
$data['products'] = $this->quality_model->getAllprodcuts();
|
||||
$data['customers'] = $this->quality_model->getAllcustomers();
|
||||
$data['existspec'] = $this->quality_model->getAllspec();
|
||||
$data['existspecinward'] = $this->quality_model->getAllspecInward();
|
||||
$this->global['pageTitle'] = 'Resico : Quality Master';
|
||||
$this->loadViews("qualitymasterlistview", $this->global, $data , NULL);
|
||||
}
|
||||
@ -40,7 +41,7 @@ class quality extends BaseController
|
||||
public function reportList()
|
||||
{
|
||||
$data['records'] = $this->quality_model->getTestMasterforList();
|
||||
$this->global['pageTitle'] = 'Resico : Quality Master';
|
||||
$this->global['pageTitle'] = 'Resico : Prodcut Report List ';
|
||||
$this->loadViews("reportmasterlist", $this->global, $data , NULL);
|
||||
}
|
||||
|
||||
@ -49,8 +50,11 @@ class quality extends BaseController
|
||||
*/
|
||||
function addNewPage()
|
||||
{
|
||||
$data['products'] = $this->quality_model->getAllprodcuts();
|
||||
$data['customers'] = $this->quality_model->getAllcustomers();
|
||||
$data['productsoutward'] = $this->quality_model->getAllprodcuts();
|
||||
$data['customersoutward'] = $this->quality_model->getAllcustomers();
|
||||
$data['productsinward'] = $this->quality_model->getAllprodcutsInward();
|
||||
$data['customersinward'] = $this->quality_model->getAllcustomersInward();
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Quality Master';
|
||||
$this->loadViews("qualitymaster", $this->global, $data , NULL);
|
||||
}
|
||||
@ -63,6 +67,8 @@ class quality extends BaseController
|
||||
$product = $this->input->post('param2');
|
||||
$customer = $this->input->post('param3');
|
||||
$jsondata = $this->input->post('param1');
|
||||
$type = $this->input->post('param4');
|
||||
|
||||
$createdby = $this->session->userdata ( 'userId' );
|
||||
$phpdata = json_decode($jsondata);
|
||||
$total = 0;
|
||||
@ -80,14 +86,14 @@ class quality extends BaseController
|
||||
if($isExist[0]->count == 0)
|
||||
{
|
||||
|
||||
$tostore = array('customer_id'=>$customer,'product_id'=>$product,'testtype'=>$name,'uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'created_by'=>$createdby);
|
||||
$tostore = array('customer_id'=>$customer,'product_id'=>$product,'testtype'=>$name,'uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'type'=>$type,'created_by'=>$createdby);
|
||||
$res = $this->quality_model->addSpecMast($tostore);
|
||||
|
||||
}
|
||||
else if($isExist[0]->count == 1)
|
||||
{
|
||||
|
||||
$tostore = array('uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'updated_by'=>$createdby);
|
||||
$tostore = array('uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'type'=>$type,'updated_by'=>$createdby);
|
||||
$res = $this->quality_model->updateSpecMast($tostore,$product,$customer,$name);
|
||||
|
||||
}
|
||||
@ -162,20 +168,35 @@ class quality extends BaseController
|
||||
function printReportPDF()
|
||||
{
|
||||
|
||||
|
||||
$type = '';
|
||||
$html = '';
|
||||
$filename = '';
|
||||
if($this->input->post('type'))
|
||||
{
|
||||
$type = $this->input->post('type');
|
||||
}
|
||||
$reportid = $this->input->post('rid');
|
||||
$data['reportdata'] = $this->quality_model->getIndividualReportData($reportid);
|
||||
$filename = 'PRE DESPATCH INSPECTION REPORT'.$reportid;
|
||||
$html = $this->load->View("viewindreportpdf",$data,true);
|
||||
require APPPATH . '/third_party/mpdf/mpdf.php';
|
||||
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
|
||||
if($type != 'INWARD' or $type == ''){
|
||||
$data['reportdata'] = $this->quality_model->getIndividualReportData($reportid);
|
||||
$filename = 'PRE DESPATCH INSPECTION REPORT'.$reportid;
|
||||
$html = $this->load->View("viewindreportpdf",$data,true);
|
||||
}
|
||||
else if($type == 'INWARD')
|
||||
{
|
||||
$data['reportdata'] = $this->quality_model->getIndividualInwardReportData($reportid);
|
||||
$filename = 'INWARD MATERIAL INSPECTION REPORT'.$reportid;
|
||||
$html = $this->load->View("viewindinwardreportpdf",$data,true);
|
||||
}
|
||||
require APPPATH . '/third_party/mpdf/mpdf.php';
|
||||
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
|
||||
$mpdf->list_indent_first_level = 1;
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
$mpdf->WriteHTML($html);
|
||||
$mpdf->Output($filename.'.pdf','I');
|
||||
$mpdf->list_indent_first_level = 1;
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
$mpdf->WriteHTML($html);
|
||||
$mpdf->Output($filename.'.pdf','I');
|
||||
|
||||
}
|
||||
|
||||
@ -205,10 +226,14 @@ class quality extends BaseController
|
||||
$batchno = $this->input->post('param5');
|
||||
$chart = $this->input->post('param7');
|
||||
$batchno = date_format(date_create($batchno),'Y-m-d');
|
||||
|
||||
$approver = $this->input->post('param6');
|
||||
|
||||
$testphpdata = json_decode($testjson,true);
|
||||
$loiphpdata = json_decode($loijson,true);
|
||||
|
||||
$afsphpdata = json_decode($afsjson,true);
|
||||
|
||||
$createdon = date('Y-m-d H:i:s');
|
||||
$createby = $this->session->userdata ( 'userId' );
|
||||
|
||||
@ -229,7 +254,7 @@ class quality extends BaseController
|
||||
$remarks1 = '';
|
||||
foreach($testphpdata as $data)
|
||||
{
|
||||
|
||||
|
||||
$descrition = $data['Description'];
|
||||
$min = $data['SpecificationMin'];
|
||||
$max = $data['SpecificationMax'];
|
||||
@ -286,6 +311,116 @@ class quality extends BaseController
|
||||
echo "Report Data Saved Successfully!";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function saveInwardTestReportData()
|
||||
{
|
||||
|
||||
date_default_timezone_get('Asia/Kolkata');
|
||||
$testjson = $this->input->post('param1');
|
||||
$loijson = $this->input->post('param2');
|
||||
$afsjson = $this->input->post('param3');
|
||||
|
||||
$igrno = $this->input->post('param4');
|
||||
$igrlineitemno = $this->input->post('param5');
|
||||
$chart = $this->input->post('param7');
|
||||
$report_date = $this->input->post('param8');
|
||||
$report_date = date_format(date_create($report_date),'Y-m-d');
|
||||
|
||||
$approver = $this->input->post('param6');
|
||||
|
||||
$testphpdata = json_decode($testjson,true);
|
||||
$loiphpdata = json_decode($loijson,true);
|
||||
|
||||
$afsphpdata = json_decode($afsjson,true);
|
||||
|
||||
$createdon = date('Y-m-d H:i:s');
|
||||
$createby = $this->session->userdata ( 'userId' );
|
||||
|
||||
$masterreportdata = array('igrno'=>$igrno,'igrlineitemno'=>$igrlineitemno,'batchdate'=>$report_date,'createdby'=>$createby,'createdon'=>$createdon,'approvedby'=>$approver,'chartdata'=>$chart);
|
||||
$MASTERID = $this->quality_model->saveMasterTestData($masterreportdata);
|
||||
|
||||
|
||||
foreach($testphpdata as $data)
|
||||
{
|
||||
|
||||
$descrition = $data['Description'];
|
||||
$min = $data['SpecificationMin'];
|
||||
$max = $data['SpecificationMax'];
|
||||
$uom = $data['SpecificationUOM'];
|
||||
$act1 = $data['ACT X1'];
|
||||
$act2 = $data['ACT X2'];
|
||||
$act3 = $data['ACT X3'];
|
||||
$average = $data['Average'];
|
||||
$results = $data['Results'];
|
||||
$remarks1 = $data['Remarks'];
|
||||
$testreportdata = array('testreport_id'=>$MASTERID,'description'=>$descrition,'min'=>$min,'max'=>$max,'UOM'=>$uom,'act1'=>$act1,'act2'=>$act2,'act3'=>$act3,'average'=>$average,'result'=>$results,'remarks'=>$remarks1);
|
||||
$reportid = $this->quality_model->saveTestReportData($testreportdata);
|
||||
}
|
||||
|
||||
foreach($loiphpdata as $loi)
|
||||
{
|
||||
$start = $loi['Heating Timestart'];
|
||||
$end = $loi['Heating Timeend'];
|
||||
$temp = $loi['Temp *c'];
|
||||
$w1 = $loi['Crucible Weight w1(g)'];
|
||||
$w2 = $loi['Before Heatingw2(g)'];
|
||||
$w3 = $loi['After Heatingw3(g)'];
|
||||
$loip = $loi['L.O.I %'];
|
||||
$remark = $loi['Remarks'];
|
||||
$loitabledata = array('testreport_id'=>$MASTERID,'start_time'=>$start,'end_time'=>$end,'temp'=>$temp,'w1'=>$w1,'w2'=>$w2,'w3'=>$w3,'loi_percentage'=>$loip,'remarks'=>$remark);
|
||||
$loiid = $this->quality_model->saveTestReportLOIData($loitabledata);
|
||||
|
||||
}
|
||||
|
||||
$count =0;
|
||||
foreach($afsphpdata as $afs)
|
||||
{
|
||||
$count++;
|
||||
if($count != 12){
|
||||
$ssize = $afs['Sieve Size µm'];
|
||||
$mesh_size = $afs['Mesh Size'];
|
||||
$sandweight = $afs['Sand Weight'];
|
||||
$Percentage = $afs['Percentage'];
|
||||
$Multiplier = $afs['Multiplier'];
|
||||
$Product = $afs['Product'];
|
||||
$afstabledata = array('testreport_id'=>$MASTERID,'sieve_size'=>$ssize,'mesh_size'=>$mesh_size,'sandweight'=>$sandweight,'percentage'=>$Percentage,'multiplier'=>$Multiplier,'product'=>$Product);
|
||||
$afsid = $this->quality_model->saveTestReportAFSData($afstabledata);
|
||||
}
|
||||
}
|
||||
|
||||
echo "Report Data Saved Successfully!";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function addNewInward_Report()
|
||||
{
|
||||
$data['records'] = $this->quality_model->getIGRNOforReport();
|
||||
$data['emplist'] = $this->quality_model->getEmplistforReport();
|
||||
$this->global['pageTitle'] = 'Siddharth : Inward Inspection';
|
||||
$this->loadViews("inward_report_create", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getIGRLineItemNo()
|
||||
{
|
||||
$igrno = $this->input->post('param1');
|
||||
$data['igrdetails'] = $this->quality_model->getIGRLineItemNo($igrno);
|
||||
echo json_encode($data['igrdetails']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getIGRDetails()
|
||||
{
|
||||
$igrno = $this->input->post('param1');
|
||||
$igrlineitemno = $this->input->post('param2');
|
||||
$data['igrdetails'] = $this->quality_model->getIGRDataforReport($igrno,$igrlineitemno);
|
||||
echo json_encode($data['igrdetails']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -14,13 +14,13 @@ class report extends BaseController
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
*/
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('dahsboard_Model');
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
}
|
||||
|
||||
public function pending_report()
|
||||
{
|
||||
|
||||
@ -36,8 +36,9 @@ class report extends BaseController
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function releasedPO()
|
||||
}
|
||||
|
||||
public function releasedPO()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Order Value - Released Reports - ';
|
||||
@ -54,7 +55,8 @@ class report extends BaseController
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function openorderPO()
|
||||
{
|
||||
|
||||
@ -73,7 +75,8 @@ class report extends BaseController
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function TotalOrd()
|
||||
{
|
||||
|
||||
@ -95,7 +98,8 @@ class report extends BaseController
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function ccr()
|
||||
{
|
||||
|
||||
@ -466,16 +470,20 @@ class report extends BaseController
|
||||
$cname = $this->input->post('client_name');
|
||||
$prod = $this->input->post('item_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$cat = $this->input->get('cat');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$d = $this->input->get('d');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t);
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d);
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
@ -515,6 +523,7 @@ class report extends BaseController
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cname = $this->input->get('cname');
|
||||
$cat = $this->input->get('cat');
|
||||
$prod = $this->input->get('prod');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
@ -530,7 +539,7 @@ class report extends BaseController
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d);
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat);
|
||||
}
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
@ -751,7 +760,147 @@ class report extends BaseController
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function rawi_cumulative()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum']=$this->dahsboard_Model->rawi_report_cumulative();
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_cumulative_raw",$this->global,$data, NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public function rawi_cum_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($sup);
|
||||
|
||||
$data['cum_year']=$this->dahsboard_Model->rawi_report_cum_year($cat);
|
||||
$this->loadviews("Report_cumulative_year_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_cum_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum_month']=$this->dahsboard_Model->rawi_report_cum_month($cat);
|
||||
$this->loadviews("Report_cumulative_month_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_cum_day()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum_day']=$this->dahsboard_Model->rawi_report_cum_day($cat);
|
||||
$this->loadviews("Report_cumulative_day_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_consolidate()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->category();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_report_consolidate($cname,$fa,$aa);
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_raw",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function rawi_consolidate_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
//$mat = $this->input->get('mid');
|
||||
$m = $this->input->get('m');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_month($m,$cat,$sup,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_month",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function rawi_consolidate_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
//$mat = $this->input->get('mid');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_year($cat,$sup,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_year",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function cashbook()
|
||||
{
|
||||
|
||||
@ -764,9 +913,9 @@ class report extends BaseController
|
||||
$data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount();
|
||||
$data['cashbook']=$this->dahsboard_Model->cashbook();
|
||||
|
||||
$income="INCOME";
|
||||
$expense="EXPENSE";
|
||||
$data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income);
|
||||
$income="RECEIPT";
|
||||
$expense="PAYMENT";
|
||||
$data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income);
|
||||
$data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense);
|
||||
$data['todayincome']=$this->dahsboard_Model->today_data($income);
|
||||
$data['todayexpense']=$this->dahsboard_Model->today_data($expense);
|
||||
@ -905,6 +1054,24 @@ public function Viewtoday()
|
||||
}
|
||||
}
|
||||
|
||||
public function depmenu()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Cashbook - viewtoday ';
|
||||
$data['depmenu']=$this->dahsboard_Model->departmentmenu();
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$this->loadviews("cashbookdepmenu",$this->global,$data, NULL);
|
||||
}
|
||||
public function cashbookmenudepartment()
|
||||
{
|
||||
$sid=$_GET['sid'];
|
||||
|
||||
$this->global['pageTitle'] = 'Cashbook - department - ';
|
||||
$data['menudepartmentwise']=$this->dahsboard_Model->menudepartmentwise($sid);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
//print_r($data['departmentwise']);
|
||||
$this->loadviews("cashbookdepday",$this->global,$data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -3,37 +3,34 @@
|
||||
require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : User (UserController)
|
||||
* User Class to control all user related operations.
|
||||
* @author : Kishor Mali
|
||||
* Class : reportlistcontroller ( Report List Controller)
|
||||
* reportlistcontroller Class to control all report related operations.
|
||||
* @author : Venba Info Tech
|
||||
* @version : 1.1
|
||||
* @since : 15 November 2016
|
||||
* @since : 12 December 2017
|
||||
*/
|
||||
class reportlistcontroller extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
* Default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('user_model');
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the first screen of the user
|
||||
* Index Page for this controller(default function of the class)
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Reports list ';
|
||||
$this->loadViews("reportslink", $this->global , NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -23,63 +23,53 @@ class requisitionform extends BaseController
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
/**
|
||||
* This function used to load the first screen of the Requistion
|
||||
* To load the Requistion Listing screen
|
||||
*/
|
||||
function requisitionlisting()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Requisition Listing';
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
// $data['ReqList'] = $this->requistion_model->getRequistListUserID($userID);
|
||||
$data['Status'] = $this->requistion_model->CheckDraftStatus($userID);
|
||||
|
||||
$data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID);
|
||||
|
||||
|
||||
$data['Status'] = $this->requistion_model->CheckDraftStatus($userID);
|
||||
$data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID);
|
||||
$this->loadViews("requisitionlisting", $this->global, $data, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the first screen of the requisition Form
|
||||
* To load the requisition Form
|
||||
*/
|
||||
|
||||
function requisition()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Raise Requisition';
|
||||
|
||||
$data['RequestType'] = $this->requistion_model->getConfigValue('C020');
|
||||
|
||||
$data['EmpList'] = $this->requistion_model->getAllEmployees();
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID);
|
||||
|
||||
$data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID);
|
||||
$data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID);
|
||||
|
||||
$this->loadViews("requisitionform", $this->global, $data,null);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the first screen of the Requistion List Approval Screen
|
||||
/**
|
||||
* To load the Requistion List Approval Screen
|
||||
*/
|
||||
function requisitionlistApproval()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Requisition Approval';
|
||||
|
||||
$data['Status']= $this->requistion_model->getStatus();
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$data['AppList'] = $this->requistion_model->getApproverRequistList($userID);
|
||||
$this->global['pageTitle'] = 'Resico : Requisition Approval';
|
||||
|
||||
$data['Status']= $this->requistion_model->getStatus();
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
$data['AppList'] = $this->requistion_model->getApproverRequistList($userID);
|
||||
|
||||
|
||||
$this->loadViews("requisitionlistapproval", $this->global, $data, NULL);
|
||||
$this->loadViews("requisitionlistapproval", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function used to load the Edit Requistion Form
|
||||
* To load the Edit Requistion Form
|
||||
*/
|
||||
function EditRequistionForm()
|
||||
{
|
||||
@ -87,14 +77,17 @@ class requisitionform extends BaseController
|
||||
|
||||
$ReqNo= $_GET['ReqNo'];
|
||||
$ReqType= $_GET['ReqType'];
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
$data['ReqDetails'] = $this->requistion_model->getRequistDetails($ReqNo,'Yes');
|
||||
$this->load->model('purchaseorder_model');
|
||||
$POType= $this->purchaseorder_model->GetPOType($ReqNo);
|
||||
$ReqPOType = '';
|
||||
if(count($POType) > 0)
|
||||
|
||||
$this->load->model('purchaseorder_model');
|
||||
|
||||
$POType= $this->purchaseorder_model->GetPOType($ReqNo);
|
||||
|
||||
$ReqPOType = '';
|
||||
|
||||
if(count($POType) > 0)
|
||||
{
|
||||
for($i=0;$i<count($POType);$i++)
|
||||
{
|
||||
@ -107,31 +100,31 @@ class requisitionform extends BaseController
|
||||
{
|
||||
$ReqPOType = $POType[$i]['POType'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//print_r($POType);
|
||||
// echo 'ReqType'.$ReqPOType;
|
||||
}
|
||||
}
|
||||
|
||||
$data['ReqPOType'] = $ReqPOType =='' ? $ReqType:$ReqPOType;
|
||||
$data['LineItem'] = $this->requistion_model->getEditRequistItemList($ReqNo);
|
||||
$data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID);
|
||||
$data['MaterialCode'] = $this->requistion_model->EditMaterialCode($ReqNo, $ReqType);
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
$this->loadViews("editrequisitionform", $this->global, $data, NULL);
|
||||
}
|
||||
/**
|
||||
* This function used to load the Delete the Requistion Items
|
||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||
$this->loadViews("editrequisitionform", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the Delete the Requistion Items
|
||||
*/
|
||||
function DeleteRequistionForm()
|
||||
{
|
||||
|
||||
$ReqList= $this->input->post('id');
|
||||
$ReqNo ='';
|
||||
$MaterialCode = '';
|
||||
$ReqNo ='';
|
||||
$MaterialCode = '';
|
||||
|
||||
if(count($ReqList) > 0)
|
||||
{
|
||||
$ReqNo = $ReqList[0];
|
||||
$MaterialCode = $ReqList[1];
|
||||
$MaterialCode = $ReqList[1];
|
||||
}
|
||||
|
||||
$this->requistion_model->DeleteRequistionLineItem( $ReqNo,$MaterialCode);
|
||||
@ -139,23 +132,26 @@ class requisitionform extends BaseController
|
||||
echo "Successfully Deleted the Line item".$ReqNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the Delete the Requistion Items
|
||||
/**
|
||||
* To load the Delete the Requistion Number
|
||||
*/
|
||||
function DeleteReqNo()
|
||||
{
|
||||
|
||||
$ReqNo= $this->input->post('id');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$Request = array('Status'=>REQ_DELETED,'updatedOn'=>$updateddt);
|
||||
|
||||
|
||||
$this->requistion_model->UpdateRequistion( $Request,$ReqNo);
|
||||
|
||||
echo "Successfully Deleted the ".$ReqNo;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the Requistion List Approval Screen
|
||||
*/
|
||||
function SearchRequistList()
|
||||
{
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
@ -168,7 +164,7 @@ class requisitionform extends BaseController
|
||||
$Status= '';
|
||||
if(count( $Dt)>1)
|
||||
{
|
||||
$FDate = $Dt[0]."-".$Dt[1]."-".$Dt[2];
|
||||
$FDate = $Dt[0]."-".$Dt[1]."-".$Dt[2];
|
||||
$TDate = $Dt[3]."-".$Dt[4]."-".$Dt[5];
|
||||
$FromDate = $this->getDateformat($FDate);
|
||||
$ToDate = $this->getDateformat($TDate);
|
||||
@ -196,15 +192,18 @@ class requisitionform extends BaseController
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getDateformat($Val)
|
||||
/**
|
||||
* To Convert the dateformat (date with time) and stored into DB
|
||||
*/
|
||||
function getDateformat($Val)
|
||||
{
|
||||
$date = new DateTime($Val);
|
||||
$retDate = $date->format('Y-m-d H:i:s');
|
||||
return $retDate;
|
||||
$date = new DateTime($Val);
|
||||
$retDate = $date->format('Y-m-d H:i:s');
|
||||
return $retDate;
|
||||
}
|
||||
/**
|
||||
* This function used to load the Employee details based on the EmpID selection
|
||||
|
||||
/**
|
||||
* To load the Employee details based on the EmpID selection
|
||||
*/
|
||||
function GetSelectedEmpDetails()
|
||||
{
|
||||
@ -214,7 +213,8 @@ class requisitionform extends BaseController
|
||||
$DeptCode = $empDetails[0]['DEPCode'];
|
||||
$CostList = $this->requistion_model->GetCostCenterByDept( $DeptCode);
|
||||
$HTML = "<option value='-1'>Select Cost center</option>";
|
||||
$BudAmount = "";
|
||||
$BudAmount = "";
|
||||
|
||||
if(count($CostList) > 0)
|
||||
{
|
||||
for ($j = 0; $j < count($CostList); $j++)
|
||||
@ -224,38 +224,39 @@ class requisitionform extends BaseController
|
||||
$HTML .="<option value='".$Code."'>".$Code."-".$Name."</option>";
|
||||
}
|
||||
}
|
||||
if(count($CostList) == 1)
|
||||
|
||||
if(count($CostList) == 1)
|
||||
{
|
||||
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
{
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
$this->load->model('purchaseorder_model');
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
$this->load->model('purchaseorder_model');
|
||||
|
||||
$result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
//print_r($result);
|
||||
$AvilBudAmt = '0';
|
||||
if(count($result)>0)
|
||||
{
|
||||
$BudAmount = $result[0]['BudgetAmount'] - $result[0]['Totalvalue'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
$result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
$AvilBudAmt = '0';
|
||||
if(count($result)>0)
|
||||
{
|
||||
$BudAmount = $result[0]['BudgetAmount'] - $result[0]['Totalvalue'];
|
||||
}
|
||||
}
|
||||
die(json_encode(array('emp' => $empDetails,'Cost' => $HTML,'AvlAmount' => $BudAmount)));
|
||||
}
|
||||
|
||||
/**
|
||||
* To get the costcenter's budget amount by using Request type and Financal year
|
||||
*/
|
||||
function getAvailableBudAmount()
|
||||
{
|
||||
$ReqType = $_GET['ReqType'];
|
||||
@ -264,26 +265,25 @@ class requisitionform extends BaseController
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
{
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
{
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
$this->load->model('purchaseorder_model');
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
$this->load->model('purchaseorder_model');
|
||||
|
||||
$Cost = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
$Cost = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
//$Cost = $this->requistion_model->GetAvailableBudgetAmount( $CostCode,$Year,$ReqType);
|
||||
|
||||
die(json_encode(array('Cost' =>$Cost)));
|
||||
die(json_encode(array('Cost' =>$Cost)));
|
||||
}
|
||||
// To get the Material code based on the Request type
|
||||
|
||||
/**
|
||||
* To get the Material code based on the Request type
|
||||
*/
|
||||
function getMaterialCode()
|
||||
{
|
||||
|
||||
@ -294,8 +294,8 @@ class requisitionform extends BaseController
|
||||
$UOM = "";
|
||||
$HTML = "<option value='-1'>Select Material Type</option>";
|
||||
|
||||
if(count($MaterialCode) > 0)
|
||||
{
|
||||
if(count($MaterialCode) > 0)
|
||||
{
|
||||
for ($j = 0; $j < count($MaterialCode); $j++)
|
||||
{
|
||||
$Code = $MaterialCode[$j]['MaterialCode'];
|
||||
@ -303,14 +303,16 @@ class requisitionform extends BaseController
|
||||
$HTML .="<option value='".$Code."'>".$Code."-".$Name."</option>";
|
||||
|
||||
}
|
||||
$MaterialName = $MaterialCode[0]['MaterialName'];
|
||||
$UOM = $MaterialCode[0]['UOM'];
|
||||
$MaterialName = $MaterialCode[0]['MaterialName'];
|
||||
$UOM = $MaterialCode[0]['UOM'];
|
||||
}
|
||||
|
||||
die(json_encode(array('Material' =>$HTML,'MaterialName'=>$MaterialName,'UOM'=>$UOM)));
|
||||
die(json_encode(array('Material' =>$HTML,'MaterialName'=>$MaterialName,'UOM'=>$UOM)));
|
||||
}
|
||||
|
||||
// To get the Material value based on the MaterialCode
|
||||
/**
|
||||
* To get the Material value based on the MaterialCode
|
||||
* */
|
||||
function getMaterialDetails()
|
||||
{
|
||||
|
||||
@ -318,15 +320,12 @@ class requisitionform extends BaseController
|
||||
|
||||
$MaterialDetails = $this->requistion_model->getRawMaterialList($Material);
|
||||
|
||||
|
||||
die(json_encode(array('MatDetail' =>$MaterialDetails)));
|
||||
}
|
||||
|
||||
/*
|
||||
To Insert the Requistion Details to Database
|
||||
*/
|
||||
/**
|
||||
* This function is used to add new Cost to the system
|
||||
|
||||
/**
|
||||
* To add new Requistions to the system
|
||||
*/
|
||||
function addNewRequistion()
|
||||
{
|
||||
@ -340,10 +339,10 @@ class requisitionform extends BaseController
|
||||
}
|
||||
else
|
||||
{
|
||||
$Status= $_GET['ID'];
|
||||
$RequestType = strtoupper(trim($this->input->post('RequestType')));
|
||||
$Requestedby = strtoupper(trim($this->input->post('EmpID')));
|
||||
$RequestedbyDept = $this->session->userdata ( 'DEPCode' );
|
||||
$Status= $_GET['ID'];
|
||||
$RequestType = strtoupper(trim($this->input->post('RequestType')));
|
||||
$Requestedby = strtoupper(trim($this->input->post('EmpID')));
|
||||
$RequestedbyDept = $this->session->userdata ( 'DEPCode' );
|
||||
$CostCenter = $this->input->post('CostCenter');
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
@ -354,44 +353,41 @@ class requisitionform extends BaseController
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
$serviceSchedule = $this->input->post('serviceSchedule');
|
||||
$servicePeriod = $this->input->post('serviceSchedule');
|
||||
// $noOfService = $this->input->post('noOfService');
|
||||
$servicePeriod = $this->input->post('serviceSchedule');
|
||||
|
||||
$noOfService = 1;
|
||||
|
||||
$IsExists = $this->requistion_model->RequistionIsExists($Requestedby);
|
||||
// print_r($IsExists);
|
||||
$IsExists = $this->requistion_model->RequistionIsExists($Requestedby);
|
||||
|
||||
|
||||
if(count( $IsExists) == 0)
|
||||
{
|
||||
//echo 'Not Exists';
|
||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod,'RequestedDept'=>$RequestedbyDept);
|
||||
|
||||
//print_r($Request);
|
||||
|
||||
if(count( $IsExists) == 0)
|
||||
{
|
||||
|
||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod,'RequestedDept'=>$RequestedbyDept);
|
||||
$Req = $this->requistion_model->addRequistion($Request);
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo 'Exists';
|
||||
$Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod,'RequestedDept'=>$RequestedbyDept);
|
||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request,$IsExists[0]['ReqNo']);
|
||||
}
|
||||
$ReqNumber = '';
|
||||
if(count($Req)>0)
|
||||
{
|
||||
|
||||
if(count($Req)>0)
|
||||
{
|
||||
$ReqNumber = $Req[0]['ReqNo'];
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$ReqNumber = $IsExists[0]['ReqNo'];
|
||||
}
|
||||
}
|
||||
|
||||
$SkipInsert = False;
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
$SkipInsert = False;
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
for($j = 1; $j < count($comma_separated); $j++)
|
||||
{
|
||||
$deletedRow = $comma_separated[$j] ;
|
||||
@ -403,30 +399,36 @@ class requisitionform extends BaseController
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||
$Quantity = $this->input->post('Quantity'.$i);
|
||||
|
||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
|
||||
$this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if($Status == REQ_DRAFT)
|
||||
{
|
||||
}
|
||||
if($Status == REQ_DRAFT)
|
||||
{
|
||||
echo 'Successfully Saved the Requistion details.Requistion No is '.$ReqNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Successfully Created the Requistion details.Requistion No is '.$ReqNumber;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* To Store the Requistions edited values
|
||||
*/
|
||||
function EditRequistion()
|
||||
{
|
||||
$Status = $this->input->post('txtStatus');
|
||||
@ -439,8 +441,8 @@ class requisitionform extends BaseController
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
$serviceSchedule = $this->input->post('serviceSchedule');
|
||||
$servicePeriod = $this->input->post('serviceSchedule');
|
||||
// $noOfService = $this->input->post('noOfService');
|
||||
$servicePeriod = $this->input->post('serviceSchedule');
|
||||
|
||||
$noOfService = 1;
|
||||
if(strlen($Status) > 1)
|
||||
{
|
||||
@ -449,75 +451,69 @@ class requisitionform extends BaseController
|
||||
}
|
||||
else
|
||||
{
|
||||
$Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>$updatedDate,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod);
|
||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber);
|
||||
$Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>$updatedDate,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod);
|
||||
$UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber);
|
||||
}
|
||||
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
|
||||
/* Table value update and Insert in the table */
|
||||
//echo "RowCOunt:" .$RowCount;
|
||||
$SkipInsert = False;
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
/* Table value update and Insert in the table */
|
||||
|
||||
$SkipInsert = False;
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
for($j = 1; $j < count($comma_separated); $j++)
|
||||
{
|
||||
$deletedRow = $comma_separated[$j] ;
|
||||
|
||||
$deletedRow = $comma_separated[$j] ;
|
||||
if($deletedRow == $i )
|
||||
{
|
||||
$SkipInsert = "True";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||
$Quantity = $this->input->post('Quantity'.$i);
|
||||
$IsExists = $this->requistion_model->LineItemIsExists($ReqNumber,$MaterialCode);
|
||||
if(count( $IsExists) == 0)
|
||||
{
|
||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate);
|
||||
|
||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate);
|
||||
$this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate);
|
||||
|
||||
$this->requistion_model->UpdateRequistionLineItem($ReqDetails,$ReqNumber,$MaterialCode);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
echo 'Successfully updated the Requistion details .Requistion No is '.$ReqNumber;
|
||||
// $this->requisitionlisting();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/* To Edit the request*/
|
||||
function ViewRequest()
|
||||
{
|
||||
}
|
||||
echo 'Successfully updated the Requistion details .Requistion No is '.$ReqNumber;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To Edit the request
|
||||
**/
|
||||
function ViewRequest()
|
||||
{
|
||||
|
||||
$ReqNo= $this->input->post('id');
|
||||
$ReqNo= $this->input->post('id');
|
||||
$result = $this->requistion_model->getRequistItemList($ReqNo);
|
||||
$ReqList = $this->requistion_model->getRequistDetails($ReqNo);
|
||||
$DepNo = $ReqList[0]['DEPCode'];
|
||||
//$CostList = $this->requistion_model->GetCostCenterByDept($DepNo);
|
||||
$HTML="";
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
$ReqList = $this->requistion_model->getRequistDetails($ReqNo);
|
||||
$DepNo = $ReqList[0]['DEPCode'];
|
||||
|
||||
$HTML="";
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
$SNo = $i + 1;
|
||||
$MaterialCode = $result[$i]['MaterialCode'];
|
||||
$MaterialName = $result[$i]['MaterialName'];
|
||||
@ -538,41 +534,34 @@ class requisitionform extends BaseController
|
||||
<td align='left'>".$StatusName."</td>
|
||||
</tr>";
|
||||
|
||||
//$index = $index + 1;
|
||||
|
||||
}
|
||||
$CostCode = '';
|
||||
$ReqType = '';
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$this->load->model('costcenter_model');
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
$FYEnd = '';
|
||||
$this->load->model('costcenter_model');
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
{
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
}
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
$this->load->model('purchaseorder_model');
|
||||
if(count($ReqList)>0)
|
||||
{
|
||||
|
||||
$ReqType = $ReqList[0]['ReqType'];
|
||||
|
||||
$ReqType = $ReqList[0]['ReqType'];
|
||||
$CostCode = $ReqList[0]['CostCenterCode'];
|
||||
}
|
||||
|
||||
$POType= $this->purchaseorder_model->GetPOType($ReqNo);
|
||||
|
||||
$ReqPOType = '';
|
||||
if(count($POType) > 0)
|
||||
{
|
||||
|
||||
$ReqPOType = '';
|
||||
if(count($POType) > 0)
|
||||
{
|
||||
for($i=0;$i<count($POType);$i++)
|
||||
{
|
||||
if($POType[$i]['POType'] == $ReqType)
|
||||
@ -584,63 +573,35 @@ class requisitionform extends BaseController
|
||||
{
|
||||
$ReqPOType = $POType[$i]['POType'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$RequestType='';
|
||||
$RequestType= $ReqPOType =='' ? $ReqType:$ReqPOType;
|
||||
|
||||
|
||||
|
||||
|
||||
$AvlBudget = array();
|
||||
|
||||
// if($ReqType== CAPITAL&&$RequestType!=IMPORT )
|
||||
// {
|
||||
// $AvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
// }
|
||||
|
||||
|
||||
if($ReqType== CAPITAL&&$RequestType!=IMPORT )
|
||||
{
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$RequestType);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// else if($ReqType== CAPITAL&&$RequestType==IMPORT)
|
||||
// {
|
||||
|
||||
// $AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$RequestType);
|
||||
// }
|
||||
|
||||
|
||||
// else if($ReqType== IMPORT)
|
||||
// {
|
||||
// $AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$RequestType);
|
||||
// }
|
||||
else
|
||||
|
||||
{
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
}
|
||||
|
||||
|
||||
// $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
//print_r($result);
|
||||
$AvilBudAmt = '0';
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
$AvilBudAmt = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
//echo $AvilBudAmt;
|
||||
|
||||
die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList,'AvilBudAmount'=>number_format($AvilBudAmt,2))));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For requistion approval status
|
||||
*/
|
||||
function ApproveRequest()
|
||||
{
|
||||
$Status= Trim($_GET['Status']);
|
||||
@ -648,18 +609,19 @@ class requisitionform extends BaseController
|
||||
$ReqNo= $_GET['ReqNo'];
|
||||
$Remarks = trim($this->input->post('id'));
|
||||
$ApprovedBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$ApprovedDate = $dt->format('Y-m-d H:i:s');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$ApprovedDate = $dt->format('Y-m-d H:i:s');
|
||||
$Request = array('Status'=>$Status,'Comments'=>$Remarks,'ApprovedOn'=>$ApprovedDate,'Approvedby'=>$ApprovedBy);
|
||||
$this->requistion_model->UpdateRequistion($Request,$ReqNo);
|
||||
echo "Successfully Updated the Requistion No: ".$ReqNo;
|
||||
|
||||
}
|
||||
echo "Successfully Updated the Requistion No: ".$ReqNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* To load pagenotfound view
|
||||
*/
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class : servicepurchaseorder (Service Purchase Order Details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* servicepurchaseorder Class to control all service po related operations.
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 15 November 2017
|
||||
@ -14,51 +14,56 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
class servicepurchaseorder extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
* default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('purchaseorder_model');
|
||||
|
||||
$this->load->library('session');
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('session');
|
||||
$this->load->library('form_validation');
|
||||
$this->load->model('requistion_model');
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To load Service PO Billing
|
||||
*/
|
||||
function viewServicePOReportForBilling()
|
||||
{
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Service Purchase Order for Billing';
|
||||
|
||||
$data["Billing"] = $this->purchaseorder_model->GetServicePOListforBilling();
|
||||
|
||||
//print_r($data["Billing"]);
|
||||
|
||||
$this->loadViews("serviceporeport", $this->global,$data,null);
|
||||
|
||||
}
|
||||
|
||||
function UpdateServicePOStatus()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* To Change Status of Service PO.
|
||||
*/
|
||||
function UpdateServicePOStatus()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Update Service PO Status';
|
||||
$data['PO'] = $this->purchaseorder_model->GetServicePOListforStatusUpdate();
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
|
||||
$data['PO'] = $this->purchaseorder_model->GetServicePOListforStatusUpdate();
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$this->loadViews("statusofservicepurchaseorder", $this->global,$data,Null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To Get Po details for Service PO Billing
|
||||
*/
|
||||
function getPODetails()
|
||||
{
|
||||
$PONO = $this->input->post('id');
|
||||
$PO=$PONO;
|
||||
$result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
$PO=$PONO;
|
||||
$result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
$HTML="";
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
$SNo = $i + 1;
|
||||
$ReqNo = $result[$i]['ReqNo'];
|
||||
$Reqedby = $result[$i]['FirstName'];
|
||||
@ -93,28 +98,26 @@ class servicepurchaseorder extends BaseController
|
||||
echo $HTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* To Update Service PO Status
|
||||
*/
|
||||
function UpdateServiceStatus()
|
||||
{
|
||||
|
||||
$PONO = $this->input->post('PONO');
|
||||
$WorkStatus = $this->input->post('WorkStatus');
|
||||
|
||||
|
||||
|
||||
$Remarks = $this->input->post('Remarks');
|
||||
$updatedBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$updatedBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
if($WorkStatus== SERVICE_COMPLETED ){
|
||||
$POStatus=PO_SERVICE_COMPLETED;
|
||||
$POList = array('UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'ServiceWorkStatusRemarks'=>$Remarks,'ServiceWorkStatus'=>$WorkStatus,'Status'=>$POStatus);
|
||||
|
||||
|
||||
|
||||
|
||||
$PO=$PONO;
|
||||
$result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
|
||||
if($WorkStatus== SERVICE_COMPLETED ){
|
||||
|
||||
$POStatus=PO_SERVICE_COMPLETED;
|
||||
$POList = array('UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'ServiceWorkStatusRemarks'=>$Remarks,'ServiceWorkStatus'=>$WorkStatus,'Status'=>$POStatus);
|
||||
$PO=$PONO;
|
||||
$result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
|
||||
for ($i = 0; $i < count($result); $i++)
|
||||
{
|
||||
@ -124,80 +127,79 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
$ReqList = $this->purchaseorder_model->updateReqDetail($PONO,$POStatus,$MaterialCode);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// $ReqList = $this->purchaseorder_model->updateReqDetail($PONO,$POStatus);
|
||||
$this->purchaseorder_model->UpdateReceivedQtyforServicePO($PONO,$updateddt,$updatedBy);
|
||||
}
|
||||
else{
|
||||
$POList = array('UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'ServiceWorkStatusRemarks'=>$Remarks,'ServiceWorkStatus'=>$WorkStatus);
|
||||
}
|
||||
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
$this->purchaseorder_model->UpdateReceivedQtyforServicePO($PONO,$updateddt,$updatedBy);
|
||||
}
|
||||
else{
|
||||
$POList = array('UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'ServiceWorkStatusRemarks'=>$Remarks,'ServiceWorkStatus'=>$WorkStatus);
|
||||
}
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
$this->UpdateServicePOStatus();
|
||||
echo "<script>alert('Successfully Updated the workStatus of the PO ".$PONO."')</script>";
|
||||
echo "<script>alert('Successfully Updated the workStatus of the PO ".$PONO."')</script>";
|
||||
}
|
||||
// To get the available Budget Amount
|
||||
|
||||
/**
|
||||
* To get the available Budget Amount
|
||||
**/
|
||||
function AvilBudgetAmount()
|
||||
{
|
||||
// echo 'Controller called';
|
||||
$this->load->model('costcenter_model');
|
||||
$CostCode = $this->input->post('id');
|
||||
$ReqType = $_GET['ReqType'];
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
{
|
||||
{
|
||||
|
||||
$this->load->model('costcenter_model');
|
||||
$CostCode = $this->input->post('id');
|
||||
$ReqType = $_GET['ReqType'];
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
{
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
$this->load->model('purchaseorder_model');
|
||||
$result = array();
|
||||
|
||||
if($ReqType== CAPITAL)
|
||||
{
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
$this->load->model('purchaseorder_model');
|
||||
$result = array();
|
||||
|
||||
if($ReqType== CAPITAL)
|
||||
{
|
||||
$result = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
}
|
||||
else if($ReqType== IMPORT)
|
||||
{
|
||||
}
|
||||
else if($ReqType== IMPORT)
|
||||
{
|
||||
$result = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
}
|
||||
//print_r($result);
|
||||
$AvilBudAmt = '0';
|
||||
if(count($result)>0)
|
||||
{
|
||||
}
|
||||
|
||||
$AvilBudAmt = '0';
|
||||
if(count($result)>0)
|
||||
{
|
||||
$AvilBudAmt = $result[0]['BudgetAmount'] - $result[0]['Totalvalue'];
|
||||
}
|
||||
|
||||
// echo 'Test';
|
||||
print_r($AvilBudAmt);
|
||||
//die(json_encode(array('Cost' => $AvilBudAmt)));
|
||||
}
|
||||
print_r($AvilBudAmt);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getDateformat($Val)
|
||||
/**
|
||||
* To convert the dateformat (date with time) and store to DB
|
||||
*/
|
||||
function getDateformat($Val)
|
||||
{
|
||||
$date = new DateTime($Val,new DateTimeZone('Asia/Kolkata'));
|
||||
// print_r($date);
|
||||
$retDate = $date->format('Y-m-d H:i:s');
|
||||
return $retDate;
|
||||
}
|
||||
|
||||
//This used to Create Service Purchase Order
|
||||
/**
|
||||
* To Create Service Purchase Order
|
||||
*/
|
||||
function addNewServicePurchaseOrder()
|
||||
{
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class :storerequisition (Store Requisition Detail - Controller )
|
||||
* User Class to control all user related operations.
|
||||
* storerequisition Class to control all store related operations.
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 18 November 2017
|
||||
@ -12,52 +12,69 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
class storerequisition extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
* default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
//$this->load->model('monthlypay_model');
|
||||
$this->load->library('session');
|
||||
$this->load->library('form_validation');
|
||||
// $this->load->library('pagination');
|
||||
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the first screen of the user
|
||||
* Index Page for this controller (default function of the class)
|
||||
*/
|
||||
public function index()
|
||||
public function index()
|
||||
{
|
||||
//$this->global['pageTitle'] = 'Resico : storesrequisitionslip';
|
||||
|
||||
//$this->loadviews('storesrequisitionslip',$this->global);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the Add store requisition screen
|
||||
*/
|
||||
function addstorerequisitionslip()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Add Store Requisition';
|
||||
|
||||
$this->loadviews('addstorerequisitionslip',$this->global);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the store requisition list screen
|
||||
*/
|
||||
function storerequisitionlist()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Store Requisition List';
|
||||
|
||||
$this->loadviews('storerequisitionlist',$this->global);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the store requisition listing
|
||||
*/
|
||||
function storerequisitionlisting()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Store Requisition Listing';
|
||||
|
||||
$this->loadviews('storerequisitionlisting',$this->global);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the approval store requisition screen
|
||||
*/
|
||||
function approvalstorerequisition()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Approval Store Requisition';
|
||||
|
||||
$this->loadviews('approvalstorerequisitionslip',$this->global);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load pagenotfound screen
|
||||
*/
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
|
||||
@ -4,7 +4,7 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
|
||||
/**
|
||||
* Class :storerequisitionlist (Store Stock list details - Controller)
|
||||
* User Class to control all user related operations.
|
||||
* storerequisitionlist Class to control all Store's-stock related operations.
|
||||
* @author : Venba Info Tech -
|
||||
* @version : 1.1
|
||||
* @since : 18 November 2017
|
||||
@ -12,58 +12,58 @@ require APPPATH . '/libraries/BaseController.php';
|
||||
class storerequisitionlist extends BaseController
|
||||
{
|
||||
/**
|
||||
* This is default constructor of the class
|
||||
* Default constructor of the class
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('storerequistion_model');
|
||||
|
||||
$this->load->library('session');
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
|
||||
|
||||
/*ADD Store requisition line item
|
||||
*/
|
||||
function addstores()
|
||||
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$userId= $this->session->userdata ('userId');
|
||||
$data['DEPCode'] = $this->session->userdata('DEPCode');
|
||||
/**
|
||||
* For Store requisition listing (NOTE : this listing descripted - what are the store requistion)
|
||||
**/
|
||||
function addstores()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : Created Store Requisition Listing';
|
||||
|
||||
$userId= $this->session->userdata ('userId');
|
||||
|
||||
$data['DEPCode'] = $this->session->userdata('DEPCode');
|
||||
$data['DepName'] = $this->session->userdata('DepartmentName');
|
||||
|
||||
$data['cost'] = $this->storerequistion_model->getCostUser($userId);
|
||||
$data['MaterialList'] = $this->storerequistion_model->getRawMaterialList();
|
||||
|
||||
|
||||
$this->loadViews("addstorerequisitionslip", $this->global,$data,null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function addstore()
|
||||
/**
|
||||
* Store requisition listing is under Draft status (this hide the raise StoreRequisition button).
|
||||
**/
|
||||
function addstore()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$userId= $this->session->userdata ('userId');
|
||||
|
||||
$userId= $this->session->userdata ('userId');
|
||||
$data['Store'] = $this->storerequistion_model->Storeall($userId);
|
||||
|
||||
$this->loadViews("storerequisition", $this->global,$data,null);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the Delete the StoreRequistion Items
|
||||
/**
|
||||
* Its handles Store Requistion Delete Operations ( in Store Requistion listing )
|
||||
*/
|
||||
function DeleteReqNo()
|
||||
{
|
||||
|
||||
$StoreReqNo= $this->input->post('id');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
$Request = array('Status'=>REQ_DELETED,'updatedOn'=>$updateddt);
|
||||
|
||||
$this->storerequistion_model->UpdateRequistion($StoreReqNo,$Request);
|
||||
@ -72,33 +72,29 @@ class storerequisitionlist extends BaseController
|
||||
|
||||
}
|
||||
|
||||
/* The Function Edit Store Requistion list */
|
||||
/**
|
||||
* For editing purpose and it has oldest all store requistion.
|
||||
*/
|
||||
function EditStoreRequistion()
|
||||
{
|
||||
$StoreReqNo = $_GET['StoreReqNo'];
|
||||
|
||||
//$StoreReqNo= $this->input->post('id');
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : Edit StoreRequisition';
|
||||
$this->load->model('storerequistion_model');
|
||||
$data['cost'] = $this->storerequistion_model->editRequistDetails($StoreReqNo);
|
||||
|
||||
$data['Status'] = $this->storerequistion_model->getStoreRequistionStatus($StoreReqNo);
|
||||
|
||||
$data['MaterialList'] = $this->storerequistion_model->getRawMaterialList();
|
||||
|
||||
$data['cost'] = $this->storerequistion_model->editRequistDetails($StoreReqNo);
|
||||
$data['Status'] = $this->storerequistion_model->getStoreRequistionStatus($StoreReqNo);
|
||||
$data['MaterialList'] = $this->storerequistion_model->getRawMaterialList();
|
||||
$data['DepName'] = $this->session->userdata('DepartmentName');
|
||||
$data['LineItem']=$this ->storerequistion_model->editstorerequistions($StoreReqNo);
|
||||
|
||||
$this->loadViews("editstorerequisition", $this->global,$data,null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**get the date formatted**/
|
||||
|
||||
function getDateformat($Val)
|
||||
/**
|
||||
* To convert the dateformat (date with time) and store to DB
|
||||
*/
|
||||
function getDateformat($Val)
|
||||
{
|
||||
$date = new DateTime($Val);
|
||||
$retDate = $date->format('Y-m-d H:i:s');
|
||||
@ -106,8 +102,9 @@ class storerequisitionlist extends BaseController
|
||||
}
|
||||
|
||||
|
||||
/**This function is used to add new StoreRequestion to the system */
|
||||
|
||||
/**
|
||||
* For new StoreRequestion values inserted into DB
|
||||
*/
|
||||
function addNewRequistion()
|
||||
{
|
||||
|
||||
@ -119,115 +116,103 @@ class storerequisitionlist extends BaseController
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
// echo $RowCount;
|
||||
// die();
|
||||
$Status = $this->input->post('txtStatus');
|
||||
$Requestedby = $this->session->userdata ( 'EmpID' );
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
//echo 'done';
|
||||
$StoreReqNo ='';
|
||||
|
||||
$StoreItemStatus =STORE_OPEN;
|
||||
$Request = array( 'Requestedby'=>$Requestedby,'DepartmentCode'=>$DEPCode,'ReqDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
||||
//print_r($Request);
|
||||
$Req = $this->storerequistion_model->addRequistion($Request);
|
||||
$StoreItemStatus =STORE_OPEN;
|
||||
$Request = array( 'Requestedby'=>$Requestedby,'DepartmentCode'=>$DEPCode,'ReqDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
||||
|
||||
$Req = $this->storerequistion_model->addRequistion($Request);
|
||||
|
||||
if(count($Req)>0)
|
||||
{
|
||||
$StoreReqNo = $Req[0]['StoreReqNo'];
|
||||
//printf_r($ReqNumber);
|
||||
}
|
||||
//echo $StoreReqNo;
|
||||
|
||||
|
||||
|
||||
$SkipInsert = False;
|
||||
if(count($Req)>0)
|
||||
{
|
||||
$StoreReqNo = $Req[0]['StoreReqNo'];
|
||||
}
|
||||
|
||||
$SkipInsert = False;
|
||||
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
|
||||
for($j = 1; $j < count($comma_separated); $j++)
|
||||
{
|
||||
$deletedRow = $comma_separated[$j];
|
||||
|
||||
if($deletedRow == $i )
|
||||
{
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
for($j = 1; $j < count($comma_separated); $j++)
|
||||
{
|
||||
$deletedRow = $comma_separated[$j];
|
||||
if($deletedRow == $i )
|
||||
{
|
||||
|
||||
$SkipInsert = "True";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
$SkipInsert = "True";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||
$QuantityRequired=$this->input->post('Quantity'.$i);
|
||||
$Remarks=$this->input->post('Remarks'.$i);
|
||||
$Request = array('MaterialCode'=>$MaterialCode,'Status'=>$StoreItemStatus ,'QuantityRequired'=>$QuantityRequired,'Remarks'=>$Remarks,'StoreReqNo'=>$StoreReqNo);
|
||||
|
||||
|
||||
|
||||
$addReq=$this->storerequistion_model->addstoreRequistion($Request);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($Status == STORE_DRAFT)
|
||||
{
|
||||
echo 'Successfully Saved the Store Requistion details';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Successfully Created the Store Requistion details';
|
||||
}
|
||||
if($Status == STORE_DRAFT)
|
||||
{
|
||||
echo 'Successfully Saved the Store Requistion details';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Successfully Created the Store Requistion details';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* For Store requisition listing (NOTE : this listing descripted - only approved store requistion)
|
||||
*/
|
||||
function addstorerequisitionlist()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : StoreRequisition Listing';
|
||||
$this->global['pageTitle'] = 'Resico : Store Requisition Listing';
|
||||
$this->load->model('storerequistion_model');
|
||||
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
$data['TotNoOfLine']=$this->storerequistion_model->getRequistionList();
|
||||
//print_r($data['TotNoOfLine']);
|
||||
$this->loadViews("storerequisitionlisting", $this->global,$data,null);
|
||||
|
||||
$this->loadViews("storerequisitionlisting", $this->global,$data,null);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//To issue Store Requistion
|
||||
/**
|
||||
* To issue Store Requistion
|
||||
**/
|
||||
function issuestorerequisition()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Issue StoreRequisition';
|
||||
$this->load->model('storerequistion_model');
|
||||
|
||||
$StoreReqNo= $_GET['ReqNo'];
|
||||
$StoreReqNo= $_GET['ReqNo'];
|
||||
|
||||
$data['ReqItem'] = $this->storerequistion_model->getRequistItemList($StoreReqNo);
|
||||
$data['ReqListDetails'] = $this->storerequistion_model->getRequistDetails($StoreReqNo);
|
||||
//print_r($data['ReqItem']);
|
||||
$data['ReqListDetails'] = $this->storerequistion_model->getRequistDetails($StoreReqNo);
|
||||
$this->loadViews("issueStoreRequistion", $this->global,$data,null);
|
||||
|
||||
}
|
||||
//update with existing one with new one
|
||||
}
|
||||
|
||||
/**
|
||||
* To Update with existing one with new one (Issued Requistion)
|
||||
* */
|
||||
function UpdateIssueRequistion()
|
||||
{
|
||||
|
||||
//echo 'ffd';
|
||||
// die();
|
||||
$ReqNO = $this->input->post('txtReqNo');
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
//echo $RowCount;
|
||||
//die();
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
$UPdateby=$this->session->userdata('userId');
|
||||
@ -235,22 +220,15 @@ class storerequisitionlist extends BaseController
|
||||
$UPdateon = $date->format('Y-m-d H:i:s');
|
||||
|
||||
|
||||
//$ItemStatus = STORE_ISSUSED;
|
||||
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
|
||||
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||
// echo $MaterialCode;
|
||||
|
||||
$IssuedQuantity = $this->input->post('txtIssuedQuantity'.$i);
|
||||
|
||||
$Reqqty= $this->input->post('txtqty'.$i);
|
||||
// echo $Reqqty;
|
||||
// die();
|
||||
$savedqty=$this->storerequistion_model->getSavedQty($ReqNO,$MaterialCode);
|
||||
// if($reqstatus==)
|
||||
// print_r($savedqty);
|
||||
// die();
|
||||
$Qtyissued=0;
|
||||
foreach($savedqty as $Qty)
|
||||
{
|
||||
@ -258,8 +236,6 @@ class storerequisitionlist extends BaseController
|
||||
}
|
||||
|
||||
$ActQty=$Qtyissued+$IssuedQuantity;
|
||||
// echo $ActQty;
|
||||
// die();
|
||||
|
||||
|
||||
if($Reqqty>$ActQty)
|
||||
@ -272,26 +248,14 @@ class storerequisitionlist extends BaseController
|
||||
$ItemStatus = STORE_ISSUSED;
|
||||
}
|
||||
|
||||
//echo $ItemStatus;
|
||||
//die();
|
||||
// echo'Material issed';
|
||||
if(strlen($IssuedQuantity)>0)
|
||||
{
|
||||
|
||||
|
||||
$Remarks = $this->input->post('txtRemarks'.$i);
|
||||
|
||||
//echo $IssuedQuantity;
|
||||
//die ();
|
||||
$CreatedBy = $this->session->userdata('userId');
|
||||
|
||||
|
||||
$storerequisition = array('StoreReqNo'=>$ReqNO,'MaterialCode'=>$MaterialCode,'QuantityIssued'=>$ActQty,'Status'=>$ItemStatus,'StoreComments'=>$Remarks,'UpdatedOn'=>$createddt,'UpdatedBy'=>$CreatedBy);
|
||||
|
||||
|
||||
//print_r($storerequisition);
|
||||
//die();
|
||||
|
||||
$storerequisition = array('StoreReqNo'=>$ReqNO,'MaterialCode'=>$MaterialCode,'QuantityIssued'=>$ActQty,'Status'=>$ItemStatus,'StoreComments'=>$Remarks,'UpdatedOn'=>$createddt,'UpdatedBy'=>$CreatedBy);
|
||||
|
||||
|
||||
$this->storerequistion_model->UpdateStoreRequistionItem($storerequisition,$ReqNO,$MaterialCode);
|
||||
|
||||
@ -302,8 +266,6 @@ class storerequisitionlist extends BaseController
|
||||
$avlQty = $getAvailableqty[0]['Quantity'];
|
||||
}
|
||||
$BalanceQty=$avlQty-$IssuedQuantity;
|
||||
// echo $BalanceQty;
|
||||
// die();
|
||||
$updatStock = array('Quantity'=>$BalanceQty,'Status'=>'0',
|
||||
'Remarks'=>'Stock Deducted For'.$ReqNO,'UpdatedOn'=>$UPdateon,'UpdatedBy'=>$UPdateby);
|
||||
|
||||
@ -314,7 +276,6 @@ class storerequisitionlist extends BaseController
|
||||
$StoreReqNo=$ReqNO;
|
||||
$reqstatus=$this->storerequistion_model->getstatuscount('ST037',$ReqNO);
|
||||
$reqstatuscount=0;
|
||||
//print_r($reqstatus);
|
||||
foreach ($reqstatus as $Req)
|
||||
{
|
||||
$reqstatuscount=$Req->SCount;
|
||||
@ -332,7 +293,7 @@ class storerequisitionlist extends BaseController
|
||||
}
|
||||
|
||||
|
||||
// echo $reqstatuscount;
|
||||
|
||||
|
||||
$updatestatus=array('Status' =>$reqStatus);
|
||||
|
||||
@ -344,50 +305,50 @@ class storerequisitionlist extends BaseController
|
||||
}
|
||||
|
||||
}
|
||||
//die();
|
||||
|
||||
echo "<script>alert('Updated Successfully!');</script>";
|
||||
redirect('storerequisitionlisting','refresh');
|
||||
|
||||
|
||||
|
||||
}
|
||||
/* this function use to search StoreRequistlist*///search bar
|
||||
function SearchRequistLists()
|
||||
|
||||
/**
|
||||
* For Store Requisition listing (Note: this listing descripted - Approve the store requisition )
|
||||
**/
|
||||
function SearchRequistLists()
|
||||
{
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
|
||||
|
||||
$data['AppList'] = $this->storerequistion_model->getApproverRequistList($userID);
|
||||
//print_r($data['AppList']);
|
||||
$this->global['pageTitle'] = 'Resico : ApprovalStoreRequisitionSlip';
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
$userID = $this->session->userdata ( 'userId' );
|
||||
$data['AppList'] = $this->storerequistion_model->getApproverRequistList($userID);
|
||||
$this->global['pageTitle'] = 'Resico : Approval Store Requisition Listing';
|
||||
$data['Status']= $this->storerequistion_model->getStatus();
|
||||
|
||||
$this->loadViews("approvalstorerequisitionslip", $this->global, $data, NULL);
|
||||
$this->loadViews("approvalstorerequisitionslip", $this->global, $data, NULL);
|
||||
|
||||
}
|
||||
|
||||
/*Approve Completed*/
|
||||
/**
|
||||
* To change the approval storerequisition status ( Approve Completed are not)
|
||||
*/
|
||||
function ApproveRequest()
|
||||
{
|
||||
$Status= Trim($_GET['Status']);
|
||||
|
||||
//$StoreReqNo=$this->input->post('StoreReqNo');
|
||||
$StoreReqNo = trim($this->input->post('id'));
|
||||
$Remarks=trim($this->input->post('newcomments'));
|
||||
$ApprovedBy = $this->session->userdata ( 'userId' );
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$ApprovedDate = $dt->format('Y-m-d H:i:s');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$ApprovedDate = $dt->format('Y-m-d H:i:s');
|
||||
$Request = array('Status'=>$Status,'Comments'=>$Remarks,'ApprovedOn'=>$ApprovedDate,'Approvedby'=>$ApprovedBy);
|
||||
|
||||
$this->storerequistion_model->UpdateRequistion($StoreReqNo,$Request);
|
||||
echo "Successfully Updated the Requistion No: ".$StoreReqNo;
|
||||
echo "Successfully Updated the Requistion No: ".$StoreReqNo;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This function used to load the first screen of the Requistion List Approval Screen
|
||||
*/
|
||||
/*to load the first screen of the Requistion List Approval Screen*/
|
||||
function requisitionlistApproval()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico :Approvalstorerequisitionlist';
|
||||
@ -439,8 +400,11 @@ class storerequisitionlist extends BaseController
|
||||
|
||||
die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList)));
|
||||
}
|
||||
|
||||
function UpdateStoreRequistion()
|
||||
|
||||
/**
|
||||
* For stored new values after edited StoreRequistion information.
|
||||
*/
|
||||
function UpdateStoreRequistion()
|
||||
{
|
||||
|
||||
$CostCenter = $this->input->post('CostCenter');
|
||||
@ -480,6 +444,7 @@ class storerequisitionlist extends BaseController
|
||||
|
||||
if($deletedRow == $i )
|
||||
{
|
||||
|
||||
$SkipInsert = "True";
|
||||
break;
|
||||
}
|
||||
@ -523,22 +488,20 @@ class storerequisitionlist extends BaseController
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to load the Delete the Requistion Items
|
||||
/**
|
||||
* Its handles Store Requistion Line item Delete Operations ( add & edit Store Requistion screen)
|
||||
*/
|
||||
function DeleteRequistionForm()
|
||||
{
|
||||
|
||||
|
||||
function DeleteRequistionForm()
|
||||
{
|
||||
$ReqList= $this->input->post('id');
|
||||
$StoreReqNo ='';
|
||||
$MaterialCode = '';
|
||||
if(count($ReqList) > 0)
|
||||
{
|
||||
$StoreReqNo = $ReqList[0];
|
||||
$MaterialCode = $ReqList[1];
|
||||
}
|
||||
|
||||
if(count($ReqList) > 0)
|
||||
{
|
||||
$StoreReqNo = $ReqList[0];
|
||||
$MaterialCode = $ReqList[1];
|
||||
}
|
||||
|
||||
$this->storerequistion_model->DeleteRequistionLineItem( $StoreReqNo,$MaterialCode);
|
||||
|
||||
echo "Successfully Deleted the Line item".$StoreReqNo;
|
||||
|
||||
@ -28,12 +28,11 @@ class storestatus extends BaseController
|
||||
public function index()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico Industries : Store Status';
|
||||
|
||||
$this->loadViews("storestatus", $this->global, NULL , NULL);
|
||||
$this->loadViews("storestatus", $this->global, NULL , NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the Supplier list
|
||||
* To descripted Store Stock Availability list
|
||||
*/
|
||||
function storeavailability()
|
||||
{
|
||||
@ -48,8 +47,8 @@ class storestatus extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the Supplier list
|
||||
*/
|
||||
* Its handles add stock details Operation.
|
||||
*/
|
||||
function AddStock()
|
||||
{
|
||||
|
||||
@ -77,9 +76,9 @@ class storestatus extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the Supplier list
|
||||
*/
|
||||
function UpdateStock()
|
||||
* Its handles updated stock details Operations.
|
||||
*/
|
||||
function UpdateStock()
|
||||
{
|
||||
|
||||
$MaterialCode = $this->input->post('EditMaterialCode');
|
||||
@ -106,11 +105,10 @@ class storestatus extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the Supplier list
|
||||
* Its handles view all stock details.
|
||||
*/
|
||||
function viewStockHistory()
|
||||
{
|
||||
|
||||
$MaterialCode= $this->input->post('id');
|
||||
|
||||
$result = $this->store_model->GetStockHisory($MaterialCode);
|
||||
|
||||
@ -158,55 +158,202 @@ function attendancemonth()
|
||||
|
||||
}
|
||||
|
||||
|
||||
function attendanceyear()
|
||||
{
|
||||
$CURMONTH = date('m');
|
||||
$CURDATE = date('d');
|
||||
$EmpID= $this->input->post('id');
|
||||
$day = array();
|
||||
|
||||
$result = $this->dahsboard_Model->attendanceyear($EmpID);
|
||||
$yearabs = $this->dahsboard_Model->getAllAttendance($EmpID,$CURMONTH);
|
||||
$TotalNoofDays = $result[0]->TotalWorkingDays;
|
||||
$DaysWorked = $result[0]->DaysWorked;
|
||||
|
||||
|
||||
$values=0;
|
||||
|
||||
$weekdays = array();
|
||||
$date = date('d');
|
||||
|
||||
$Work= array_sum($weekdays);
|
||||
|
||||
for($j=1;$j<=$date;$j++)
|
||||
{
|
||||
$weekdays[] = 'WH'.$j;
|
||||
public function getFinancialStartDate() {
|
||||
$CURMONTH = date('n');
|
||||
$CURYEAR = date('Y');
|
||||
$FINYEAR = 0;
|
||||
if($CURMONTH >= 4 ) {
|
||||
$FINYEAR = $CURYEAR;
|
||||
}else {
|
||||
$FINYEAR = $CURYEAR-1;
|
||||
}
|
||||
foreach ($yearabs as $day ) {
|
||||
foreach ($day as $key => $value) {
|
||||
foreach ($weekdays as $weeks) {
|
||||
|
||||
$dateInString = $FINYEAR.'-4-1';
|
||||
$result = date_create($dateInString);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getFinancialEndDate() {
|
||||
$CURMONTH = date('n');
|
||||
$CURYEAR = date('Y');
|
||||
$FINYEAR = 0;
|
||||
if($CURMONTH < 4 ) {
|
||||
$FINYEAR = $CURYEAR;
|
||||
}else {
|
||||
$FINYEAR = $CURYEAR+1;
|
||||
}
|
||||
|
||||
$dateInString = $FINYEAR.'-3-31';
|
||||
$result = date_create($dateInString);
|
||||
return $result;
|
||||
}
|
||||
|
||||
function attendanceyear()
|
||||
{
|
||||
$CURMONTH = date('m');
|
||||
$CURDATE = date('d');
|
||||
|
||||
|
||||
$EmpID= $this->input->post('id');
|
||||
$day = array();
|
||||
|
||||
|
||||
$datejoin=$this->dahsboard_Model->joindate($EmpID);
|
||||
|
||||
$DateofJoiningInString = $datejoin[0]->DateofJoining;
|
||||
$DateofJoining = date_create($DateofJoiningInString);
|
||||
|
||||
if($weeks == $key)
|
||||
{
|
||||
if($value != 0){
|
||||
$values++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$finStart = $this->getFinancialStartDate();
|
||||
$finEnd = $this->getFinancialEndDate();
|
||||
|
||||
|
||||
$JoinedMonth = date_format($DateofJoining,"n");
|
||||
|
||||
if($DateofJoining >= $finStart && $DateofJoining <= $finEnd) {
|
||||
|
||||
$JoinedMonthAttendance = $this->dahsboard_Model->getAllAttendance($EmpID,$JoinedMonth);
|
||||
|
||||
|
||||
$doj_month =date_format($DateofJoining,"n");
|
||||
$doj_year= date_format($DateofJoining,"Y");
|
||||
$doj_day= date_format($DateofJoining,"j");
|
||||
|
||||
$joinedMonthDaysCount = cal_days_in_month(CAL_GREGORIAN, $doj_month, $doj_year);
|
||||
$joinedMonthWorkingDayCount = $joinedMonthDaysCount - $doj_day;
|
||||
|
||||
|
||||
|
||||
$joinedMonthDays =0;
|
||||
for($j=$doj_day;$j<=$joinedMonthDaysCount;$j++)
|
||||
{
|
||||
$weekdays[] = 'WH'.$j;
|
||||
}
|
||||
foreach ($JoinedMonthAttendance as $day ) {
|
||||
//print_r($weekda);
|
||||
foreach ($day as $key => $value) {
|
||||
foreach ($weekdays as $weeks) {
|
||||
|
||||
if($weeks == $key)
|
||||
{
|
||||
if($value!= 0){
|
||||
|
||||
$joinedMonthDays++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$result = $this->dahsboard_Model->attendanceyear($EmpID, $JoinedMonth + 1);
|
||||
$yearabs = $this->dahsboard_Model->getAllAttendance($EmpID,$CURMONTH);
|
||||
|
||||
//print_r($yearabs);exit();
|
||||
$TotalNoofDays = $result[0]->TotalWorkingDays;
|
||||
$DaysWorked = $result[0]->DaysWorked;
|
||||
|
||||
|
||||
$values=0;
|
||||
|
||||
$weekdays = array();
|
||||
$date = date('d');
|
||||
|
||||
$Work= array_sum($weekdays);
|
||||
|
||||
for($j=1;$j<=$date;$j++)
|
||||
{
|
||||
$weekdays[] = 'WH'.$j;
|
||||
}
|
||||
foreach ($yearabs as $day ) {
|
||||
//print_r($weekda);
|
||||
foreach ($day as $key => $value) {
|
||||
foreach ($weekdays as $weeks) {
|
||||
|
||||
if($weeks == $key)
|
||||
{
|
||||
if($value != 0){
|
||||
|
||||
$values++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$TotalNoofDays = $TotalNoofDays+$CURDATE + $joinedMonthWorkingDayCount ;
|
||||
$DaysWorked = $DaysWorked+$values+$joinedMonthDays;
|
||||
|
||||
$final_res = round(($DaysWorked /$TotalNoofDays) * 100);
|
||||
$data['workeds']=$DaysWorked;
|
||||
$data['yeardata'] = $final_res;
|
||||
$data['totaldays'] = $TotalNoofDays;
|
||||
|
||||
|
||||
echo json_encode($data);
|
||||
|
||||
|
||||
}else {
|
||||
$result = $this->dahsboard_Model->attendanceyear($EmpID, 4);
|
||||
$yearabs = $this->dahsboard_Model->getAllAttendance($EmpID,$CURMONTH);
|
||||
|
||||
|
||||
$TotalNoofDays = $TotalNoofDays+$CURDATE;
|
||||
$DaysWorked = $DaysWorked+$values;
|
||||
|
||||
$final_res = round(($DaysWorked /$TotalNoofDays) * 100);
|
||||
$data['workeds']=$DaysWorked;
|
||||
$data['yeardata'] = $final_res;
|
||||
$data['totaldays'] = $TotalNoofDays;
|
||||
$TotalNoofDays = $result[0]->TotalWorkingDays;
|
||||
$DaysWorked = $result[0]->DaysWorked;
|
||||
|
||||
|
||||
$values=0;
|
||||
|
||||
$weekdays = array();
|
||||
$date = date('d');
|
||||
|
||||
$Work= array_sum($weekdays);
|
||||
|
||||
for($j=1;$j<=$date;$j++)
|
||||
{
|
||||
$weekdays[] = 'WH'.$j;
|
||||
}
|
||||
foreach ($yearabs as $day ) {
|
||||
//print_r($weekda);
|
||||
foreach ($day as $key => $value) {
|
||||
foreach ($weekdays as $weeks) {
|
||||
|
||||
if($weeks == $key)
|
||||
{
|
||||
if($value != 0){
|
||||
|
||||
$values++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$TotalNoofDays = $TotalNoofDays+$CURDATE;
|
||||
$DaysWorked = $DaysWorked+$values;
|
||||
|
||||
$final_res = round(($DaysWorked /$TotalNoofDays) * 100);
|
||||
$data['workeds']=$DaysWorked;
|
||||
$data['yeardata'] = $final_res;
|
||||
$data['totaldays'] = $TotalNoofDays;
|
||||
|
||||
echo json_encode($data);
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* To load the user list
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -255,6 +255,52 @@ function addNewmonthlisting($m_list)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*permission form model */
|
||||
function emplist()
|
||||
{
|
||||
|
||||
$sql="select Emp.EmpID,CONCAT(FirstName,' ',LastName)as name ,Emp.Departmentcode, Dep.DepartmentName FROM T_Employee_Details as Emp
|
||||
join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsActive = 1;";
|
||||
$query =$this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function addper($Permissiondata)
|
||||
{
|
||||
|
||||
//print_r($Permissiondata);die;
|
||||
$this->db->insert('T_Permission',$Permissiondata);
|
||||
$reuslt = $this->db->insert_id();
|
||||
return $reuslt;
|
||||
}
|
||||
|
||||
function perlist()
|
||||
{
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Permission');
|
||||
$query =$this->db->get();
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
function pdf($SNO)
|
||||
{
|
||||
$this->db->select('per.*,emp.FirstName,LastName,dep.DepartmentName');
|
||||
$this->db->from('T_Permission per');
|
||||
$this->db->join('T_Employee_Details emp','emp.EmpID = per.EmpID');
|
||||
$this->db->join('T_DepartmentDetails dep','dep.DEPCode = emp.Departmentcode');
|
||||
$this->db->where('per.SNO',$SNO );
|
||||
$query =$this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -18,6 +18,15 @@ class Quality_model extends CI_Model
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
function getAllprodcutsInward()
|
||||
{
|
||||
$this->db->select('MaterialCode,MaterialName');
|
||||
$this->db->from('T_MaterialMaster');
|
||||
$this->db->like('T_MaterialMaster.Category','raw material');
|
||||
$result = $this->db->get();
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
function getAllcustomers()
|
||||
{
|
||||
$this->db->select('client_id,client_name');
|
||||
@ -26,6 +35,15 @@ class Quality_model extends CI_Model
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
function getAllcustomersInward()
|
||||
{
|
||||
$this->db->select('SupplierID,SupplierName');
|
||||
$this->db->from('T_SupplierDetailsN');
|
||||
$this->db->where('IsActive',1);
|
||||
$result = $this->db->get();
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
function checkExist($product,$customer,$name)
|
||||
{
|
||||
$this->db->select('count(*) as count');
|
||||
@ -69,6 +87,16 @@ class Quality_model extends CI_Model
|
||||
$result = $this->db->get();
|
||||
return $result->result();
|
||||
}
|
||||
function getAllspecInward()
|
||||
{
|
||||
$this->db->select('T_Prodcut_Specification_Master.*,T_MaterialMaster.MaterialCode,T_MaterialMaster.MaterialName,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,count(*) as count');
|
||||
$this->db->from('T_Prodcut_Specification_Master');
|
||||
$this->db->join('T_MaterialMaster','T_Prodcut_Specification_Master.product_id=T_MaterialMaster.MaterialCode');
|
||||
$this->db->join('T_SupplierDetailsN','T_Prodcut_Specification_Master.customer_id=T_SupplierDetailsN.SupplierID');
|
||||
$this->db->group_by('product_id,customer_id');
|
||||
$result = $this->db->get();
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
|
||||
function getIndividualSpec($prodcutid,$customerid)
|
||||
@ -80,6 +108,20 @@ class Quality_model extends CI_Model
|
||||
$this->db->where('T_Prodcut_Specification_Master.product_id',$prodcutid);
|
||||
$this->db->where('T_Prodcut_Specification_Master.customer_id',$customerid);
|
||||
$result = $this->db->get();
|
||||
//print_r($result->result());
|
||||
if(empty($result->result()))
|
||||
{
|
||||
|
||||
$this->db->select('T_Prodcut_Specification_Master.*,T_MaterialMaster.MaterialCode,T_MaterialMaster.MaterialName as product_name,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName as client_name');
|
||||
$this->db->from('T_Prodcut_Specification_Master');
|
||||
$this->db->join('T_MaterialMaster','T_Prodcut_Specification_Master.product_id=T_MaterialMaster.MaterialCode');
|
||||
$this->db->join('T_SupplierDetailsN','T_Prodcut_Specification_Master.customer_id=T_SupplierDetailsN.SupplierID');
|
||||
$this->db->where('T_Prodcut_Specification_Master.product_id',$prodcutid);
|
||||
$this->db->where('T_Prodcut_Specification_Master.customer_id',$customerid);
|
||||
$result = $this->db->get();
|
||||
|
||||
}
|
||||
//exit();
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
@ -111,10 +153,16 @@ class Quality_model extends CI_Model
|
||||
|
||||
function getSpecifications($productid,$customerid)
|
||||
{
|
||||
$this->db->where('product_id',$productid);
|
||||
$this->db->where('customer_id',$customerid);
|
||||
$res = $this->db->get('T_Prodcut_Specification_Master');
|
||||
//echo 'from model'.$productid.'-'.$customerid;
|
||||
// $this->db->where('product_id',$productid);
|
||||
// $this->db->where('customer_id',$customerid);
|
||||
// $res = $this->db->get('T_Prodcut_Specification_Master');
|
||||
$sql = "Select * from T_Prodcut_Specification_Master where product_id = ? and customer_id = ?";
|
||||
$res = $this->db->query($sql,array($productid,$customerid));
|
||||
// print_r($this->db->last_query());
|
||||
return $res->result();
|
||||
//print_r($res->result());
|
||||
|
||||
}
|
||||
|
||||
function getEmplistforReport()
|
||||
@ -210,6 +258,52 @@ class Quality_model extends CI_Model
|
||||
|
||||
}
|
||||
|
||||
function getIndividualInwardReportData($reportid)
|
||||
{
|
||||
|
||||
$this->db->select('T_Test_Report_Master.chartdata,T_Test_Report_Master.batchdate,T_Test_Report_Master.testreport_id,T_IGR_Master.IGRNO,T_IGR_Master.DeliveryChellanOrInvoiceNo,T_IGR_Master.DeliveryChellanDate,T_IGR_Details.IGRItemNo,T_IGR_Details.QuantityAsPerInvoice,T_MaterialMaster.MaterialCode,T_MaterialMaster.Materialname,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_Test_Report_Master.approvedby,T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName');
|
||||
$this->db->from('T_Test_Report_Master');
|
||||
$this->db->join('T_IGR_Master','T_Test_Report_Master.igrno=T_IGR_Master.IGRNO');
|
||||
$this->db->join('T_IGR_Details','T_Test_Report_Master.igrlineitemno=T_IGR_Details.IGRItemNo');
|
||||
$this->db->join('T_PurchaseOrder_Master','T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO');
|
||||
$this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode');
|
||||
$this->db->join('T_SupplierDetailsN','T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID');
|
||||
$this->db->join('tbl_users','T_Test_Report_Master.createdby=tbl_users.userid');
|
||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID');
|
||||
$this->db->where('T_Test_Report_Master.testreport_id',$reportid);
|
||||
|
||||
|
||||
$res = $this->db->get();
|
||||
$reportdata['master'] = $res->result();
|
||||
|
||||
$this->db->select('T_Test_Report.*');
|
||||
$this->db->from('T_Test_Report');
|
||||
$this->db->where('testreport_id',$reportid);
|
||||
$res1 = $this->db->get();
|
||||
$reportdata['masterreport'] = $res1->result();
|
||||
|
||||
$this->db->select('T_Test_Report_LOI.*');
|
||||
$this->db->from('T_Test_Report_LOI');
|
||||
$this->db->where('testreport_id',$reportid);
|
||||
$res1 = $this->db->get();
|
||||
$reportdata['masterreportloi'] = $res1->result();
|
||||
|
||||
$this->db->select('T_Test_Report_AFS.*');
|
||||
$this->db->from('T_Test_Report_AFS');
|
||||
$this->db->where('testreport_id',$reportid);
|
||||
$res1 = $this->db->get();
|
||||
$reportdata['masterreportafs'] = $res1->result();
|
||||
|
||||
$this->db->select('T_Company_Details.CompanyName,T_Company_Details.Address,T_Company_Details.ProfilePic');
|
||||
$this->db->from('T_Company_Details');
|
||||
//$this->db->where('testreport_id',$reportid);
|
||||
$res1 = $this->db->get();
|
||||
$reportdata['company'] = $res1->result();
|
||||
|
||||
return $reportdata;
|
||||
|
||||
}
|
||||
|
||||
function getTestMasterforList()
|
||||
{
|
||||
$this->db->select('T_Test_Report_Master.testreport_id,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,ip_clients.client_id,ip_clients.client_name,ip_products.product_id,ip_products.product_name,ip_products.product_description');
|
||||
@ -218,9 +312,96 @@ class Quality_model extends CI_Model
|
||||
$this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id');
|
||||
$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
$this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id');
|
||||
//$this->db->where('T_Test_Report_Master.invoiceid','!=0');
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
function getTestMasterforListInward()
|
||||
{
|
||||
// $this->db->select('T_Test_Report_Master.testreport_id,T_Test_Report_Master.igrno,T_Test_Report_Master.igrlineitemno,T_Test_Report_Master.batchdate,ip_clients.client_id,ip_clients.client_name,ip_products.product_id,ip_products.product_name,ip_products.product_description');
|
||||
// $this->db->from('T_Test_Report_Master');
|
||||
// $this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number');
|
||||
// $this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id');
|
||||
// $this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id');
|
||||
// $this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id');
|
||||
// $res = $this->db->get();
|
||||
// return $res->result();
|
||||
|
||||
$this->db->select('T_Test_Report_Master.batchdate,T_Test_Report_Master.testreport_id,T_IGR_Master.IGRNO,T_IGR_Master.DeliveryChellanOrInvoiceNo,T_IGR_Master.DeliveryChellanDate,T_IGR_Details.IGRItemNo,T_IGR_Details.QuantityAsPerInvoice,T_MaterialMaster.MaterialCode,T_MaterialMaster.Materialname,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_Test_Report_Master.approvedby,T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName');
|
||||
$this->db->from('T_Test_Report_Master');
|
||||
$this->db->join('T_IGR_Master','T_Test_Report_Master.igrno=T_IGR_Master.IGRNO');
|
||||
$this->db->join('T_IGR_Details','T_Test_Report_Master.igrlineitemno=T_IGR_Details.IGRItemNo');
|
||||
$this->db->join('T_PurchaseOrder_Master','T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO');
|
||||
$this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode');
|
||||
$this->db->join('T_SupplierDetailsN','T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID');
|
||||
$this->db->join('tbl_users','T_Test_Report_Master.createdby=tbl_users.userid');
|
||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID');
|
||||
$this->db->order_by('testreport_id','desc');
|
||||
$res = $this->db->get();
|
||||
return $res->result();
|
||||
}
|
||||
|
||||
function getIGRNOforReport()
|
||||
{
|
||||
// $this->db->distinct();
|
||||
// $this->db->select('IGRNO');
|
||||
// $this->db->from('T_IGR_Details');
|
||||
// $this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode');
|
||||
// $this->db->like('T_MaterialMaster.Category','raw material');
|
||||
|
||||
$sql = 'select distinct IGRNO from T_IGR_Details
|
||||
join T_MaterialMaster on T_IGR_Details.MaterialCode = T_MaterialMaster.MaterialCode
|
||||
where T_MaterialMaster.Category like "%Raw Material%" order by IGRNO desc';
|
||||
$result = $this->db->query($sql);
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
function getIGRLineItemNo($igrno)
|
||||
{
|
||||
// $this->db->select('IGRItemNo');
|
||||
// $this->db->from('T_IGR_Details');
|
||||
// $this->db->where('IGRNO',$igrno);
|
||||
|
||||
$sql = 'select IGRItemNo from T_IGR_Details
|
||||
join T_MaterialMaster on T_IGR_Details.MaterialCode = T_MaterialMaster.MaterialCode
|
||||
where IGRNO = ? and T_MaterialMaster.Category like "%Raw Material%"';
|
||||
|
||||
$result = $this->db->query($sql,array($igrno));
|
||||
return $result->result();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getIGRDataforReport($igrno,$igrlineitemno)
|
||||
{
|
||||
//echo $igrno.'-'.$igrlineitemno;die();
|
||||
// $this->db->select('T_IGR_Master.DeliveryChellanOrInvoiceNo,T_IGR_Master.DeliveryChellanDate,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_MaterialMaster.MaterialCode,T_MaterialMaster.MaterialName,T_IGR_Details.QuantityAsPerInvoice');
|
||||
// $this->db->from('T_IGR_Master');
|
||||
// $this->db->join('T_IGR_Details','T_IGR_Master.IGRNO=T_IGR_Details.IGRNO');
|
||||
// $this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode');
|
||||
// $this->db->join('T_PurchaseOrder_Master','T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO');
|
||||
// $this->db->join('T_SupplierDetailsN','T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID');
|
||||
|
||||
// $this->db->where('T_IGR_Details.IGRNO',$igrno);
|
||||
// $this->db->where('T_IGR_Details.IGRItemNo',$igrlineitemno);
|
||||
// $this->db->order_by('T_IGR_Master.IGRNO');
|
||||
// $res = $this->db->get();
|
||||
// return $res->result();
|
||||
|
||||
$sql = 'select T_IGR_Master.DeliveryChellanOrInvoiceNo, date_format(T_IGR_Master.DeliveryChellanDate,"%d-%m-%Y") as DeliveryChellanDate,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_MaterialMaster.MaterialCode,
|
||||
T_MaterialMaster.MaterialName,T_IGR_Details.QuantityAsPerInvoice
|
||||
from T_IGR_Master
|
||||
join T_IGR_Details on T_IGR_Master.IGRNO=T_IGR_Details.IGRNO
|
||||
join T_MaterialMaster on T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode
|
||||
join T_PurchaseOrder_Master on T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO
|
||||
join T_SupplierDetailsN on T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID
|
||||
where T_IGR_Master.IGRNO = ? and T_IGR_Details.IGRItemNo = ?';
|
||||
$res = $this->db->query($sql,array($igrno,$igrlineitemno));
|
||||
return $res->result();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
|
||||
</td>
|
||||
<td style="text-align:left;"><?php
|
||||
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
|
||||
|
||||
201
application/views/Report_consolidate_month.php
Normal file
201
application/views/Report_consolidate_month.php
Normal file
@ -0,0 +1,201 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate Month(<?php
|
||||
$m = $this->input->get('m');
|
||||
echo $m;
|
||||
?>)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if(!empty($spurchse)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
$ab=$this->input->get('ab');
|
||||
$month=date('F');
|
||||
$m = $this->input->get('m');
|
||||
//echo $month;
|
||||
foreach($spurchse as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<?php echo $rel->category;?>
|
||||
</td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>&m=<?php echo $m;?>"><?php echo $rel->supplier_name;?> </a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->quantity);
|
||||
echo round($rel->quantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative month Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
708
application/views/Report_consolidate_raw.php
Normal file
708
application/views/Report_consolidate_raw.php
Normal file
@ -0,0 +1,708 @@
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#client_name").select2();
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||
|
||||
<div class="form-group has-feedback">
|
||||
<div class="col-md-4">
|
||||
<label for="client_name">
|
||||
<?php echo 'Category'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="client_name" name="client_name">
|
||||
<option value="">Select Category</option>
|
||||
<?php
|
||||
foreach($material as $item):
|
||||
|
||||
{?>
|
||||
|
||||
<option value="<?php echo $item->Category;?>"><?php echo $item->Category ; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2">
|
||||
<label for="to_date">
|
||||
<?php echo 'year'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="financialyear" name="financialyear">
|
||||
<option value="">Select Year</option>
|
||||
<?php
|
||||
|
||||
|
||||
foreach($finyear as $item):
|
||||
|
||||
{?>
|
||||
|
||||
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<br>
|
||||
<label><input type="radio" name="colorRadio" id="value" onclick="toggleTables('2')" value="tab"> Value</label>
|
||||
<label><input type="radio" name="colorRadio" id="qty" onclick="toggleTables('1')" value="ta" checked> Quantity</label>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2 "><br>
|
||||
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||
value="View Report">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body" style="display:block" id="a">
|
||||
|
||||
<table class="table table-bordered table-hover" id="tab" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">Category</th>
|
||||
<th style="text-align:center;">Apr</th>
|
||||
<th style="text-align:center;">May</th>
|
||||
<th style="text-align:center;">Jun</th>
|
||||
<th style="text-align:center;">Jul</th>
|
||||
<th style="text-align:center;">Aug</th>
|
||||
<th style="text-align:center;">Sep</th>
|
||||
<th style="text-align:center;">Oct</th>
|
||||
<th style="text-align:center;">Nov</th>
|
||||
<th style="text-align:center;">Dec</th>
|
||||
<th style="text-align:center;">Jan</th>
|
||||
<th style="text-align: center;">Feb</th>
|
||||
<th style="text-align: center;">Mar</th>
|
||||
<th style="text-align: center;">Total</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$apr = 0;
|
||||
$may = 0;
|
||||
$jun = 0;
|
||||
$jul = 0;
|
||||
$aug = 0;
|
||||
$sep = 0;
|
||||
$oct = 0;
|
||||
$nov = 0;
|
||||
$dec = 0;
|
||||
$jan = 0;
|
||||
$feb = 0;
|
||||
$mar = 0;
|
||||
$tot = 0;
|
||||
$ab=$this->input->post('financialyear');
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo $result->category;?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$apr= $apr + round($result->April);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$may= $may + round($result->May);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jun= $jun + round($result->June);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jul= $jul + round($result->July);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$aug= $aug + round($result->August);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$sep= $sep + $result->September;
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$oct= $oct + round($result->October);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$nov= $nov + round($result->November);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$dec= $dec + round($result->December);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jan= $jan + round($result->January);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$feb= $feb + round($result->February);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$mar= $mar + round($result->March);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$tot= $tot + round($result->qtotal);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo round($result->qtotal);?> </a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right;"><strong><?php
|
||||
{
|
||||
echo $apr;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $may;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $jun;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $jul;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $aug;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $sep;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $oct;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $nov;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $dec;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $jan;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $feb;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $mar;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tot;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="box-body" id="b" style="display:none">
|
||||
|
||||
|
||||
<table class="table table-bordered table-hover" style="font-size:14px;" id="ta">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">Category</th>
|
||||
<th style="text-align:center;">Apr (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">May (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Jun (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center;">Jul (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Aug (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center;">Sep (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Oct (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Nov (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Dec (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Jan (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align: center;">Feb (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align: center;">Mar (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align: center;">Total (<i class="fa fa-rupee " ></i>)</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$apr = 0;
|
||||
$may = 0;
|
||||
$jun = 0;
|
||||
$jul = 0;
|
||||
$aug = 0;
|
||||
$sep = 0;
|
||||
$oct = 0;
|
||||
$nov = 0;
|
||||
$dec = 0;
|
||||
$jan = 0;
|
||||
$feb = 0;
|
||||
$mar = 0;
|
||||
$tot = 0;
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo $result->category;?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$apr= $apr + round($result->vApril);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo round($result->vApril);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$may= $may + round($result->vMay);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo round($result->vMay);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jun= $jun + round($result->vJune);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo round($result->vJune);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jul= $jul + round($result->vJuly);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo round($result->vJuly);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$aug= $aug + round($result->vAugust);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo round($result->vAugust);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$sep= $sep + $result->vSeptember;
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo round($result->vSeptember);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$oct= $oct + round($result->vOctober);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo round($result->vOctober);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$nov= $nov + round($result->vNovember);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo round($result->vNovember);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$dec= $dec + round($result->vDecember);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo round($result->vDecember);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jan= $jan + round($result->vJanuary);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo round($result->vJanuary);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$feb= $feb + round($result->vFebruary);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo round($result->vFebruary);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$mar= $mar + round($result->vMarch);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo round($result->vMarch);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$tot= $tot + round($result->vtotal);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo round($result->vtotal);?> </a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
<td style="text-align:right;"><strong><?php
|
||||
{
|
||||
echo number_format($apr,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($may,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($jun,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($jul,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($aug,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($sep,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($oct,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($nov,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($dec,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($jan,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($feb,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($mar,2,'.','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tot,2,'.','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#tab').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Purchase Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$(document).ready(function() {
|
||||
table = $('#ta').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Purchase Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
function toggleTables(which)
|
||||
{
|
||||
|
||||
if(which == "1") {
|
||||
document.getElementById('a').style.display = "block";
|
||||
document.getElementById('b').style.display = "none";
|
||||
|
||||
}
|
||||
if(which == "2") {
|
||||
document.getElementById('b').style.display = "block";
|
||||
document.getElementById('a').style.display = "none";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
202
application/views/Report_consolidate_year.php
Normal file
202
application/views/Report_consolidate_year.php
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate Month(<?php
|
||||
$m = $this->input->get('ab');
|
||||
echo $m;
|
||||
?>)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if(!empty($spurchse)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
$ab=$this->input->get('ab');
|
||||
|
||||
$month=date('F');
|
||||
//echo $month;
|
||||
foreach($spurchse as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<?php echo $rel->category;?>
|
||||
</td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?> </a>
|
||||
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->quantity);
|
||||
echo round($rel->quantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative month Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative Today</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative Today - Inward </b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -69,7 +69,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
193
application/views/Report_cumulative_day_raw.php
Normal file
193
application/views/Report_cumulative_day_raw.php
Normal file
@ -0,0 +1,193 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Today (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum_day)){
|
||||
$tqt=0;
|
||||
$tvt=0.00;
|
||||
|
||||
$d=date('Y-m-d');
|
||||
foreach($cum_day as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo round($rel->tquantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo number_format($rel->ttotal,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative Year Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative -inward</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -90,27 +90,27 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?></span></td>
|
||||
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?></span></td>
|
||||
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mqt= $mqt + round($rel->mquantity);
|
||||
echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?></span></td>
|
||||
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mvt= $mvt + number_format($rel->mtotal,2,'.','');
|
||||
echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?></span></td>
|
||||
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yqt= $yqt + round($rel->quantity);
|
||||
echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?></span></td>
|
||||
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yvt= $yvt + number_format($rel->total,2,'.','');
|
||||
echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?></span></td>
|
||||
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?></span></td>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative Month</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative Month -Inward </b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -75,7 +75,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
200
application/views/Report_cumulative_month_raw.php
Normal file
200
application/views/Report_cumulative_month_raw.php
Normal file
@ -0,0 +1,200 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Month (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum_month)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$month=date('F');
|
||||
//echo $month;
|
||||
foreach($cum_month as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo round($rel->tquantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo number_format($rel->ttotal,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative month Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
265
application/views/Report_cumulative_raw.php
Normal file
265
application/views/Report_cumulative_raw.php
Normal file
@ -0,0 +1,265 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
?>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum)){
|
||||
$yqt=0.00;
|
||||
$yvt=0.00;
|
||||
$mqt=0.00;
|
||||
$mvt=0.00;
|
||||
$tqt=0.00;
|
||||
$tvt=0.00;
|
||||
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
|
||||
|
||||
foreach($cum as $rel)
|
||||
{
|
||||
$cat = $rel->category;
|
||||
?>
|
||||
<tr>
|
||||
<!-- <td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;?>&ab=<?php //echo $ab;?>&mid=<?php //echo $rel->mid;?>"><?php //echo $rel->supplier_name;?></a>
|
||||
</span></td>-->
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->category;?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span>
|
||||
<?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->tquantity);?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo number_format($rel->ttotal,2,'.','');?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mqt= $mqt + round($rel->mquantity);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->mquantity);?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mvt= $mvt + number_format($rel->mtotal,2,'.','');
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo number_format($rel->mtotal,2,'.','');?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yqt= $yqt + round($rel->quantity);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->quantity);?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yvt= $yvt + number_format($rel->total,2,'.','');
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo number_format($rel->total,2,'.','');?></a>
|
||||
</span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $mqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($mvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $yqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($yvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative Year</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Cumulative Year - Inward</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -81,7 +81,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
206
application/views/Report_cumulative_year_raw.php
Normal file
206
application/views/Report_cumulative_year_raw.php
Normal file
@ -0,0 +1,206 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Year (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
?>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value ( <i class="fa fa-rupee " ></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum_year)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
foreach($cum_year as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo round($rel->tquantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo number_format($rel->ttotal,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative Year Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>&month=<?php echo $new;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>&month=<?php echo $new;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
@ -187,6 +187,7 @@ if(!empty($mms))
|
||||
<th style="text-align:center">Date</th>
|
||||
<th style="text-align:center">Time</th>
|
||||
<th style="text-align:center">Material Name</th>
|
||||
<th style="text-align:center;">Category</th>
|
||||
<th style="text-align:center">Supplier Name</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">UOM</th>
|
||||
@ -225,6 +226,7 @@ if(!empty($mms))
|
||||
<td style="text-align:center"><span><?php echo $rel->created_date;?></span></td>
|
||||
<td style="text-align:right"><span><?php echo $rel->created_time;?></span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span><?php echo $rel->supplier_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_qty= $tot_qty + round($rel->quantity);
|
||||
@ -276,6 +278,7 @@ if(!empty($mms))
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
|
||||
<td class="amount" style="text-align:right"><strong>
|
||||
|
||||
@ -185,7 +185,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&frm=<?php echo $frm;?>&t=<?php echo $t;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&frm=<?php echo $frm;?>&t=<?php echo $t;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_rate= $tot_rate + round($rel->counts);
|
||||
|
||||
@ -103,7 +103,7 @@ if(!empty($mms))
|
||||
//echo $new;
|
||||
?>
|
||||
|
||||
<a href="<?= base_url() ?>report/month_wise?ab=<?php echo $ab;?>&dat=<?php echo $pass;?>"><?php echo $new;?></a>
|
||||
<a href="<?= base_url() ?>report/imonth_wise?ab=<?php echo $ab;?>&dat=<?php echo $pass;?>"><?php echo $new;?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tr3= $tr3 + $rel->quantity;
|
||||
@ -124,7 +124,7 @@ if(!empty($mms))
|
||||
<td style="text-align:center;"><strong><?php
|
||||
$ab=$this->input->post('financialyear');
|
||||
$Total="Total";
|
||||
echo anchor('report/year_wise_total/' . $ab,$Total); ?></strong>
|
||||
echo anchor('report/iyear_wise_total/' . $ab,$Total); ?></strong>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
@ -11,7 +11,7 @@ $(function() {
|
||||
var inc = [];
|
||||
t= <?php echo json_encode($dropdownvalues)?>;
|
||||
$.each(t,function(i,item){
|
||||
if(item.type == 'INCOME')
|
||||
if(item.type == 'RECEPIT')
|
||||
{
|
||||
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||
}
|
||||
@ -77,12 +77,12 @@ function loadAccountType(id)
|
||||
|
||||
if(id == 'myradio1')
|
||||
{
|
||||
// alert('INCOME clicked');
|
||||
// alert('RECEPIT clicked');
|
||||
|
||||
$('#accode').find('option').remove().end().append('<option value="-1">Select Account Name</option>').val('Select Account Code');
|
||||
|
||||
$.each(t,function(i,item){
|
||||
if(item.type == 'INCOME')
|
||||
if(item.type == 'RECEPIT')
|
||||
{
|
||||
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||
}
|
||||
@ -144,8 +144,8 @@ function loadAccountType(id)
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<b><span for="Accountcode">Select Accounut type:</span> </b> </br></br>
|
||||
<input type="radio" onclick = loadAccountType(this.id); id="myradio1" name="myradio" value="1" checked>Income
|
||||
<input type="radio" onclick = loadAccountType(this.id); id="myradio2" name="myradio" value="2" >Expense
|
||||
<input type="radio" onclick = loadAccountType(this.id); id="myradio1" name="myradio" value="1" checked>RECEIPT
|
||||
<input type="radio" onclick = loadAccountType(this.id); id="myradio2" name="myradio" value="2" >PAYMENT
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
116
application/views/cashbookdepday.php
Normal file
116
application/views/cashbookdepday.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
$inrsymbol='';
|
||||
if(!empty($Indiancurrency))
|
||||
{
|
||||
foreach ($Indiancurrency as $inr)
|
||||
{
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<CENTER><h3 class="box-title"><strong>Department Based Report</strong></h3></CENTER>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
|
||||
<table class="table table-bordered table-hover" id="req" style="background-color:#fff;font-size:11px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
|
||||
<th>date</th>
|
||||
<th>Account Name</th>
|
||||
<th>Paid Type</th>
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($menudepartmentwise)){
|
||||
foreach($menudepartmentwise as $dt)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
|
||||
<td align="left"><span><?php echo $dt->date?></span></td>
|
||||
<td align="left"><span><?php echo $dt->name?></span></td>
|
||||
<td align="left"><span><?php echo $dt->type?></span></td>
|
||||
<td align="right"><span><?php echo number_format($dt->total,2,'.','');?></span></td>
|
||||
<td align="left"><span><?php echo $dt->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#req').DataTable( {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
119
application/views/cashbookdepmenu.php
Normal file
119
application/views/cashbookdepmenu.php
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
$inrsymbol='';
|
||||
if(!empty($Indiancurrency))
|
||||
{
|
||||
foreach ($Indiancurrency as $inr)
|
||||
{
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<CENTER><h3 class="box-title"><strong>Cashbook Department</strong></h3></CENTER>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
|
||||
<table class="table table-bordered table-hover" id="req" style="background-color:#fff;font-size:11px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<th>Account Name</th>
|
||||
<th>Paid Type</th>
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($depmenu)){
|
||||
foreach($depmenu as $t)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
|
||||
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookmenudepartment?sid=<?php echo $t->account_code;?>"><span><?php echo $t->name?></span></a></td>
|
||||
|
||||
<td align="left"><span><?php echo $t->type?></span></td>
|
||||
<td align="right"><span><?php echo number_format($t->total,2,'.','');?></span></td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#req').DataTable( {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3"><strong>Account Type :</strong> <strong style="color:#ff6347;">*</strong><br>
|
||||
<input type="radio" name="accounttype" id="accounttype" value="INCOME" checked> Income<br>
|
||||
<input type="radio" name="accounttype" id="accounttype" value="EXPENSE"> Expense<br>
|
||||
<input type="radio" name="accounttype" id="accounttype" value="RECEPIT" checked> RECEPIT<br>
|
||||
<input type="radio" name="accounttype" id="accounttype" value="PAYMENT"> PAYMENT<br>
|
||||
</div><p style="color:red"></p>
|
||||
|
||||
<div class="col-md-3 pad"><strong>Account Code :</strong> <strong style="color:#ff6347;">*</strong>
|
||||
|
||||
@ -3143,6 +3143,20 @@ $("#PaymentMethod").select2();
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" id="" style="padding: 0px;">
|
||||
<div class="col-md-5 col-md-offset-4" align="right">
|
||||
<label>Total Amount <?php echo "($INR)"?></label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ViewTotalAmountlocal','value' => set_value('ViewTotalAmountlocal'),'id'=>'ViewTotalAmountlocal', 'class' => 'form-control num' ,'placeholder' => 'Total Amount','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" style="padding:1%;" ></div>
|
||||
<div class="col-md-12" style="border:1px solid #000;padding:0px;" id="ViewModalImportTaxHide" style="display:none;">
|
||||
<br/>
|
||||
@ -5884,7 +5898,7 @@ function DeleteRow(rowid)
|
||||
$('#ViewAfterSgst').val($('#AfterSgst'+userid).val());
|
||||
$('#ViewAfterIgst').val($('#AfterIgst'+userid).val());
|
||||
$('#ViewOtherAllowances').val($('#OtherAmt'+userid).val());
|
||||
|
||||
$('#ViewTotalAmountlocal').val(cellval[9].innerHTML);
|
||||
|
||||
$('#drpFreightviewloc').val($("#Ftype"+userid).val());
|
||||
$('#NOOfTripslocview').val($("#NoTrip"+userid).val());
|
||||
|
||||
@ -20,8 +20,11 @@
|
||||
<!-- daterange picker -->
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/plugins/daterangepicker/daterangepicker.css">
|
||||
|
||||
<!-- web favicon -->
|
||||
<!-- This is needed for IE -->
|
||||
<link rel="icon" href="<?php echo base_url(); ?>assets/dist/img/RI_favicon.png"/>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url();?>assets/js/jquery-1.12.4.js"></script>
|
||||
<!-- jquery-1.12.4.min -->
|
||||
<script type="text/javascript" src="<?php echo base_url();?>assets/js/jquery-1.12.4.min.js"></script>
|
||||
@ -580,6 +583,13 @@ $(function() {
|
||||
<span>Product Test Report</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>qualityreportlistinward">
|
||||
<i class="fa fa-hand-o-down"></i>
|
||||
<span>Inward Material Test Report</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
1027
application/views/inward_report_create.php
Normal file
1027
application/views/inward_report_create.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -196,10 +196,11 @@ if($RecCount > 0)
|
||||
|
||||
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
<tr>
|
||||
<td colspan="1" style="background:#2c0000;" width="15%"> <center> <img width="80" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></center>
|
||||
<td colspan="1" style="background:#2c0000;" width="15%"> <center> <img width="80" src=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAdnJLH8AAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAVZQTFRFZwAAZQAAZgAAbAkJiTk5j0NDjkJCjUBAgy8vcxUVaAMDZwEBgCoqhzY2agUFeyEh4MvL9e7u9Ozs8+vr7eDg3sjIwZeXjD4+aAICaQMD9vDw9u/v2sHBchMTfCMj6NjY//7+/vz8/v39////m1dXx6Gh4s7O6NfX/fv7/fz87N/f3MTE+fX149DQfSYm4c3NtoWFcBEReiEhr3l5/Pn5nl1dsHt7ZAAAchUVrXV1awcHzqysbQsL1La2qnFxr3p6YwAAijw8+/j4nFpa0bGxpmlps4GB5NDQfSUl7+TknVtb/Pr6n15eyaamqG9v8OXl+vX1mlZWrnl5bAsL17u7uIiIv5SUcxQUpGdnqW9vcRER2cDAyKOj6dnZficnpmpq+vb2x6Cg6drasXx8ijo68unpuIeHyKKi48/PsX19iz09bw4OmVVVaQQEaAEBlk9Po2VlbQoKWxkEXAAAAAFiS0dEIypibDoAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAE/SURBVDjLzdJZO4JBFAfwmSGpRJIo0SyW88pe3pds2SVb1mQJ2bL7/jdOuqinjFv+N+eZOb+LOecZQv5NaCmMlY6seKjs19XbGjD2RoezSFxNtgabu7ncZy2eVi+mzdfu7+gkJOAPertC3awMesJcCKm45MrXi6BPCdXvqAQDEozBSHhIgBoeYQiAj1YDPjY+EQ0aEJukGmBadCrCQU5rASXxGexEfwGzcwrEvA4sJKxFn4SlZQ2QK6trHgP4+oZmCozEYZOb33v4CaRSAEZwy6kDcntnV8BemuoA3z845MCPiBaY9BjvQydMCxKZGAivneqBOylAnOqBlT3DR5zH9W9w+RXIi0umBTSHq7hKW4HrGnCjuMpTenuH9Z4EHrA8VoJsLm8Wnhh5zhTMwsvr2zuWj8/qb8/Ktebb/22+AFHiR0nKtJ7kAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEwLTI1VDA4OjM1OjEwKzAwOjAwPcBprgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0xMC0yNVQwODozNToxMCswMDowMEyd0RIAAABGdEVYdHNvZnR3YXJlAEltYWdlTWFnaWNrIDYuNy44LTkgMjAxNC0wNS0xMiBRMTYgaHR0cDovL3d3dy5pbWFnZW1hZ2ljay5vcmfchu0AAAAAGHRFWHRUaHVtYjo6RG9jdW1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OmhlaWdodAAxOTIPAHKFAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADE5MtOsIQgAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTUwODkyMDUxMEpy/MMAAAAPdEVYdFRodW1iOjpTaXplADBCQpSiPuwAAABWdEVYdFRodW1iOjpVUkkAZmlsZTovLy9tbnRsb2cvZmF2aWNvbnMvMjAxNy0xMC0yNS9iMDFjN2RiMzVkYjc0NmY0YThlNjQ4MmVjNWFlNzBjZS5pY28ucG5nFB8FeAAAAABJRU5ErkJggg=="></center>
|
||||
</td>
|
||||
<td colspan="10">
|
||||
<center><b><?php echo $CompanyName;?></b><br/><?php echo $CompanyAddress; ?><br/> PaySlip for the Month of <?php echo $PayOn ?></center>
|
||||
<!-- <center><b><?php echo $CompanyName;?></b><br/><?php echo $CompanyAddress; ?><br/> PaySlip for the Month of <?php echo $PayOn ?></center> -->
|
||||
<center><b>SIDDHARTH INDUSTRIES</b><br/> Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, <br/>Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026. <br/> PaySlip for the Month of <?php echo $PayOn ?></center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -11,16 +11,28 @@ th{
|
||||
|
||||
$products2=array(-1=>'Select Products');
|
||||
|
||||
foreach($products as $product)
|
||||
foreach($productsoutward as $product)
|
||||
{
|
||||
$products2[$product->product_id] =$product->product_id.'-'.$product->product_name.'-'.$product->product_description;
|
||||
}
|
||||
|
||||
$customers2 = array(-1 => 'Select Customer');
|
||||
foreach($customers as $customer)
|
||||
foreach($customersoutward as $customer)
|
||||
{
|
||||
$customers2[$customer->client_id] = $customer->client_name;
|
||||
}
|
||||
|
||||
$productsinward1=array(-1=>'Select Products');
|
||||
foreach($productsinward as $product)
|
||||
{
|
||||
$productsinward1[$product->MaterialCode] =$product->MaterialCode.'-'.$product->MaterialName;
|
||||
}
|
||||
|
||||
$customersinward1 = array(-1 => 'Select Customer');
|
||||
foreach($customersinward as $customer)
|
||||
{
|
||||
$customersinward1[$customer->SupplierID] = $customer->SupplierName;
|
||||
}
|
||||
?>
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||
@ -52,17 +64,38 @@ foreach($customers as $customer)
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?php echo form_dropdown('name="product"',$products2,set_value('product',$products2[-1]),'id="product"' ,'class="form-control select2');?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<?php echo form_dropdown('name="customer"',$customers2,set_value('customer',$customers2[-1]),'id="customer"' ,'class="form-control select2');?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<input type="button" id="addspec" class="btn btn-primary" value = "Add New Specification">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<input type="radio" value="1" name="type" id="OutWard" onclick="changeType(this.value);"/> OutWard
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<input type="radio" value="0" name="type" id="Inward" onclick="changeType(this.value);"/> InWard
|
||||
</div>
|
||||
|
||||
<div id='outwardarea' style="display:block;">
|
||||
<div class="col-md-3">
|
||||
<?php echo form_dropdown('name="product"',$products2,set_value('product',$products2[-1]),'id="product"' ,'class="form-control select2');?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<?php echo form_dropdown('name="customer"',$customers2,set_value('customer',$customers2[-1]),'id="customer"' ,'class="form-control select2');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id='inwardarea' style="display:none;">
|
||||
<div class="col-md-3">
|
||||
<?php echo form_dropdown('name="productinward"',$productsinward1,set_value('productinward',$productsinward1[-1]),'id="productinward"' ,'class="form-control select2');?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<?php echo form_dropdown('name="customerinward"',$customersinward1,set_value('customerinward',$customersinward1[-1]),'id="customerinward"' ,'class="form-control select2');?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<input type="button" id="addspec" class="btn btn-primary" value = "Add New Specification">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
@ -182,21 +215,66 @@ foreach($customers as $customer)
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#addspec').click(function(){
|
||||
|
||||
var product = $('#product').val();
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#specmodel').modal('show');
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#OutWard').attr('checked','true');
|
||||
});
|
||||
|
||||
function changeType(v)
|
||||
{
|
||||
|
||||
var val = v
|
||||
if(val == 0)
|
||||
|
||||
{
|
||||
$('#inwardarea').css({'display':'block'});
|
||||
|
||||
$('#outwardarea').css({'display':'none'});
|
||||
|
||||
}
|
||||
|
||||
else if(val == 1)
|
||||
|
||||
{
|
||||
$('#inwardarea').css({'display':'none'});
|
||||
$('#outwardarea').css({'display':'block'});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$('#addspec').click(function(){
|
||||
|
||||
if($('#OutWard').is(':checked'))
|
||||
{
|
||||
var product = $('#product').val();
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#specmodel').modal('show');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var productinward = $('#productinward').val();
|
||||
var customerinward = $('#customerinward').val();
|
||||
if(productinward == -1 || customerinward == -1)
|
||||
{
|
||||
|
||||
alert('Please Select Product and Customer.');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$('#specmodel').modal('show');
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function addNewRow()
|
||||
{
|
||||
@ -236,12 +314,24 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
|
||||
function getAllData()
|
||||
{
|
||||
|
||||
var alldata = $("#testspecifications").tableToJSON();
|
||||
var type = '';
|
||||
var product = '';
|
||||
var customer = '';
|
||||
if($('#OutWard').is(':checked'))
|
||||
{
|
||||
type = 'OUTWARD';
|
||||
product = $('#product').val();
|
||||
customer = $('#customer').val();
|
||||
}
|
||||
else
|
||||
{
|
||||
type = 'INWARD';
|
||||
product = $('#productinward').val();
|
||||
customer = $('#customerinward').val();
|
||||
}
|
||||
var alldata = $("#testspecifications").tableToJSON();
|
||||
//alert(JSON.stringify(alldata));
|
||||
alldata=JSON.stringify(alldata)
|
||||
var product = $('#product').val();
|
||||
var customer = $('#customer').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
@ -249,18 +339,16 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
else{
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:alldata,param2:product,param3:customer},
|
||||
data:{param1:alldata,param2:product,param3:customer,param4:type},
|
||||
//dataType:"json",
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>quality/saveSpectficationData",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
//console.log(data);
|
||||
|
||||
|
||||
window.location = "<?php echo base_url().'quality';?>";
|
||||
$('#content').loader('hide');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -55,7 +55,8 @@
|
||||
<tr>
|
||||
|
||||
<th>Product Name</th>
|
||||
<th>Company Name</th>
|
||||
<th>Company Name</th>
|
||||
<th>Type</th>
|
||||
<th>Total Specification</th>
|
||||
|
||||
|
||||
@ -68,10 +69,17 @@
|
||||
{
|
||||
foreach($existspec as $data)
|
||||
{
|
||||
|
||||
//print_r($data);echo "</br></br>";
|
||||
?>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->product_name.'-'.$data->product_description?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->client_name?></a></td> <td><?php echo $data->count?></td></tr>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->product_name.'-'.$data->product_description?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->client_name?></a></td> <td><?php echo $data->type?> </td><td><?php echo $data->count?></td></tr>
|
||||
<?php
|
||||
} }
|
||||
|
||||
if(!empty($existspecinward))
|
||||
{
|
||||
foreach($existspecinward as $in)
|
||||
{
|
||||
?>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $in->MaterialCode.'/'.$in->SupplierID ?>"><?php echo $in->MaterialName?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $in->MaterialCode.'/'.$in->SupplierID ?>"><?php echo $in->SupplierName?></a></td> <td><?php echo $in->type?> </td><td><?php echo $in->count?></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
<?php
|
||||
$today_in='';
|
||||
$today_ex='';
|
||||
@ -148,7 +146,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
|
||||
<!-- fix for small devices only -->
|
||||
<div class="clearfix visible-sm-block"></div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
|
||||
<div class="info-box-content">
|
||||
@ -163,7 +161,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
|
||||
<!-- fix for small devices only -->
|
||||
<div class="clearfix visible-sm-block"></div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
|
||||
<div class="info-box-content">
|
||||
@ -176,7 +174,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
|
||||
<!-- fix for small devices only -->
|
||||
<div class="clearfix visible-sm-block"></div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
|
||||
<div class="info-box-content">
|
||||
@ -186,6 +184,18 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix visible-sm-block"></div>
|
||||
<div class="col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-hourglass-1 " style="padding: 5px; background-color:orange;"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/depmenu' ?>" data-toggle="tooltip" title="Click here to View Department payments"><?php echo "Dep Payments" ?></a></span>
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
|
||||
<span class="info-box-text text-center"><strong>Payments :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</section>
|
||||
@ -222,38 +232,39 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<!--<th>Account Code</th>-->
|
||||
<th>Account Name</th>
|
||||
<th>Paid To</th>
|
||||
<th>Paid Type</th>
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
<th>Description</th>
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<th>Received From</th>
|
||||
<th>Paid To</th>
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payments <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cashbook)){
|
||||
$tvt=0.00;
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
foreach($cashbook as $cash)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $cash->date?></span></td>
|
||||
<td><span><?php echo $cash->date?></span></td>
|
||||
<td align="left"><span><?php echo $cash->name?></span></td>
|
||||
<td align="left"><span><?php echo $cash->towhom?></span></td>
|
||||
<td align="left"><span><?php echo $cash->type?></span></td>
|
||||
<td align="left"><span><?php echo $cash->type?></span></td>
|
||||
<td align="left"><span><?php echo $cash->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $cash->paymentname?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($cash->total,2,'.','');
|
||||
echo number_format($cash->total,2,'.','');?></span></td>
|
||||
|
||||
$ti= $ti + number_format($cash->income,2,'.','');
|
||||
echo number_format($cash->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($cash->expense,2,'.','');
|
||||
echo number_format($cash->expense,2,'.','');?></span></td>
|
||||
<td align="left"><span><?php echo $cash->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -262,27 +273,35 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td> </td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($ti,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
81
application/views/reportmasterlist_inward.php
Normal file
81
application/views/reportmasterlist_inward.php
Normal file
@ -0,0 +1,81 @@
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
//print_r($records);
|
||||
|
||||
?>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Inward Product Test Reports List</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
<div class="col-md-3">
|
||||
<a href=" <?php echo base_url().'quality/addNewInward_Report';?> " type="button" class="btn btn-primary">Add New</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<br/>
|
||||
<table id="testspecifications" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
<th>Test Report ID</th>
|
||||
<th>IGRNO</th>
|
||||
<th>IGR Line Item No</th>
|
||||
<th>Report Date</th>
|
||||
<th>Product Name</th>
|
||||
<th>Customer Name</th>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="specAppend">
|
||||
<?php
|
||||
if(!empty($records))
|
||||
{
|
||||
|
||||
foreach($records as $data)
|
||||
{
|
||||
|
||||
//print_r($data);echo "</br></br>";
|
||||
?>
|
||||
<tr> <td><a href="<?php echo base_url()?>quality/viewIndInwardReport/<?php echo $data->testreport_id ?>"><?php echo $data->testreport_id?></a></td> <td><?php echo $data->IGRNO?></td> <td><?php echo $data->IGRItemNo?></td><td style="text-align:right;"><?php echo date_format(date_create($data->batchdate),'d-m-Y');?></td><td><?php echo $data->SupplierName;?></td><td><?php echo $data->Materialname;?></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@ -160,6 +160,8 @@ h1{
|
||||
<a href="<?php echo base_url(); ?>Report_supplier_inward" target="_blank" style="color: #cc6666;">Purchase Supplier - Wise<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_consolidate_inward" target="_blank" style="color: #cc6666;">Consolidate Report<p class="uk-text-meta uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_cumulative_inward" target="_blank" style="color: #cc6666;">Cumulative Report<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_cumulative_raw" target="_blank" style="color: #cc6666;">Cumulative Report - Category Wise<p class="uk-text uk-margin-remove"></p>
|
||||
<a href="<?php echo base_url(); ?>Report_consolidate_category" target="_blank" style="color: #cc6666;">Consolidate Report - Category Wise<p class="uk-text-meta uk-margin-remove"></p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,7 @@ if(!empty($data))
|
||||
$document = 'uploads/cashbook/noimage.png';
|
||||
}
|
||||
|
||||
if($extype == 'INCOME')
|
||||
if($extype == 'RECEIPT')
|
||||
{
|
||||
$label = 'Received From';
|
||||
}
|
||||
|
||||
@ -7,14 +7,20 @@ th{
|
||||
|
||||
$pname = '';
|
||||
$cnamme = '';
|
||||
$pdec = '';
|
||||
$type = '';
|
||||
$pid='';
|
||||
$cid='';
|
||||
foreach($specifications as $s)
|
||||
{
|
||||
$pname = $s->product_description;
|
||||
$pname = $s->product_name;
|
||||
if(!empty($s->product_description)){
|
||||
$pdec = $s->product_description;
|
||||
}
|
||||
$cname = $s->client_name;
|
||||
$pid = $s->product_id;
|
||||
$cid = $s->customer_id;
|
||||
$type = $s->type;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -50,7 +56,7 @@ foreach($specifications as $s)
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="p" id="p" class="form-control" value="<?php echo $pname;?>" readonly>
|
||||
<input type="text" name="p" id="p" class="form-control" value="<?php echo $pname;if(!empty($pdec)){echo '-'.$pdec;};?>" readonly>
|
||||
<input type="hidden" name="product" id="product" value="<?php echo $pid;?>">
|
||||
</div>
|
||||
|
||||
@ -58,7 +64,9 @@ foreach($specifications as $s)
|
||||
<input type="text" name="c" id="c" class="form-control" value="<?php echo $cname;?>" readonly>
|
||||
<input type="hidden" name="customer" id="customer" value="<?php echo $cid;?>">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<input type="text" id="ttype" class="form-control" value = "<?php echo $type;?>" readonly>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="button" id="addspec" class="btn btn-primary" value = "Add New Specification">
|
||||
</div>
|
||||
@ -243,6 +251,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
alldata=JSON.stringify(alldata)
|
||||
var product = $('#product').val();
|
||||
var customer = $('#customer').val();
|
||||
var type = $('#ttype').val();
|
||||
if(product == -1 || customer == -1)
|
||||
{
|
||||
alert('Please Select Product and Customer.');
|
||||
@ -250,17 +259,17 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
||||
else{
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:alldata,param2:product,param3:customer},
|
||||
data:{param1:alldata,param2:product,param3:customer,param4:type},
|
||||
//dataType:"json",
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>quality/saveSpectficationData",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
//console.log(data);
|
||||
|
||||
alert(data);
|
||||
window.location = "<?php echo base_url().'quality';?>";
|
||||
$('#content').loader('hide');
|
||||
|
||||
}
|
||||
|
||||
|
||||
482
application/views/viewindInwardreport.php
Normal file
482
application/views/viewindInwardreport.php
Normal file
@ -0,0 +1,482 @@
|
||||
<style>
|
||||
.edit{
|
||||
|
||||
background-color:#eeffcc ! important;
|
||||
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
//print_r($reportdata['master']);
|
||||
$reportid = '';
|
||||
$igrno = '';
|
||||
$igrlineitemno = '';
|
||||
$customername = '';
|
||||
$product_description = '';
|
||||
$batchdate = '';
|
||||
$qty = '';
|
||||
$inspector = '';
|
||||
$approvedby = '';
|
||||
$DeliveryChellanOrInvoiceNo = '';
|
||||
$DeliveryChellanDate = '';
|
||||
|
||||
foreach($reportdata['master'] as $m)
|
||||
{
|
||||
|
||||
$reportid = $m->testreport_id;
|
||||
$igrno = $m->IGRNO;
|
||||
$igrlineitemno = $m->IGRItemNo;
|
||||
$customername = $m->SupplierID.'-'.$m->SupplierName;
|
||||
$product_description = $m->MaterialCode.'-'.$m->Materialname;
|
||||
$DeliveryChellanOrInvoiceNo = $m->DeliveryChellanOrInvoiceNo;
|
||||
$qty = $m->QuantityAsPerInvoice;
|
||||
$DeliveryChellanDate = $m->DeliveryChellanDate;
|
||||
$batchdate = $m->batchdate;
|
||||
$inspector = $m->FirstName.' '.$m->LastName;
|
||||
$approvedby = $m->approvedby;
|
||||
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
th{
|
||||
text-align:center !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Inward Material Inspection Report - Test Report No:<?php echo $reportid;?></center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
<div class="col-md-3" id="savebutton">
|
||||
<input type="button" id="submit" target="_blank" value = "Print" class="btn btn-primary" onclick="PrintFunction();">
|
||||
</div>
|
||||
<form id="printPDF">
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label>IGR No</label>
|
||||
<input type="text" class="form-control" value="<?php echo $igrno;?>" readonly>
|
||||
<input type="hidden" class="form-control" value="<?php echo $reportid;?>" name="rid" readonly>
|
||||
<input type="hidden" class="form-control" value="INWARD" name="type" readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>IGR Line Item No</label>
|
||||
<input type="text" class="form-control" value="<?php echo $igrlineitemno;?>" readonly>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-md-3">
|
||||
<label>Invoice No</label>
|
||||
<input type="text" id="invoicedate" name="invoicedate" value="<?php echo $DeliveryChellanOrInvoiceNo;?>" class="form-control" readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Invoice Date</label>
|
||||
<input type="text" id="invoicedate" name="invoicedate" value="<?php echo date_format(date_create($DeliveryChellanDate),'d-m-Y');?>" class="form-control" readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Supplier Name</label>
|
||||
<input type="text" id="customername" name="customername" value="<?php echo $customername;?>" class="form-control" readonly>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Grade</label>
|
||||
<input type="text" id="productname" name="productname" value="<?php echo $product_description;?>" class="form-control" readonly>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Qty</label>
|
||||
<input type="text" id="qty" name="qty" value="<?php echo $qty?>" class="form-control ;" readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Batch Date</label>
|
||||
<input type="text" id="reportdate" name="reportdate" class="form-control" value = "<?php echo date_format(date_create($batchdate),'d-m-Y');?>" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<br/>
|
||||
<table id="testreport" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||
<thead style="background-color:#ddf;">
|
||||
<tr>
|
||||
|
||||
<th width="3px">SNO</th>
|
||||
<th>Description</th>
|
||||
<th width="5px">Specification</br>Min</th><th width="5px">Specification</br>Max</th><th width="5px">Specification</br>UOM</th><th>ACT X1</th><th>ACT X2</th><th>ACT X3</th><th width="5px">Average</th><th width="5px">Results</th><th>Remarks</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="specAppend">
|
||||
<?php
|
||||
$index = 0;
|
||||
foreach($reportdata['masterreport'] as $master)
|
||||
{
|
||||
$index++;
|
||||
?>
|
||||
<tr> <td><?php echo $index;?></td> <td><?php echo $master->description;?></td><td><?php echo $master->min;?></td> <td><?php echo $master->max;?></td> <td><?php echo $master->UOM;?></td><td><?php if(!empty($master->act1)){ echo $master->act1; }else {echo '0.00';}?></td><td><?php if(!empty($master->act2)){ echo $master->act2; } else {echo '0.00';}?></td> <td><?php if(!empty($master->act3)){ echo $master->act3; } else {echo '0.00';}?></td> <td><?php echo $master->average;?></td> <td><?php echo $master->result;?></td> <td><?php echo $master->remarks;?></td> </tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
<hr>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3"><b> L.O.I Details </b></div> <div class="col-md-1 col-md-offset-8 text-right"><i class="fa fa-expand" id="loibutton"></i></div>
|
||||
|
||||
</div>
|
||||
<div id="loiarea">
|
||||
<table id="loitable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
<th><center>SNO</center></th><th><center>Heating Time</center></br><center>start</center></th><th><center>Heating Time</center></br><center>end</center></th><th>Temp *c</th><th><center>Crucible Weight</center></br> <center>w1(g)<center></th><th><center>Before Heating</center></br><center>w2(g)</center></th><th><center>After Heating<center></br>w3(g)</center></th><th>L.O.I %</th><th>Remarks</th>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody id="loiAppend">
|
||||
<?php
|
||||
$indexx = 0;
|
||||
foreach($reportdata['masterreportloi'] as $loi)
|
||||
{
|
||||
$indexx++;
|
||||
?>
|
||||
<tr> <td><?php echo $indexx;?></td> <td><?php echo $loi->start_time;?></td> <td><?php echo $loi->end_time;?></td> <td><?php echo $loi->temp;?></td> <td><?php echo $loi->w1;?></td> <td><?php echo $loi->w2;?></td> <td><?php echo $loi->w3;?></td> <td><?php echo $loi->loi_percentage;?></td> <td><?php echo $loi->remarks;?></td></tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3"><b> AFS Details </b></div> <div class="col-md-1 col-md-offset-8 text-right"><i class="fa fa-expand" id="afsbutton"></i></div>
|
||||
|
||||
</div>
|
||||
<div id="afsarea">
|
||||
<table id="afstable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
<th>NO</th><th>Sieve Size µm</th><th>Mesh Size</th><th>Sand Weight</th><th>Percentage</th><th>Multiplier</th><th>Product</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="afsAppend">
|
||||
<?php
|
||||
$ind = 0;
|
||||
$total_sandweight = 0;
|
||||
$totalproduct = 0;
|
||||
foreach($reportdata['masterreportafs'] as $afs)
|
||||
{
|
||||
$ind++;
|
||||
?>
|
||||
<tr> <td><?php echo $ind;?></td> <td id="<?php echo $ind.'size';?>"><?php echo $afs->sieve_size?></td> <td><?php echo $afs->mesh_size;?></td><td id="<?php echo $ind.'p';?>"><?php echo $afs->sandweight;?></td><td><?php echo $afs->percentage?></td><td ><?php echo $afs->multiplier?></td><td><?php echo $afs->product;?></td></tr>
|
||||
<?php
|
||||
$total_sandweight = $total_sandweight + $afs->sandweight;
|
||||
$totalproduct = $totalproduct + $afs->product;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<tr id="12"> <td> </td> <td><b>Total</b></td> <td > </td><td id="12p"><?php echo $total_sandweight;?></td><td id="12m"> </td><td id="12pt"><?php echo number_format($totalproduct,3,'.','');?></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3"><b>AFS CHART </b></div> <div class="col-md-1 col-md-offset-8 text-right"><i class="fa fa-expand" id="chartbutton"></i></div>
|
||||
|
||||
</div>
|
||||
<div id="chartarea">
|
||||
<div>
|
||||
<center><canvas id="myCanvas" width="1000" height="350" style="border:1px solid #d3d3d3;">
|
||||
Your browser does not support the HTML5 canvas tag.</canvas></center>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row"> </div>
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Inspected By :</label>
|
||||
<input type="text" id="inspector" class="form-control" value="<?php echo $inspector;?>" readonly>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 col-md-offset-6 ">
|
||||
<label>Approved By :</label>
|
||||
<input type="text" id="inspector" class="form-control" value="<?php echo $approvedby;?>" readonly>
|
||||
<!-- <input type="text" id="approvedby" class="form-control"> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row"> </div>
|
||||
<div>
|
||||
<div class="row"> </div>
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
<!-- <div class="box-footer clearfix">
|
||||
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
$('#monthlylisting').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"aaSorting": [[ 0, "asc" ]],
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
|
||||
var dataset = [];
|
||||
var datalabel = [];
|
||||
for(x=1;x<=11;x++)
|
||||
{
|
||||
var swid = x+'p';
|
||||
var sanddata = document.getElementById(swid).textContent;
|
||||
dataset.push(sanddata);
|
||||
|
||||
var sizeid = x+'size';
|
||||
var sizedata = document.getElementById(sizeid).textContent;
|
||||
datalabel.push(sizedata);
|
||||
}
|
||||
|
||||
|
||||
drawChart(dataset,datalabel);
|
||||
|
||||
}); // End of document on ready funciton
|
||||
|
||||
function drawChart(dataset,datalabel){
|
||||
var c = document.getElementById("myCanvas");
|
||||
var ctx = c.getContext("2d");
|
||||
ctx.clearRect(0, 0, c.width, c.height);
|
||||
var xlabels = datalabel;
|
||||
var xlabelscount = xlabels.length;
|
||||
console.log(xlabelscount);
|
||||
var dataset = dataset;
|
||||
|
||||
Array.prototype.max = function() {
|
||||
return Math.max.apply(null, this);
|
||||
};
|
||||
var maxdataitem = dataset.max();
|
||||
maxdataitem = Math.round((maxdataitem + 10)/5);
|
||||
|
||||
|
||||
var dataset_locationsX = [];
|
||||
var dataset_locationsY = [];
|
||||
|
||||
var canvaswidth = document.getElementById('myCanvas').offsetWidth;
|
||||
var canvasheight = document.getElementById('myCanvas').offsetHeight;
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(30,0);
|
||||
ctx.lineTo(30,canvasheight);
|
||||
ctx.strokeStyle="black";
|
||||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(0,(canvasheight-30));
|
||||
ctx.lineTo(canvaswidth,(canvasheight-30));
|
||||
ctx.strokeStyle="black";
|
||||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.font = "bold 12px Arial";
|
||||
ctx.fillStyle = "black";
|
||||
ctx.fillText("Sieve Size µm",(canvaswidth/2),(canvasheight-2));
|
||||
ctx.closePath();
|
||||
|
||||
var xaxislabelwidth = (canvaswidth/12);
|
||||
|
||||
var startingpointX = 30;
|
||||
var startingpointY = (canvasheight-30);
|
||||
|
||||
|
||||
for(i=1;i<=xlabelscount;i++) //X DataLabel
|
||||
{
|
||||
ctx.beginPath();
|
||||
ctx.font = "10px Arial";
|
||||
ctx.fillStyle = "black";
|
||||
ctx.fillText(xlabels[i-1],(startingpointX+(xaxislabelwidth * i)),(startingpointY+15));
|
||||
ctx.closePath();
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(i=1;i<=xlabelscount;i++) // X Data
|
||||
{
|
||||
ctx.beginPath();
|
||||
ctx.arc((startingpointX+(xaxislabelwidth * i)),startingpointY,3,0,2*Math.PI);
|
||||
ctx.fillStyle = "black";
|
||||
ctx.fill();
|
||||
ctx.closePath();
|
||||
var xl = (startingpointX+(xaxislabelwidth * i));
|
||||
|
||||
dataset_locationsX.push(xl);
|
||||
|
||||
}
|
||||
|
||||
|
||||
var j = 0;
|
||||
var ylabel = 0;
|
||||
for(i=1;i<=maxdataitem;i++) // y Data and Y labels
|
||||
{
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(startingpointX,(startingpointY-j),3,0,2*Math.PI);
|
||||
ctx.fillStyle = "black";
|
||||
ctx.fill();
|
||||
var yl = ((startingpointY-j));
|
||||
dataset_locationsY.push(yl);
|
||||
ctx.fillStyle = "black";
|
||||
ctx.font = "10px Arial";
|
||||
ctx.fillText((j/7),(startingpointX-30),(startingpointY-j));
|
||||
ylabel = ylabel + 5;
|
||||
j=j+35;
|
||||
ctx.closePath();
|
||||
|
||||
}
|
||||
|
||||
var finallocationofY = [];
|
||||
var finallocationofX = [];
|
||||
for(i=1;i<=xlabelscount;i++) //Exact chart Data Draw red circle
|
||||
{
|
||||
ctx.beginPath();
|
||||
<!-- ctx.arc((parseFloat(dataset_locationsX[i-1])),((startingpointY - parseFloat(dataset[i-1]) * 7)),4,0,2*Math.PI); -->
|
||||
ctx.fillStyle="red";
|
||||
ctx.lineCap = 'round';
|
||||
<!-- ctx.fill(); -->
|
||||
ctx.fillRect((parseFloat(dataset_locationsX[i-1])-5),((startingpointY - parseFloat(dataset[i-1]) * 7)-5),8,8)
|
||||
finallocationofY.push((startingpointY - parseFloat(dataset[i-1]) * 7));
|
||||
finallocationofX.push(parseFloat(dataset_locationsX[i-1]));
|
||||
ctx.closePath();
|
||||
//Draw text for data points
|
||||
ctx.beginPath();
|
||||
ctx.font = "10px Arial";
|
||||
ctx.fillStyle="blue";
|
||||
ctx.fillText(dataset[i-1],(parseFloat(dataset_locationsX[i-1])),((startingpointY - parseFloat(dataset[i-1]) * 7)-10));
|
||||
ctx.closePath();
|
||||
}
|
||||
|
||||
|
||||
for(i=0;i<=xlabelscount;i++) //Exact Chart Data Draw line
|
||||
{
|
||||
|
||||
|
||||
ctx.moveTo(finallocationofX[i],finallocationofY[i]);
|
||||
ctx.lineTo(finallocationofX[i+1],finallocationofY[i+1]);
|
||||
ctx.setLineDash([0,0]);
|
||||
//ctx.strokeStyle="#1a75ff";
|
||||
ctx.lineWidth=3;
|
||||
//setInterval(function(){
|
||||
ctx.stroke();
|
||||
//},30000);
|
||||
|
||||
|
||||
|
||||
}
|
||||
//ctx.beginPath();
|
||||
for(i=1;i<=dataset_locationsY.length;i++) // Drawing Dashed Lines from Y
|
||||
{
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(startingpointX,dataset_locationsY[i]);
|
||||
ctx.lineTo(canvaswidth,dataset_locationsY[i]);
|
||||
ctx.setLineDash([3,6]);
|
||||
ctx.strokeStyle="black";
|
||||
ctx.lineWidth=0.2;
|
||||
ctx.stroke();
|
||||
ctx.closePath();
|
||||
|
||||
}
|
||||
//sctx.closePath();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function PrintFunction()
|
||||
{
|
||||
// var reportid = <?php echo $reportid;?>;
|
||||
// $.ajax({
|
||||
// data:{param1:reportid},
|
||||
// type:"POST",
|
||||
// url:"<?php echo base_url() ?>quality/printReportPDF",
|
||||
// success:function(data) {
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
$('#printPDF').attr('action', '<?php echo base_url() ?>quality/printReportPDF');
|
||||
$('#printPDF').attr('method', 'post');
|
||||
$('#printPDF').submit();
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
188
application/views/viewindinwardreportpdf.php
Normal file
188
application/views/viewindinwardreportpdf.php
Normal file
@ -0,0 +1,188 @@
|
||||
|
||||
<?php
|
||||
//print_r($reportdata);
|
||||
$src='';
|
||||
$reportid = '';
|
||||
$igrno = '';
|
||||
$igrlineitemno = '';
|
||||
$invoiceno = '';
|
||||
$invoicedate = '';
|
||||
$customername = '';
|
||||
$product_description = '';
|
||||
|
||||
$qty = '';
|
||||
$batchdate = '';
|
||||
$inspector = '';
|
||||
$approvedby = '';
|
||||
if(!empty($reportdata['master'])){
|
||||
foreach($reportdata['master'] as $m)
|
||||
{
|
||||
$src = $m->chartdata;
|
||||
$reportid = $m->testreport_id;
|
||||
$invoiceno = $m->DeliveryChellanOrInvoiceNo;
|
||||
$invoicedate = $m->DeliveryChellanDate;
|
||||
$customername = $m->SupplierName;
|
||||
$product_description = $m->Materialname;
|
||||
$igrno = $m->IGRNO;
|
||||
$igrlineitemno = $m->IGRItemNo;
|
||||
$qty = $m->QuantityAsPerInvoice;
|
||||
$batchdate = $m->batchdate;
|
||||
$inspector = $m->FirstName.' '.$m->LastName;
|
||||
$approvedby = $m->approvedby;
|
||||
}
|
||||
}
|
||||
|
||||
$cname = '';
|
||||
$caddress = '';
|
||||
$pic = '';
|
||||
if(!empty($reportdata['company'])){
|
||||
foreach($reportdata['company'] as $c)
|
||||
{
|
||||
$cname = $c->CompanyName;
|
||||
$caddress = $c->Address;
|
||||
$pic = $c->ProfilePic;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
td{
|
||||
text-align:center;
|
||||
height:17px;
|
||||
}
|
||||
|
||||
table{
|
||||
|
||||
font-size:10px;
|
||||
}
|
||||
</style>
|
||||
<html>
|
||||
<body>
|
||||
<!-- <table style="border-collapse:collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr><td colspan="6" style="text-align:center;"><h2>PRE DISPATCH INSPECTION REPORT</h2></td></tr>
|
||||
<tr><td rowspan="5" style="text-align:center;width:20%"><img src="<?php echo base_url().'uploads/images/'.$pic;?>" alt="no image"/></td>
|
||||
<td rowspan="5" style="text-align:center;"><b><?php echo $cname;?></b><br><?php echo $caddress;?></td>
|
||||
<td style="text-align:center;width:30%">CUSTOMER NAME</td>
|
||||
|
||||
<td colspan="6"style="text-align:center;width:100%"><b><?php echo $customername;?></b></td>
|
||||
</tr>
|
||||
<tr><td style="text-align:center;width:10%">MATERIAL NAME</td><td style="text-align:center;width:20%"><b><?php echo $product_description;?><b></td><td style="text-align:center;width:20%">INVOICE NO</td><td style="text-align:center;width:10%"><b><?php echo $invoiceno;?></b></td></tr>
|
||||
<tr><td rowspan="3">Qty</td> <td rowspan="3"> <b><?php echo $qty;?> kgs</b></td> <td>INVOICE DATE</td><td><b><?php echo date_format(date_create($invoicedate),'d-m-Y');?></b></td></tr>
|
||||
<tr><td>Batch NO</td><td><b><?php echo $batchno;?></b></td></tr>
|
||||
<tr><td>BATCH DATE</td><td><b><?php echo date_format(date_create($batchdate),'d-m-Y');?></b></td></tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
<table style="border-collapse:collapse;border-left-style:hidden;width:100%" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="6"><h2>INWARD MATERIAL INSPECTION REPORT</h2></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td rowspan="5" ><img src="<?php echo base_url().'uploads/images/'.$pic;?>" alt="no image"/></td>
|
||||
<td rowspan="5" width="38%"><b><?php echo $cname;?></b><br><?php echo $caddress;?></td>
|
||||
<td width="8%" rowspan="2">SUPPLIER NAME</td>
|
||||
<td rowspan="2"><b><?php echo $customername;?></b></td>
|
||||
<td width="8%" >IGRNO</td>
|
||||
<td><b><?php echo $igrno;?></b></td>
|
||||
<tr><td width="8%" >IGRItemNo</td>
|
||||
<td><b><?php echo $igrlineitemno;?></b></td></tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2" width="8%">MATERIAL NAME</td>
|
||||
<td rowspan="2" ><b><?php echo $product_description;?></td>
|
||||
<td >INVOICE NO</td>
|
||||
<td ><b><?php echo $invoiceno;?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >INVOICE DATE</td>
|
||||
<td ><b><?php echo date_format(date_create($invoicedate),'d-m-Y');?></b></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td rowspan="1" width="8%">QTY</td>
|
||||
<td rowspan="1" ><b><?php echo $qty;?> kgs</b></td>
|
||||
<!-- <td >BATCH NO</td>
|
||||
<td ><b><?php echo "HI";?></b></td>-->
|
||||
<td >BATCH DATE</td>
|
||||
<td><b><?php echo date_format(date_create($batchdate),'d-m-Y');?></b></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr><th rowspan="3">S.NO</th><th rowspan="3" width="160">DESCRIPTION</th><th rowspan="2" colspan="3" width="110">SPECIFICATION</th><th colspan="3" width="170">ACT</th> <th rowspan="3" width="50">Average</th> <th rowspan="3" width="110">Results</th> <th rowspan="3" width="90">Remarks</th> </tr> <tr><th rowspan="2">X1</th> <th rowspan="2">X2</th> <th rowspan="2">X3</th></tr><tr><th>Min</th><th>Max</th><th width="46">UOM</th></tr>
|
||||
|
||||
<?php
|
||||
$index = 0;
|
||||
foreach($reportdata['masterreport'] as $master)
|
||||
{
|
||||
$index++;
|
||||
?>
|
||||
<tr> <td><?php echo $index;?></td> <td style="text-align:left;"><?php echo $master->description;?></td><td><?php if($master->min == 0 || $master->min == '') { echo "-"; } else { echo $master->min;} ?></td> <td><?php if($master->max == 0 || $master->max == '') { echo '-'; } else { echo $master->max; }?></td> <td><?php echo $master->UOM;?></td><td><?php if(!empty($master->act1)){ echo $master->act1; }else {echo '0.00';}?></td><td><?php if(!empty($master->act2)){ echo $master->act2; } else {echo '0.00';}?></td> <td><?php if(!empty($master->act3)){ echo $master->act3; } else {echo '0.00';}?></td> <td><?php echo $master->average;?></td> <td><?php echo $master->result;?></td> <td style="text-align:left;"><?php echo $master->remarks;?></td> </tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>L.O.I DETAILS</h3>
|
||||
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr><th rowspan="2">S.NO</th><th width="160">HEATING TIME</th><th width="110">TEMP</th><th width="115">CRUCIBLE WEIGHT</th><th>BEFORE HEATING WEIGHT</th><th>AFTER HEATING WEIGHT</th> <th rowspan="2">L.O.I (%)</th><th rowspan="2">Remarks</th> </tr>
|
||||
<tr><th>START TIME - END TIME</th><th>*C</th> <th>W1(g)</th> <th>W2(g)</th> <th>W3(g)</th></tr>
|
||||
<?php
|
||||
$indexx = 0;
|
||||
foreach($reportdata['masterreportloi'] as $loi)
|
||||
{
|
||||
$indexx++;
|
||||
?>
|
||||
<tr> <td><?php echo $indexx;?></td> <td><?php echo $loi->start_time.'~'.$loi->end_time;?></td><td><?php echo $loi->temp;?></td> <td><?php echo $loi->w1;?></td> <td><?php echo $loi->w2;?></td> <td><?php echo $loi->w3;?></td> <td><?php echo $loi->loi_percentage;?></td> <td style="text-align:left;"><?php echo $loi->remarks;?></td></tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>AFS DETAILS</h3>
|
||||
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr > <th height="20">S.NO</th> <th width="160">Sieve Size µm </th> <th width="110">Mesh Size</th> <th width="110">SAND WEIGHT</th> <th width="110">Percantage</th> <th width="110">Multiplier</th> <th width="90">Product</th></tr>
|
||||
<?php
|
||||
$ind = 0;
|
||||
$total_sandweight = 0;
|
||||
$totalproduct = 0;
|
||||
foreach($reportdata['masterreportafs'] as $afs)
|
||||
{
|
||||
$ind++;
|
||||
?>
|
||||
<tr> <td><?php echo $ind;?></td> <td id="<?php echo $ind.'size';?>"><?php echo $afs->sieve_size?></td> <td><?php echo $afs->mesh_size?></td><td id="<?php echo $ind.'p';?>"><?php echo $afs->sandweight;?></td><td><?php echo $afs->percentage?></td><td ><?php echo $afs->multiplier?></td><td><?php echo $afs->product;?></td></tr>
|
||||
<?php
|
||||
$total_sandweight = $total_sandweight + $afs->sandweight;
|
||||
$totalproduct = $totalproduct + $afs->product;
|
||||
}
|
||||
?>
|
||||
<tr id="12"> <td> </td> <td><b>Total</b></td> <td> </td><td id="12sw"><?php echo $total_sandweight;?></td><td id="12p"><?php echo $total_sandweight;?></td><td id="12m"> </td><td id="12pt"><?php echo number_format($totalproduct,3,'.','');?></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<div>
|
||||
<!-- <center><canvas id="myCanvas" width="1000" height="350" style="border:1px solid #d3d3d3;"></canvas></center> -->
|
||||
<center><img id="ren" src="<?php echo $src;?>" alt="NO"/></center>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<br><br>
|
||||
<table >
|
||||
<tr><td>INSPECTOR NAME :<?php echo $inspector;?></td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td>APPROVED BY :<?php echo $approvedby;?></td></tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
|
||||
<tr><td>Signature</td><td> </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
BIN
assets/dist/img/RI_favicon.png
vendored
Normal file
BIN
assets/dist/img/RI_favicon.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user