Date format in reports has benn fixed
This commit is contained in:
parent
18a51396fd
commit
00270ba5fa
@ -46,16 +46,7 @@ class user extends BaseController
|
|||||||
$data['totalcapitalamount']=$this->dahsboard_Model->totalcapitalamount();
|
$data['totalcapitalamount']=$this->dahsboard_Model->totalcapitalamount();
|
||||||
$data['totalimportamount']=$this->dahsboard_Model->totalimportamount();
|
$data['totalimportamount']=$this->dahsboard_Model->totalimportamount();
|
||||||
$data['totalrevenueamount']=$this->dahsboard_Model->totalrevenueamount();
|
$data['totalrevenueamount']=$this->dahsboard_Model->totalrevenueamount();
|
||||||
//6th month
|
|
||||||
$data['totalservicepojune']=$this->dahsboard_Model->totalservicepojune();
|
|
||||||
$data['totalrevenuepojune']=$this->dahsboard_Model->totalrevenuepojune();
|
|
||||||
$data['totalimportpojune']=$this->dahsboard_Model->totalimportpojune();
|
|
||||||
$data['totalcapitalpojune']=$this->dahsboard_Model->totalcapitalpojune();
|
|
||||||
//7th month
|
|
||||||
$data['totalservicepojuly']=$this->dahsboard_Model->totalservicepojuly();
|
|
||||||
$data['totalrevenuepojuly']=$this->dahsboard_Model->totalrevenuepojuly();
|
|
||||||
$data['totalimportpojuly']=$this->dahsboard_Model->totalimportpojuly();
|
|
||||||
$data['totalcapitalpojuly']=$this->dahsboard_Model->totalcapitalpojuly();
|
|
||||||
|
|
||||||
$data['totalservicepo']=$this->dahsboard_Model->totalservicepo();
|
$data['totalservicepo']=$this->dahsboard_Model->totalservicepo();
|
||||||
$data['totalrevenuepo']=$this->dahsboard_Model->totalrevenuepo();
|
$data['totalrevenuepo']=$this->dahsboard_Model->totalrevenuepo();
|
||||||
@ -71,7 +62,11 @@ class user extends BaseController
|
|||||||
$data['revenueprogress']=$this->dahsboard_Model->revenueprogress();
|
$data['revenueprogress']=$this->dahsboard_Model->revenueprogress();
|
||||||
$data['importprogress']=$this->dahsboard_Model->importprogress();
|
$data['importprogress']=$this->dahsboard_Model->importprogress();
|
||||||
$data['capitalprogress']=$this->dahsboard_Model->capitalprogress();
|
$data['capitalprogress']=$this->dahsboard_Model->capitalprogress();
|
||||||
|
//month-wise area chart
|
||||||
|
$data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount();
|
||||||
|
$data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount();
|
||||||
|
$data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount();
|
||||||
|
$data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount();
|
||||||
|
|
||||||
|
|
||||||
$this->loadViews("dashboard", $this->global, $data , NULL);
|
$this->loadViews("dashboard", $this->global, $data , NULL);
|
||||||
|
|||||||
@ -62,81 +62,89 @@ function totalrevenueamount()
|
|||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
function totalservicepojune()
|
//totalservice
|
||||||
{
|
function getTotalServicePoCount(){
|
||||||
$sql="SELECT count(cmast.PONO) totalservicepojune FROM T_PurchaseOrder_Master cmast
|
$i=1;
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
while($i<=12){
|
||||||
where ReqType='SERVICE' and month(PODate) = 6 ";
|
|
||||||
$query = $this->db->query($sql);
|
$sql="SELECT count(cmast.PONO) as totalService FROM T_PurchaseOrder_Master cmast
|
||||||
return $query->result();
|
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||||
|
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||||
|
where ReqType='SERVICE' and month(PODate) = $i ";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
$array_result[]=$query->result();
|
||||||
|
$i++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $array_result;
|
||||||
|
|
||||||
}
|
}
|
||||||
function totalimportpojune()
|
|
||||||
{
|
function getTotalimportPoCount(){
|
||||||
$sql="SELECT count(cmast.PONO)as totalimportpojune FROM T_PurchaseOrder_Master cmast
|
$i=1;
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
while($i<=12){
|
||||||
where ReqType='IMPORT' and month(PODate) = 6 ";
|
|
||||||
$query = $this->db->query($sql);
|
$sql="SELECT count(cmast.PONO) as totalImport FROM T_PurchaseOrder_Master cmast
|
||||||
return $query->result();
|
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||||
|
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||||
|
where ReqType='IMPORT' and month(PODate) = $i ";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
$array_result[]=$query->result();
|
||||||
|
$i++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $array_result;
|
||||||
|
|
||||||
}
|
}
|
||||||
function totalrevenuepojune()
|
function getTotalcapitalPoCount(){
|
||||||
{
|
$i=1;
|
||||||
$sql="SELECT count(cmast.PONO)as totalrevenuepojune FROM T_PurchaseOrder_Master cmast
|
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
while($i<=12){
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
|
||||||
where ReqType='REVENUE' and month(PODate) = 6 ";
|
$sql="SELECT count(cmast.PONO) as totalcapital FROM T_PurchaseOrder_Master cmast
|
||||||
$query = $this->db->query($sql);
|
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||||
return $query->result();
|
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||||
|
where ReqType='CAPITAL' and month(PODate) = $i ";
|
||||||
|
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
$array_result[]=$query->result();
|
||||||
|
$i++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $array_result;
|
||||||
|
|
||||||
}
|
}
|
||||||
function totalcapitalpojune()
|
function getTotalrevenuePoCount(){
|
||||||
{
|
$i=1;
|
||||||
$sql="SELECT count(cmast.PONO)as totalcapitalpojune FROM T_PurchaseOrder_Master cmast
|
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
while($i<=12){
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
|
||||||
where ReqType='CAPITAL' and month(PODate) = 6 ";
|
$sql="SELECT count(cmast.PONO) as totalrevenue FROM T_PurchaseOrder_Master cmast
|
||||||
$query = $this->db->query($sql);
|
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
||||||
return $query->result();
|
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
||||||
}
|
where ReqType='REVENUE' and month(PODate) = $i ";
|
||||||
//7 month //
|
|
||||||
function totalservicepojuly()
|
$query = $this->db->query($sql);
|
||||||
{
|
$array_result[]=$query->result();
|
||||||
$sql="SELECT count(cmast.PONO)as totalservicepojuly FROM T_PurchaseOrder_Master cmast
|
$i++;
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
}
|
||||||
where ReqType='SERVICE' and month(PODate) = 7 ";
|
|
||||||
$query = $this->db->query($sql);
|
return $array_result;
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
function totalrevenuepojuly()
|
|
||||||
{
|
|
||||||
$sql="SELECT count(cmast.PONO)as totalrevenuepojuly FROM T_PurchaseOrder_Master cmast
|
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
|
||||||
where ReqType='REVENUE' and month(PODate) = 7 ";
|
|
||||||
$query = $this->db->query($sql);
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
function totalimportpojuly()
|
|
||||||
{
|
|
||||||
$sql="SELECT count(cmast.PONO)as totalimportpojuly FROM T_PurchaseOrder_Master cmast
|
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
|
||||||
where ReqType='IMPORT' and month(PODate) = 7 ";
|
|
||||||
$query = $this->db->query($sql);
|
|
||||||
return $query->result();
|
|
||||||
}
|
|
||||||
function totalcapitalpojuly()
|
|
||||||
{
|
|
||||||
$sql="SELECT count(cmast.PONO)as totalcapitalpojuly FROM T_PurchaseOrder_Master cmast
|
|
||||||
join T_PurchaseOrder_LineItem line on line.PONO=cmast.PONO
|
|
||||||
join T_Requestion_Master req on req.ReqNo=line.ReqNo
|
|
||||||
where ReqType='CAPITAL' and month(PODate) = 7 ";
|
|
||||||
$query = $this->db->query($sql);
|
|
||||||
return $query->result();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function serviceprogress()
|
function serviceprogress()
|
||||||
{
|
{
|
||||||
$sql="SELECT count(cmast.PONO) as serviceprogress FROM T_PurchaseOrder_Master cmast
|
$sql="SELECT count(cmast.PONO) as serviceprogress FROM T_PurchaseOrder_Master cmast
|
||||||
@ -247,13 +255,14 @@ function reqdetail(){
|
|||||||
function req_list(){
|
function req_list(){
|
||||||
|
|
||||||
|
|
||||||
$sql="select mas.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);
|
$query = $this->db->query($sql);
|
||||||
|
//print_r($this->db->last_query());
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
|
|
||||||
@ -264,7 +273,7 @@ where mas.Status = 'ST002'
|
|||||||
function report_relpo(){
|
function report_relpo(){
|
||||||
|
|
||||||
|
|
||||||
$sql="select Mast.PONO,Mast.POType,Mast.CreatedDate,Mast.ReleasedOn as ReleasedDate,Dept_Details.DepartmentName As Dept_Name,Mast.TotalOrderValue
|
$sql="select Mast.PONO,Mast.POType,date_format(Mast.CreatedDate,'%d-%m-%Y') as CreatedDate,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
|
||||||
JOIN T_Requestion_Master as Req on Req.ReqNo=Det.ReqNo
|
JOIN T_Requestion_Master as Req on Req.ReqNo=Det.ReqNo
|
||||||
@ -274,7 +283,7 @@ 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 Dept_Name";
|
group by Mast.PONO";
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
@ -285,7 +294,7 @@ group by Dept_Name";
|
|||||||
function report_openpending(){
|
function report_openpending(){
|
||||||
|
|
||||||
|
|
||||||
$sql="select Mast.PONO,Mast.POType,Mast.CreatedDate,Mast.ApprovedOn as ApprovedDate,Dept_Details.DepartmentName As Dept_Name,Mast.TotalOrderValue
|
$sql="select Mast.PONO,Mast.POType,date_format(Mast.CreatedDate,'%d-%m-%Y') as CreatedDate,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
|
||||||
JOIN T_Requestion_Master as Req on Req.ReqNo=Det.ReqNo
|
JOIN T_Requestion_Master as Req on Req.ReqNo=Det.ReqNo
|
||||||
@ -332,50 +341,48 @@ group by Dept_Name";
|
|||||||
|
|
||||||
|
|
||||||
$sql="SELECT Cost_Center_Budget.CostCenterCode as Cost_Center_Code, CostCenterName as Cost_Center_Name,group_concat(distinct Dept_Details.DepartmentName) as Dept_Name,Cost_Center_Budget.BudgetType as BudgetType,Cost_Center_Budget.BudgetYear as BudgetYear,
|
$sql="SELECT Cost_Center_Budget.CostCenterCode as Cost_Center_Code, CostCenterName as Cost_Center_Name,group_concat(distinct Dept_Details.DepartmentName) as Dept_Name,Cost_Center_Budget.BudgetType as BudgetType,Cost_Center_Budget.BudgetYear as BudgetYear,
|
||||||
|
|
||||||
case Cost_Center_Budget.BudgetType
|
case Cost_Center_Budget.BudgetType
|
||||||
when 'IMPORT'
|
when 'IMPORT'
|
||||||
then ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)
|
then ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)
|
||||||
when 'CAPITAL'
|
when 'CAPITAL'
|
||||||
then
|
then
|
||||||
case po.CapitalRange
|
case po.CapitalRange
|
||||||
when '0'
|
when '0'
|
||||||
then ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)
|
then ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)
|
||||||
else ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)
|
else ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)
|
||||||
end
|
end
|
||||||
when 'SERVICE'
|
when 'SERVICE'
|
||||||
then ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)
|
then ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)
|
||||||
when 'REVENUE'
|
when 'REVENUE'
|
||||||
then ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(T_Rev_Tax.AfterDiscount)),0)
|
then ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(distinct T_Rev_Tax.AfterDiscount)),0)
|
||||||
end
|
end
|
||||||
|
|
||||||
as Util_Amount,
|
as Util_Amount,
|
||||||
case Cost_Center_Budget.BudgetType
|
case Cost_Center_Budget.BudgetType
|
||||||
when 'IMPORT'
|
when 'IMPORT'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0))
|
||||||
when 'CAPITAL'
|
when 'CAPITAL'
|
||||||
then
|
then
|
||||||
case po.CapitalRange
|
case po.CapitalRange
|
||||||
when '0'
|
when '0'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct(PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0))
|
||||||
else (Cost_Center_Budget.BudgetAmount - ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0))
|
else (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0))
|
||||||
end
|
end
|
||||||
when 'SERVICE'
|
when 'SERVICE'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate)),0))
|
||||||
when 'REVENUE'
|
when 'REVENUE'
|
||||||
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(T_Rev_Tax.AfterDiscount)),0))
|
then (Cost_Center_Budget.BudgetAmount - ifnull((sum(distinct PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(distinct T_Rev_Tax.AfterDiscount)),0))
|
||||||
end
|
end
|
||||||
as Avlbl_Amt
|
as Avlbl_Amt
|
||||||
from T_CostCenter_Budget Cost_Center_Budget
|
from T_CostCenter_Budget Cost_Center_Budget
|
||||||
left join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
|
left join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode
|
||||||
left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO
|
left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.Status !='ST030'
|
||||||
left JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
|
left JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo
|
||||||
JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mast.CostCenterCode
|
JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mast.CostCenterCode
|
||||||
JOIN T_CostCenter_Departments CostCentDept on CostCentDept.CostCenterCode=Cost_Mast.CostCenterCode
|
JOIN T_CostCenter_Departments CostCentDept on CostCentDept.CostCenterCode=Cost_Mast.CostCenterCode
|
||||||
JOIN T_DepartmentDetails Dept_Details on Dept_Details.DEPCode= CostCentDept.DEPCode
|
JOIN T_DepartmentDetails Dept_Details on Dept_Details.DEPCode= CostCentDept.DEPCode
|
||||||
WHERE DATE(Cost_Center_Budget.CreatedDate) BETWEEN '2017-04-01' AND '2018-03-31'
|
WHERE DATE(Cost_Center_Budget.CreatedDate) BETWEEN '2017-04-01' AND '2018-03-31'
|
||||||
group by
|
group by
|
||||||
Cost_Center_Budget.CostCenterCode,Cost_Center_Budget.BudgetType,Cost_Center_Budget.BudgetYear
|
Cost_Center_Budget.BudgetYear,Cost_Center_Budget.CostCenterCode,Cost_Center_Budget.BudgetType
|
||||||
order by Cost_Center_Budget.CostCenterCode";
|
order by Cost_Center_Budget.CostCenterCode";
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|||||||
@ -46,12 +46,13 @@ 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 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>Released Date From:</b></div>
|
<div class="input-group-addon"><b>Released Date From:</b></div>
|
||||||
<input type="text" id="min-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="From:">
|
<input type="text" id="min-date" class="form-control filter1" placeholder="From:">
|
||||||
<div class="input-group-addon"><b>to</b></div>
|
<div class="input-group-addon"><b>to</b></div>
|
||||||
<input type="text" id="max-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="To:">
|
<input type="text" id="max-date" class="form-control filter1" placeholder="To:">
|
||||||
<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>
|
||||||
@ -80,8 +81,8 @@ if(!empty($rel_po))
|
|||||||
<tr>
|
<tr>
|
||||||
<td><span><?php echo $rel->PONO?></span></td>
|
<td><span><?php echo $rel->PONO?></span></td>
|
||||||
<td><span><?php echo $rel->POType?></span></td>
|
<td><span><?php echo $rel->POType?></span></td>
|
||||||
<td><span><?php $date = new DateTime($rel->CreatedDate);echo $date->format('Y-m-d'); ?></span></td>
|
<td><span><?php $date = new DateTime($rel->CreatedDate);echo $date->format('d-m-Y'); ?></span></td>
|
||||||
<td><span><?php $date = new DateTime($rel->ReleasedDate);echo $date->format('Y-m-d'); ?></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>
|
||||||
|
|
||||||
@ -132,20 +133,23 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
|
|
||||||
$( function() {
|
$( function() {
|
||||||
var dateFormat = "mm/dd/yy",
|
|
||||||
|
//var dateFormat = "dd-mm-yy",
|
||||||
from = $( "#min-date" )
|
from = $( "#min-date" )
|
||||||
.datepicker({
|
.datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
numberOfMonths: 1
|
//numberOfMonths: 1
|
||||||
})
|
})
|
||||||
.on( "change", function() {
|
.on( "change", function() {
|
||||||
to.datepicker( "option", "minDate", getDate( this ) );
|
to.datepicker( "option", "minDate", getDate( this ) );
|
||||||
}),
|
}),
|
||||||
to = $( "#max-date" ).datepicker({
|
to = $( "#max-date" ).datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
numberOfMonths: 1
|
//numberOfMonths: 1
|
||||||
})
|
})
|
||||||
.on( "change", function() {
|
.on( "change", function() {
|
||||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||||
@ -172,26 +176,32 @@ $( function() {
|
|||||||
// Extend dataTables search
|
// Extend dataTables search
|
||||||
$.fn.dataTable.ext.search.push(
|
$.fn.dataTable.ext.search.push(
|
||||||
function(settings, data, dataIndex) {
|
function(settings, data, dataIndex) {
|
||||||
var min = $('#min-date').val();
|
var min = (moment($('#min-date').val(), "DD/MM/YYYY").isValid()) ? ~~moment($('#min-date').val(), "DD/MM/YYYY").format("X") : null;
|
||||||
var max = $('#max-date').val();
|
var max = (moment($('#max-date').val(), "DD/MM/YYYY").isValid()) ? ~~moment($('#max-date').val(), "DD/MM/YYYY").format("X") : null;
|
||||||
var ReleasedDate = data[3] || 0; // Our date column in the table
|
var ReleasedDate = ~~moment(data[3], "DD/MM/YYYY").format("X"); // Our date column in the table
|
||||||
|
// alert(min);
|
||||||
if (
|
if (min == null && max == null) {
|
||||||
(min == "" || max == "") ||
|
return true;
|
||||||
(moment(ReleasedDate).isSameOrAfter(min) && moment(ReleasedDate).isSameOrBefore(max))
|
}
|
||||||
) {
|
if (min == null && ReleasedDate <= max) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
if (max == null && ReleasedDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (ReleasedDate <= max && ReleasedDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Re-draw the table when the a date range filter changes
|
// Re-draw the table when the a date range filter changes
|
||||||
$('.filter1').change(function() {
|
$('#min-date, #max-date').change(function() {
|
||||||
table.draw();
|
table.draw();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#my-table_filter').hide();
|
$('#my-table_filter').hide();
|
||||||
|
|
||||||
//total order value range
|
//total order value range
|
||||||
$.fn.dataTable.ext.search.push(
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|||||||
@ -84,25 +84,9 @@ if(!empty($ccrpt))
|
|||||||
<td><span><?php echo $rel->Dept_Name?></span></td>
|
<td><span><?php echo $rel->Dept_Name?></span></td>
|
||||||
<td><span><?php echo $rel->BudgetType?></span></td>
|
<td><span><?php echo $rel->BudgetType?></span></td>
|
||||||
<td><span><?php echo $rel->BudgetYear?></span></td>
|
<td><span><?php echo $rel->BudgetYear?></span></td>
|
||||||
<td align="right"><span><?php
|
<td align="right"><span><?php echo $rel->Util_Amount?></span></td>
|
||||||
setlocale(LC_MONETARY, 'en_IN.UTF-8');
|
<td align="right"><span><?php echo $rel->Avlbl_Amt?></span></td>
|
||||||
echo money_format('%n', $rel->Util_Amount);
|
|
||||||
//echo number_format($rel->Util_Amount, 2)
|
|
||||||
?></span></td>
|
|
||||||
|
|
||||||
<td align="right"><span><?php
|
|
||||||
$avlamount = 0;
|
|
||||||
if($rel->Avlbl_Amt < 0 ){
|
|
||||||
setlocale(LC_MONETARY, 'en_IN.UTF-8');
|
|
||||||
echo money_format('%n', $avlamount);
|
|
||||||
//echo number_format($avlamount,2);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
setlocale(LC_MONETARY, 'en_IN.UTF-8');
|
|
||||||
echo money_format('%n', $rel->Avlbl_Amt);
|
|
||||||
//echo number_format($rel->Avlbl_Amt, 2);
|
|
||||||
}
|
|
||||||
?></span></td>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -48,10 +48,10 @@ if(!empty($open_po))
|
|||||||
</div>
|
</div>
|
||||||
<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>Released Date From:</b></div>
|
<div class="input-group-addon"><b>Created Date From:</b></div>
|
||||||
<input type="text" id="min-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="From:">
|
<input type="text" id="min-date" class="form-control filter1" placeholder="From:">
|
||||||
<div class="input-group-addon"><b>to</b></div>
|
<div class="input-group-addon"><b>to</b></div>
|
||||||
<input type="text" id="max-date" class="form-control filter1" data-date-format="yyyy-mm-dd" placeholder="To:">
|
<input type="text" id="max-date" class="form-control filter1" placeholder="To:">
|
||||||
<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>
|
||||||
@ -80,8 +80,8 @@ if(!empty($open_po))
|
|||||||
<tr>
|
<tr>
|
||||||
<td><span><?php echo $rel->PONO?></span></td>
|
<td><span><?php echo $rel->PONO?></span></td>
|
||||||
<td><span><?php echo $rel->POType?></span></td>
|
<td><span><?php echo $rel->POType?></span></td>
|
||||||
<td><span><?php $date = new DateTime($rel->CreatedDate);echo $date->format('Y-m-d'); ?></span></td>
|
<td><span><?php echo $rel->CreatedDate?></span></td>
|
||||||
<td><span><?php $date = new DateTime($rel->ApprovedDate);echo $date->format('Y-m-d'); ?></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 $rel->TotalOrderValue?></span></td>
|
<td align="right"><span><?php echo $rel->TotalOrderValue?></span></td>
|
||||||
|
|
||||||
@ -132,9 +132,10 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
|
|
||||||
$( function() {
|
$( function() {
|
||||||
var dateFormat = "mm/dd/yy",
|
//var dateFormat = "mm-dd-yy",
|
||||||
from = $( "#min-date" )
|
from = $( "#min-date" )
|
||||||
.datepicker({
|
.datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
numberOfMonths: 1
|
numberOfMonths: 1
|
||||||
@ -143,6 +144,7 @@ $( function() {
|
|||||||
to.datepicker( "option", "minDate", getDate( this ) );
|
to.datepicker( "option", "minDate", getDate( this ) );
|
||||||
}),
|
}),
|
||||||
to = $( "#max-date" ).datepicker({
|
to = $( "#max-date" ).datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
numberOfMonths: 1
|
numberOfMonths: 1
|
||||||
@ -172,18 +174,24 @@ $( function() {
|
|||||||
// Extend dataTables search
|
// Extend dataTables search
|
||||||
$.fn.dataTable.ext.search.push(
|
$.fn.dataTable.ext.search.push(
|
||||||
function(settings, data, dataIndex) {
|
function(settings, data, dataIndex) {
|
||||||
var min = $('#min-date').val();
|
var min = (moment($('#min-date').val(), "DD/MM/YYYY").isValid()) ? ~~moment($('#min-date').val(), "DD/MM/YYYY").format("X") : null;
|
||||||
var max = $('#max-date').val();
|
var max = (moment($('#max-date').val(), "DD/MM/YYYY").isValid()) ? ~~moment($('#max-date').val(), "DD/MM/YYYY").format("X") : null;
|
||||||
var ReleasedDate = data[2] || 0; // Our date column in the table
|
var CreatedDate = ~~moment(data[2], "DD/MM/YYYY").format("X"); // Our date column in the table
|
||||||
|
// alert(min);
|
||||||
if (
|
if (min == null && max == null) {
|
||||||
(min == "" || max == "") ||
|
return true;
|
||||||
(moment(ReleasedDate).isSameOrAfter(min) && moment(ReleasedDate).isSameOrBefore(max))
|
}
|
||||||
) {
|
if (min == null && CreatedDate <= max) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
if (max == null && CreatedDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (CreatedDate <= max && CreatedDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Re-draw the table when the a date range filter changes
|
// Re-draw the table when the a date range filter changes
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
//print_r($getTotalServicePoCount);
|
||||||
$Empcnt = '';
|
$Empcnt = '';
|
||||||
//echo $DEPCode;
|
//echo $DEPCode;
|
||||||
//echo ROLE_MANAGER;
|
//echo ROLE_MANAGER;
|
||||||
@ -11,7 +12,10 @@ if(!empty($EmpCount))
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<!-- Dashboard for Account department-->
|
<!-- Dashboard for Account department-->
|
||||||
@ -189,6 +193,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
<!-- Info boxes -->
|
<!-- Info boxes -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<a href="<?php echo base_url(); ?>Requisition">
|
||||||
<div class="info-box" style="min-height: 105px;">
|
<div class="info-box" style="min-height: 105px;">
|
||||||
<span class="info-box-icon bg-aqua" style="height: 105px;padding:25px;"><i<i class="fa fa-spinner"></span>
|
<span class="info-box-icon bg-aqua" style="height: 105px;padding:25px;"><i<i class="fa fa-spinner"></span>
|
||||||
<?php
|
<?php
|
||||||
@ -202,7 +207,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
|
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text" style="color:#00c0ef;"><strong>TODAY'S REQUESTS</strong></span>
|
<span class="info-box-text" style="color:#00c0ef;"><strong>TODAY'S REQUESTS</strong></span>
|
||||||
<span class="info-box-number"><?php echo $req->TODAY_REQUESTS;?></span>
|
<span class="info-box-number"style="color:black;"><?php echo $req->TODAY_REQUESTS;?></span>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -210,10 +215,12 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
?>
|
?>
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<!-- /.info-box -->
|
<!-- /.info-box -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<a href="<?php echo base_url(); ?>reportpending">
|
||||||
<div class="info-box" style="min-height: 105px;">
|
<div class="info-box" style="min-height: 105px;">
|
||||||
<span class="info-box-icon bg-red" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
|
<span class="info-box-icon bg-red" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
|
||||||
|
|
||||||
@ -225,7 +232,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
|
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text"style="color:#dd4b39;"><strong>TOTAL PENDING REQUESTS</strong></span>
|
<span class="info-box-text"style="color:#dd4b39;"><strong>TOTAL PENDING REQUESTS</strong></span>
|
||||||
<span class="info-box-number"><?php echo $req_p->TOTAL_PENDING_REQUESTS;?></span>
|
<span class="info-box-number"style="color:black;"><?php echo $req_p->TOTAL_PENDING_REQUESTS;?></span>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -233,6 +240,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
?>
|
?>
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<!-- /.info-box -->
|
<!-- /.info-box -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
@ -241,6 +249,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
<div class="clearfix visible-sm-block"></div>
|
<div class="clearfix visible-sm-block"></div>
|
||||||
|
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<a href="<?php echo base_url(); ?>TotalOrder">
|
||||||
<div class="info-box" style="min-height: 105px;">
|
<div class="info-box" style="min-height: 105px;">
|
||||||
<span class="info-box-icon bg-green" style="height: 105px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
|
<span class="info-box-icon bg-green" style="height: 105px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
|
||||||
<?php if(!empty($totalpurchaseorder))
|
<?php if(!empty($totalpurchaseorder))
|
||||||
@ -252,7 +261,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
?>
|
?>
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text" style="color:#00a65a;"><strong>TOTAL PURCHASE ORDER</strong></span>
|
<span class="info-box-text" style="color:#00a65a;"><strong>TOTAL PURCHASE ORDER</strong></span>
|
||||||
<span class="info-box-number"><strong><?php echo $po->totalpurchaseorder;?></strong></span>
|
<span class="info-box-number"style="color:black;"><strong><?php echo $po->totalpurchaseorder;?></strong></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -266,7 +275,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
?>
|
?>
|
||||||
<span class="info-box-text" style="color:#00a65a;"><strong>TOTAL ORDER VALUE</strong></span>
|
<span class="info-box-text" style="color:#00a65a;"><strong>TOTAL ORDER VALUE</strong></span>
|
||||||
|
|
||||||
<span class="info-box-number"><strong> <?php echo $ordervalue->totalordervalue;?></strong></span>
|
<span class="info-box-number"style="color:black;"><strong> <?php echo $ordervalue->totalordervalue;?></strong></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,10 +285,12 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
|
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<!-- /.info-box -->
|
<!-- /.info-box -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||||
|
<a href="<?php echo base_url(); ?>openOrder">
|
||||||
<div class="info-box" style="min-height: 105px;">
|
<div class="info-box" style="min-height: 105px;">
|
||||||
<span class="info-box-icon bg-yellow" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-1 " style="padding: 5px;"></i></span>
|
<span class="info-box-icon bg-yellow" style="height: 105px;padding:25px;"><i class="fa fa-hourglass-1 " style="padding: 5px;"></i></span>
|
||||||
<?php if(!empty($pendingpo))
|
<?php if(!empty($pendingpo))
|
||||||
@ -289,7 +300,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
?>
|
?>
|
||||||
<div class="info-box-content">
|
<div class="info-box-content">
|
||||||
<span class="info-box-text" style="color:#f39c12;"><strong>PENDING PURCHASE ORDER</strong></span>
|
<span class="info-box-text" style="color:#f39c12;"><strong>PENDING PURCHASE ORDER</strong></span>
|
||||||
<span class="info-box-number"><?php echo $pendingpolist->pending;?></span>
|
<span class="info-box-number"style="color:black;"><?php echo $pendingpolist->pending;?></span>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -297,6 +308,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
?>
|
?>
|
||||||
<!-- /.info-box-content -->
|
<!-- /.info-box-content -->
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
<!-- /.info-box -->
|
<!-- /.info-box -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
@ -331,7 +343,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<strong>1 Jan, 2017 - 31 Dec, 2017</strong>
|
<strong>1 April, 2017 - 31 March, 2017</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="chart">
|
<div class="chart">
|
||||||
@ -662,9 +674,13 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<!-- Main row -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- /.row -->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
@ -689,71 +705,87 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
|||||||
// This will get the first returned node in the jQuery collection.
|
// This will get the first returned node in the jQuery collection.
|
||||||
|
|
||||||
var salesChart = new Chart(salesChartCanvas);
|
var salesChart = new Chart(salesChartCanvas);
|
||||||
var insert =<?php echo $totalservicepojune[0]->totalservicepojune;?>;
|
|
||||||
var insert1 =<?php echo $totalrevenuepojune[0]->totalrevenuepojune;?>;
|
|
||||||
var insert2 =<?php echo $totalimportpojune[0]->totalimportpojune;?>;
|
|
||||||
var insert3 =<?php echo $totalcapitalpojune[0]->totalcapitalpojune;?>;
|
|
||||||
|
|
||||||
var insert4 =<?php echo $totalservicepojuly[0]->totalservicepojuly;?>;
|
|
||||||
var insert5 =<?php echo $totalrevenuepojuly[0]->totalrevenuepojuly;?>;
|
|
||||||
var insert6 =<?php echo $totalimportpojuly[0]->totalimportpojuly;?>;
|
|
||||||
var insert7 =<?php echo $totalcapitalpojuly[0]->totalcapitalpojuly;?>;
|
|
||||||
|
|
||||||
|
var service = <?php echo JSON_encode($getTotalServicePoCount)?>;
|
||||||
|
var Import = <?php echo JSON_encode($getTotalimportPoCount)?>;
|
||||||
|
var capital = <?php echo JSON_encode($getTotalcapitalPoCount)?>;
|
||||||
|
var revenue = <?php echo JSON_encode($getTotalrevenuePoCount)?>;
|
||||||
|
// alert(service.PONO);
|
||||||
|
var serviceValues = [];
|
||||||
|
// var arr = new Array();
|
||||||
|
$.each (service,function(idx,obj){
|
||||||
|
serviceValues.push(obj[0].totalService);
|
||||||
|
});
|
||||||
|
var ImportValues = [];
|
||||||
|
// var arr = new Array();
|
||||||
|
$.each (Import,function(idx,obj){
|
||||||
|
ImportValues.push(obj[0].totalImport);
|
||||||
|
});
|
||||||
|
var capitalValues = [];
|
||||||
|
// var arr = new Array();
|
||||||
|
$.each (capital,function(idx,obj){
|
||||||
|
capitalValues.push(obj[0].totalcapital);
|
||||||
|
});
|
||||||
|
var revenueValues = [];
|
||||||
|
// var arr = new Array();
|
||||||
|
$.each (revenue,function(idx,obj){
|
||||||
|
revenueValues.push(obj[0].totalrevenue);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//alert(arr.total2);
|
||||||
var salesChartData = {
|
var salesChartData = {
|
||||||
labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||||
|
|
||||||
datasets: [
|
datasets: [
|
||||||
|
|
||||||
{
|
{
|
||||||
label: "Electronics",
|
label: "Electronics",
|
||||||
fillColor: "rgba(0, 192, 239, 0.7)",
|
fillColor: "rgba(0, 192, 239, 0.2)",
|
||||||
strokeColor: "rgb(0, 192, 239)",
|
strokeColor: "rgba(0, 192, 239,0.6)",
|
||||||
pointColor: "#00c0ef ",
|
pointColor: "#00c0ef ",
|
||||||
pointStrokeColor: "rgb(210, 214, 222)",
|
pointStrokeColor: "rgba(60,141,188,1)",
|
||||||
pointHighlightFill: "#fff",
|
pointHighlightFill: "#fff",
|
||||||
pointHighlightStroke: "rgb(220,220,220)",
|
pointHighlightStroke: "rgba(60,141,188,1)",
|
||||||
data: [0,0,0,0,0,0,0,0,0,0,0,0]
|
data:serviceValues
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: "Digital Goods",
|
label: "Digital Goods",
|
||||||
fillColor: "rgba(221, 75, 57,0.8)",
|
fillColor: "rgba(221, 75, 57,0.2)",
|
||||||
strokeColor: "rgba(221, 75, 57,0.8)",
|
strokeColor: "rgba(221, 75, 57,0.8)",
|
||||||
pointColor: "#dd4b39 ",
|
pointColor: "#dd4b39 ",
|
||||||
pointStrokeColor: "rgba(60,141,188,1)",
|
pointStrokeColor: "rgba(60,141,188,1)",
|
||||||
pointHighlightFill: "#fff",
|
pointHighlightFill: "#fff",
|
||||||
pointHighlightStroke: "rgba(60,141,188,1)",
|
pointHighlightStroke: "rgba(60,141,188,1)",
|
||||||
data: [0,0,0,0,0,0,0,0,0,0,0,0]
|
data:revenueValues
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Food",
|
label: "Food",
|
||||||
fillColor: "rgba(0, 166, 90, 0.7)",
|
fillColor: "rgba(0, 166, 90, 0.2)",
|
||||||
strokeColor: "rgba(0, 166, 90,0.8)",
|
strokeColor: "rgba(0, 166, 90,0.8)",
|
||||||
pointColor: "#00a65a ",
|
pointColor: "#00a65a ",
|
||||||
pointStrokeColor: "rgba(60,141,188,1)",
|
pointStrokeColor: "rgba(60,141,188,1)",
|
||||||
pointHighlightFill: "#fff",
|
pointHighlightFill: "#fff",
|
||||||
pointHighlightStroke: "rgba(60,141,188,1",
|
pointHighlightStroke: "rgba(60,141,188,1",
|
||||||
data: [0,0,0,0,0,0,0,0,0,0,0,0]
|
data:ImportValues
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Food",
|
label: "Food",
|
||||||
fillColor: "rgba(243, 156, 18, 0.9)",
|
fillColor: "rgba(243, 156, 18, 0.2)",
|
||||||
strokeColor: "rgba(243, 156, 18,0.8)",
|
strokeColor: "rgba(243, 156, 18,0.8)",
|
||||||
pointColor: "#f39c12 ",
|
pointColor: "#f39c12 ",
|
||||||
pointStrokeColor: "rgba(60,141,188,1)",
|
pointStrokeColor: "rgba(60,141,188,1)",
|
||||||
pointHighlightFill: "#fff",
|
pointHighlightFill: "#fff",
|
||||||
pointHighlightStroke: "rgba(60,141,188,1",
|
pointHighlightStroke: "rgba(60,141,188,1",
|
||||||
data: [0,0,0,0,0,0,0,0,0,0,0,0]
|
data:capitalValues
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
salesChartData.datasets[0].data[5]=insert;
|
|
||||||
salesChartData.datasets[1].data[5]=insert1;
|
|
||||||
salesChartData.datasets[2].data[5]=insert2;
|
|
||||||
salesChartData.datasets[3].data[5]=insert3;
|
|
||||||
//7th month
|
|
||||||
salesChartData.datasets[0].data[6]=insert4;
|
|
||||||
salesChartData.datasets[1].data[6]=insert5;
|
|
||||||
salesChartData.datasets[2].data[6]=insert6;
|
|
||||||
salesChartData.datasets[3].data[6]=insert7;
|
|
||||||
|
|
||||||
var salesChartOptions = {
|
var salesChartOptions = {
|
||||||
//Boolean - If we should show the scale at all
|
//Boolean - If we should show the scale at all
|
||||||
@ -793,6 +825,7 @@ var insert7 =<?php echo $totalcapitalpojuly[0]->totalcapitalpojuly;?>;
|
|||||||
//Boolean - whether to make the chart responsive to window resizing
|
//Boolean - whether to make the chart responsive to window resizing
|
||||||
responsive: true
|
responsive: true
|
||||||
};
|
};
|
||||||
|
|
||||||
// alert(salesChartData);
|
// alert(salesChartData);
|
||||||
|
|
||||||
//Create the line chart
|
//Create the line chart
|
||||||
@ -875,201 +908,18 @@ var insert7 =<?php echo $totalcapitalpojuly[0]->totalcapitalpojuly;?>;
|
|||||||
//Create pie or douhnut chart
|
//Create pie or douhnut chart
|
||||||
// You can switch between pie and douhnut using the method below.
|
// You can switch between pie and douhnut using the method below.
|
||||||
pieChart.Doughnut(PieData, pieOptions);
|
pieChart.Doughnut(PieData, pieOptions);
|
||||||
//-----------------
|
// //-----------------
|
||||||
//- END PIE CHART -
|
// //- END PIE CHART -
|
||||||
//-----------------
|
// //-----------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
|
||||||
// Bootstrap datepicker
|
|
||||||
// Set up your table
|
|
||||||
table = $('#req').DataTable
|
|
||||||
({
|
|
||||||
paging: true,
|
|
||||||
info: true
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
// Bootstrap datepicker
|
|
||||||
// Set up your table
|
|
||||||
table = $('#qdetails').DataTable
|
|
||||||
({
|
|
||||||
paging: true,
|
|
||||||
info: true
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$( function() {
|
|
||||||
var dateFormat = "mm/dd/yy",
|
|
||||||
from = $( "#min-date" )
|
|
||||||
.datepicker({
|
|
||||||
defaultDate: "+1w",
|
|
||||||
changeMonth: true,
|
|
||||||
numberOfMonths: 1
|
|
||||||
})
|
|
||||||
.on( "change", function() {
|
|
||||||
to.datepicker( "option", "minDate", getDate( this ) );
|
|
||||||
}),
|
|
||||||
to = $( "#max-date" ).datepicker({
|
|
||||||
defaultDate: "+1w",
|
|
||||||
changeMonth: true,
|
|
||||||
numberOfMonths: 1
|
|
||||||
})
|
|
||||||
.on( "change", function() {
|
|
||||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
|
||||||
});
|
|
||||||
|
|
||||||
function getDate( element ) {
|
|
||||||
var date;
|
|
||||||
try {
|
|
||||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
|
||||||
} catch( error ) {
|
|
||||||
date = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
|
||||||
//$('.input-daterange').each(function() {
|
|
||||||
// $(this).datepicker('clearDates');
|
|
||||||
//});
|
|
||||||
|
|
||||||
|
|
||||||
// Extend dataTables search
|
|
||||||
$.fn.dataTable.ext.search.push(
|
|
||||||
function(settings, data, dataIndex) {
|
|
||||||
var min = $('#min-date').val();
|
|
||||||
var max = $('#max-date').val();
|
|
||||||
var Req_Date = data[2] || 0; // Our date column in the table
|
|
||||||
|
|
||||||
if (
|
|
||||||
(min == "" || max == "") ||
|
|
||||||
(moment(Req_Date).isSameOrAfter(min) && moment(Req_Date).isSameOrBefore(max))
|
|
||||||
) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// Re-draw the table when the a date range filter changes
|
|
||||||
$('.filter1').change(function() {
|
|
||||||
table.draw();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#my-table_filter').hide();
|
|
||||||
|
|
||||||
//total order value range
|
|
||||||
$.fn.dataTable.ext.search.push(
|
|
||||||
function( settings, data, dataIndex ) {
|
|
||||||
var min = parseInt( $('#min').val(), 10 );
|
|
||||||
var max = parseInt( $('#max').val(), 10 );
|
|
||||||
var Tot_Ord_Value = parseFloat( data[5] ) || 0;
|
|
||||||
|
|
||||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
|
||||||
( isNaN( min ) && Tot_Ord_Value <= max ) ||
|
|
||||||
( min <= Tot_Ord_Value && isNaN( max ) ) ||
|
|
||||||
( min <= Tot_Ord_Value && Tot_Ord_Value <= max ) )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
//var table = $('#qdetails').DataTable();
|
|
||||||
|
|
||||||
// Event listener to the two range filtering inputs to redraw on input
|
|
||||||
$('#min, #max').keyup( function() {
|
|
||||||
table.draw();
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
//for clear button
|
|
||||||
function Reset()
|
|
||||||
{
|
|
||||||
$('#min').val('');
|
|
||||||
$('#max').val('');
|
|
||||||
$('#min-date').val('');
|
|
||||||
$('#max-date').val('');
|
|
||||||
}
|
|
||||||
|
|
||||||
//search each column
|
|
||||||
$(document).ready(function() {
|
|
||||||
|
|
||||||
//var table = $('#qdetails').DataTable
|
|
||||||
(
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
columnDefs: [
|
|
||||||
{ width: '5%', targets: 0 }
|
|
||||||
],
|
|
||||||
fixedColumns: true
|
|
||||||
} );
|
|
||||||
|
|
||||||
// Setup - add a text input to each footer cell
|
|
||||||
$('tfoot th').each( function () {
|
|
||||||
|
|
||||||
var title = $(this).text();
|
|
||||||
$(this).html( '<input type="text" placeholder="Search '+title+'" style="width: 88px;background-color:#c2ecf7;font-style: italic;" />' );
|
|
||||||
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
// DataTable
|
|
||||||
//var table = $('#qdetails').DataTable();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Apply the search
|
|
||||||
table.columns().every( function () {
|
|
||||||
var that = this;
|
|
||||||
|
|
||||||
$( 'input', this.footer() ).on( 'keyup change', function () {
|
|
||||||
if ( that.search() !== this.value ) {
|
|
||||||
that
|
|
||||||
.search( this.value )
|
|
||||||
.draw();
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(function () {
|
|
||||||
$('#dept').DataTable({
|
|
||||||
"paging": true,
|
|
||||||
"lengthChange": true,
|
|
||||||
"searching": true,
|
|
||||||
// "ordering": true,
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -49,9 +49,9 @@ if(!empty($pending_list))
|
|||||||
<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>Request Date From:</b></div>
|
<div class="input-group-addon"><b>Request Date From:</b></div>
|
||||||
<input type="text" id="min-date" class="form-control filter1" data-date-format="dd/mm/yyyy" placeholder="From:">
|
<input type="text" id="min-date" class="form-control filter1" placeholder="From:">
|
||||||
<div class="input-group-addon"><b>To</b></div>
|
<div class="input-group-addon"><b>To</b></div>
|
||||||
<input type="text" id="max-date" class="form-control filter1" data-date-format="dd/mm/yyyy" placeholder="To:">
|
<input type="text" id="max-date" class="form-control filter1" placeholder="To:">
|
||||||
<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>
|
||||||
@ -77,7 +77,8 @@ if(!empty($pending_list))
|
|||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span><?php $date = new DateTime($lis->ReqDate);echo $date->format('Y-m-d'); ?></span></td>
|
<!-- <td><span><?php //$date = new DateTime($lis->ReqDate);echo $date->format('d-m-Y'); ?></span></td>-->
|
||||||
|
<td><span><?php echo $lis->ReqDate?></span></td>
|
||||||
<td><span><?php echo $lis->ReqNo?></span></td>
|
<td><span><?php echo $lis->ReqNo?></span></td>
|
||||||
<td><span><?php echo $lis->Requestedby?></span></td>
|
<td><span><?php echo $lis->Requestedby?></span></td>
|
||||||
<td><span><?php echo $lis->DepartmentName?></span></td>
|
<td><span><?php echo $lis->DepartmentName?></span></td>
|
||||||
@ -105,7 +106,7 @@ if(!empty($pending_list))
|
|||||||
<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.html5.min.js"></script>
|
||||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.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 src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
@ -130,20 +131,24 @@ $(document).ready(function() {
|
|||||||
//dateFormat: 'dd-mm-yy'
|
//dateFormat: 'dd-mm-yy'
|
||||||
|
|
||||||
$( function() {
|
$( function() {
|
||||||
var dateFormat = "mm/dd/yy",
|
//var dateFormat = "mm/dd/yy",
|
||||||
from = $( "#min-date" )
|
from = $( "#min-date" )
|
||||||
.datepicker({
|
.datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
numberOfMonths: 1
|
//numberOfMonths: 1
|
||||||
|
|
||||||
})
|
})
|
||||||
.on( "change", function() {
|
.on( "change", function() {
|
||||||
to.datepicker( "option", "minDate", getDate( this ) );
|
to.datepicker("option", "minDate", getDate( this ) );
|
||||||
}),
|
}),
|
||||||
to = $( "#max-date" ).datepicker({
|
to = $( "#max-date" ).datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
defaultDate: "+0d",
|
defaultDate: "+0d",
|
||||||
changeMonth: true,
|
changeMonth: true,
|
||||||
numberOfMonths: 1
|
//numberOfMonths: 1
|
||||||
|
|
||||||
})
|
})
|
||||||
.on( "change", function() {
|
.on( "change", function() {
|
||||||
from.datepicker( "option", "maxDate", getDate( this ) );
|
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||||
@ -151,6 +156,7 @@ $( function() {
|
|||||||
|
|
||||||
function getDate( element ) {
|
function getDate( element ) {
|
||||||
var date;
|
var date;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
date = $.datepicker.parseDate( dateFormat, element.value );
|
date = $.datepicker.parseDate( dateFormat, element.value );
|
||||||
|
|
||||||
@ -171,22 +177,28 @@ $( function() {
|
|||||||
// Extend dataTables search
|
// Extend dataTables search
|
||||||
$.fn.dataTable.ext.search.push(
|
$.fn.dataTable.ext.search.push(
|
||||||
function(settings, data, dataIndex) {
|
function(settings, data, dataIndex) {
|
||||||
var min = $('#min-date').val();
|
var min = (moment($('#min-date').val(), "DD/MM/YYYY").isValid()) ? ~~moment($('#min-date').val(), "DD/MM/YYYY").format("X") : null;
|
||||||
var max = $('#max-date').val();
|
var max = (moment($('#max-date').val(), "DD/MM/YYYY").isValid()) ? ~~moment($('#max-date').val(), "DD/MM/YYYY").format("X") : null;
|
||||||
var ReqDate = data[0] || 0; // Our date column in the table
|
var ReqDate = ~~moment(data[0], "DD/MM/YYYY").format("X"); // Our date column in the table
|
||||||
|
// alert(min);
|
||||||
if (
|
if (min == null && max == null) {
|
||||||
(min == "" || max == "") ||
|
return true;
|
||||||
(moment(ReqDate).isSameOrAfter(min) && moment(ReqDate).isSameOrBefore(max))
|
}
|
||||||
) {
|
if (min == null && ReqDate <= max) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
if (max == null && ReqDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (ReqDate <= max && ReqDate >= min) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Re-draw the table when the a date range filter changes
|
// Re-draw the table when the a date range filter changes
|
||||||
$('.filter1').change(function() {
|
$('#min-date, #max-date').change(function() {
|
||||||
table.draw();
|
table.draw();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user