filters added
This commit is contained in:
parent
a2caf723a8
commit
10a4af5f37
@ -24,14 +24,29 @@ class report extends BaseController
|
||||
}
|
||||
public function pending_report()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$this->global['pageTitle'] = 'Siddharth : 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);
|
||||
//print_r($data);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
|
||||
//print_r($data);
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
|
||||
@ -44,17 +59,30 @@ class report extends BaseController
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public function releasedPO()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$this->global['pageTitle'] = 'Siddharth : 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);
|
||||
//print_r($data);
|
||||
|
||||
|
||||
|
||||
$data['rel_po']=$this->dahsboard_Model->report_relpo();
|
||||
}
|
||||
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
@ -68,12 +96,28 @@ class report extends BaseController
|
||||
}
|
||||
public function openorderPO()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$this->global['pageTitle'] = 'Siddharth : 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['open_po']=$this->dahsboard_Model->report_openpending($fa,$aa,$m,$frm,$t,$agf,$agt);
|
||||
//print_r($data);
|
||||
|
||||
|
||||
|
||||
$data['open_po']=$this->dahsboard_Model->report_openpending();
|
||||
}
|
||||
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
@ -189,11 +233,17 @@ class report extends BaseController
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
|
||||
|
||||
|
||||
$data['mmr']=$this->dahsboard_Model->report_MMReceiptValue();
|
||||
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$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)
|
||||
{
|
||||
$this->loadviews("Report_Material_Master_ReceiptValue",$this->global,$data, NULL);
|
||||
|
||||
@ -57,7 +57,7 @@ class user extends BaseController
|
||||
$data['details']=$this->dahsboard_Model->reqdetail();
|
||||
|
||||
$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['revenueprogress']=$this->dahsboard_Model->revenueprogress();
|
||||
|
||||
@ -507,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
|
||||
join T_CostCenter_Master cos on cos.CostCenterCode = mas.CostCenterCode
|
||||
join T_Employee_Details emp on emp.EmpID = mas.Requestedby
|
||||
join T_DepartmentDetails dep on dep.DEPCode=emp.Departmentcode
|
||||
where mas.Status = 'ST002'
|
||||
";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (mas.ReqDate >= '".$fa."-04-01' and mas.ReqDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
if ($m!= ''){
|
||||
|
||||
$sql.="and monthname(mas.ReqDate) = '".$m."'";
|
||||
|
||||
}
|
||||
|
||||
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(){
|
||||
|
||||
|
||||
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
|
||||
from T_PurchaseOrder_Master Mast
|
||||
JOIN T_PurchaseOrder_LineItem Det on Det.PONO=Mast.PONO
|
||||
@ -538,17 +555,38 @@ JOIN T_CostCenter_Master as Cost on
|
||||
Cost.CostCenterCode=Req.CostCenterCode
|
||||
JOIN T_CostCenter_Budget as Cost_Center_Bdgt on Cost.CostCenterCode=Cost_Center_Bdgt.CostCenterCode
|
||||
where Mast.Status='ST026'
|
||||
group by Mast.PONO";
|
||||
";
|
||||
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 Mast.PONO";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function report_openpending(){
|
||||
|
||||
|
||||
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
|
||||
from T_PurchaseOrder_Master Mast
|
||||
JOIN T_PurchaseOrder_LineItem Det on Det.PONO=Mast.PONO
|
||||
@ -558,9 +596,36 @@ JOIN T_DepartmentDetails Dept_Details on Dept_Details.DEPCode=Emp_Det.Department
|
||||
JOIN T_CostCenter_Master as Cost on
|
||||
Cost.CostCenterCode=Req.CostCenterCode
|
||||
JOIN T_CostCenter_Budget as Cost_Center_Bdgt on Cost.CostCenterCode=Cost_Center_Bdgt.CostCenterCode
|
||||
where Mast.Status='ST025' or Mast.Status='ST005'
|
||||
group by PONO,POType,Dept_Name";
|
||||
where (Mast.Status='ST025' or Mast.Status='ST005')
|
||||
";
|
||||
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);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
|
||||
|
||||
@ -666,16 +731,28 @@ group by po.SupplierID,pl.MaterialCode";
|
||||
|
||||
}
|
||||
|
||||
function report_MMReceiptValue(){
|
||||
function report_MMReceiptValue($fa,$aa,$m){
|
||||
|
||||
|
||||
$sql="select
|
||||
DATE_FORMAT(IF(matv.PODate = '0000-00-00', NOW(), matv.PODate), '%b-%Y') AS Month,
|
||||
DATE_FORMAT(IF(pm.PODate = '0000-00-00', NOW(), pm.PODate), '%b-%Y') AS Month,
|
||||
matv.MaterialCode,mat.MaterialName,mat.UOM,ROUND(AVG(matv.Rate),2) as Average_Rate
|
||||
from T_MaterialItem_PO matv
|
||||
join T_MaterialMaster mat on matv.MaterialCode=mat.MaterialCode
|
||||
group by matv.MaterialCode
|
||||
order by monthname(matv.PODate)";
|
||||
join T_PurchaseOrder_Master pm on pm.CreatedDate = matv.CreatedDate
|
||||
join T_MaterialMaster mat on matv.MaterialCode=mat.MaterialCode
|
||||
where pm.PODate != 0 ";
|
||||
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);
|
||||
return $query->result();
|
||||
|
||||
|
||||
@ -25,6 +25,10 @@ if(!empty($mmr))
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@ -34,11 +38,97 @@ if(!empty($mmr))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Material Master - Receipt Value</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><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>
|
||||
<!-- /.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>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +148,9 @@ if(!empty($mmr))
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($mmr)){
|
||||
<?php
|
||||
$tot=0.00;
|
||||
if(!empty($mmr)){
|
||||
foreach($mmr as $rel)
|
||||
{
|
||||
?>
|
||||
@ -68,7 +160,9 @@ if(!empty($mmr))
|
||||
<td><span><?php echo $rel->MaterialCode?></span></td>
|
||||
<td><span><?php echo $rel->MaterialName?></span></td>
|
||||
<td><span><?php echo $rel->UOM?></span></td>
|
||||
<td align="right"><span><?php echo number_format($rel->Average_Rate,2,'.','')?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tot= $tot + number_format($rel->Average_Rate,2,'.','');
|
||||
echo number_format($rel->Average_Rate,2,'.','')?></span></td>
|
||||
|
||||
|
||||
|
||||
@ -79,6 +173,15 @@ if(!empty($mmr))
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
@ -111,7 +214,7 @@ $(document).ready(function() {
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
messageTop: $('h3').text(),
|
||||
title: 'Report - Material Master - ReceiptValue',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
@ -25,6 +25,10 @@ if(!empty($rel_po))
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@ -34,30 +38,144 @@ if(!empty($rel_po))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Order Value - Released</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><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>
|
||||
<!-- /.box-header -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input" >
|
||||
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
||||
<input type="number" id="min" class="form-control date-range-filter" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<input type="number" id="max" class="form-control date-range-filter" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()"><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>Released Date From:</b></div>
|
||||
<input type="text" id="min-date" class="form-control filter1" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<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>
|
||||
</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 class="box-body">
|
||||
@ -67,7 +185,7 @@ if(!empty($rel_po))
|
||||
<tr>
|
||||
<th>PO NO</th>
|
||||
<th>PO Type</th>
|
||||
<th>Created Date</th>
|
||||
<th>PO Date</th>
|
||||
<th>Released Date</th>
|
||||
<th>Requested Department</th>
|
||||
<th>Total Order Value ( <i class="fa fa-rupee "></i>)</th>
|
||||
@ -75,7 +193,9 @@ if(!empty($rel_po))
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($rel_po)){
|
||||
<?php
|
||||
$tot=0.00;
|
||||
if(!empty($rel_po)){
|
||||
foreach($rel_po as $rel)
|
||||
{
|
||||
?>
|
||||
@ -85,7 +205,9 @@ 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->ReleasedDate);echo $date->format('d-m-Y'); ?></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
|
||||
$tot= $tot + number_format($rel->TotalOrderValue,2,'.','');
|
||||
echo number_format($rel->TotalOrderValue,2,'.','')?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
@ -95,6 +217,16 @@ if(!empty($rel_po))
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
@ -127,7 +259,7 @@ $(document).ready(function() {
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
messageTop: $('h3').text(),
|
||||
title: 'Report - Released PO',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
@ -25,6 +25,10 @@ if(!empty($open_po))
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@ -34,29 +38,144 @@ if(!empty($open_po))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Open Orders - Pending</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><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>
|
||||
<!-- /.box-header -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input" >
|
||||
<div class="input-group-addon"><b>Total Order Value From:</b></div>
|
||||
<input type="number" id="min" class="form-control date-range-filter" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<input type="number" id="max" class="form-control date-range-filter" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()"><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>PO Date From:</b></div>
|
||||
<input type="text" id="min-date" class="form-control filter1" placeholder="From:">
|
||||
<div class="input-group-addon"><b>to</b></div>
|
||||
<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>
|
||||
</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 class="box-body">
|
||||
@ -74,7 +193,9 @@ if(!empty($open_po))
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($open_po)){
|
||||
<?php
|
||||
$tot=0.00;
|
||||
if(!empty($open_po)){
|
||||
foreach($open_po as $rel)
|
||||
{
|
||||
?>
|
||||
@ -84,7 +205,9 @@ if(!empty($open_po))
|
||||
<td><span><?php echo $rel->PODate?></span></td>
|
||||
<td><span><?php echo $rel->ApprovedDate?></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
|
||||
$tot= $tot + number_format($rel->TotalOrderValue,2,'.','');
|
||||
echo number_format($rel->TotalOrderValue,2,'.','')?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
@ -94,6 +217,16 @@ if(!empty($open_po))
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
@ -126,7 +259,7 @@ $(document).ready(function() {
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
messageTop: $('h3').text(),
|
||||
title: 'Report - Open Order-Pending',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
@ -25,38 +25,157 @@ if(!empty($pending_list))
|
||||
float: right;
|
||||
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="row"style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Total Pending Requests</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><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>
|
||||
<!-- /.box-header -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input" >
|
||||
<div class="input-group-addon"><b>Aging From:</b></div>
|
||||
<input type="number" id="min" class="form-control date-range-filter" placeholder="From:">
|
||||
<div class="input-group-addon"><b>To</b></div>
|
||||
<input type="number" id="max" class="form-control date-range-filter" placeholder="To:">
|
||||
<div class="input-group-addon"> <a onclick="Reset()"><b>Clear</b></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-daterange input">
|
||||
<div class="input-group-addon"><b>Request Date From:</b></div>
|
||||
<input type="text" id="min-date" class="form-control filter1" placeholder="From:">
|
||||
<div class="input-group-addon"><b>To</b></div>
|
||||
<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>
|
||||
</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="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">
|
||||
@ -125,7 +244,7 @@ $(document).ready(function() {
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
//messageTop: $('h3').text(),
|
||||
messageTop: $('h3').text(),
|
||||
title: 'Report - Pending Request',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user