category wise reports added
This commit is contained in:
parent
d7108c6949
commit
87110c500d
@ -229,6 +229,8 @@ $route['Report_year_wise_inward'] = "report/iyear_wise";
|
||||
$route['Report_supplier_inward'] = "report/ipurchase_supplier";
|
||||
$route['Report_consolidate_inward'] = "report/iconsolidate";
|
||||
$route['Report_cumulative_inward'] = "report/icumulative";
|
||||
$route['Report_cumulative_raw'] = "report/rawi_cumulative";
|
||||
$route['Report_consolidate_category'] = "report/rawi_consolidate";
|
||||
$route['cashbookreport']="report/cashbook";
|
||||
$route['cashbookmonthlyexpenses']="report/monthexpenses";
|
||||
$route['cashbookyearlyexpenses']="report/yearexpenses";
|
||||
|
||||
@ -503,6 +503,7 @@ class report extends BaseController
|
||||
$cname = $this->input->post('client_name');
|
||||
$prod = $this->input->post('item_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$cat = $this->input->get('cat');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
$m=$this->input->post('month');
|
||||
@ -512,7 +513,7 @@ class report extends BaseController
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t);
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat);
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
@ -552,6 +553,7 @@ class report extends BaseController
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cname = $this->input->get('cname');
|
||||
$cat = $this->input->get('cat');
|
||||
$prod = $this->input->get('prod');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
@ -567,7 +569,7 @@ class report extends BaseController
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d);
|
||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat);
|
||||
}
|
||||
|
||||
$this->loadviews("Report_purchase_inward",$this->global,$data, NULL);
|
||||
@ -751,6 +753,144 @@ class report extends BaseController
|
||||
$data['cum_day']=$this->dahsboard_Model->ireport_cum_day($sup,$mat);
|
||||
$this->loadviews("Report_cumulative_day_inward",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_cumulative()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum']=$this->dahsboard_Model->rawi_report_cumulative();
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_cumulative_raw",$this->global,$data, NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public function rawi_cum_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($sup);
|
||||
|
||||
$data['cum_year']=$this->dahsboard_Model->rawi_report_cum_year($mat,$cat);
|
||||
$this->loadviews("Report_cumulative_year_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_cum_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum_month']=$this->dahsboard_Model->rawi_report_cum_month($mat,$cat);
|
||||
$this->loadviews("Report_cumulative_month_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_cum_day()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
$mat=$this->input->get('mid');
|
||||
$cat=$this->input->get('cat');
|
||||
//print_r($prod);
|
||||
|
||||
$data['cum_day']=$this->dahsboard_Model->rawi_report_cum_day($mat,$cat);
|
||||
$this->loadviews("Report_cumulative_day_raw",$this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function rawi_consolidate()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cname = $this->input->post('client_name');
|
||||
$ab=$this->input->post('financialyear');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_report_consolidate($cname,$fa,$aa);
|
||||
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_raw",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function rawi_consolidate_month()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
$mat = $this->input->get('mid');
|
||||
$m = $this->input->get('m');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_month($m,$cat,$sup,$mat,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_month",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function rawi_consolidate_year()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Reports';
|
||||
//$this->input->post('btn_submit');
|
||||
$cat = $this->input->get('cat');
|
||||
$sup = $this->input->get('sup');
|
||||
$mat = $this->input->get('mid');
|
||||
$ab=$this->input->get('ab');
|
||||
$fa=substr($ab,0,-5);
|
||||
$aa=substr($ab,5,5);
|
||||
//print_r($prod);
|
||||
$data['material']=$this->dahsboard_Model->material_name();
|
||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||
$data['spurchse']=$this->dahsboard_Model->rawi_consolidate_year($cat,$sup,$mat,$fa,$aa);
|
||||
// print_r( $data['spurchse']);
|
||||
if($this->DEPCode == MANAGEMENT)
|
||||
{
|
||||
$this->loadviews("Report_consolidate_year",$this->global,$data, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadViews("access", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function cashbook()
|
||||
{
|
||||
|
||||
@ -639,7 +639,7 @@ 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
|
||||
where
|
||||
pm.Status != 'ST030' ";
|
||||
pm.Status != 'ST030' and pm.Status != 'ST056' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -713,7 +713,7 @@ 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
|
||||
where
|
||||
pm.Status != 'ST030' ";
|
||||
pm.Status != 'ST030' and pm.Status != 'ST056' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -794,7 +794,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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
|
||||
where pm.Status != 'ST030'
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056'
|
||||
group by month(created_date)";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
@ -822,7 +822,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ?
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ?
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql,array($month,$year));
|
||||
return $query->result();
|
||||
@ -835,7 +835,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31'
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql,array());
|
||||
return $query->result();
|
||||
@ -885,7 +885,7 @@ 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
|
||||
where
|
||||
pm.Status != 'ST030' ";
|
||||
pm.Status != 'ST030' and pm.Status != 'ST056' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -954,7 +954,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' ";
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -984,7 +984,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and
|
||||
case
|
||||
when (month(pm.CreatedDate) >=4) then
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 )
|
||||
@ -998,7 +998,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and
|
||||
month(pm.CreatedDate) = month(current_date())
|
||||
group by supplier_name,material_name
|
||||
) as month on month.supplier_name=year.supplier_name and month.material_name=year.material_name
|
||||
@ -1008,7 +1008,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and
|
||||
date(pm.CreatedDate) = current_date()
|
||||
group by supplier_name,material_name
|
||||
) as today on today.supplier_name=month.supplier_name and today.material_name=month.material_name
|
||||
@ -1024,7 +1024,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."'
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
@ -1036,7 +1036,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and
|
||||
case
|
||||
when (month(pm.CreatedDate) >=4) then
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 )
|
||||
@ -1055,18 +1055,18 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status != 'ST056' and sd.SupplierName is not null and
|
||||
date(pm.CreatedDate) = current_date() and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t){
|
||||
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){
|
||||
|
||||
|
||||
$sql="SELECT pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date,
|
||||
TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time,
|
||||
mm.MaterialName as material_name,sd.SupplierName as supplier_name,
|
||||
mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,
|
||||
ifnull(sum(pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(pl.Rate),0) as rate,
|
||||
round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value,
|
||||
if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,
|
||||
@ -1092,8 +1092,7 @@ 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
|
||||
where
|
||||
pm.Status != 'ST030' and pm.Status = 'ST056' ";
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -1127,20 +1126,25 @@ if ($cname!= ''){
|
||||
$sql.=" and mm.MaterialName = '".$prod."' ";
|
||||
|
||||
}
|
||||
if ($cat!= ''){
|
||||
|
||||
$sql.=" and mm.Category = '".$cat."' ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql.="group by pono,material_name,supplier_name";
|
||||
$sql.="group by pono,material_name,category,supplier_name";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d){
|
||||
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat){
|
||||
|
||||
|
||||
$sql="SELECT pm.PONO as pono,date_format(pm.CreatedDate,'%d-%m-%Y') as created_date,
|
||||
TIME_FORMAT(pm.CreatedDate,'%l:%i %p') as created_time,
|
||||
mm.MaterialName as material_name,sd.SupplierName as supplier_name,
|
||||
mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,
|
||||
ifnull(sum(pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(pl.Rate),0) as rate,
|
||||
round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as value,
|
||||
if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,
|
||||
@ -1167,7 +1171,7 @@ 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
|
||||
where
|
||||
pm.Status != 'ST030' and pm.Status = 'ST056' ";
|
||||
pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -1216,11 +1220,16 @@ if ($cname!= ''){
|
||||
$sql.=" and date(pm.CreatedDate) = '".$d."' ";
|
||||
|
||||
}
|
||||
if ($cat!= ''){
|
||||
|
||||
$sql.=" and mm.Category = '".$cat."' ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql.="group by pono,material_name,supplier_name";
|
||||
//echo $sql;
|
||||
$sql.="group by pono,material_name,category,supplier_name";
|
||||
//ho $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
@ -1234,7 +1243,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056'
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master)
|
||||
group by month(created_date)";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
@ -1253,7 +1262,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ?
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and sd.SupplierName is not null and pm.PONO in (select PONO from T_IGR_Master) and month(pm.CreatedDate)= ? and year(pm.CreatedDate) = ?
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql,array($month,$year));
|
||||
return $query->result();
|
||||
@ -1266,7 +1275,7 @@ left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.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
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31'
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and sd.SupplierName is not null and date(pm.CreatedDate) >= '$a-04-01' and date(pm.CreatedDate) <= '$b-03-31'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql,array());
|
||||
return $query->result();
|
||||
@ -1316,7 +1325,7 @@ 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
|
||||
where
|
||||
pm.Status != 'ST030' and pm.Status = 'ST056' ";
|
||||
pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -1385,7 +1394,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' ";
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
@ -1415,7 +1424,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
case
|
||||
when (month(pm.CreatedDate) >=4) then
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 )
|
||||
@ -1429,7 +1438,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
month(pm.CreatedDate) = month(current_date())
|
||||
group by supplier_name,material_name
|
||||
) as month on month.supplier_name=year.supplier_name and month.material_name=year.material_name
|
||||
@ -1439,7 +1448,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
date(pm.CreatedDate) = current_date()
|
||||
group by supplier_name,material_name
|
||||
) as today on today.supplier_name=month.supplier_name and today.material_name=month.material_name
|
||||
@ -1455,7 +1464,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."'
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and month(pm.CreatedDate) = month(current_date()) and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
@ -1467,7 +1476,7 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
case
|
||||
when (month(pm.CreatedDate) >=4) then
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 )
|
||||
@ -1486,11 +1495,195 @@ FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and sd.SupplierName is not null and
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
date(pm.CreatedDate) = current_date() and sd.SupplierID = '".$sup."' and mm.MaterialCode = '".$mat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cumulative(){
|
||||
|
||||
$sql="SELECT year.mid as mid,year.category as category,year.material_name as material_name,year.quantity as quantity,year.total as total,month.mquantity as mquantity,month.mtotal as mtotal,today.tquantity as tquantity,today.ttotal as ttotal
|
||||
FROM (SELECT mm.Category as category,mm.MaterialCode as mid,ifnull(mm.MaterialName,'-') as material_name,ifnull(sum(pl.Quantity),0) as quantity,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as total
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
case
|
||||
when (month(pm.CreatedDate) >=4) then
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 )
|
||||
else
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)-1 and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) <= 3 )
|
||||
end
|
||||
group by category,material_name
|
||||
) as year left join
|
||||
(SELECT mm.Category as category,mm.MaterialCode as mid,ifnull(mm.MaterialName,'-') as material_name,ifnull(sum(pl.Quantity),0) as mquantity,round(ifnull(sum(pl.Quantity * pl.Rate),0),2) as mtotal
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
month(pm.CreatedDate) = month(current_date())
|
||||
group by category,material_name
|
||||
) as month on month.material_name=year.material_name and month.category=year.category
|
||||
left join
|
||||
(SELECT mm.Category as category,mm.MaterialCode as mid,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
date(pm.CreatedDate) = current_date()
|
||||
group by category,material_name
|
||||
) as today on today.material_name=month.material_name and today.category=month.category
|
||||
group by category,material_name ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_year($mat=null,$cat=null){
|
||||
|
||||
$sql="SELECT mm.Category as category,sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
case
|
||||
when (month(pm.CreatedDate) >=4) then
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)+1 and MONTH(pm.CreatedDate) <= 3 )
|
||||
else
|
||||
(YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE)-1 and MONTH(pm.CreatedDate) >= 4 ) or ( YEAR(pm.CreatedDate) = YEAR(CURRENT_DATE) and MONTH(pm.CreatedDate) <= 3 )
|
||||
end
|
||||
and mm.MaterialCode = '".$mat."' and mm.Category = '".$cat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_month($mat=null,$cat=null){
|
||||
|
||||
$sql="SELECT mm.Category as category,sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
month(pm.CreatedDate) = month(current_date()) and mm.MaterialCode = '".$mat."' and mm.Category = '".$cat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_cum_day($mat=null,$cat=null){
|
||||
|
||||
$sql="SELECT mm.Category as category,sd.SupplierID as sid,mm.MaterialCode as mid,sd.SupplierName as supplier_name,ifnull(mm.MaterialName,'-') as material_name,IF(pl.Quantity IS NULL or pl.Quantity = '', 0, sum(pl.Quantity)) as tquantity,ifnull(sum(pl.Quantity * pl.Rate),0) as ttotal
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
date(pm.CreatedDate) = current_date() and mm.MaterialCode = '".$mat."'and mm.Category = '".$cat."'
|
||||
group by supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_report_consolidate($cname,$fa,$aa){
|
||||
|
||||
|
||||
$sql="select mm.Category as category,mm.MaterialCode as mid,mm.MaterialName as material_name,
|
||||
SUM(IF(month(pm.CreatedDate) = 4, pl.Quantity, 0)) AS April,
|
||||
SUM(IF(month(pm.CreatedDate) = 5, pl.Quantity, 0)) AS May,
|
||||
SUM(IF(month(pm.CreatedDate) = 6, pl.Quantity, 0)) AS June,
|
||||
SUM(IF(month(pm.CreatedDate) = 7, pl.Quantity, 0)) AS July,
|
||||
SUM(IF(month(pm.CreatedDate) = 8, pl.Quantity, 0)) AS August,
|
||||
SUM(IF(month(pm.CreatedDate) = 9, pl.Quantity, 0)) AS September,
|
||||
SUM(IF(month(pm.CreatedDate) = 10, pl.Quantity, 0)) AS October,
|
||||
SUM(IF(month(pm.CreatedDate) = 11, pl.Quantity, 0)) AS November,
|
||||
SUM(IF(month(pm.CreatedDate) = 12, pl.Quantity, 0)) AS December,
|
||||
SUM(IF(month(pm.CreatedDate) = 1, pl.Quantity, 0)) AS January,
|
||||
SUM(IF(month(pm.CreatedDate) = 2, pl.Quantity, 0)) AS February,
|
||||
SUM(IF(month(pm.CreatedDate) = 3, pl.Quantity, 0)) AS March,
|
||||
sum(pl.Quantity) as qtotal,
|
||||
SUM(IF(month(pm.CreatedDate) = 4, pl.Quantity * pl.Rate, 0)) AS vApril,
|
||||
SUM(IF(month(pm.CreatedDate) = 5, pl.Quantity * pl.Rate, 0)) AS vMay,
|
||||
SUM(IF(month(pm.CreatedDate) = 6, pl.Quantity * pl.Rate, 0)) AS vJune,
|
||||
SUM(IF(month(pm.CreatedDate) = 7, pl.Quantity * pl.Rate, 0)) AS vJuly,
|
||||
SUM(IF(month(pm.CreatedDate) = 8, pl.Quantity * pl.Rate, 0)) AS vAugust,
|
||||
SUM(IF(month(pm.CreatedDate) = 9, pl.Quantity * pl.Rate, 0)) AS vSeptember,
|
||||
SUM(IF(month(pm.CreatedDate) = 10, pl.Quantity * pl.Rate, 0)) AS vOctober,
|
||||
SUM(IF(month(pm.CreatedDate) = 11, pl.Quantity * pl.Rate, 0)) AS vNovember,
|
||||
SUM(IF(month(pm.CreatedDate) = 12, pl.Quantity * pl.Rate, 0)) AS vDecember,
|
||||
SUM(IF(month(pm.CreatedDate) = 1, pl.Quantity * pl.Rate, 0)) AS vJanuary,
|
||||
SUM(IF(month(pm.CreatedDate) = 2, pl.Quantity * pl.Rate, 0)) AS vFebruary,
|
||||
SUM(IF(month(pm.CreatedDate) = 3, pl.Quantity * pl.Rate, 0)) AS vMarch,
|
||||
sum(pl.Quantity * pl.Rate) as vtotal
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) ";
|
||||
|
||||
if ($cname!= ''){
|
||||
|
||||
$sql.="and mm.MaterialName = '".$cname."'";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
|
||||
$sql.= "group by category,material_name";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function rawi_consolidate_month($m=null,$cat=null,$sup=null,$mat=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name,
|
||||
sum(pl.Quantity) as quantity,
|
||||
sum(pl.Quantity * pl.Rate) as total
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
monthname(pm.CreatedDate) = '".$m."' and mm.Category = '".$cat."' and mm.MaterialCode = '".$mat."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by category,supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function rawi_consolidate_year($cat=null,$sup=null,$mat=null,$fa=null,$aa=null){
|
||||
|
||||
$sql="select mm.Category as category,sd.SupplierID as sid,sd.SupplierName as supplier_name,mm.MaterialCode as mid,mm.MaterialName as material_name,
|
||||
sum(pl.Quantity) as quantity,
|
||||
sum(pl.Quantity * pl.Rate) as total
|
||||
FROM T_PurchaseOrder_Master pm
|
||||
join T_PurchaseOrder_LineItem pl on pl.PONO = pm.PONO
|
||||
join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
|
||||
join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
where pm.Status != 'ST030' and pm.Status = 'ST056' and pm.PONO in (select PONO from T_IGR_Master) and
|
||||
mm.Category = '".$cat."' and mm.MaterialCode = '".$mat."' ";
|
||||
if ($fa and $aa != ''){
|
||||
|
||||
$sql.=" and (pm.CreatedDate >= '".$fa."-04-01' and pm.CreatedDate <= '".$aa."-03-31')";
|
||||
|
||||
}
|
||||
$sql.= "group by category,supplier_name,material_name";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function cashbook()
|
||||
{
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $result->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
|
||||
</td>
|
||||
<td style="text-align:left;"><?php
|
||||
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
|
||||
|
||||
200
application/views/Report_consolidate_month.php
Normal file
200
application/views/Report_consolidate_month.php
Normal file
@ -0,0 +1,200 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate Month(<?php
|
||||
$m = $this->input->get('m');
|
||||
echo $m;
|
||||
?>)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if(!empty($spurchse)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
$ab=$this->input->get('ab');
|
||||
$month=date('F');
|
||||
$m = $this->input->get('m');
|
||||
//echo $month;
|
||||
foreach($spurchse as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>&m=<?php echo $m;?>"><?php echo $rel->category;?> </a>
|
||||
</td>
|
||||
<td><span><?php echo $rel->supplier_name;?>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->quantity);
|
||||
echo round($rel->quantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative month Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
729
application/views/Report_consolidate_raw.php
Normal file
729
application/views/Report_consolidate_raw.php
Normal file
@ -0,0 +1,729 @@
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#client_name").select2();
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||
|
||||
<div class="form-group has-feedback">
|
||||
<div class="col-md-4">
|
||||
<label for="client_name">
|
||||
<?php echo 'Material'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="client_name" name="client_name">
|
||||
<option value="">Select Material</option>
|
||||
<?php
|
||||
foreach($material as $item):
|
||||
|
||||
{?>
|
||||
|
||||
<option value="<?php echo $item->MaterialName;?>"><?php echo $item->MaterialName ; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2">
|
||||
<label for="to_date">
|
||||
<?php echo 'year'; ?>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="financialyear" name="financialyear">
|
||||
<option value="">Select Year</option>
|
||||
<?php
|
||||
|
||||
|
||||
foreach($finyear as $item):
|
||||
|
||||
{?>
|
||||
|
||||
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
|
||||
|
||||
|
||||
<?php } endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<br>
|
||||
<label><input type="radio" name="colorRadio" id="value" onclick="toggleTables('2')" value="tab"> Value</label>
|
||||
<label><input type="radio" name="colorRadio" id="qty" onclick="toggleTables('1')" value="ta" checked> Quantity</label>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2 "><br>
|
||||
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||
value="View Report">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body" style="display:block" id="a">
|
||||
|
||||
<table class="table table-bordered table-hover" id="tab" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">Category</th>
|
||||
<th style="text-align:center;">Material Name</th>
|
||||
<th style="text-align:center;">Apr</th>
|
||||
<th style="text-align:center;">May</th>
|
||||
<th style="text-align:center;">Jun</th>
|
||||
<th style="text-align:center;">Jul</th>
|
||||
<th style="text-align:center;">Aug</th>
|
||||
<th style="text-align:center;">Sep</th>
|
||||
<th style="text-align:center;">Oct</th>
|
||||
<th style="text-align:center;">Nov</th>
|
||||
<th style="text-align:center;">Dec</th>
|
||||
<th style="text-align:center;">Jan</th>
|
||||
<th style="text-align: center;">Feb</th>
|
||||
<th style="text-align: center;">Mar</th>
|
||||
<th style="text-align: center;">Total</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$apr = 0;
|
||||
$may = 0;
|
||||
$jun = 0;
|
||||
$jul = 0;
|
||||
$aug = 0;
|
||||
$sep = 0;
|
||||
$oct = 0;
|
||||
$nov = 0;
|
||||
$dec = 0;
|
||||
$jan = 0;
|
||||
$feb = 0;
|
||||
$mar = 0;
|
||||
$tot = 0;
|
||||
$ab=$this->input->post('financialyear');
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>"><?php echo $result->category;?> </a>
|
||||
</td>
|
||||
<td style="text-align:left;"><?php
|
||||
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$apr= $apr + round($result->April);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$may= $may + round($result->May);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jun= $jun + round($result->June);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jul= $jul + round($result->July);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$aug= $aug + round($result->August);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$sep= $sep + $result->September;
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$oct= $oct + round($result->October);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$nov= $nov + round($result->November);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$dec= $dec + round($result->December);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jan= $jan + round($result->January);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$feb= $feb + round($result->February);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$mar= $mar + round($result->March);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$tot= $tot + round($result->qtotal);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>"><?php echo round($result->qtotal);?> </a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
<td style="text-align:right;"><strong><?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong><?php
|
||||
{
|
||||
echo $apr;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $may;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $jun;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $jul;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $aug;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $sep;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo $oct;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $nov;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $dec;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $jan;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $feb;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $mar;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tot;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="box-body" id="b" style="display:none">
|
||||
|
||||
|
||||
<table class="table table-bordered table-hover" style="font-size:14px;" id="ta">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">Category</th>
|
||||
<th style="text-align:center;">Material Name</th>
|
||||
<th style="text-align:center;">Apr (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">May (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Jun (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center;">Jul (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Aug (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center;">Sep (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Oct (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Nov (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Dec (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align:center;">Jan (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align: center;">Feb (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align: center;">Mar (<i class="fa fa-rupee " ></i>)</th>
|
||||
<th style="text-align: center;">Total (<i class="fa fa-rupee " ></i>)</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
$apr = 0;
|
||||
$may = 0;
|
||||
$jun = 0;
|
||||
$jul = 0;
|
||||
$aug = 0;
|
||||
$sep = 0;
|
||||
$oct = 0;
|
||||
$nov = 0;
|
||||
$dec = 0;
|
||||
$jan = 0;
|
||||
$feb = 0;
|
||||
$mar = 0;
|
||||
$tot = 0;
|
||||
foreach ($spurchse as $result) { ?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>"><?php echo $result->category;?> </a>
|
||||
</td>
|
||||
<td style="text-align:left;"><?php
|
||||
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
|
||||
?></td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$apr= $apr + round($result->vApril);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo round($result->vApril);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$may= $may + round($result->vMay);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo round($result->vMay);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jun= $jun + round($result->vJune);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo round($result->vJune);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jul= $jul + round($result->vJuly);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo round($result->vJuly);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$aug= $aug + round($result->vAugust);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo round($result->vAugust);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$sep= $sep + $result->vSeptember;
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo round($result->vSeptember);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$oct= $oct + round($result->vOctober);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo round($result->vOctober);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$nov= $nov + round($result->vNovember);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo round($result->vNovember);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$dec= $dec + round($result->vDecember);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo round($result->vDecember);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$jan= $jan + round($result->vJanuary);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo round($result->vJanuary);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$feb= $feb + round($result->vFebruary);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo round($result->vFebruary);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$mar= $mar + round($result->vMarch);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo round($result->vMarch);?> </a>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<?php
|
||||
$tot= $tot + round($result->vtotal);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&mid=<?php echo $result->mid;?>&cat=<?php echo $result->category;?>"><?php echo round($result->vtotal);?> </a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
<td><strong><?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong><?php
|
||||
{
|
||||
echo number_format($apr,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($may,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($jun,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($jul,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($aug,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($sep,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($oct,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($nov,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($dec,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($jan,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($feb,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($mar,2,'.','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
<td style="text-align:right;">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tot,2,'.','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</strong></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#tab').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Purchase Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$(document).ready(function() {
|
||||
table = $('#ta').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Purchase Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
function toggleTables(which)
|
||||
{
|
||||
|
||||
if(which == "1") {
|
||||
document.getElementById('a').style.display = "block";
|
||||
document.getElementById('b').style.display = "none";
|
||||
|
||||
}
|
||||
if(which == "2") {
|
||||
document.getElementById('b').style.display = "block";
|
||||
document.getElementById('a').style.display = "none";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
200
application/views/Report_consolidate_year.php
Normal file
200
application/views/Report_consolidate_year.php
Normal file
@ -0,0 +1,200 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Consolidate Month(<?php
|
||||
$m = $this->input->get('ab');
|
||||
echo $m;
|
||||
?>)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if(!empty($spurchse)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
$ab=$this->input->get('ab');
|
||||
|
||||
$month=date('F');
|
||||
//echo $month;
|
||||
foreach($spurchse as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:left;">
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->category;?> </a>
|
||||
</td>
|
||||
<td><span><?php echo $rel->supplier_name;?>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->quantity);
|
||||
echo round($rel->quantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->total,2,'.','');
|
||||
echo number_format($rel->total,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative month Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Today</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Today - Inward</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -69,7 +69,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
193
application/views/Report_cumulative_day_raw.php
Normal file
193
application/views/Report_cumulative_day_raw.php
Normal file
@ -0,0 +1,193 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Today (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum_day)){
|
||||
$tqt=0;
|
||||
$tvt=0.00;
|
||||
|
||||
$d=date('Y-m-d');
|
||||
foreach($cum_day as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&d=<?php echo $d;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo round($rel->tquantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo number_format($rel->ttotal,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative Year Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative - Inward</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -91,27 +91,27 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?></span></td>
|
||||
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo anchor('report/cum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?></span></td>
|
||||
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mqt= $mqt + round($rel->mquantity);
|
||||
echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?></span></td>
|
||||
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mvt= $mvt + number_format($rel->mtotal,2,'.','');
|
||||
echo anchor('report/cum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?></span></td>
|
||||
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yqt= $yqt + round($rel->quantity);
|
||||
echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?></span></td>
|
||||
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yvt= $yvt + number_format($rel->total,2,'.','');
|
||||
echo anchor('report/cum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?></span></td>
|
||||
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?></span></td>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Month</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Month - Inward</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -75,7 +75,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
200
application/views/Report_cumulative_month_raw.php
Normal file
200
application/views/Report_cumulative_month_raw.php
Normal file
@ -0,0 +1,200 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Month (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum_month)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
$month=date('F');
|
||||
//echo $month;
|
||||
foreach($cum_month as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo round($rel->tquantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo number_format($rel->ttotal,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative month Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
276
application/views/Report_cumulative_raw.php
Normal file
276
application/views/Report_cumulative_raw.php
Normal file
@ -0,0 +1,276 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
?>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
|
||||
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value (<i class="fa fa-rupee "></i>)</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum)){
|
||||
$yqt=0.00;
|
||||
$yvt=0.00;
|
||||
$mqt=0.00;
|
||||
$mvt=0.00;
|
||||
$tqt=0.00;
|
||||
$tvt=0.00;
|
||||
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
|
||||
|
||||
foreach($cum as $rel)
|
||||
{
|
||||
$cat = $rel->category;
|
||||
?>
|
||||
<tr>
|
||||
<!-- <td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;?>&ab=<?php //echo $ab;?>&mid=<?php //echo $rel->mid;?>"><?php //echo $rel->supplier_name;?></a>
|
||||
</span></td>-->
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->category;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span>
|
||||
<?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo round($rel->tquantity);?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo number_format($rel->ttotal,2,'.','');?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mqt= $mqt + round($rel->mquantity);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo round($rel->mquantity);?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$mvt= $mvt + number_format($rel->mtotal,2,'.','');
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo number_format($rel->mtotal,2,'.','');?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yqt= $yqt + round($rel->quantity);
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo round($rel->quantity);?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$yvt= $yvt + number_format($rel->total,2,'.','');
|
||||
?>
|
||||
<a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo number_format($rel->total,2,'.','');?></a>
|
||||
</span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $mqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($mvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $yqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($yvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ if(!empty($mms))
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Year</b></p></h3></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Year - Inward</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
@ -81,7 +81,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
206
application/views/Report_cumulative_year_raw.php
Normal file
206
application/views/Report_cumulative_year_raw.php
Normal file
@ -0,0 +1,206 @@
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($mms))
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<style>
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.dataTables_paginate {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
div.dt-buttons {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div class="row" style="min-height: 600px;">
|
||||
<!-- Left col -->
|
||||
<div class="col-md-12">
|
||||
<!-- TABLE: LATEST ORDERS -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Report - Cumulative Year (Category-Wise)</b></p></h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="font-size:14px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
?>
|
||||
<th style="text-align:center" rowspan="2">Category</th>
|
||||
<th style="text-align:center" rowspan="2">Supplier Name</th>
|
||||
<th style="text-align:center" rowspan="2">Material Name</th>
|
||||
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">Value ( <i class="fa fa-rupee " ></i>)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($cum_year)){
|
||||
$tqt=0;
|
||||
$tvt=0;
|
||||
|
||||
if (date('m') >= 4) {
|
||||
$yearl = date('Y').'-'.(date('Y')+1);
|
||||
} else {
|
||||
$yearl = (date('Y')-1).'-'.date('Y');
|
||||
}
|
||||
$ab=$yearl;
|
||||
foreach($cum_year as $rel)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&mid=<?php echo $rel->mid;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tqt= $tqt + round($rel->tquantity);
|
||||
echo round($rel->tquantity);?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
|
||||
echo number_format($rel->ttotal,2,'.','');?></span></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:center;"><strong>Total</strong></td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo '';
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo $tqt;
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#cc').DataTable( {
|
||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export cumulative Year Report',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$('#mySelect').on('change',function(){
|
||||
|
||||
table
|
||||
.column(4)
|
||||
.search(this.value)
|
||||
.draw();
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>&month=<?php echo $new;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>&month=<?php echo $new;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
@ -189,6 +189,7 @@ if(!empty($mms))
|
||||
<th style="text-align:center">Date</th>
|
||||
<th style="text-align:center">Time</th>
|
||||
<th style="text-align:center">Material Name</th>
|
||||
<th style="text-align:center;">Category</th>
|
||||
<th style="text-align:center">Supplier Name</th>
|
||||
<th style="text-align:center">Quantity</th>
|
||||
<th style="text-align:center">UOM</th>
|
||||
@ -227,6 +228,7 @@ if(!empty($mms))
|
||||
<td style="text-align:center"><span><?php echo $rel->created_date;?></span></td>
|
||||
<td style="text-align:right"><span><?php echo $rel->created_time;?></span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td><span><?php echo $rel->category;?></span></td>
|
||||
<td><span><?php echo $rel->supplier_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_qty= $tot_qty + round($rel->quantity);
|
||||
@ -278,6 +280,7 @@ if(!empty($mms))
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
<td><strong> </strong></td>
|
||||
|
||||
<td class="amount" style="text-align:right"><strong>
|
||||
|
||||
@ -186,7 +186,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&frm=<?php echo $frm;?>&t=<?php echo $t;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&ab=<?php echo $ab;?>&month=<?php echo $month;?>&frm=<?php echo $frm;?>&t=<?php echo $t;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tot_rate= $tot_rate + round($rel->counts);
|
||||
|
||||
@ -104,7 +104,7 @@ if(!empty($mms))
|
||||
//echo $new;
|
||||
?>
|
||||
|
||||
<a href="<?= base_url() ?>report/month_wise?ab=<?php echo $ab;?>&dat=<?php echo $pass;?>"><?php echo $new;?></a>
|
||||
<a href="<?= base_url() ?>report/imonth_wise?ab=<?php echo $ab;?>&dat=<?php echo $pass;?>"><?php echo $new;?></a>
|
||||
</span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
$tr3= $tr3 + $rel->quantity;
|
||||
@ -125,7 +125,7 @@ if(!empty($mms))
|
||||
<td style="text-align:center;"><strong><?php
|
||||
$ab=$this->input->post('financialyear');
|
||||
$Total="Total";
|
||||
echo anchor('report/year_wise_total/' . $ab,$Total); ?></strong>
|
||||
echo anchor('report/iyear_wise_total/' . $ab,$Total); ?></strong>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ if(!empty($mms))
|
||||
?>
|
||||
<tr>
|
||||
<td><span>
|
||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>"><?php echo $rel->supplier_name;?></a>
|
||||
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $rel->sid;?>&mid=<?php echo $rel->mid;?>&ab=<?php echo $ab;?>"><?php echo $rel->supplier_name;?></a>
|
||||
</span></td>
|
||||
<td><span><?php echo $rel->material_name;?></span></td>
|
||||
<td style="text-align:right"><span><?php
|
||||
|
||||
@ -151,6 +151,8 @@ h1{
|
||||
<a href="<?php echo base_url(); ?>Report_supplier_inward" target="_blank">Purchase Supplier - Wise<p class="uk-text uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_consolidate_inward" target="_blank">Consolidate Report<p class="uk-text-meta uk-margin-remove"></p></a>
|
||||
<a href="<?php echo base_url(); ?>Report_cumulative_inward" target="_blank">Cumulative Report<p class="uk-text uk-margin-remove"></p>
|
||||
<a href="<?php echo base_url(); ?>Report_cumulative_raw" target="_blank">Cumulative Report - Category Wise<p class="uk-text uk-margin-remove"></p>
|
||||
<a href="<?php echo base_url(); ?>Report_consolidate_category" target="_blank">Consolidate Report - Category Wise<p class="uk-text-meta uk-margin-remove"></p></a>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user