report changes merged in ria
This commit is contained in:
parent
33a76fe9f0
commit
6bcc120316
@ -161,6 +161,16 @@ class quality extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function viewIndInwardReport()
|
||||||
|
{
|
||||||
|
$reportid = $this->uri->segment(3);
|
||||||
|
|
||||||
|
$data['reportdata'] = $this->quality_model->getIndividualInwardReportData($reportid);
|
||||||
|
$this->global['pageTitle'] = 'Resico : View Individual Report';
|
||||||
|
$this->loadViews("viewindInwardreport", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To Generate the Reports as pdf
|
* To Generate the Reports as pdf
|
||||||
@ -400,7 +410,7 @@ class quality extends BaseController
|
|||||||
{
|
{
|
||||||
$data['records'] = $this->quality_model->getIGRNOforReport();
|
$data['records'] = $this->quality_model->getIGRNOforReport();
|
||||||
$data['emplist'] = $this->quality_model->getEmplistforReport();
|
$data['emplist'] = $this->quality_model->getEmplistforReport();
|
||||||
$this->global['pageTitle'] = 'Siddharth : Inward Inspection';
|
$this->global['pageTitle'] = 'Resico : Inward Inspection';
|
||||||
$this->loadViews("inward_report_create", $this->global,$data,NULL);
|
$this->loadViews("inward_report_create", $this->global,$data,NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,10 +23,38 @@ class report extends BaseController
|
|||||||
|
|
||||||
public function pending_report()
|
public function pending_report()
|
||||||
{
|
{
|
||||||
|
$this->global['pageTitle'] = 'Resico : Reports';
|
||||||
|
|
||||||
|
if ($this->input->post('btn_submit')) {
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Total Pending Requests Reports -';
|
$this->global['pageTitle'] = 'Total Pending Requests Reports -';
|
||||||
|
|
||||||
$data['pending_list']=$this->dahsboard_Model->req_list();
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
|
$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');
|
||||||
|
|
||||||
|
$agf = $this->input->post('aging_from');
|
||||||
|
|
||||||
|
$agt = $this->input->post('aging_to');
|
||||||
|
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
$data['pending_list']=$this->dahsboard_Model->req_list($fa,$aa,$m,$frm,$t,$agf,$agt);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($this->DEPCode == MANAGEMENT)
|
if($this->DEPCode == MANAGEMENT)
|
||||||
{
|
{
|
||||||
@ -40,12 +68,37 @@ class report extends BaseController
|
|||||||
|
|
||||||
public function releasedPO()
|
public function releasedPO()
|
||||||
{
|
{
|
||||||
|
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||||
|
|
||||||
|
if ($this->input->post('btn_submit')) {
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Order Value - Released Reports - ';
|
$this->global['pageTitle'] = 'Order Value - Released Reports - ';
|
||||||
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
|
$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');
|
||||||
|
|
||||||
|
$agf = $this->input->post('total_order_value_From');
|
||||||
|
|
||||||
|
$agt = $this->input->post('total_order_value_To');
|
||||||
|
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
$data['rel_po']=$this->dahsboard_Model->report_relpo($fa,$aa,$m,$frm,$t,$agf,$agt);
|
||||||
|
|
||||||
|
}
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data['rel_po']=$this->dahsboard_Model->report_relpo();
|
//$data['rel_po']=$this->dahsboard_Model->report_relpo();
|
||||||
|
|
||||||
if($this->DEPCode == MANAGEMENT)
|
if($this->DEPCode == MANAGEMENT)
|
||||||
{
|
{
|
||||||
@ -59,12 +112,45 @@ class report extends BaseController
|
|||||||
|
|
||||||
public function openorderPO()
|
public function openorderPO()
|
||||||
{
|
{
|
||||||
|
$this->global['pageTitle'] = 'Resico : Reports';
|
||||||
|
|
||||||
|
if ($this->input->post('btn_submit')) {
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Open Orders - Pending Reports - ';
|
$this->global['pageTitle'] = 'Open Orders - Pending Reports - ';
|
||||||
|
|
||||||
|
|
||||||
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
$data['open_po']=$this->dahsboard_Model->report_openpending();
|
$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');
|
||||||
|
|
||||||
|
$agf = $this->input->post('total_order_value_From');
|
||||||
|
|
||||||
|
$agt = $this->input->post('total_order_value_To');
|
||||||
|
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
$data['open_po']=$this->dahsboard_Model->report_openpending($fa,$aa,$m,$frm,$t,$agf,$agt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//$data['open_po']=$this->dahsboard_Model->report_openpending();
|
||||||
if($this->DEPCode == MANAGEMENT)
|
if($this->DEPCode == MANAGEMENT)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -167,12 +253,28 @@ class report extends BaseController
|
|||||||
}
|
}
|
||||||
public function MM_ReceiptValue()
|
public function MM_ReceiptValue()
|
||||||
{
|
{
|
||||||
|
$this->global['pageTitle'] = 'Resico : Reports';
|
||||||
|
|
||||||
|
|
||||||
|
if ($this->input->post('btn_submit')) {
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Material Master - Receipt Value Reports-';
|
$this->global['pageTitle'] = 'Material Master - Receipt Value Reports-';
|
||||||
|
|
||||||
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
|
$fa=substr($ab,0,-5);
|
||||||
|
|
||||||
$data['mmr']=$this->dahsboard_Model->report_MMReceiptValue();
|
$aa=substr($ab,5,5);
|
||||||
|
|
||||||
|
$m=$this->input->post('month');
|
||||||
|
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
$data['mmr']=$this->dahsboard_Model->report_MMReceiptValue($fa,$aa,$m);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
|
|
||||||
|
|
||||||
if($this->DEPCode == MANAGEMENT)
|
if($this->DEPCode == MANAGEMENT)
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class user extends BaseController
|
|||||||
$data['details']=$this->dahsboard_Model->reqdetail();
|
$data['details']=$this->dahsboard_Model->reqdetail();
|
||||||
|
|
||||||
$data['pending_details']=$this->dahsboard_Model->req_pending();
|
$data['pending_details']=$this->dahsboard_Model->req_pending();
|
||||||
$data['list']=$this->dahsboard_Model->req_list();
|
// $data['list']=$this->dahsboard_Model->req_list();
|
||||||
|
|
||||||
$data['serviceprogress']=$this->dahsboard_Model->serviceprogress();
|
$data['serviceprogress']=$this->dahsboard_Model->serviceprogress();
|
||||||
$data['revenueprogress']=$this->dahsboard_Model->revenueprogress();
|
$data['revenueprogress']=$this->dahsboard_Model->revenueprogress();
|
||||||
|
|||||||
@ -4,6 +4,7 @@ class dahsboard_Model extends CI_Model
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/* HR DASHBOART Model START*/
|
||||||
function totemp()
|
function totemp()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -55,15 +56,27 @@ $sql="select EmpID,CONCAT(FirstName,' ',LastName) as name FROM T_Employee_Detai
|
|||||||
|
|
||||||
|
|
||||||
function attyesterday($WH,$date)
|
function attyesterday($WH,$date)
|
||||||
|
{
|
||||||
|
//echo 'model' . $WH.'-'.$date;
|
||||||
|
$sql="select EmpID,".$WH." from T_Attendance where Month_Year = ? and EmpID in (select EmpID from T_Attendance)" ;
|
||||||
|
$query = $this->db->query($sql,array($date));
|
||||||
|
// print_r($query->result());
|
||||||
|
//echo count($query->result());
|
||||||
|
return $query->result_array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function dayAllPersentEmpSalary($WH,$OT,$date)
|
||||||
{
|
{
|
||||||
//echo $EmpID.'-'.$dates;
|
//echo $EmpID.'-'.$dates;
|
||||||
$sql="select ".$WH." from T_Attendance where Month_Year = ? and EmpID in (select EmpID from T_Attendance)";
|
$sql="select EmpID,".$WH.",".$OT." from T_Attendance where Month_Year = ? and EmpID in (select EmpID from T_Attendance)";
|
||||||
$query = $this->db->query($sql,array($date));
|
$query = $this->db->query($sql,array($date));
|
||||||
//return
|
//return
|
||||||
return $query->result_array();
|
return $query->result_array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function attendance($EmpID,$dates)
|
function attendance($EmpID,$dates)
|
||||||
{
|
{
|
||||||
//echo $EmpID.'-'.$dates;
|
//echo $EmpID.'-'.$dates;
|
||||||
@ -105,6 +118,16 @@ where att.Month_Year = ? and att.EmpID = ?;";
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function persentEmployeeDetails($EmpID){
|
||||||
|
//join T_Attendance att on att.EmpID = pay.EmpID
|
||||||
|
$sql= "select * FROM T_Emp_Pay_Data where EmpID = ?;";
|
||||||
|
$query = $this->db->query($sql,array($EmpID));
|
||||||
|
|
||||||
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function attendanceyear($EmpID,$MONTH)
|
function attendanceyear($EmpID,$MONTH)
|
||||||
{
|
{
|
||||||
@ -112,20 +135,28 @@ where att.Month_Year = ? and att.EmpID = ?;";
|
|||||||
// $sql="select Att.EmpID,Att.Month_Year,Att.*,NoofDays,Days_Worked,emp.DateofJoining from T_Attendance Att
|
// $sql="select Att.EmpID,Att.Month_Year,Att.*,NoofDays,Days_Worked,emp.DateofJoining from T_Attendance Att
|
||||||
// join T_Employee_Details as emp on emp.EmpID = Att.EmpID
|
// join T_Employee_Details as emp on emp.EmpID = Att.EmpID
|
||||||
// where Att.Month_Year between ? and ? and Att.EmpID = ?";
|
// where Att.Month_Year between ? and ? and Att.EmpID = ?";
|
||||||
|
// else
|
||||||
|
// (YEAR(Month_Year) = YEAR(CURRENT_DATE)-1 and MONTH(Month_Year) >= ? ) or ( YEAR(Month_Year) = YEAR(CURRENT_DATE) and MONTH(Month_Year) <= 3 )
|
||||||
$sql = 'select sum(NoofDays) as TotalWorkingDays,sum(Days_worked) as DaysWorked from T_Attendance where
|
$sql = 'select sum(NoofDays) as TotalWorkingDays,sum(Days_worked) as DaysWorked from T_Attendance where
|
||||||
case
|
case
|
||||||
when (month(Month_Year) >=4) then
|
when (month(Month_Year) >=4) then
|
||||||
(YEAR(Month_Year) = YEAR(CURRENT_DATE) and MONTH(Month_Year) >= ? ) or ( YEAR(Month_Year) = YEAR(CURRENT_DATE)+1 and MONTH(Month_Year) <= 3 )
|
(YEAR(Month_Year) = YEAR(CURRENT_DATE) and MONTH(Month_Year) >= ? ) or ( YEAR(Month_Year) = YEAR(CURRENT_DATE)+1 and MONTH(Month_Year) <= 3 )
|
||||||
else
|
|
||||||
(YEAR(Month_Year) = YEAR(CURRENT_DATE)-1 and MONTH(Month_Year) >= ? ) or ( YEAR(Month_Year) = YEAR(CURRENT_DATE) and MONTH(Month_Year) <= 3 )
|
|
||||||
end and EmpID = ? and month(Month_Year) != month(current_date());';
|
end and EmpID = ? and month(Month_Year) != month(current_date());';
|
||||||
$query= $this->db->query($sql,array($MONTH, $MONTH, $EmpID));
|
$query= $this->db->query($sql,array($MONTH, $EmpID));
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* HR DASHBOARD Model END*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function totalpurchaseorder(){
|
function totalpurchaseorder(){
|
||||||
|
|
||||||
|
|
||||||
@ -476,27 +507,44 @@ WHERE Cost_Center_Budget.BudgetType='REVENUE' and YEAR(STR_TO_DATE(`BudgetYear`,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function req_list(){
|
function req_list($fa,$aa,$m,$frm,$t,$agf,$agt){
|
||||||
|
|
||||||
|
|
||||||
$sql="select date_format(mas.ReqDate,'%d-%m-%Y') as ReqDate,mas.ReqNo,emp.FirstName as Requestedby,dep.DepartmentName,mas.ReqType,DATEDIFF(CURDATE(),mas.ReqDate) AS Aging from T_Requestion_Master as mas
|
$sql="select date_format(mas.ReqDate,'%d-%m-%Y') as ReqDate,mas.ReqNo,emp.FirstName as Requestedby,dep.DepartmentName,mas.ReqType,DATEDIFF(CURDATE(),mas.ReqDate) AS Aging from T_Requestion_Master as mas
|
||||||
join T_CostCenter_Master cos on cos.CostCenterCode = mas.CostCenterCode
|
join T_CostCenter_Master cos on cos.CostCenterCode = mas.CostCenterCode
|
||||||
join T_Employee_Details emp on emp.EmpID = mas.Requestedby
|
join T_Employee_Details emp on emp.EmpID = mas.Requestedby
|
||||||
join T_DepartmentDetails dep on dep.DEPCode=emp.Departmentcode
|
join T_DepartmentDetails dep on dep.DEPCode=emp.Departmentcode
|
||||||
where mas.Status = 'ST002'
|
where mas.Status = 'ST002'
|
||||||
";
|
";
|
||||||
$query = $this->db->query($sql);
|
if ($fa and $aa != ''){
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
|
$sql.=" and (mas.ReqDate >= '".$fa."-04-01' and mas.ReqDate <= '".$aa."-03-31')";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($m!= ''){
|
||||||
|
|
||||||
|
$sql.="and monthname(mas.ReqDate) = '".$m."'";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function report_relpo(){
|
if ($frm and $t != ''){
|
||||||
|
$fromd= date("Y-m-d",strtotime($frm));
|
||||||
|
$tod=date("Y-m-d",strtotime($t));
|
||||||
|
|
||||||
|
$sql.="and date(mas.ReqDate) >= '".$fromd."'
|
||||||
|
and date(mas.ReqDate) <= '".$tod."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($agf and $agt != ''){
|
||||||
|
|
||||||
|
$sql.="and DATEDIFF(CURDATE(),mas.ReqDate) >= '".$agf."'
|
||||||
|
and DATEDIFF(CURDATE(),mas.ReqDate) <= '".$agt."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
//print_r($this->db->last_query());
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function report_relpo($fa,$aa,$m,$frm,$t,$agf,$agt){
|
||||||
$sql="select Mast.PONO,Mast.POType,date_format(Mast.PODate,'%d-%m-%Y') as PODate,date_format(Mast.ReleasedOn,'%d-%m-%Y') as ReleasedDate,Dept_Details.DepartmentName As Dept_Name,Mast.TotalOrderValue
|
$sql="select Mast.PONO,Mast.POType,date_format(Mast.PODate,'%d-%m-%Y') as PODate,date_format(Mast.ReleasedOn,'%d-%m-%Y') as ReleasedDate,Dept_Details.DepartmentName As Dept_Name,Mast.TotalOrderValue
|
||||||
from T_PurchaseOrder_Master Mast
|
from T_PurchaseOrder_Master Mast
|
||||||
JOIN T_PurchaseOrder_LineItem Det on Det.PONO=Mast.PONO
|
JOIN T_PurchaseOrder_LineItem Det on Det.PONO=Mast.PONO
|
||||||
@ -507,17 +555,38 @@ JOIN T_CostCenter_Master as Cost on
|
|||||||
Cost.CostCenterCode=Req.CostCenterCode
|
Cost.CostCenterCode=Req.CostCenterCode
|
||||||
JOIN T_CostCenter_Budget as Cost_Center_Bdgt on Cost.CostCenterCode=Cost_Center_Bdgt.CostCenterCode
|
JOIN T_CostCenter_Budget as Cost_Center_Bdgt on Cost.CostCenterCode=Cost_Center_Bdgt.CostCenterCode
|
||||||
where Mast.Status='ST026'
|
where Mast.Status='ST026'
|
||||||
group by Mast.PONO";
|
";
|
||||||
$query = $this->db->query($sql);
|
if ($fa and $aa != ''){
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
|
$sql.=" and (Mast.PODate >= '".$fa."-04-01' and Mast.PODate <= '".$aa."-03-31')";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($m!= ''){
|
||||||
|
|
||||||
|
$sql.="and monthname(Mast.PODate) = '".$m."'";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function report_openpending(){
|
if ($frm and $t != ''){
|
||||||
|
$fromd= date("Y-m-d",strtotime($frm));
|
||||||
|
$tod=date("Y-m-d",strtotime($t));
|
||||||
|
|
||||||
|
$sql.="and date(Mast.PODate) >= '".$fromd."'
|
||||||
|
and date(Mast.PODate) <= '".$tod."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($agf and $agt != ''){
|
||||||
|
|
||||||
|
$sql.="and Mast.TotalOrderValue >= '".$agf."'
|
||||||
|
and Mast.TotalOrderValue <= '".$agt."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
$sql.=" group by Mast.PONO";
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function report_openpending($fa,$aa,$m,$frm,$t,$agf,$agt){
|
||||||
$sql="select Mast.PONO as PONO,Mast.POType as POType,date_format(Mast.PODate,'%d-%m-%Y') as PODate,date_format(Mast.ApprovedOn,'%d-%m-%Y') as ApprovedDate,Dept_Details.DepartmentName As Dept_Name,Mast.TotalOrderValue
|
$sql="select Mast.PONO as PONO,Mast.POType as POType,date_format(Mast.PODate,'%d-%m-%Y') as PODate,date_format(Mast.ApprovedOn,'%d-%m-%Y') as ApprovedDate,Dept_Details.DepartmentName As Dept_Name,Mast.TotalOrderValue
|
||||||
from T_PurchaseOrder_Master Mast
|
from T_PurchaseOrder_Master Mast
|
||||||
JOIN T_PurchaseOrder_LineItem Det on Det.PONO=Mast.PONO
|
JOIN T_PurchaseOrder_LineItem Det on Det.PONO=Mast.PONO
|
||||||
@ -527,9 +596,36 @@ JOIN T_DepartmentDetails Dept_Details on Dept_Details.DEPCode=Emp_Det.Department
|
|||||||
JOIN T_CostCenter_Master as Cost on
|
JOIN T_CostCenter_Master as Cost on
|
||||||
Cost.CostCenterCode=Req.CostCenterCode
|
Cost.CostCenterCode=Req.CostCenterCode
|
||||||
JOIN T_CostCenter_Budget as Cost_Center_Bdgt on Cost.CostCenterCode=Cost_Center_Bdgt.CostCenterCode
|
JOIN T_CostCenter_Budget as Cost_Center_Bdgt on Cost.CostCenterCode=Cost_Center_Bdgt.CostCenterCode
|
||||||
where Mast.Status='ST025' or Mast.Status='ST005'
|
where (Mast.Status='ST025' or Mast.Status='ST005')
|
||||||
group by PONO,POType,Dept_Name";
|
";
|
||||||
|
if ($fa and $aa != ''){
|
||||||
|
|
||||||
|
$sql.=" and (Mast.PODate >= '".$fa."-04-01' and Mast.PODate <= '".$aa."-03-31')";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($m!= ''){
|
||||||
|
|
||||||
|
$sql.="and monthname(Mast.PODate) = '".$m."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($frm and $t != ''){
|
||||||
|
$fromd= date("Y-m-d",strtotime($frm));
|
||||||
|
$tod=date("Y-m-d",strtotime($t));
|
||||||
|
|
||||||
|
$sql.="and date(Mast.PODate) >= '".$fromd."'
|
||||||
|
and date(Mast.PODate) <= '".$tod."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($agf and $agt != ''){
|
||||||
|
|
||||||
|
$sql.="and Mast.TotalOrderValue >= '".$agf."'
|
||||||
|
and Mast.TotalOrderValue <= '".$agt."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
$sql.=" group by PONO,POType,Dept_Name";
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
|
//echo $sql;
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
|
|
||||||
@ -635,7 +731,7 @@ group by po.SupplierID,pl.MaterialCode";
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function report_MMReceiptValue(){
|
function report_MMReceiptValue($fa,$aa,$m){
|
||||||
|
|
||||||
|
|
||||||
$sql="select
|
$sql="select
|
||||||
@ -644,8 +740,19 @@ group by po.SupplierID,pl.MaterialCode";
|
|||||||
from T_MaterialItem_PO matv
|
from T_MaterialItem_PO matv
|
||||||
join T_PurchaseOrder_Master pm on pm.CreatedDate = matv.CreatedDate
|
join T_PurchaseOrder_Master pm on pm.CreatedDate = matv.CreatedDate
|
||||||
join T_MaterialMaster mat on matv.MaterialCode=mat.MaterialCode
|
join T_MaterialMaster mat on matv.MaterialCode=mat.MaterialCode
|
||||||
group by matv.MaterialCode
|
where pm.PODate != 0 ";
|
||||||
order by monthname(pm.PODate)";
|
if ($fa and $aa != ''){
|
||||||
|
|
||||||
|
$sql.=" and (pm.PODate >= '".$fa."-04-01' and pm.PODate <= '".$aa."-03-31')";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($m!= ''){
|
||||||
|
|
||||||
|
$sql.="and monthname(pm.PODate) = '".$m."'";
|
||||||
|
|
||||||
|
}
|
||||||
|
$sql.=" group by matv.MaterialCode";
|
||||||
|
$sql.=" order by monthname(pm.PODate)";
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,12 @@ if(!empty($mmr))
|
|||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #5d0411;
|
||||||
|
|
||||||
|
border-color: #5d0411;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@ -45,10 +51,144 @@ if(!empty($mmr))
|
|||||||
<!-- TABLE: LATEST ORDERS -->
|
<!-- TABLE: LATEST ORDERS -->
|
||||||
<div class="box box-info">
|
<div class="box box-info">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Material Master - Receipt Value</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#5d0411"><b>Report - Material Master - Receipt Value</b> <br><br>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($this->input->post('financialyear')){
|
||||||
|
|
||||||
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
|
echo '('.$ab.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('month')){
|
||||||
|
|
||||||
|
$m=$this->input->post('month');
|
||||||
|
|
||||||
|
echo '('.$m.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
}
|
||||||
|
?></p></h3></center>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
<!-- /.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-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">
|
||||||
|
|
||||||
|
<label for="to_date">
|
||||||
|
|
||||||
|
<?php echo 'Month'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<select class="form-control" id="month" name="month">
|
||||||
|
|
||||||
|
<option value="">Select Month</option>
|
||||||
|
|
||||||
|
<option value="January">January</option>
|
||||||
|
|
||||||
|
<option value="February">February</option>
|
||||||
|
|
||||||
|
<option value="March">March</option>
|
||||||
|
|
||||||
|
<option value="April">April</option>
|
||||||
|
|
||||||
|
<option value="May">May</option>
|
||||||
|
|
||||||
|
<option value="June">June</option>
|
||||||
|
|
||||||
|
<option value="July">July</option>
|
||||||
|
|
||||||
|
<option value="August">August</option>
|
||||||
|
|
||||||
|
<option value="September">September</option>
|
||||||
|
|
||||||
|
<option value="October">October</option>
|
||||||
|
|
||||||
|
<option value="November">November</option>
|
||||||
|
|
||||||
|
<option value="December">December</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-md-offset-0"><br>
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-success" name="btn_submit" style="padding:10px;"
|
||||||
|
|
||||||
|
value="View Report">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -69,7 +209,9 @@ if(!empty($mmr))
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if(!empty($mmr)){
|
<?php
|
||||||
|
$tot=0.00;
|
||||||
|
if(!empty($mmr)){
|
||||||
foreach($mmr as $rel)
|
foreach($mmr as $rel)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -79,9 +221,9 @@ if(!empty($mmr))
|
|||||||
<td><span><?php echo $rel->MaterialCode?></span></td>
|
<td><span><?php echo $rel->MaterialCode?></span></td>
|
||||||
<td><span><?php echo $rel->MaterialName?></span></td>
|
<td><span><?php echo $rel->MaterialName?></span></td>
|
||||||
<td><span><?php echo $rel->UOM?></span></td>
|
<td><span><?php echo $rel->UOM?></span></td>
|
||||||
<td align="right"><span><?php echo $rel->Average_Rate?></span></td>
|
<td align="right"><span><?php
|
||||||
|
$tot= $tot + number_format($rel->Average_Rate,2,'.','');
|
||||||
|
echo number_format($rel->Average_Rate,2,'.','')?></span></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@ -90,6 +232,22 @@ if(!empty($mmr))
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<td style="text-align:center"><?php
|
||||||
|
|
||||||
|
$t='Total';
|
||||||
|
|
||||||
|
echo $t;?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td style="text-align:right"><?php echo number_format($tot,2,'.','');?></td>
|
||||||
|
|
||||||
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -119,6 +277,7 @@ buttons: [
|
|||||||
{
|
{
|
||||||
extend: 'excelHtml5',
|
extend: 'excelHtml5',
|
||||||
footer: 'true',
|
footer: 'true',
|
||||||
|
messageTop: $('h3').text(),
|
||||||
title: 'Report - Material Master - ReceiptValue',
|
title: 'Report - Material Master - ReceiptValue',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: ':visible'
|
columns: ':visible'
|
||||||
|
|||||||
@ -26,6 +26,10 @@ if(!empty($rel_po))
|
|||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #5d0411;
|
||||||
|
border-color: #5d0411;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@ -35,10 +39,59 @@ if(!empty($rel_po))
|
|||||||
<!-- TABLE: LATEST ORDERS -->
|
<!-- TABLE: LATEST ORDERS -->
|
||||||
<div class="box box-info">
|
<div class="box box-info">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Order Value - Released</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#5d0411"><b>Order Value - Released</b>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($this->input->post('financialyear')){
|
||||||
|
|
||||||
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
|
echo '('.$ab.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('month')){
|
||||||
|
|
||||||
|
$m=$this->input->post('month');
|
||||||
|
|
||||||
|
echo '('.$m.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('from_date') && $this->input->post('to_date')){
|
||||||
|
|
||||||
|
$frm = $this->input->post('from_date');
|
||||||
|
|
||||||
|
$t = $this->input->post('to_date');
|
||||||
|
|
||||||
|
echo $frm.'-to-'.$t;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('total_order_value_From') && $this->input->post('total_order_value_To')){
|
||||||
|
|
||||||
|
$tfrm = $this->input->post('total_order_value_From');
|
||||||
|
|
||||||
|
$tt = $this->input->post('total_order_value_To');
|
||||||
|
|
||||||
|
echo 'Total Order Value between'.' '.'RS.'.$tfrm.'-to-'.'RS.'.$tt;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?></p></h3></center>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
<!-- /.box-header -->
|
||||||
<div class="row">
|
<!-- <div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="input-group input-daterange input" >
|
<div class="input-group input-daterange input" >
|
||||||
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
||||||
@ -58,6 +111,190 @@ if(!empty($rel_po))
|
|||||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<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-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">
|
||||||
|
|
||||||
|
<label for="to_date">
|
||||||
|
|
||||||
|
<?php echo 'Month'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<select class="form-control" id="month" name="month">
|
||||||
|
|
||||||
|
<option value="">Select Month</option>
|
||||||
|
|
||||||
|
<option value="January">January</option>
|
||||||
|
|
||||||
|
<option value="February">February</option>
|
||||||
|
|
||||||
|
<option value="March">March</option>
|
||||||
|
|
||||||
|
<option value="April">April</option>
|
||||||
|
|
||||||
|
<option value="May">May</option>
|
||||||
|
|
||||||
|
<option value="June">June</option>
|
||||||
|
|
||||||
|
<option value="July">July</option>
|
||||||
|
|
||||||
|
<option value="August">August</option>
|
||||||
|
|
||||||
|
<option value="September">September</option>
|
||||||
|
|
||||||
|
<option value="October">October</option>
|
||||||
|
|
||||||
|
<option value="November">November</option>
|
||||||
|
|
||||||
|
<option value="December">December</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="total_order_value_From">
|
||||||
|
|
||||||
|
<?php echo 'Total Order Value From'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="total_order_value_From" id="total_order_value_From" style="padding:4px;">
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="total_order_value_To">
|
||||||
|
|
||||||
|
<?php echo 'Total Order Value To'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="total_order_value_To" id="total_order_value_To" style="padding:4px;">
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="from_date">
|
||||||
|
|
||||||
|
<?php echo 'From Date'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
||||||
|
|
||||||
|
<span class="input-group-addon">
|
||||||
|
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="to_date">
|
||||||
|
|
||||||
|
<?php echo 'To Date'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
||||||
|
|
||||||
|
<span class="input-group-addon">
|
||||||
|
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-md-offset-11"><br>
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||||
|
|
||||||
|
value="View Report">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -68,7 +305,7 @@ if(!empty($rel_po))
|
|||||||
<tr>
|
<tr>
|
||||||
<th>PO NO</th>
|
<th>PO NO</th>
|
||||||
<th>PO Type</th>
|
<th>PO Type</th>
|
||||||
<th>Created Date</th>
|
<th>PO Date</th>
|
||||||
<th>Released Date</th>
|
<th>Released Date</th>
|
||||||
<th>Requested Department</th>
|
<th>Requested Department</th>
|
||||||
<th>Total Order Value</th>
|
<th>Total Order Value</th>
|
||||||
@ -76,7 +313,7 @@ if(!empty($rel_po))
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if(!empty($rel_po)){
|
<?php $tot=0.00; if(!empty($rel_po)){
|
||||||
foreach($rel_po as $rel)
|
foreach($rel_po as $rel)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -86,7 +323,10 @@ if(!empty($rel_po))
|
|||||||
<td><span><?php $date = new DateTime($rel->PODate);echo $date->format('d-m-Y'); ?></span></td>
|
<td><span><?php $date = new DateTime($rel->PODate);echo $date->format('d-m-Y'); ?></span></td>
|
||||||
<td><span><?php $date = new DateTime($rel->ReleasedDate);echo $date->format('d-m-Y'); ?></span></td>
|
<td><span><?php $date = new DateTime($rel->ReleasedDate);echo $date->format('d-m-Y'); ?></span></td>
|
||||||
<td><span><?php echo $rel->Dept_Name?></span></td>
|
<td><span><?php echo $rel->Dept_Name?></span></td>
|
||||||
<td align="right"><span><?php echo $rel->TotalOrderValue?></span></td>
|
<!-- <td align="right"><span><?php echo $rel->TotalOrderValue?></span></td> -->
|
||||||
|
<td align="right"><span><?php
|
||||||
|
$tot= $tot number_format($rel->TotalOrderValue,2,'.','');
|
||||||
|
echo number_format($rel->TotalOrderValue,2,'.','')?></span></td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -96,6 +336,25 @@ if(!empty($rel_po))
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
|
||||||
|
<td style="text-align:center"><?php
|
||||||
|
|
||||||
|
$t='Total';
|
||||||
|
|
||||||
|
echo $t;?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td style="text-align:right"><?php echo number_format($tot,2,'.','');?></td>
|
||||||
|
|
||||||
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -128,6 +387,7 @@ $(document).ready(function() {
|
|||||||
extend: 'excelHtml5',
|
extend: 'excelHtml5',
|
||||||
footer: 'true',
|
footer: 'true',
|
||||||
title: 'Report - Released PO',
|
title: 'Report - Released PO',
|
||||||
|
messageTop: $('h3').text(),
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: ':visible'
|
columns: ':visible'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,11 @@ if(!empty($open_po))
|
|||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #5d0411;
|
||||||
|
border-color: #5d0411;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@ -34,10 +39,52 @@ if(!empty($open_po))
|
|||||||
<!-- TABLE: LATEST ORDERS -->
|
<!-- TABLE: LATEST ORDERS -->
|
||||||
<div class="box box-info">
|
<div class="box box-info">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Open Orders - Pending</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#5d0411"><b>Open Orders - Pending</b><br><br>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if($this->input->post('financialyear')){
|
||||||
|
|
||||||
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
|
echo '('.$ab.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('month')){
|
||||||
|
|
||||||
|
$m=$this->input->post('month');
|
||||||
|
|
||||||
|
echo '('.$m.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('from_date') && $this->input->post('to_date')){
|
||||||
|
|
||||||
|
$frm = $this->input->post('from_date');
|
||||||
|
|
||||||
|
$t = $this->input->post('to_date');
|
||||||
|
|
||||||
|
echo $frm.'-to-'.$t;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('total_order_value_From') && $this->input->post('total_order_value_To')){
|
||||||
|
|
||||||
|
$tfrm = $this->input->post('total_order_value_From');
|
||||||
|
|
||||||
|
$tt = $this->input->post('total_order_value_To');
|
||||||
|
|
||||||
|
echo 'Total Order Value between'.' '.'RS.'.$tfrm.'-to-'.'RS.'.$tt;
|
||||||
|
|
||||||
|
}
|
||||||
|
?></p></h3></center>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
<!-- /.box-header -->
|
||||||
<div class="row">
|
<!-- <div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="input-group input-daterange input" >
|
<div class="input-group input-daterange input" >
|
||||||
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
||||||
@ -56,8 +103,161 @@ if(!empty($open_po))
|
|||||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<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-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>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="to_date">
|
||||||
|
|
||||||
|
<?php echo 'Month'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<select class="form-control" id="month" name="month">
|
||||||
|
<option value="">Select Month</option>
|
||||||
|
<option value="January">January</option>
|
||||||
|
<option value="February">February</option>
|
||||||
|
<option value="March">March</option>
|
||||||
|
<option value="April">April</option>
|
||||||
|
<option value="May">May</option>
|
||||||
|
<option value="June">June</option>
|
||||||
|
<option value="July">July</option>
|
||||||
|
<option value="August">August</option>
|
||||||
|
<option value="September">September</option>
|
||||||
|
<option value="October">October</option>
|
||||||
|
<option value="November">November</option>
|
||||||
|
<option value="December">December</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="total_order_value_From">
|
||||||
|
|
||||||
|
<?php echo 'Total Order Value From'; ?>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="total_order_value_From" id="total_order_value_From" style="padding:4px;">
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="total_order_value_To">
|
||||||
|
|
||||||
|
<?php echo 'Total Order Value To'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="total_order_value_To" id="total_order_value_To" style="padding:4px;">
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="from_date">
|
||||||
|
|
||||||
|
<?php echo 'From Date'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
||||||
|
|
||||||
|
<span class="input-group-addon">
|
||||||
|
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="to_date">
|
||||||
|
|
||||||
|
<?php echo 'To Date'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
||||||
|
|
||||||
|
<span class="input-group-addon">
|
||||||
|
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-md-offset-11"><br>
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||||
|
|
||||||
|
value="View Report">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div>
|
<div>
|
||||||
@ -74,7 +274,7 @@ if(!empty($open_po))
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if(!empty($open_po)){
|
<?php $tot=0.00; if(!empty($open_po)){
|
||||||
foreach($open_po as $rel)
|
foreach($open_po as $rel)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -84,7 +284,14 @@ if(!empty($open_po))
|
|||||||
<td><span><?php echo $rel->CreatedDate?></span></td>
|
<td><span><?php echo $rel->CreatedDate?></span></td>
|
||||||
<td><span><?php echo $rel->ApprovedDate?></span></td>
|
<td><span><?php echo $rel->ApprovedDate?></span></td>
|
||||||
<td><span><?php echo $rel->Dept_Name?></span></td>
|
<td><span><?php echo $rel->Dept_Name?></span></td>
|
||||||
<td align="right"><span><?php echo number_format($rel->TotalOrderValue,2,'.','')?></span></td>
|
<!-- <td align="right"><span><?php echo number_format($rel->TotalOrderValue,2,'.','')?></span></td> -->
|
||||||
|
<td align="right"><span><?php
|
||||||
|
|
||||||
|
$tot= $tot + number_format($rel->TotalOrderValue,2,'.','');
|
||||||
|
|
||||||
|
echo number_format($rel->TotalOrderValue,2,'.','')?></span></td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -94,6 +301,25 @@ if(!empty($open_po))
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
|
||||||
|
<td style="text-align:center"><?php
|
||||||
|
|
||||||
|
$t='Total';
|
||||||
|
|
||||||
|
echo $t;?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td><?php echo '';?></td>
|
||||||
|
|
||||||
|
<td style="text-align:right"><?php echo number_format($tot,2,'.','');?></td>
|
||||||
|
|
||||||
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -23,6 +23,7 @@ foreach($customersoutward as $customer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$productsinward1=array(-1=>'Select Products');
|
$productsinward1=array(-1=>'Select Products');
|
||||||
|
|
||||||
foreach($productsinward as $product)
|
foreach($productsinward as $product)
|
||||||
{
|
{
|
||||||
$productsinward1[$product->MaterialCode] =$product->MaterialCode.'-'.$product->MaterialName;
|
$productsinward1[$product->MaterialCode] =$product->MaterialCode.'-'.$product->MaterialName;
|
||||||
@ -64,17 +65,29 @@ foreach($customersinward as $customer)
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<input type="radio" value="1" name="type" id="OutWard" onclick="changeType(this.value);"/> OutWard
|
<?php
|
||||||
</div>
|
// $data = array(
|
||||||
|
// 'name' => 'newsletter',
|
||||||
|
// 'id' => 'newsletter',
|
||||||
|
// 'value' => 'accept',
|
||||||
|
// 'checked' => TRUE,
|
||||||
|
// 'style' => 'margin:10px'
|
||||||
|
// );
|
||||||
|
|
||||||
|
// echo form_checkbox($data);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<input type="radio" value="1" name="type" id="OutWard" onclick="changeType(this.value);"/> OutWard
|
||||||
|
|
||||||
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<input type="radio" value="0" name="type" id="Inward" onclick="changeType(this.value);"/> InWard
|
<input type="radio" value="0" name="type" id="Inward" onclick="changeType(this.value);"/> InWard
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id='outwardarea' style="display:block;">
|
<div id='outwardarea' style="display:block;">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<?php echo form_dropdown('name="product"',$products2,set_value('product',$products2[-1]),'id="product"' ,'class="form-control select2');?>
|
<?php echo form_dropdown('name="product"',$products2,set_value('product',$products2[-1]),'id="product"' ,'class="form-control select2');?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -85,6 +98,7 @@ foreach($customersinward as $customer)
|
|||||||
|
|
||||||
<div id='inwardarea' style="display:none;">
|
<div id='inwardarea' style="display:none;">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<?php echo form_dropdown('name="productinward"',$productsinward1,set_value('productinward',$productsinward1[-1]),'id="productinward"' ,'class="form-control select2');?>
|
<?php echo form_dropdown('name="productinward"',$productsinward1,set_value('productinward',$productsinward1[-1]),'id="productinward"' ,'class="form-control select2');?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -108,7 +122,7 @@ foreach($customersinward as $customer)
|
|||||||
<th>Min</th>
|
<th>Min</th>
|
||||||
<th>Max</th>
|
<th>Max</th>
|
||||||
<th>Temp</th>
|
<th>Temp</th>
|
||||||
<th>Action</th>
|
<!-- <th>Action</th> -->
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -210,35 +224,33 @@ foreach($customersinward as $customer)
|
|||||||
<td align="right" contenteditable="true"><%=Min%></td>
|
<td align="right" contenteditable="true"><%=Min%></td>
|
||||||
<td align="right" contenteditable="true"><%=Max%></td>
|
<td align="right" contenteditable="true"><%=Max%></td>
|
||||||
<td align="right" contenteditable="true"><%=Temp%></td>
|
<td align="right" contenteditable="true"><%=Temp%></td>
|
||||||
<td align="center" contenteditable="false"><a data-target='#specmodel' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#specmodel"> </a> <a href='#' onclick = "DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a></td>
|
<!-- <td align="center" contenteditable="false"><a data-target='#specmodel' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#specmodel"> </a> <a href='#' onclick = "DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a></td> -->
|
||||||
</tr> <!-- <i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit <%=index%> "></i> -->
|
</tr> <!-- <i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit <%=index%> "></i> -->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
//alert();
|
||||||
$('#OutWard').attr('checked','true');
|
$('#OutWard').attr('checked','true');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeType(v)
|
function changeType(v)
|
||||||
{
|
{
|
||||||
|
|
||||||
var val = v
|
var val = v
|
||||||
|
// alert(val);
|
||||||
if(val == 0)
|
if(val == 0)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
//alert('InWard');
|
||||||
$('#inwardarea').css({'display':'block'});
|
$('#inwardarea').css({'display':'block'});
|
||||||
|
|
||||||
$('#outwardarea').css({'display':'none'});
|
$('#outwardarea').css({'display':'none'});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(val == 1)
|
else if(val == 1)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
//alert('OutWard');
|
||||||
$('#inwardarea').css({'display':'none'});
|
$('#inwardarea').css({'display':'none'});
|
||||||
$('#outwardarea').css({'display':'block'});
|
$('#outwardarea').css({'display':'block'});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,25 +269,28 @@ $('#addspec').click(function(){
|
|||||||
$('#specmodel').modal('show');
|
$('#specmodel').modal('show');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
else//if($('#InWard').is(':checked'))
|
||||||
{
|
{
|
||||||
|
//alert('kj');
|
||||||
var productinward = $('#productinward').val();
|
var productinward = $('#productinward').val();
|
||||||
var customerinward = $('#customerinward').val();
|
var customerinward = $('#customerinward').val();
|
||||||
if(productinward == -1 || customerinward == -1)
|
if(productinward == -1 || customerinward == -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
alert('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
$('#specmodel').modal('show');
|
$('#specmodel').modal('show');
|
||||||
|
}
|
||||||
|
//alert('kj');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function addNewRow()
|
function addNewRow()
|
||||||
{
|
{
|
||||||
var sname = $('#spname').val();
|
var sname = $('#spname').val();
|
||||||
@ -314,6 +329,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
|
|
||||||
function getAllData()
|
function getAllData()
|
||||||
{
|
{
|
||||||
|
|
||||||
var type = '';
|
var type = '';
|
||||||
var product = '';
|
var product = '';
|
||||||
var customer = '';
|
var customer = '';
|
||||||
@ -332,6 +348,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
var alldata = $("#testspecifications").tableToJSON();
|
var alldata = $("#testspecifications").tableToJSON();
|
||||||
//alert(JSON.stringify(alldata));
|
//alert(JSON.stringify(alldata));
|
||||||
alldata=JSON.stringify(alldata)
|
alldata=JSON.stringify(alldata)
|
||||||
|
// alert(customer);exit();
|
||||||
if(product == -1 || customer == -1)
|
if(product == -1 || customer == -1)
|
||||||
{
|
{
|
||||||
alert('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
@ -346,9 +363,13 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
success:function(data) {
|
success:function(data) {
|
||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
alert(data);
|
alert(data);
|
||||||
|
//console.log(data);
|
||||||
window.location = "<?php echo base_url().'quality';?>";
|
window.location = "<?php echo base_url().'quality';?>";
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,21 +69,28 @@
|
|||||||
{
|
{
|
||||||
foreach($existspec as $data)
|
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->type?> </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
|
<?php
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($existspecinward))
|
if(!empty($existspecinward))
|
||||||
{
|
{
|
||||||
foreach($existspecinward as $in)
|
foreach($existspecinward as $in)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//print_r($data);echo "</br></br>";
|
||||||
?>
|
?>
|
||||||
<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>
|
<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
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
@ -176,7 +183,7 @@ $('#addspec').click(function(){
|
|||||||
var customer = $('#customer').val();
|
var customer = $('#customer').val();
|
||||||
if(product == -1 || customer == -1)
|
if(product == -1 || customer == -1)
|
||||||
{
|
{
|
||||||
swal('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -196,7 +203,7 @@ function addNewRow()
|
|||||||
|
|
||||||
if(sname == '' || uom =='' || min == '' || max == '')
|
if(sname == '' || uom =='' || min == '' || max == '')
|
||||||
{
|
{
|
||||||
swal('Please Enter all specification');
|
alert('Please Enter all specification');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -232,7 +239,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
var customer = $('#customer').val();
|
var customer = $('#customer').val();
|
||||||
if(product == -1 || customer == -1)
|
if(product == -1 || customer == -1)
|
||||||
{
|
{
|
||||||
swal('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
@ -245,7 +252,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
swal(data);
|
alert(data);
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
|
|
||||||
|
|
||||||
@ -263,7 +270,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
var customer = $('#customer').val();
|
var customer = $('#customer').val();
|
||||||
if(product == -1 || customer == -1)
|
if(product == -1 || customer == -1)
|
||||||
{
|
{
|
||||||
swal('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var d='';
|
var d='';
|
||||||
@ -285,7 +292,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
|
|
||||||
success:function(data){
|
success:function(data){
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
swal(data);
|
alert(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -25,6 +25,11 @@ if(!empty($pending_list))
|
|||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #5d0411;
|
||||||
|
border-color: #5d0411;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@ -34,10 +39,58 @@ if(!empty($pending_list))
|
|||||||
<!-- TABLE: LATEST ORDERS -->
|
<!-- TABLE: LATEST ORDERS -->
|
||||||
<div class="box box-info">
|
<div class="box box-info">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<center><h3 class="box-title"><p style="color:#5d0411"><b>Total Pending Requests</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#5d0411"><b>Total Pending Requests</b> <br><br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($this->input->post('financialyear')){
|
||||||
|
|
||||||
|
$ab=$this->input->post('financialyear');
|
||||||
|
|
||||||
|
echo '('.$ab.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('month')){
|
||||||
|
|
||||||
|
$m=$this->input->post('month');
|
||||||
|
|
||||||
|
echo '('.$m.')';
|
||||||
|
|
||||||
|
echo ' ';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('from_date') && $this->input->post('to_date')){
|
||||||
|
|
||||||
|
$frm = $this->input->post('from_date');
|
||||||
|
|
||||||
|
$t = $this->input->post('to_date');
|
||||||
|
|
||||||
|
echo $frm.'-to-'.$t;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->input->post('aging_from') && $this->input->post('aging_to')){
|
||||||
|
|
||||||
|
$tfrm = $this->input->post('aging_from');
|
||||||
|
|
||||||
|
$tt = $this->input->post('aging_to');
|
||||||
|
|
||||||
|
echo 'Aging between'.' '.$tfrm.'-to-'.$tt.' '.'days';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?></p></h3></center>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
<!-- /.box-header -->
|
||||||
<div class="row">
|
<!--<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="input-group input-daterange input" >
|
<div class="input-group input-daterange input" >
|
||||||
<div class="input-group-addon"><b>Aging From:</b></div>
|
<div class="input-group-addon"><b>Aging From:</b></div>
|
||||||
@ -56,8 +109,188 @@ if(!empty($pending_list))
|
|||||||
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
<div class="input-group-addon"> <a onclick="Reset()" ><b>Clear</b></a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<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-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>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="to_date">
|
||||||
|
|
||||||
|
<?php echo 'Month'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<select class="form-control" id="month" name="month">
|
||||||
|
|
||||||
|
<option value="">Select Month</option>
|
||||||
|
|
||||||
|
<option value="January">January</option>
|
||||||
|
|
||||||
|
<option value="February">February</option>
|
||||||
|
|
||||||
|
<option value="March">March</option>
|
||||||
|
|
||||||
|
<option value="April">April</option>
|
||||||
|
|
||||||
|
<option value="May">May</option>
|
||||||
|
|
||||||
|
<option value="June">June</option>
|
||||||
|
|
||||||
|
<option value="July">July</option>
|
||||||
|
|
||||||
|
<option value="August">August</option>
|
||||||
|
|
||||||
|
<option value="September">September</option>
|
||||||
|
|
||||||
|
<option value="October">October</option>
|
||||||
|
|
||||||
|
<option value="November">November</option>
|
||||||
|
|
||||||
|
<option value="December">December</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="Aging_From">
|
||||||
|
|
||||||
|
<?php echo 'Aging From'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="aging_from" id="aging_from" style="padding:4px;">
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="Aging_To">
|
||||||
|
|
||||||
|
<?php echo 'Aging To'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="aging_to" id="aging_to" style="padding:4px;">
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="from_date">
|
||||||
|
|
||||||
|
<?php echo 'From Date'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
||||||
|
|
||||||
|
<span class="input-group-addon">
|
||||||
|
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-2">
|
||||||
|
|
||||||
|
<label for="to_date">
|
||||||
|
|
||||||
|
<?php echo 'To Date'; ?>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
|
||||||
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
||||||
|
|
||||||
|
<span class="input-group-addon">
|
||||||
|
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-md-offset-11"><br>
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||||
|
|
||||||
|
value="View Report">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div>
|
<div>
|
||||||
@ -126,7 +359,7 @@ buttons: [
|
|||||||
|
|
||||||
footer: 'true',
|
footer: 'true',
|
||||||
|
|
||||||
//messageTop: $('h3').text(),
|
messageTop: $('h3').text(),
|
||||||
|
|
||||||
title: 'Report - Pending Request',
|
title: 'Report - Pending Request',
|
||||||
|
|
||||||
|
|||||||
@ -4,13 +4,13 @@ th{
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<?php
|
<?php
|
||||||
|
//print_r($specifications);
|
||||||
$pname = '';
|
$pname = '';
|
||||||
$cnamme = '';
|
|
||||||
$pdec = '';
|
$pdec = '';
|
||||||
$type = '';
|
$cnamme = '';
|
||||||
$pid='';
|
$pid='';
|
||||||
$cid='';
|
$cid='';
|
||||||
|
$type= '';
|
||||||
foreach($specifications as $s)
|
foreach($specifications as $s)
|
||||||
{
|
{
|
||||||
$pname = $s->product_name;
|
$pname = $s->product_name;
|
||||||
@ -197,7 +197,7 @@ $('#addspec').click(function(){
|
|||||||
var customer = $('#customer').val();
|
var customer = $('#customer').val();
|
||||||
if(product == -1 || customer == -1)
|
if(product == -1 || customer == -1)
|
||||||
{
|
{
|
||||||
swal('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -217,7 +217,7 @@ function addNewRow()
|
|||||||
var temp = $('#temp').val();
|
var temp = $('#temp').val();
|
||||||
if(sname == '' || uom =='' || min == '' || max == '' || temp == '')
|
if(sname == '' || uom =='' || min == '' || max == '' || temp == '')
|
||||||
{
|
{
|
||||||
swal('Please Enter all specification');
|
alert('Please Enter all specification');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -254,7 +254,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
var type = $('#ttype').val();
|
var type = $('#ttype').val();
|
||||||
if(product == -1 || customer == -1)
|
if(product == -1 || customer == -1)
|
||||||
{
|
{
|
||||||
swal('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
@ -267,9 +267,11 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
swal(data);
|
alert(data);
|
||||||
window.location = "<?php echo base_url().'quality';?>";
|
window.location = "<?php echo base_url().'quality';?>";
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
|
//console.log(data);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +287,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
var customer = $('#customer').val();
|
var customer = $('#customer').val();
|
||||||
if(product == '' || customer == '')
|
if(product == '' || customer == '')
|
||||||
{
|
{
|
||||||
swal('Please Select Product and Customer.');
|
alert('Please Select Product and Customer.');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var rowid = r;
|
var rowid = r;
|
||||||
@ -310,7 +312,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
|
|||||||
|
|
||||||
success:function(data){
|
success:function(data){
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
swal(data);
|
alert(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user