inward summary report added and bugs fixed
This commit is contained in:
parent
d5aa476516
commit
021aef14d9
@ -241,6 +241,7 @@ $route['Report_cumulative_inward'] = "report/icumulative";
|
||||
$route['Report_cumulative_raw'] = "report/rawi_cumulative";
|
||||
$route['Report_consolidate_category'] = "report/rawi_consolidate";
|
||||
$route['Report_pending_purchase'] = "report/pending_purchase";
|
||||
$route['Report_purchase_attach'] = "report/iattach";
|
||||
$route['cashbookreport']="report/cashbook";
|
||||
$route['cashbookmonthlyexpenses']="report/monthexpenses";
|
||||
$route['cashbookyearlyexpenses']="report/yearexpenses";
|
||||
|
||||
@ -568,22 +568,58 @@ class report extends BaseController
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->get('month');
|
||||
$m=$this->input->get('m');
|
||||
$frm = $this->input->get('frm');
|
||||
$t = $this->input->get('t');
|
||||
$sid=$this->input->get('sid');
|
||||
$mid = $this->input->get('mid');
|
||||
$d = $this->input->get('d');
|
||||
$da = $this->input->get('da');
|
||||
$po = $this->input->get('po');
|
||||
|
||||
//print_r($m);die();
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat);
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po);
|
||||
}
|
||||
|
||||
$this->loadviews("Report_purchase_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function iattach()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
if ($this->input->post('btn_submit')) {
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
$frm = $this->input->post('from_date');
|
||||
$t = $this->input->post('to_date');
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_attachment($cname,$fa,$aa,$m,$frm,$t);
|
||||
}
|
||||
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_attach_inward",$this->global,$data, NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
public function iyear_wise()
|
||||
{
|
||||
|
||||
@ -1392,33 +1392,33 @@ group by supplier_name,material_name";
|
||||
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){
|
||||
|
||||
|
||||
$sql="select im.IGRNO as igrn,im.PONO as pono,pm.POType as potype,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package,
|
||||
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0) as sgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0) as cgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0) as igst,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0) as discount,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0) as freight,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0) as Package,
|
||||
round((
|
||||
if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull(sum(distinct id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
|
||||
- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
|
||||
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0)
|
||||
- ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
|
||||
from T_IGR_Master im
|
||||
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
|
||||
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
|
||||
where pm.Status != 'ST030' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
@ -1466,36 +1466,36 @@ $sql.="group by pono,material_name,category,supplier_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat){
|
||||
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po){
|
||||
|
||||
|
||||
$sql="select im.IGRNO as igrn,im.PONO as pono,pm.POType as potype,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(distinct id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(distinct id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight,
|
||||
ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package,
|
||||
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,sum(id.QuantityAsPerInvoice) * pl.Rate as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0) as sgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0) as cgst,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0) as igst,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0) as discount,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0) as freight,
|
||||
ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0) as Package,
|
||||
round((
|
||||
if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull(sum(distinct id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
|
||||
- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
|
||||
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0)
|
||||
- ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0)),2) as total,pb.FilePath as file
|
||||
from T_IGR_Master im
|
||||
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
|
||||
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.PONO=pm.PONO
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
|
||||
where pm.Status != 'ST030' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
@ -1549,6 +1549,16 @@ if ($cname!= ''){
|
||||
|
||||
$sql.=" and mm.Category = '".$cat."' ";
|
||||
|
||||
}
|
||||
if ($da!= ''){
|
||||
$ddd= date("Y-m-d",strtotime($da));
|
||||
$sql.=" and date(im.CreatedDate) = '".$ddd."' ";
|
||||
|
||||
}
|
||||
if ($po!= ''){
|
||||
|
||||
$sql.=" and im.PONO = '".$po."' ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1556,6 +1566,67 @@ if ($cname!= ''){
|
||||
$sql.="group by pono,material_name,category,supplier_name";
|
||||
// echo $m;
|
||||
// echo $sid;
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_attachment($cname,$fa,$aa,$m,$frm,$t){
|
||||
|
||||
|
||||
$sql="select sd.SupplierID as sid,im.PONO as pono,pm.POType as potype,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,sd.SupplierName as supplier_name,
|
||||
round((
|
||||
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterSGST),sum(st.After_SGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterCGST),sum(st.After_CGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterIGST),sum(st.After_IGST)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterFreightValue),sum(st.AfterFreightValue)),0)
|
||||
+ ifnull(if(POType = 'REVENUE',sum(rt.AfterPackagingValue),0),0)
|
||||
- ifnull(if(POType = 'REVENUE',sum(rt.AfterDiscount),sum(st.Afterdiscountval)),0)),2) as total,pb.FilePath as file1
|
||||
from T_IGR_Master im
|
||||
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
|
||||
where pm.Status != 'ST030' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and sd.SupplierName = '".$cname."'";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
if ($m!= ''){
|
||||
|
||||
$sql.="and monthname(im.CreatedDate) = '".$m."'";
|
||||
|
||||
}
|
||||
|
||||
if ($frm and $t != ''){
|
||||
$fromd= date("Y-m-d",strtotime($frm));
|
||||
$tod=date("Y-m-d",strtotime($t));
|
||||
|
||||
$sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
and date(im.CreatedDate) <= '".$tod."'";
|
||||
|
||||
}
|
||||
|
||||
$sql.="group by pono";
|
||||
// echo $m;
|
||||
// echo $sid;
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
365
application/views/Report_attach_inward.php
Normal file
365
application/views/Report_attach_inward.php
Normal file
@ -0,0 +1,365 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#client_name").select2();
|
||||
$("#item_name").select2();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
|
||||
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Inward Summary</b><br><br>
|
||||
<?php
|
||||
if($this->input->post('client_name')){
|
||||
$cl=$this->input->post('client_name');
|
||||
echo $cl;
|
||||
echo ' '.' ';
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
?></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="client_name">
|
||||
<?php echo 'Supplier'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="client_name" name="client_name" >
|
||||
<option value="">Select Supplier</option>
|
||||
<?php
|
||||
foreach($cust as $item):
|
||||
|
||||
{?>
|
||||
|
||||
<option value="<?php echo $item->SupplierName;?>"><?php echo $item->SupplierName ; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="to_date">
|
||||
<?php echo 'Year'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="financialyear" name="financialyear">
|
||||
<option value="">Select Year</option>
|
||||
<?php
|
||||
|
||||
|
||||
foreach($finyear as $item):
|
||||
|
||||
{?>
|
||||
|
||||
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<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="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 " ><br>
|
||||
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||
value="View Report">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center">PO No</th>
|
||||
<th style="text-align:center">Date</th>
|
||||
<th style="text-align:center">Supplier Name</th>
|
||||
<th style="text-align:center">Total (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Attachments</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($purchase)){
|
||||
|
||||
$tot_tot = 0;
|
||||
|
||||
foreach($purchase as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?php echo base_url().'purchaseorder/CreatePOPrint?PONO='.$rel->pono.'&ReqType='.$rel->potype; ?>"><?php echo $rel->pono;?></a>
|
||||
|
||||
</span></td>
|
||||
<td style="text-align:center"><span><?php echo $rel->created_date;?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?po=<?php echo $rel->pono;?>"><?php echo $rel->supplier_name;?> </a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_tot= $tot_tot + round($rel->total,2);
|
||||
echo $rel->total;
|
||||
?></span></td>
|
||||
<td style="text-align:center"><span>
|
||||
<?php
|
||||
if(!empty($rel->file1)){ ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $rel->file1 ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button>File Available</button></a>
|
||||
<?php
|
||||
}else
|
||||
{
|
||||
echo 'Not Available';
|
||||
}
|
||||
?>
|
||||
</span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td class="amount" style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tot_tot,2,'.','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
<td><strong> </strong></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.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/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: 'Report Purchase-Inward',
|
||||
title: $('h3').text(),
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
$( function() {
|
||||
//var dateFormat = "mm/dd/yy",
|
||||
from = $( "#min-date" )
|
||||
.datepicker({
|
||||
dateFormat: "dd-mm-yy",
|
||||
defaultDate: "+0d",
|
||||
changeMonth: true,
|
||||
//numberOfMonths: 1
|
||||
|
||||
})
|
||||
.on( "change", function() {
|
||||
to.datepicker("option", "minDate", getDate( this ) );
|
||||
}),
|
||||
to = $( "#max-date" ).datepicker({
|
||||
dateFormat: "dd-mm-yy",
|
||||
defaultDate: "+0d",
|
||||
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;
|
||||
}
|
||||
} );
|
||||
|
||||
function Reset()
|
||||
{
|
||||
$('#mySelect').val('');
|
||||
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -215,8 +215,8 @@ if(!empty($mms))
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" width="100%"id="cc" style="font-size:10px !important;">
|
||||
<div class = "table-responsive">
|
||||
<table class="table table-bordered table-hover" width="100%"id="cc" style="font-size:12px !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center">PO No</th>
|
||||
|
||||
@ -15,18 +15,19 @@ if(!empty($mms))
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||
|
||||
|
||||
<style>
|
||||
.dataTables_filter input {padding: 4px;}
|
||||
.dataTables_filter {
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
@ -39,7 +40,8 @@ if(!empty($mms))
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@ -49,7 +51,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Purchase-Inward</b><br><br>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Inward Details</b><br><br>
|
||||
<?php
|
||||
if($this->input->post('client_name')){
|
||||
$cl=$this->input->post('client_name');
|
||||
@ -214,8 +216,8 @@ if(!empty($mms))
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:10px !important;">
|
||||
<div class = "table-responsive">
|
||||
<table id="cc" class="display" cellspacing="0" width="100%" style="font-size:12px !important;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center">PO No</th>
|
||||
@ -481,9 +483,11 @@ if(!empty($mms))
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
responsive: true,
|
||||
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-2'i><'col-md-10'p>>",
|
||||
buttons: [
|
||||
|
||||
{
|
||||
|
||||
@ -189,7 +189,18 @@ if(!empty($mms))
|
||||
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
|
||||
"date-range-pre": function ( a ) {
|
||||
var monthArr = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
||||
return monthArr.indexOf(a);
|
||||
},
|
||||
"date-range-asc": function ( a, b ) {
|
||||
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
|
||||
},
|
||||
"date-range-desc": function ( a, b ) {
|
||||
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
|
||||
}
|
||||
} );
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
@ -212,7 +223,10 @@ $(document).ready(function() {
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
],
|
||||
columnDefs: [
|
||||
{ type: 'date-range', targets: 0 }
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
@ -190,7 +190,18 @@ if(!empty($mms))
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
|
||||
"date-range-pre": function ( a ) {
|
||||
var monthArr = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
||||
return monthArr.indexOf(a);
|
||||
},
|
||||
"date-range-asc": function ( a, b ) {
|
||||
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
|
||||
},
|
||||
"date-range-desc": function ( a, b ) {
|
||||
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
|
||||
}
|
||||
} );
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
@ -212,7 +223,10 @@ $(document).ready(function() {
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
],
|
||||
columnDefs: [
|
||||
{ type: 'date-range', targets: 0 }
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
@ -36,9 +36,10 @@
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<h4><span class="fa fa-truck"> Inward</span></h4>
|
||||
<a href="<?php echo base_url(); ?>Report_purchase_inward" target="_blank" >Purchase-Inward<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_purchase_inward" target="_blank" >Inward Details<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_purchase_attach" target="_blank" >Inward Summary<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_year_wise_inward" target="_blank" >Year Wise-Inward<p class="uk-text-meta uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_supplier_inward" target="_blank" >Purchase Supplier - Wise-Inward<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_supplier_inward" target="_blank" >Inward-Supplier Wise<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_consolidate_inward" target="_blank" >Consolidate Report-Inward<p class="uk-text-meta uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_cumulative_inward" target="_blank" >Cumulative Report-Inward<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_cumulative_raw" target="_blank" >Cumulative Report - Category Wise-Inward<p class="uk-text uk-margin-remove"></p></a>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user