temporary total all

This commit is contained in:
venbatechnologies@gmail.com 2018-06-26 16:40:55 +05:30
parent 6c1dfd7bca
commit af519ede09
8 changed files with 4376 additions and 3356 deletions

257
application/models/dahsboard_model.php Executable file → Normal file
View File

@ -36,19 +36,6 @@ function getfile($PONO)
}
function getfiles($PONO)
{
//$this->db->distinct();
$this->db->select('*');
$this->db->from('T_Inwardgateregister_fileupload');
$this->db->where('PONO',$PONO);
$query = $this->db->get();
// print_r( $this->db->last_query());
$result = $query->result_array();
return $result;
}
function totloan()
{
@ -1456,48 +1443,47 @@ group by supplier_name,material_name";
function ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat){
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, id.QuantityAsPerInvoice as quantity,pl.Rate as rate,round(id.QuantityAsPerInvoice * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',pm.ExchangeRate,0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) as cgst,
(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) as cgst,
round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) as igst,
(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) as igst,
round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2) as discount,
(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2) as discount,
round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) as freight,
(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) as freight,
round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package,
(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package,
round((
if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
if(POType = 'IMPORT',(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
if(POType = 'CAPITAL' && CapitalRange = 0,(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
ifnull((id.QuantityAsPerInvoice * pl.Rate),0)))
+ round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
- round(ifnull(if(POType = 'REVENUE',
sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
im.file as ifile,pb.FilePath as file ,infiles.FilePath as Infiles
(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
im.file as ifile,pb.FilePath as file
from T_IGR_Master im
left join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
@ -1506,8 +1492,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
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO = im.IGRNO
left join T_Inwardgateregister_fileupload infiles on infiles.IGRNO = im.IGRNO
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
where pm.Status != 'ST030' ";
if ($cname!= ''){
@ -1562,76 +1547,56 @@ $sql.="group by pono,material_name,category,supplier_name,id.IGRItemNo";
function ireport_purchase_link($cname,$prod,$fa,$aa,$m,$frm,$t,$sid,$mid,$d,$cat,$da,$po){
// $sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, sum(id.QuantityAsPerInvoice) as quantity,pl.Rate as rate,round(sum(id.QuantityAsPerInvoice) * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',sum(pm.ExchangeRate),0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
// round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
// round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) as cgst,
// round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) as igst,
// round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2) as discount,
// round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) as freight,
// round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package,
// round((
// if(POType = 'IMPORT',sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
// if(POType = 'CAPITAL' && CapitalRange = 0,sum(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
// ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)))
// + round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
// + round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
// + round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
// + round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
// + round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
// - round(ifnull(if(POType = 'REVENUE',
// sum(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
// sum(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
// im.file as ifile,pb.FilePath as file
// from T_IGR_Master im
// join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
// join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
// join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
// left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
// left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
// left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
// left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
// left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
$sql ="select im.IGRNO as igrn,pm.POType as potype,im.PONO as pono,date_format(im.CreatedDate,'%d-%m-%Y') as created_date,TIME_FORMAT(im.CreatedDate,'%l:%i %p') as created_time,mm.MaterialName as material_name,mm.Category as category,sd.SupplierName as supplier_name,mm.UOM as UOM, id.QuantityAsPerInvoice as quantity,pl.Rate as rate,round(id.QuantityAsPerInvoice * pl.Rate,2) as value,if(POType = 'IMPORT' or POType = 'CAPITAL',pm.ExchangeRate,0) as exchange_rate,date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,
round(ifnull(if(POType = 'REVENUE',
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst,
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) as cgst,
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) as igst,
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2) as discount,
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) as freight,
round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package,
round((
if(POType = 'IMPORT',(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
if(POType = 'CAPITAL' && CapitalRange = 0,(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
ifnull((id.QuantityAsPerInvoice * pl.Rate),0)))
+ round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) as sgst, round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) as cgst, round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) as igst, round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2) as discount,
round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) as freight,
round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) as Package,
round(( if(POType = 'IMPORT',(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
if(POType = 'CAPITAL' && CapitalRange = 0,(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
ifnull((id.QuantityAsPerInvoice * pl.Rate),0))) + round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity), (id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity), (id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2) + round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2) - round(ifnull(if(POType = 'REVENUE', (id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity), (id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total, im.file as ifile,pb.FilePath as file,infiles.FilePath as Infiles
from T_IGR_Master im join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo left join T_PurchaseOrder_BillUpload pb on pb.IGRNO = im.IGRNO
left join T_Inwardgateregister_fileupload infiles on infiles.IGRNO = im.IGRNO
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
+ round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
- round(ifnull(if(POType = 'REVENUE',
(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total,
im.file as ifile,pb.FilePath as file
from T_IGR_Master im
left join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
where pm.Status != 'ST030' ";
if ($cname!= ''){
@ -1717,7 +1682,7 @@ $sql.="group by pono,material_name,category,supplier_name,id.IGRItemNo";
function ireport_attachment($cname,$fa,$aa,$m,$frm,$t){
/** $sql="select pono,potype,date_format(created_date,'%d-%m-%Y') as created_date,date_format(materialrcvddate,'%d-%m-%Y') as materialrcvddate,supplier_name,
$sql="select pono,potype,date_format(created_date,'%d-%m-%Y') as created_date,date_format(materialrcvddate,'%d-%m-%Y') as materialrcvddate,supplier_name,
sum(total) as total,file,ifile
from igr
where status != 'ST030'
@ -1727,25 +1692,6 @@ if ($cname!= ''){
$sql.="and supplier_name = '".$cname."'";
} **/
$sql="select pm.Status AS status,sd.SupplierID AS sid,im.file AS ifile,pb.FilePath AS file,infiles.FilePath as Infiles,im.IGRNO AS igrn,pm.POType AS potype,im.PONO AS pono,date_format(im.CreatedDate,'%d-%m-%Y') AS created_date,time_format(im.CreatedDate,'%l:%i %p') AS created_time,mm.MaterialName AS material_name,
date_format(im.MaterialRcvdDate,'%d-%m-%Y') as materialrcvddate,sd.SupplierName AS supplier_name,sum(id.QuantityAsPerInvoice) AS quantity,
round(((((((if((pm.POType = 'IMPORT'),sum((pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate))),if(((pm.POType = 'CAPITAL') and (pm.CapitalRange = 0)),sum((pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate))),ifnull(sum((id.QuantityAsPerInvoice * pl.Rate)),0))) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterSGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_SGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterCGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_CGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterIGST) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.After_IGST) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterFreightValue) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.AfterFreightValue) / pl.Quantity))),0),2)) + round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterPackagingValue) / pl.Quantity)),0),0),2)) - round(ifnull(if((pm.POType = 'REVENUE'),sum(((id.QuantityAsPerInvoice * rt.AfterDiscount) / pl.Quantity)),sum(((id.QuantityAsPerInvoice * st.Afterdiscountval) / pl.Quantity))),0),2)),2) AS total
from (((((((((T_IGR_Master im join T_PurchaseOrder_LineItem pl on((pl.PONO = im.PONO))) join T_IGR_Details id on(((id.IGRNO = im.IGRNO) and (id.MaterialCode = pl.MaterialCode)))) join T_PurchaseOrder_Master pm on((pm.PONO = pl.PONO)))
left join T_MaterialMaster mm on((mm.MaterialCode = pl.MaterialCode)))
left join T_SupplierDetailsN sd on((sd.SupplierID = pm.SupplierID)))
left join T_Service_Tax st on((st.LineItemNo = pl.LineItemNo)))
left join T_Revenue_Tax rt on((rt.LineItemNo = pl.LineItemNo)))
left join T_PurchaseOrder_BillUpload pb on((pb.PONO = im.PONO)))
left join T_Inwardgateregister_fileupload infiles on ((infiles.IGRNO = im.IGRNO)))
where (pm.Status <> 'ST030') ";
if ($cname!= ''){
$sql.="and sd.SupplierName = '".$cname."'";
}
if ($fa and $aa != ''){
@ -1789,8 +1735,8 @@ function ireport_year_wise($a,$b){
// group by month(CreatedDate)
// ";
//echo $sql;
$sql="select materialrcvddate,sum(quantity)as quantity,sum(value) as value,materialrcvddate
from year_inward
$sql="select materialrcvddate,sum(quantity)as quantity,sum(value) as value
from igr
where status != 'ST030' and date(materialrcvddate) >= '$a-04-01' and date(materialrcvddate) <= '$b-03-31'
group by month(materialrcvddate)";
$query = $this->db->query($sql);
@ -1809,7 +1755,7 @@ function ireport_year_wise($a,$b){
// where status != 'ST030' and month(dat)= ? and year(dat) = ?
// group by material_name,supplier_name";
$sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total,materialrcvddate
from year_inward
from igr
where status != 'ST030' and month(materialrcvddate)= ? and year(materialrcvddate) = ?
group by material_name,supplier_name";
$query = $this->db->query($sql,array($month,$year));
@ -1822,7 +1768,7 @@ function ireport_year_wise($a,$b){
// where status != 'ST030' and date(dat) >= '$a-04-01' and date(dat) <= '$b-03-31'
// group by material_name,supplier_name";
$sql="select sid,mid,supplier_name,material_name,sum(quantity)as quantity,sum(value) as total,materialrcvddate
from year_inward
from igr
where status != 'ST030' and date(materialrcvddate) >= '$a-04-01' and date(materialrcvddate) <= '$b-03-31'
group by material_name,supplier_name";
$query = $this->db->query($sql,array());
@ -1872,14 +1818,13 @@ then ifnull(sum(id.QuantityAsPerInvoice * pl.Rate),0)
end
as total,im.MaterialRcvdDate
from T_IGR_Master im
join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
left join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
left join T_MaterialMaster mm on mm.MaterialCode = pl.MaterialCode
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
left join T_PurchaseOrder_BillUpload pb on pb.IGRNO=im.IGRNO
where pm.Status != 'ST030'";
if ($cname!= ''){
@ -1949,7 +1894,7 @@ SUM(IF(month(materialrcvddate) = 1, value, 0)) AS vJanuary,
SUM(IF(month(materialrcvddate) = 2, value, 0)) AS vFebruary,
SUM(IF(month(materialrcvddate) = 3, value, 0)) AS vMarch,
sum(value) as vtotal
FROM year_inward
FROM igr
where status != 'ST030' ";
if ($cname!= ''){
@ -1976,9 +1921,9 @@ if ($cname!= ''){
function i_consolidate_month($m=null,$sid=null,$mid=null,$fa=null,$aa=null){
$sql="select sid,mid,supplier_name,material_name,sum(quantity) as quantity,sum(value) as total
from year_inward
from igr
where status != 'ST030' and
monthname(dat) = '".$m."' and sid = '".$sid."' and mid = '".$mid."' ";
monthname(materialrcvddate) = '".$m."' and sid = '".$sid."' and mid = '".$mid."' ";
if ($fa and $aa != ''){
//$sql.=" and (dat >= '".$fa."-04-01' and dat <= '".$aa."-03-31')";
@ -1993,7 +1938,7 @@ if ($fa and $aa != ''){
function i_consolidate_year($sid=null,$mid=null,$fa=null,$aa=null){
$sql="select sid,mid,supplier_name,material_name,sum(quantity) as quantity,sum(value) as total
from year_inward
from igr
where status != 'ST030' and sid = '".$sid."' and mid = '".$mid."' ";
if ($fa and $aa != ''){
@ -2017,20 +1962,20 @@ if ($fa and $aa != ''){
$aa=substr($ab,5,5);
$sql="SELECT year.sid as sid,year.mid as mid,year.supplier_name as supplier_name,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 sid,mid,supplier_name,material_name,sum(Quantity) as quantity,sum(value) as total,materialrcvddate
FROM year_inward
FROM igr
where status != 'ST030' and
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
group by supplier_name,material_name
) as year left join
(SELECT sid,mid,supplier_name,material_name,sum(Quantity) as mquantity,sum(value) as mtotal
FROM year_inward
FROM igr
where status != 'ST030' and
month(materialrcvddate) = 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
left join
(SELECT sid,mid,supplier_name,material_name,sum(Quantity) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
date(materialrcvddate) = current_date()
group by supplier_name,material_name
@ -2043,7 +1988,7 @@ group by supplier_name,material_name
function ireport_cum_month($sup=null,$mat=null){
$sql="SELECT sid,mid,supplier_name,material_name,sum(Quantity) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
month(materialrcvddate) = month(current_date()) and sid = '".$sup."' and mid = '".$mat."'
group by supplier_name,material_name";
@ -2060,7 +2005,7 @@ group by supplier_name,material_name";
$fa=substr($ab,0,-5);
$aa=substr($ab,5,5);
$sql="SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
and sid = '".$sup."' and mid= '".$mat."'
@ -2072,7 +2017,7 @@ group by supplier_name,material_name
function ireport_cum_day($sup=null,$mat=null){
$sql="SELECT sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
date(materialrcvddate) = current_date() and sid = '".$sup."' and mid = '".$mat."'
group by supplier_name,material_name";
@ -2090,20 +2035,20 @@ group by supplier_name,material_name";
$aa=substr($ab,5,5);
$sql="SELECT year.category as category,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 category,sum(Quantity) as quantity,sum(value) as total
FROM year_inward
FROM igr
where status != 'ST030' and
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
group by category
) as year left join
(SELECT category,sum(Quantity) as mquantity,sum(value) as mtotal
FROM year_inward
FROM igr
where status != 'ST030' and
month(materialrcvddate) = month(current_date())
group by category
) as month on month.category=year.category
left join
(SELECT category,sum(Quantity) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
date(materialrcvddate) = current_date()
group by category
@ -2122,7 +2067,7 @@ group by category ";
$fa=substr($ab,0,-5);
$aa=substr($ab,5,5);
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
(materialrcvddate >= '".$fa."-04-01' and materialrcvddate <= '".$aa."-03-31')
and category = '".$cat."'
@ -2134,7 +2079,7 @@ group by supplier_name,material_name";
function rawi_report_cum_month($cat=null){
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
month(materialrcvddate) = month(current_date()) and category = '".$cat."'
group by supplier_name,material_name";
@ -2144,7 +2089,7 @@ group by supplier_name,material_name";
function rawi_report_cum_day($cat=null){
$sql="SELECT category,sid,mid,supplier_name,material_name,IF(Quantity IS NULL or Quantity = '', 0, sum(Quantity)) as tquantity,sum(value) as ttotal
FROM year_inward
FROM igr
where status != 'ST030' and
date(materialrcvddate) = current_date() and category = '".$cat."'
group by supplier_name,material_name";
@ -2182,7 +2127,7 @@ SUM(IF(month(materialrcvddate) = 1, value, 0)) AS vJanuary,
SUM(IF(month(materialrcvddate) = 2, value, 0)) AS vFebruary,
SUM(IF(month(materialrcvddate) = 3, value, 0)) AS vMarch,
sum(value) as vtotal
FROM year_inward
FROM igr
where status != 'ST030' ";
if ($cname!= ''){
@ -2211,7 +2156,7 @@ function rawi_consolidate_month($m=null,$cat=null,$sup=null,$fa=null,$aa=null){
$sql="select category,sid,supplier_name,mid,material_name,
sum(Quantity) as quantity,
sum(value) as total
FROM year_inward
FROM igr
where status != 'ST030' and
monthname(materialrcvddate) = '".$m."' and category = '".$cat."' ";
if ($fa and $aa != ''){
@ -2229,7 +2174,7 @@ if ($fa and $aa != ''){
$sql="select category,sid,supplier_name,mid,material_name,
sum(Quantity) as quantity,
sum(value) as total
FROM year_inward
FROM igr
where status != 'ST030' and
category = '".$cat."' ";
if ($fa and $aa != ''){

View File

@ -185,7 +185,7 @@ table.dataTable thead > tr > td.sorting {
$mar = 0;
$tot = 0;
$ab=$this->input->post('financialyear');
foreach ($spurchse as $result) { ?>
foreach ($spurchse as $index=>$result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/link_purchase?sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&ab=<?php echo $ab;?>"><?php echo $result->supplier_name;?> </a>
@ -193,70 +193,70 @@ table.dataTable thead > tr > td.sorting {
<td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="april_qty<?php echo $index?>"><?php
$apr= $apr + round($result->April);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="may_qty<?php echo $index?>"><?php
$may= $may + round($result->May);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="june_qty<?php echo $index?>"><?php
$jun= $jun + round($result->June);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="july_qty<?php echo $index?>"><?php
$jul= $jul + round($result->July);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="aug_qty<?php echo $index?>"><?php
$aug= $aug + round($result->August);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="sep_qty<?php echo $index?>"><?php
$sep= $sep + round($result->September);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="oct_qty<?php echo $index?>"><?php
$oct= $oct + round($result->October);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="nov_qty<?php echo $index?>"><?php
$nov= $nov + round($result->November);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="dec_qty<?php echo $index?>"><?php
$dec= $dec + round($result->December);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="jan_qty<?php echo $index?>"><?php
$jan= $jan + round($result->January);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="feb_qty<?php echo $index?>"><?php
$feb= $feb + round($result->February);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="mar_qty<?php echo $index?>"><?php
$mar= $mar + round($result->March);
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="tot_qty<?php echo $index?>"><?php
$tot= $tot + round($result->qtotal);
?>
<a href="<?= base_url() ?>report/consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo round($result->qtotal);?> </a>
<a href="<?= base_url() ?>report/consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo round($result->qtotal);?> </a></span>
</td>
</tr>
@ -449,7 +449,7 @@ table.dataTable thead > tr > td.sorting {
$feb = 0;
$mar = 0;
$tot = 0;
foreach ($spurchse as $result) { ?>
foreach ($spurchse as $index=>$result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/link_purchase?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
@ -457,70 +457,70 @@ table.dataTable thead > tr > td.sorting {
<td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="aprilval<?php echo $index?>"><?php
$apr= $apr + number_format($result->vApril,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="mayval<?php echo $index?>"><?php
$may= $may + number_format($result->vMay,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id ="juneval<?php echo $index?>"><?php
$jun= $jun + number_format($result->vJune,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="julyval<?php echo $index?>"><?php
$jul= $jul + number_format($result->vJuly,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="augval<?php echo $index?>"><?php
$aug= $aug + number_format($result->vAugust,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="sepval<?php echo $index?>"><?php
$sep= $sep + number_format($result->vSeptember,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="octval<?php echo $index?>"><?php
$oct= $oct + number_format($result->vOctober,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="novval<?php echo $index?>"><?php
$nov= $nov + number_format($result->vNovember,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="decval<?php echo $index?>"><?php
$dec= $dec + number_format($result->vDecember,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="janval<?php echo $index?>"><?php
$jan= $jan + number_format($result->vJanuary,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="febval<?php echo $index?>"><?php
$feb= $feb + number_format($result->vFebruary,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="marval<?php echo $index?>"><?php
$mar= $mar + number_format($result->vMarch,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="totalval<?php echo $index?>"><?php
$tot= $tot + number_format($result->vtotal,2,'.','');
?>
<a href="<?= base_url() ?>report/consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a>
<a href="<?= base_url() ?>report/consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a></span>
</td>
</tr>
@ -715,7 +715,91 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
var april_sum=0;
var may_sum=0;
var june_sum = 0;
var july_sum = 0;
var aug_sum = 0;
var sep_sum=0;
var oct_sum =0;
var nov_sum =0;
var dec_sum=0;
var jan_sum=0;
var feb_sum=0;
var mar_sum=0;
var total_sum=0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var april= $('#april_qty'+count).text();
var may = $('#may_qty'+count).text();
var june = $('#june_qty'+count).text();
var july = $('#july_qty'+count).text();
var aug = $('#aug_qty'+count).text();
var sep = $('#sep_qty'+count).text();
var oct = $('#oct_qty'+count).text();
var nov = $('#nov_qty'+count).text();
var dec = $('#dec_qty'+count).text();
var jan = $('#jan_qty'+count).text();
var feb = $('#feb_qty'+count).text();
var mar = $('#mar_qty'+count).text();
var tot = $('#tot_qty'+count).text();
april_sum += +april;
may_sum += +may;
june_sum += +june;
july_sum += +july;
aug_sum += +aug;
sep_sum += +sep;
oct_sum += +oct;
nov_sum += +nov;
dec_sum += + dec;
jan_sum += +jan;
feb_sum += +feb;
mar_sum += +mar;
total_sum += +tot;
}
var api = this.api(), data;
var Final_april_total =parseInt(april_sum);
var Final_may_total = parseInt(may_sum);
var Final_june_total = parseInt(june_sum);
var Final_july_total = parseInt(july_sum);
var Final_aug_total = parseInt(aug_sum);
var Final_sep_total = parseInt(sep_sum);
var Final_oct_total = parseInt(oct_sum);
var Final_nov_total = parseInt(nov_sum);
var Final_dec_total = parseInt(dec_sum);
var Final_jan_total = parseInt(jan_sum);
var Final_feb_total = parseInt(feb_sum);
var Final_mar_total = parseInt(mar_sum);
var Final_tot = parseInt(total_sum);
$( api.column( 2 ).footer() ).html( Final_april_total.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( Final_may_total.toFixed(2).bold() );
$( api.column( 4 ).footer() ).html( Final_june_total.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( Final_july_total.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( Final_aug_total.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( Final_sep_total.toFixed(2).bold() );
$( api.column( 8 ).footer() ).html( Final_oct_total.toFixed(2).bold() );
$( api.column( 9 ).footer() ).html( Final_nov_total.toFixed(2).bold() );
$( api.column( 10 ).footer() ).html( Final_dec_total.toFixed(2).bold() );
$( api.column( 11 ).footer() ).html( Final_jan_total.toFixed(2).bold() );
$( api.column( 12 ).footer() ).html( Final_feb_total.toFixed(2).bold() );
$( api.column( 13 ).footer() ).html( Final_mar_total.toFixed(2).bold() );
$( api.column( 14 ).footer() ).html( Final_tot.toFixed(2).bold() );
}
} );
} );
$(document).ready(function() {
@ -737,7 +821,92 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
var aprilval_sum =0;
var mayval_sum =0;
var juneval_sum =0;
var julyval_sum =0;
var augval_sum =0;
var sepval_sum =0;
var octval_sum =0;
var novval_sum =0;
var decval_sum =0;
var janval_sum =0;
var febval_sum =0;
var marval_sum =0;
var totalval_sum =0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var aprilv= $('#aprilval'+count).text();
var mayv = $('#mayval'+count).text();
var junev = $('#juneval'+count).text();
var julyv = $('#julyval'+count).text();
var augv = $('#augval'+count).text();
var sepv = $('#sepval'+count).text();
var octv = $('#octval'+count).text();
var novv = $('#novval'+count).text();
var decv = $('#decval'+count).text();
var janv = $('#janval'+count).text();
var febv = $('#febval'+count).text();
var marv = $('#marval'+count).text();
var totv = $('#totalval'+count).text();
aprilval_sum += +aprilv;
mayval_sum += +mayv;
juneval_sum += +junev;
julyval_sum += +julyv;
augval_sum += +augv;
sepval_sum += +sepv;
octval_sum += +octv;
novval_sum += +novv;
decval_sum += + decv;
janval_sum += +janv;
febval_sum += +febv;
marval_sum += +marv;
totalval_sum += +totv;
}
var api = this.api(), data;
var Final_april_total =parseInt(aprilval_sum);
var Final_may_total = parseInt(mayval_sum);
var Final_june_total = parseInt(juneval_sum);
var Final_july_total = parseInt(julyval_sum);
var Final_aug_total = parseInt(augval_sum);
var Final_sep_total = parseInt(sepval_sum);
var Final_oct_total = parseInt(octval_sum);
var Final_nov_total = parseInt(novval_sum);
var Final_dec_total = parseInt(decval_sum);
var Final_jan_total = parseInt(janval_sum);
var Final_feb_total = parseInt(febval_sum);
var Final_mar_total = parseInt(marval_sum);
var Final_tot = parseInt(totalval_sum);
$( api.column( 2 ).footer() ).html( Final_april_total.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( Final_may_total.toFixed(2).bold() );
$( api.column( 4 ).footer() ).html( Final_june_total.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( Final_july_total.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( Final_aug_total.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( Final_sep_total.toFixed(2).bold() );
$( api.column( 8 ).footer() ).html( Final_oct_total.toFixed(2).bold() );
$( api.column( 9 ).footer() ).html( Final_nov_total.toFixed(2).bold() );
$( api.column( 10 ).footer() ).html( Final_dec_total.toFixed(2).bold() );
$( api.column( 11 ).footer() ).html( Final_jan_total.toFixed(2).bold() );
$( api.column( 12 ).footer() ).html( Final_feb_total.toFixed(2).bold() );
$( api.column( 13 ).footer() ).html( Final_mar_total.toFixed(2).bold() );
$( api.column( 14 ).footer() ).html( Final_tot.toFixed(2).bold() );
}
} );
} );

View File

@ -183,7 +183,7 @@ table.dataTable thead > tr > td.sorting {
$mar = 0;
$tot = 0;
$ab=$this->input->post('financialyear');
foreach ($spurchse as $result) { ?>
foreach ($spurchse as $index=>$result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/ilink_purchase?sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&ab=<?php echo $ab;?>"><?php echo $result->supplier_name;?> </a>
@ -191,70 +191,70 @@ table.dataTable thead > tr > td.sorting {
<td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="april_qty<?php echo $index?>"><?php
$apr= $apr + round($result->April);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="may_qty<?php echo $index?>"><?php
$may= $may + round($result->May);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="june_qty<?php echo $index?>"><?php
$jun= $jun + round($result->June);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="july_qty<?php echo $index?>"><?php
$jul= $jul + round($result->July);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="aug_qty<?php echo $index?>"><?php
$aug= $aug + round($result->August);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="sep_qty<?php echo $index?>"><?php
$sep= $sep + round($result->September);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="oct_qty<?php echo $index?>"><?php
$oct= $oct + round($result->October);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="nov_qty<?php echo $index?>"><?php
$nov= $nov + round($result->November);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="dec_qty<?php echo $index?>"><?php
$dec= $dec + round($result->December);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="jan_qty<?php echo $index?>"><?php
$jan= $jan + round($result->January);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="feb_qty<?php echo $index?>"><?php
$feb= $feb + round($result->February);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="mar_qty<?php echo $index?>"><?php
$mar= $mar + round($result->March);
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="tot_qty<?php echo $index?>"><?php
$tot= $tot + round($result->qtotal);
?>
<a href="<?= base_url() ?>report/i_consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo round($result->qtotal);?> </a>
<a href="<?= base_url() ?>report/i_consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo round($result->qtotal);?> </a></span>
</td>
</tr>
@ -448,7 +448,7 @@ table.dataTable thead > tr > td.sorting {
$feb = 0;
$mar = 0;
$tot = 0;
foreach ($spurchse as $result) { ?>
foreach ($spurchse as $index=>$result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo $result->supplier_name;?> </a>
@ -456,70 +456,70 @@ table.dataTable thead > tr > td.sorting {
<td style="text-align:left;"><?php
if(!empty($result->material_name)) { echo $result->material_name ; } else {echo "-";}
?></td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="aprilval<?php echo $index?>"><?php
$apr= $apr + number_format($result->vApril,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="mayval<?php echo $index?>"><?php
$may= $may + number_format($result->vMay,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id ="juneval<?php echo $index?>"><?php
$jun= $jun + number_format($result->vJune,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="julyval<?php echo $index?>"><?php
$jul= $jul + number_format($result->vJuly,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="augval<?php echo $index?>"><?php
$aug= $aug + number_format($result->vAugust,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="sepval<?php echo $index?>"><?php
$sep= $sep + number_format($result->vSeptember,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="octval<?php echo $index?>"><?php
$oct= $oct + number_format($result->vOctober,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="novval<?php echo $index?>"><?php
$nov= $nov + number_format($result->vNovember,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="decval<?php echo $index?>"><?php
$dec= $dec + number_format($result->vDecember,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="janval<?php echo $index?>"><?php
$jan= $jan + number_format($result->vJanuary,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="febval<?php echo $index?>"><?php
$feb= $feb + number_format($result->vFebruary,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="marval<?php echo $index?>"><?php
$mar= $mar + number_format($result->vMarch,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_month?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a></span>
</td>
<td style="text-align:right;"><?php
<td style="text-align:right;"><span id="totalval<?php echo $index?>"><?php
$tot= $tot + number_format($result->vtotal,2,'.','');
?>
<a href="<?= base_url() ?>report/i_consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a>
<a href="<?= base_url() ?>report/i_consolidate_year?ab=<?php echo $ab;?>&sid=<?php echo $result->sid;?>&mid=<?php echo $result->mid;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a></span>
</td>
</tr>
@ -716,7 +716,93 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
var april_sum=0;
var may_sum=0;
var june_sum = 0;
var july_sum = 0;
var aug_sum = 0;
var sep_sum=0;
var oct_sum =0;
var nov_sum =0;
var dec_sum=0;
var jan_sum=0;
var feb_sum=0;
var mar_sum=0;
var total_sum=0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var april= $('#april_qty'+count).text();
var may = $('#may_qty'+count).text();
var june = $('#june_qty'+count).text();
var july = $('#july_qty'+count).text();
var aug = $('#aug_qty'+count).text();
var sep = $('#sep_qty'+count).text();
var oct = $('#oct_qty'+count).text();
var nov = $('#nov_qty'+count).text();
var dec = $('#dec_qty'+count).text();
var jan = $('#jan_qty'+count).text();
var feb = $('#feb_qty'+count).text();
var mar = $('#mar_qty'+count).text();
var tot = $('#tot_qty'+count).text();
april_sum += +april;
may_sum += +may;
june_sum += +june;
july_sum += +july;
aug_sum += +aug;
sep_sum += +sep;
oct_sum += +oct;
nov_sum += +nov;
dec_sum += + dec;
jan_sum += +jan;
feb_sum += +feb;
mar_sum += +mar;
total_sum += +tot;
}
var api = this.api(), data;
var Final_april_total =parseInt(april_sum);
var Final_may_total = parseInt(may_sum);
var Final_june_total = parseInt(june_sum);
var Final_july_total = parseInt(july_sum);
var Final_aug_total = parseInt(aug_sum);
var Final_sep_total = parseInt(sep_sum);
var Final_oct_total = parseInt(oct_sum);
var Final_nov_total = parseInt(nov_sum);
var Final_dec_total = parseInt(dec_sum);
var Final_jan_total = parseInt(jan_sum);
var Final_feb_total = parseInt(feb_sum);
var Final_mar_total = parseInt(mar_sum);
var Final_tot = parseInt(total_sum);
$( api.column( 2 ).footer() ).html( Final_april_total.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( Final_may_total.toFixed(2).bold() );
$( api.column( 4 ).footer() ).html( Final_june_total.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( Final_july_total.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( Final_aug_total.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( Final_sep_total.toFixed(2).bold() );
$( api.column( 8 ).footer() ).html( Final_oct_total.toFixed(2).bold() );
$( api.column( 9 ).footer() ).html( Final_nov_total.toFixed(2).bold() );
$( api.column( 10 ).footer() ).html( Final_dec_total.toFixed(2).bold() );
$( api.column( 11 ).footer() ).html( Final_jan_total.toFixed(2).bold() );
$( api.column( 12 ).footer() ).html( Final_feb_total.toFixed(2).bold() );
$( api.column( 13 ).footer() ).html( Final_mar_total.toFixed(2).bold() );
$( api.column( 14 ).footer() ).html( Final_tot.toFixed(2).bold() );
}
} );
} );
$(document).ready(function() {
@ -739,6 +825,95 @@ $(document).ready(function() {
'colvis'
],
"footerCallback": function ( row, data, start, end, display )
{
var aprilval_sum =0;
var mayval_sum =0;
var juneval_sum =0;
var julyval_sum =0;
var augval_sum =0;
var sepval_sum =0;
var octval_sum =0;
var novval_sum =0;
var decval_sum =0;
var janval_sum =0;
var febval_sum =0;
var marval_sum =0;
var totalval_sum =0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var aprilv= $('#aprilval'+count).text();
var mayv = $('#mayval'+count).text();
var junev = $('#juneval'+count).text();
var julyv = $('#julyval'+count).text();
var augv = $('#augval'+count).text();
var sepv = $('#sepval'+count).text();
var octv = $('#octval'+count).text();
var novv = $('#novval'+count).text();
var decv = $('#decval'+count).text();
var janv = $('#janval'+count).text();
var febv = $('#febval'+count).text();
var marv = $('#marval'+count).text();
var totv = $('#totalval'+count).text();
aprilval_sum += +aprilv;
mayval_sum += +mayv;
juneval_sum += +junev;
julyval_sum += +julyv;
augval_sum += +augv;
sepval_sum += +sepv;
octval_sum += +octv;
novval_sum += +novv;
decval_sum += + decv;
janval_sum += +janv;
febval_sum += +febv;
marval_sum += +marv;
totalval_sum += +totv;
}
var api = this.api(), data;
var Final_april_total =parseInt(aprilval_sum);
var Final_may_total = parseInt(mayval_sum);
var Final_june_total = parseInt(juneval_sum);
var Final_july_total = parseInt(julyval_sum);
var Final_aug_total = parseInt(augval_sum);
var Final_sep_total = parseInt(sepval_sum);
var Final_oct_total = parseInt(octval_sum);
var Final_nov_total = parseInt(novval_sum);
var Final_dec_total = parseInt(decval_sum);
var Final_jan_total = parseInt(janval_sum);
var Final_feb_total = parseInt(febval_sum);
var Final_mar_total = parseInt(marval_sum);
var Final_tot = parseInt(totalval_sum);
$( api.column( 2 ).footer() ).html( Final_april_total.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( Final_may_total.toFixed(2).bold() );
$( api.column( 4 ).footer() ).html( Final_june_total.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( Final_july_total.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( Final_aug_total.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( Final_sep_total.toFixed(2).bold() );
$( api.column( 8 ).footer() ).html( Final_oct_total.toFixed(2).bold() );
$( api.column( 9 ).footer() ).html( Final_nov_total.toFixed(2).bold() );
$( api.column( 10 ).footer() ).html( Final_dec_total.toFixed(2).bold() );
$( api.column( 11 ).footer() ).html( Final_jan_total.toFixed(2).bold() );
$( api.column( 12 ).footer() ).html( Final_feb_total.toFixed(2).bold() );
$( api.column( 13 ).footer() ).html( Final_mar_total.toFixed(2).bold() );
$( api.column( 14 ).footer() ).html( Final_tot.toFixed(2).bold() );
}
// columns:[
// { id:"col1", width:2 }
// ]

View File

@ -183,88 +183,88 @@ table.dataTable thead > tr > td.sorting {
$mar = 0;
$tot = 0;
$ab=$this->input->post('financialyear');
foreach ($spurchse as $result) { ?>
foreach ($spurchse as $index=>$result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo $result->category;?> </a>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="april_qty<?php echo $index?>">
<?php
$apr= $apr + round($result->April);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo round($result->April);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="may_qty<?php echo $index?>">
<?php
$may= $may + round($result->May);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo round($result->May);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="june_qty<?php echo $index?>">
<?php
$jun= $jun + round($result->June);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo round($result->June);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="july_qty<?php echo $index?>">
<?php
$jul= $jul + round($result->July);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo round($result->July);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="aug_qty<?php echo $index?>">
<?php
$aug= $aug + round($result->August);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo round($result->August);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="sep_qty<?php echo $index?>">
<?php
$sep= $sep + $result->September;
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo round($result->September);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="oct_qty<?php echo $index?>">
<?php
$oct= $oct + round($result->October);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo round($result->October);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="nov_qty<?php echo $index?>">
<?php
$nov= $nov + round($result->November);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo round($result->November);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="dec_qty<?php echo $index?>">
<?php
$dec= $dec + round($result->December);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo round($result->December);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="jan_qty<?php echo $index?>">
<?php
$jan= $jan + round($result->January);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo round($result->January);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="feb_qty<?php echo $index?>">
<?php
$feb= $feb + round($result->February);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo round($result->February);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="mar_qty<?php echo $index?>">
<?php
$mar= $mar + round($result->March);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo round($result->March);?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="tot_qty<?php echo $index?>">
<?php
$tot= $tot + round($result->qtotal);
?>
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo round($result->qtotal);?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo round($result->qtotal);?> </a></span>
</td>
</tr>
@ -451,88 +451,88 @@ table.dataTable thead > tr > td.sorting {
$feb = 0;
$mar = 0;
$tot = 0;
foreach ($spurchse as $result) { ?>
foreach ($spurchse as $index=>$result) { ?>
<tr>
<td style="text-align:left;">
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo $result->category;?> </a>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="aprilval<?php echo $index?>">
<?php
$apr= $apr + number_format($result->vApril,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'April';?>"><?php echo number_format($result->vApril,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="mayval<?php echo $index?>">
<?php
$may= $may + number_format($result->vMay,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'May';?>"><?php echo number_format($result->vMay,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id ="juneval<?php echo $index?>">
<?php
$jun= $jun + number_format($result->vJune,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'June';?>"><?php echo number_format($result->vJune,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="julyval<?php echo $index?>">
<?php
$jul= $jul + number_format($result->vJuly,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'July';?>"><?php echo number_format($result->vJuly,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="augval<?php echo $index?>">
<?php
$aug= $aug + number_format($result->vAugust,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'August';?>"><?php echo number_format($result->vAugust,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="sepval<?php echo $index?>">
<?php
$sep= $sep + number_format($result->vSeptember,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'September';?>"><?php echo number_format($result->vSeptember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="octval<?php echo $index?>">
<?php
$oct= $oct + number_format($result->vOctober,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'October';?>"><?php echo number_format($result->vOctober,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="novval<?php echo $index?>">
<?php
$nov= $nov + number_format($result->vNovember,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'November';?>"><?php echo number_format($result->vNovember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="decval<?php echo $index?>">
<?php
$dec= $dec + number_format($result->vDecember,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'December';?>"><?php echo number_format($result->vDecember,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="janval<?php echo $index?>">
<?php
$jan= $jan + number_format($result->vJanuary,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'January';?>"><?php echo number_format($result->vJanuary,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="febval<?php echo $index?>">
<?php
$feb= $feb + number_format($result->vFebruary,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'February';?>"><?php echo number_format($result->vFebruary,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="marval<?php echo $index?>">
<?php
$mar= $mar + number_format($result->vMarch,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_month?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>&m=<?php echo 'March';?>"><?php echo number_format($result->vMarch,2,'.','');?> </a></span>
</td>
<td style="text-align:right;">
<td style="text-align:right;"><span id="totalval<?php echo $index?>">
<?php
$tot= $tot + number_format($result->vtotal,2,'.','');
?>
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a>
<a href="<?= base_url() ?>report/rawi_consolidate_year?ab=<?php echo $ab;?>&cat=<?php echo $result->category;?>"><?php echo number_format($result->vtotal,2,'.','');?> </a></span>
</td>
</tr>
@ -720,7 +720,97 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
var april_sum=0;
var may_sum=0;
var june_sum = 0;
var july_sum = 0;
var aug_sum = 0;
var sep_sum=0;
var oct_sum =0;
var nov_sum =0;
var dec_sum=0;
var jan_sum=0;
var feb_sum=0;
var mar_sum=0;
var total_sum=0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var april= $('#april_qty'+count).text();
var may = $('#may_qty'+count).text();
var june = $('#june_qty'+count).text();
var july = $('#july_qty'+count).text();
var aug = $('#aug_qty'+count).text();
var sep = $('#sep_qty'+count).text();
var oct = $('#oct_qty'+count).text();
var nov = $('#nov_qty'+count).text();
var dec = $('#dec_qty'+count).text();
var jan = $('#jan_qty'+count).text();
var feb = $('#feb_qty'+count).text();
var mar = $('#mar_qty'+count).text();
var tot = $('#tot_qty'+count).text();
april_sum += +april;
may_sum += +may;
june_sum += +june;
july_sum += +july;
aug_sum += +aug;
sep_sum += +sep;
oct_sum += +oct;
nov_sum += +nov;
dec_sum += + dec;
jan_sum += +jan;
feb_sum += +feb;
mar_sum += +mar;
total_sum += +tot;
}
var api = this.api(), data;
var Final_april_total =parseInt(april_sum);
var Final_may_total = parseInt(may_sum);
var Final_june_total = parseInt(june_sum);
var Final_july_total = parseInt(july_sum);
var Final_aug_total = parseInt(aug_sum);
var Final_sep_total = parseInt(sep_sum);
var Final_oct_total = parseInt(oct_sum);
var Final_nov_total = parseInt(nov_sum);
var Final_dec_total = parseInt(dec_sum);
var Final_jan_total = parseInt(jan_sum);
var Final_feb_total = parseInt(feb_sum);
var Final_mar_total = parseInt(mar_sum);
var Final_tot = parseInt(total_sum);
// console.log(Final_jan_total);
$( api.column( 1 ).footer() ).html( Final_april_total.toFixed(2).bold() );
$( api.column( 2 ).footer() ).html( Final_may_total.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( Final_june_total.toFixed(2).bold() );
$( api.column( 4 ).footer() ).html( Final_july_total.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( Final_aug_total.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( Final_sep_total.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( Final_oct_total.toFixed(2).bold() );
$( api.column( 8 ).footer() ).html( Final_nov_total.toFixed(2).bold() );
$( api.column( 9 ).footer() ).html( Final_dec_total.toFixed(2).bold() );
$( api.column( 10 ).footer() ).html( Final_jan_total.toFixed(2).bold() );
$( api.column( 11 ).footer() ).html( Final_feb_total.toFixed(2).bold() );
$( api.column( 12 ).footer() ).html( Final_mar_total.toFixed(2).bold() );
$( api.column( 13 ).footer() ).html( Final_tot.toFixed(2).bold() );
}
} );
} );
$(document).ready(function() {
@ -742,7 +832,94 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
var aprilval_sum =0;
var mayval_sum =0;
var juneval_sum =0;
var julyval_sum =0;
var augval_sum =0;
var sepval_sum =0;
var octval_sum =0;
var novval_sum =0;
var decval_sum =0;
var janval_sum =0;
var febval_sum =0;
var marval_sum =0;
var totalval_sum =0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var aprilv= $('#aprilval'+count).text();
var mayv = $('#mayval'+count).text();
var junev = $('#juneval'+count).text();
var julyv = $('#julyval'+count).text();
var augv = $('#augval'+count).text();
var sepv = $('#sepval'+count).text();
var octv = $('#octval'+count).text();
var novv = $('#novval'+count).text();
var decv = $('#decval'+count).text();
var janv = $('#janval'+count).text();
var febv = $('#febval'+count).text();
var marv = $('#marval'+count).text();
var totv = $('#totalval'+count).text();
aprilval_sum += +aprilv;
mayval_sum += +mayv;
juneval_sum += +junev;
julyval_sum += +julyv;
augval_sum += +augv;
sepval_sum += +sepv;
octval_sum += +octv;
novval_sum += +novv;
decval_sum += + decv;
janval_sum += +janv;
febval_sum += +febv;
marval_sum += +marv;
totalval_sum += +totv;
}
var api = this.api(), data;
var Final_april_total =parseInt(aprilval_sum);
var Final_may_total = parseInt(mayval_sum);
var Final_june_total = parseInt(juneval_sum);
var Final_july_total = parseInt(julyval_sum);
var Final_aug_total = parseInt(augval_sum);
var Final_sep_total = parseInt(sepval_sum);
var Final_oct_total = parseInt(octval_sum);
var Final_nov_total = parseInt(novval_sum);
var Final_dec_total = parseInt(decval_sum);
var Final_jan_total = parseInt(janval_sum);
var Final_feb_total = parseInt(febval_sum);
var Final_mar_total = parseInt(marval_sum);
var Final_tot = parseInt(totalval_sum);
$( api.column( 1 ).footer() ).html( Final_april_total.toFixed(2).bold() );
$( api.column( 2 ).footer() ).html( Final_may_total.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( Final_june_total.toFixed(2).bold() );
$( api.column( 4 ).footer() ).html( Final_july_total.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( Final_aug_total.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( Final_sep_total.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( Final_oct_total.toFixed(2).bold() );
$( api.column( 8 ).footer() ).html( Final_nov_total.toFixed(2).bold() );
$( api.column( 9 ).footer() ).html( Final_dec_total.toFixed(2).bold() );
$( api.column( 10 ).footer() ).html( Final_jan_total.toFixed(2).bold() );
$( api.column( 11 ).footer() ).html( Final_feb_total.toFixed(2).bold() );
$( api.column( 12 ).footer() ).html( Final_mar_total.toFixed(2).bold() );
$( api.column( 13 ).footer() ).html( Final_tot.toFixed(2).bold() );
}
} );
} );

View File

@ -98,7 +98,7 @@ if(!empty($mms))
}
$ab=$yearl;
foreach($cum as $rel)
foreach($cum as $index=>$rel)
{
?>
<tr>
@ -106,22 +106,22 @@ if(!empty($mms))
<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
<td style="text-align:right"><span id="d_qty<?php echo $index;?>"><?php
$tqt= $tqt + round($rel->tquantity);
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,round($rel->tquantity));?></span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="d_value<?php echo $index?>"><?php
$tvt= $tvt + number_format($rel->ttotal,2,'.','');
echo anchor('report/icum_day/'.$rel->sid . '/' . $rel->mid,number_format($rel->ttotal,2,'.',''));?></span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="m_quty<?php echo $index?>"><?php
$mqt= $mqt + round($rel->mquantity);
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,round($rel->mquantity));?></span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="m_value<?php echo $index?>"><?php
$mvt= $mvt + number_format($rel->mtotal,2,'.','');
echo anchor('report/icum_month/'.$rel->sid . '/' . $rel->mid,number_format($rel->mtotal,2,'.',''));?></span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="y_qty<?php echo $index?>"><?php
$yqt= $yqt + round($rel->quantity);
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,round($rel->quantity));?></span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="y_value<?php echo $index;?>"><?php
$yvt= $yvt + number_format($rel->total,2,'.','');
echo anchor('report/icum_year/'.$rel->sid . '/' . $rel->mid,number_format($rel->total,2,'.',''));?></span></td>
@ -261,7 +261,58 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
var m_qsum =0;
var d_qsum= 0;
var d_valuesum= 0;
var m_valuesum= 0;
var y_quty=0;
var year_value = 0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var te= $('#m_quty'+count).text();
var dte= $('#d_qty'+count).text();
var dvte= $('#d_value'+count).text();
var m_value= $('#m_value'+count).text();
var y_qty= $('#y_qty'+count).text();
var y_value = $('#y_value'+count).text();
m_qsum += +te;
d_qsum += +dte;
d_valuesum += +dvte;
m_valuesum += +m_value;
y_quty += +y_qty;
year_value += +y_value;
}
var FinalTotal =parseInt(m_qsum);
var DailyFinalToatal=parseInt(d_qsum);
var DailyvalueFinalTotal=parseInt(d_valuesum);
var MonthlyValueFinal = parseInt(m_valuesum);
var yearlyFinalQty = parseInt(y_quty);
var yearlyValueFinal = parseInt(year_value);
var api = this.api(), data;
$( api.column( 4 ).footer() ).html( FinalTotal.toFixed(2).bold() );
$( api.column( 2 ).footer() ).html( DailyFinalToatal.toFixed(2).bold() );
$( api.column( 3 ).footer() ).html( DailyvalueFinalTotal.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( MonthlyValueFinal.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( yearlyFinalQty.toFixed(2).bold() );
$( api.column( 7 ).footer() ).html( yearlyValueFinal.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){

View File

@ -98,7 +98,7 @@ if(!empty($mms))
$ab=$yearl;
foreach($cum as $rel)
foreach($cum as $index=>$rel)
{
$cat = $rel->category;
?>
@ -109,33 +109,33 @@ if(!empty($mms))
<td><span>
<a href="<?= base_url() ?>report/ilink_purchase?ab=<?php echo $ab;?>&cat=<?php echo $rel->category;?>"><?php echo $rel->category;?></a>
</span></td>
<td style="text-align:right"><span>
<td style="text-align:right"><span id="d_qty<?php echo $index;?>">
<?php
$tqt= $tqt + round($rel->tquantity);
?>
<a href="<?= base_url() ?>report/rawi_cum_day?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->tquantity);?></a>
</span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="d_value<?php echo $index?>"><?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;?>"><?php echo number_format($rel->ttotal,2,'.','');?></a>
</span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="m_quty<?php echo $index?>"><?php
$mqt= $mqt + round($rel->mquantity);
?>
<a href="<?= base_url() ?>report/rawi_cum_month?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->mquantity);?></a>
</span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="m_value<?php echo $index?>"><?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;?>"><?php echo number_format($rel->mtotal,2,'.','');?></a>
</span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="y_qty<?php echo $index?>"><?php
$yqt= $yqt + round($rel->quantity);
?>
<a href="<?= base_url() ?>report/rawi_cum_year?cat=<?php echo $rel->category;?>&ab=<?php echo $ab;?>"><?php echo round($rel->quantity);?></a>
</span></td>
<td style="text-align:right"><span><?php
<td style="text-align:right"><span id="y_value<?php echo $index;?>"><?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;?>"><?php echo number_format($rel->total,2,'.','');?></a>
@ -269,7 +269,57 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
var table = $('#cc').DataTable();
var m_qsum =0;
var d_qsum= 0;
var d_valuesum= 0;
var m_valuesum= 0;
var y_quty=0;
var year_value = 0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var te= $('#m_quty'+count).text();
var dte= $('#d_qty'+count).text();
var dvte= $('#d_value'+count).text();
var m_value= $('#m_value'+count).text();
var y_qty= $('#y_qty'+count).text();
var y_value = $('#y_value'+count).text();
m_qsum += +te;
d_qsum += +dte;
d_valuesum += +dvte;
m_valuesum += +m_value;
y_quty += +y_qty;
year_value += +y_value;
}
var api = this.api(), data;
var FinalTotal =parseInt(m_qsum);
var DailyFinalToatal=parseInt(d_qsum);
var DailyvalueFinalTotal=parseInt(d_valuesum);
var MonthlyValueFinal = parseInt(m_valuesum);
var yearlyFinalQty = parseInt(y_quty);
var yearlyValueFinal = parseInt(year_value);
$( api.column( 3 ).footer() ).html( FinalTotal.toFixed(2).bold() );
$( api.column( 1 ).footer() ).html( DailyFinalToatal.toFixed(2).bold() );
$( api.column( 2 ).footer() ).html( DailyvalueFinalTotal.toFixed(2).bold() );
$( api.column( 4 ).footer() ).html( MonthlyValueFinal.toFixed(2).bold() );
$( api.column( 5 ).footer() ).html( yearlyFinalQty.toFixed(2).bold() );
$( api.column( 6 ).footer() ).html( yearlyValueFinal.toFixed(2).bold() );
}
} );
} );
$('#mySelect').on('change',function(){

278
application/views/cashbook_cumulative_month_report.php Executable file → Normal file
View File

@ -1,8 +1,4 @@
<?php
$tiapr=0.00;$timay=0.00;$tijun=0.00;$tijul=0.00;$tiaug=0.00;$tisep=0.00;$tioct=0.00;$tinov=0.00;$tidec=0.00;
$teapr=0.00;$temay=0.00;$tejun=0.00;$tejul=0.00;$teaug=0.00;$tesep=0.00;$teoct=0.00;$tenov=0.00;$tedec=0.00;
$tinjan=0.00;$tinfeb=0.00;$tinmar=0.00;$rowwiseincome = 0.00;
$texjan=0.00;$texfeb=0.00;$texmar=0.00;$rowwiseexpense = 0.00;
if (date('m') >= 4) {
$yearl = date('Y').'-'.(date('Y')+1);
} else {
@ -46,7 +42,7 @@ if (date('m') >= 4) {
<div class="col-md-12">
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook - Cumulative Monthwise Report
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook - Cumulative Monthwise Report
<!-- ( <?php echo $fa.'-'.$aa; ?> ) -->
<?php
if($this->input->post('client_name')){
@ -174,71 +170,49 @@ if (date('m') >= 4) {
<?php
if(!empty($datas)){
foreach($datas as $d)
foreach($datas as $index=> $d)
{
?>
<tr>
<td><?php echo $d->name; ?></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'April' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tiapr= $tiapr + number_format($d->AprilIncome,2,'.',''); echo number_format($d->AprilIncome,2,'.',''); ?></span></a></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'April' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $teapr= $teapr + number_format($d->AprilExpense,2,'.',''); echo number_format($d->AprilExpense,2,'.',''); ?></span></a></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'May' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $timay= $timay + number_format($d->MayIncome,2,'.',''); echo number_format($d->MayIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'May' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $temay= $temay + number_format($d->MayExpense,2,'.',''); echo number_format($d->MayExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'June' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tijun= $tijun + number_format($d->JuneIncome,2,'.',''); echo number_format($d->JuneIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'June' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tejun= $tejun + number_format($d->JuneExpense,2,'.',''); echo number_format($d->JuneExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'July' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tijul= $tijul + number_format($d->JulyIncome,2,'.',''); echo number_format($d->JulyIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'July' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tejul= $tejul + number_format($d->JulyExpense,2,'.',''); echo number_format($d->JulyExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'August' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tiaug= $tiaug + number_format($d->AugustIncome,2,'.',''); echo number_format($d->AugustIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'August' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $teaug= $teaug + number_format($d->AugustExpense,2,'.',''); echo number_format($d->AugustExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'September' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tisep= $tisep + number_format($d->SepIncome,2,'.',''); echo number_format($d->SepIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'September' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tesep= $tesep + number_format($d->SepExpense,2,'.',''); echo number_format($d->SepExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'October' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tioct= $tioct + number_format($d->OctIncome,2,'.',''); echo number_format($d->OctIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'October' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $teoct= $teoct + number_format($d->OctExpense,2,'.',''); echo number_format($d->OctExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'November' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinov= $tinov + number_format($d->NovIncome,2,'.',''); echo number_format($d->NovIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'November' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tenov= $tenov + number_format($d->NovExpense,2,'.',''); echo number_format($d->NovExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'December' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tidec= $tidec + number_format($d->DecIncome,2,'.',''); echo number_format($d->DecIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'December' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tedec= $tedec + number_format($d->DecExpense,2,'.',''); echo number_format($d->DecExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'January' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinjan= $tinjan + number_format($d->JanIncome,2,'.',''); echo number_format($d->JanIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'January' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $texjan= $texjan + number_format($d->JanExpense,2,'.',''); echo number_format($d->JanExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'February' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinfeb= $tinfeb + number_format($d->FebIncome,2,'.',''); echo number_format($d->FebIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'February' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $texfeb= $texfeb + number_format($d->FebExpense,2,'.',''); echo number_format($d->FebExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'March' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinmar= $tinmar + number_format($d->MarIncome,2,'.',''); echo number_format($d->MarIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'March' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $texmar= $texmar + number_format($d->MarExpense,2,'.',''); echo number_format($d->MarExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $rowwiseincome = $rowwiseincome + number_format($d->receiptoverall,2,'.',''); echo number_format($d->receiptoverall,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $rowwiseexpense = $rowwiseexpense + number_format($d->paymentoverall,2,'.',''); echo number_format($d->paymentoverall,2,'.',''); ?></span></td>
<td id ="aprin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'April' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->AprilIncome,2,'.',''); ?></span></a></td>
<td id ="aprex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'April' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->AprilExpense,2,'.',''); ?></span></a></td>
<td id ="mayin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'May' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->MayIncome,2,'.',''); ?></span></td>
<td id ="mayex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'May' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->MayExpense,2,'.',''); ?></span></td>
<td id ="junin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'June' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->JuneIncome,2,'.',''); ?></span></td>
<td id ="junex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'June' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->JuneExpense,2,'.',''); ?></span></td>
<td id ="jlyin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'July' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->JulyIncome,2,'.',''); ?></span></td>
<td id ="jlyex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'July' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->JulyExpense,2,'.',''); ?></span></td>
<td id ="augin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'August' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->AugustIncome,2,'.',''); ?></span></td>
<td id ="augex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'August' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->AugustExpense,2,'.',''); ?></span></td>
<td id ="sepin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'September' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->SepIncome,2,'.',''); ?></span></td>
<td id ="sepex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'September' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->SepExpense,2,'.',''); ?></span></td>
<td id ="octin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'October' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->OctIncome,2,'.',''); ?></span></td>
<td id ="octex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'October' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->OctExpense,2,'.',''); ?></span></td>
<td id ="novin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'November' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->NovIncome,2,'.',''); ?></span></td>
<td id ="novex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'November' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->NovExpense,2,'.',''); ?></span></td>
<td id ="decin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'December' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->DecIncome,2,'.',''); ?></span></td>
<td id ="decex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'December' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->DecExpense,2,'.',''); ?></span></td>
<td id ="janin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'January' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->JanIncome,2,'.',''); ?></span></td>
<td id ="janex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'January' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->JanExpense,2,'.',''); ?></span></td>
<td id ="febin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'February' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->FebIncome,2,'.',''); ?></span></td>
<td id ="febex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'February' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->FebExpense,2,'.',''); ?></span></td>
<td id ="marin<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'March' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->MarIncome,2,'.',''); ?></span></td>
<td id ="marex<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'March' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->MarExpense,2,'.',''); ?></span></td>
<td id ="totalincome<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->receiptoverall,2,'.',''); ?></span></td>
<td id ="totalexpense<?= $index ?>"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php echo number_format($d->paymentoverall,2,'.',''); ?></span></td>
</tr>
<?php } ?>
</tbody>
<tfoot width="100%">
<tr>
<td><b><?php echo "TOTAL" ?></b></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'April' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tiapr,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'April' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($teapr,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'May' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($timay,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'May' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($temay,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'June' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tijun,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'June' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tejun,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'July' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tijul,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'July' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tejul,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'August' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tiaug,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'August' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($teaug,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'September' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tisep,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'September' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tesep,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'October' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tioct,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'October' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($teoct,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'November' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinov,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'November' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tenov,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'December' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tidec,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'December' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tedec,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'January' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinjan,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'January' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($texjan,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'February' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinfeb,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'February' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($texfeb,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'March' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinmar,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'March' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($texmar,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($rowwiseincome,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($rowwiseexpense,2,'.',''); ?></b></span></td>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td>
</tr>
</tfoot>
<?php } ?>
@ -288,10 +262,192 @@ $(document).ready(function() {
},
'colvis'
]
],
"footerCallback": function ( row, data, start, end, display )
{
} );
} );
var april_income_sum =0;
var april_expense_sum= 0;
var may_income_sum =0;
var may_expense_sum= 0;
var june_income_sum =0;
var june_expense_sum= 0;
var july_income_sum =0;
var july_expense_sum= 0;
var august_income_sum =0;
var august_expense_sum= 0;
var september_income_sum =0;
var september_expense_sum= 0;
var october_income_sum =0;
var october_expense_sum= 0;
var november_income_sum =0;
var november_expense_sum= 0;
var december_income_sum =0;
var december_expense_sum= 0;
var january_income_sum =0;
var january_expense_sum= 0;
var february_income_sum =0;
var february_expense_sum= 0;
var march_income_sum =0;
var march_expense_sum= 0;
var finalTotal_income_sum =0;
var finalTotal_expense_sum= 0;
for(var j = 0;j<=display.length-1;j++)
{
var count = display[j];
var april_income_value = $('#aprin'+count).text();
var april_expense_value= $('#aprex'+count).text();
var may_income_value = $('#mayin'+count).text();
var may_expense_value= $('#mayex'+count).text();
var june_income_value = $('#junin'+count).text();
var june_expense_value= $('#junex'+count).text();
var july_income_value = $('#jlyin'+count).text();
var july_expense_value= $('#jlyex'+count).text();
var august_income_value = $('#augin'+count).text();
var august_expense_value= $('#augex'+count).text();
var september_income_value = $('#sepin'+count).text();
var september_expense_value= $('#sepex'+count).text();
var october_income_value = $('#octin'+count).text();
var october_expense_value= $('#octex'+count).text();
var november_income_value = $('#novin'+count).text();
var november_expense_value= $('#novex'+count).text();
var december_income_value = $('#decin'+count).text();
var december_expense_value= $('#decex'+count).text();
var january_income_value = $('#janin'+count).text();
var january_expense_value= $('#janex'+count).text();
var february_income_value = $('#febin'+count).text();
var february_expense_value= $('#febex'+count).text();
var march_income_value = $('#marin'+count).text();
var march_expense_value= $('#marex'+count).text();
var finalTotal_income_value = $('#totalincome'+count).text();
var finalTotal_expense_value= $('#totalexpense'+count).text();
april_income_sum += +april_income_value;
april_expense_sum += +april_expense_value;
may_income_sum += +may_income_value;
may_expense_sum += +may_expense_value;
june_income_sum += +june_income_value;
june_expense_sum += +june_expense_value;
july_income_sum += +july_income_value;
july_expense_sum += +july_expense_value;
august_income_sum += +august_income_value;
august_expense_sum += +august_expense_value;
september_income_sum += +september_income_value;
september_expense_sum += +september_expense_value;
october_income_sum += +october_income_value;
october_expense_sum += +october_expense_value;
november_income_sum += +november_income_value;
november_expense_sum += +november_expense_value;
december_income_sum += +december_income_value;
december_expense_sum += +december_expense_value;
january_income_sum += +january_income_value;
january_expense_sum += +january_expense_value;
february_income_sum += +february_income_value;
february_expense_sum += +february_expense_value;
march_income_sum += +march_income_value;
march_expense_sum += +march_expense_value;
finalTotal_income_sum += +finalTotal_income_value;
finalTotal_expense_sum += +finalTotal_expense_value;
}
var api = this.api(), data;
$( api.column( 1 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'April' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(april_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 2 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'April' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(april_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 3 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'May' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(may_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 4 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'May' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(may_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 5 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'June' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(june_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 6 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'June' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(june_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 7 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'July' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(july_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 8 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'July' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(july_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 9 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'August' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(august_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 10 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'August' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(august_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 11 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'September' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(september_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 12 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'September' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(september_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 13 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'October' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(october_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 14 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'October' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(october_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 15 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'November' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(november_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 16 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'November' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(november_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 17 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'December' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(december_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 18 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'December' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(december_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 19 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'January' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(january_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 20 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'January' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(january_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 21 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'February' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(february_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 22 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'February' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(february_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 23 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'March' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(march_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 24 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'March' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(march_expense_sum).toFixed(2).bold()+'</a>' );
$( api.column( 25 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(finalTotal_income_sum).toFixed(2).bold()+'</a>' );
$( api.column( 26 ).footer() ).html( "<a href=<?php echo base_url(); ?>report/cashbookdepartment?c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>>"+parseInt(finalTotal_expense_sum).toFixed(2).bold()+'</a>' );
}
} );
} );
</script>

View File

@ -0,0 +1,297 @@
<?php
$tiapr=0.00;$timay=0.00;$tijun=0.00;$tijul=0.00;$tiaug=0.00;$tisep=0.00;$tioct=0.00;$tinov=0.00;$tidec=0.00;
$teapr=0.00;$temay=0.00;$tejun=0.00;$tejul=0.00;$teaug=0.00;$tesep=0.00;$teoct=0.00;$tenov=0.00;$tedec=0.00;
$tinjan=0.00;$tinfeb=0.00;$tinmar=0.00;$rowwiseincome = 0.00;
$texjan=0.00;$texfeb=0.00;$texmar=0.00;$rowwiseexpense = 0.00;
if (date('m') >= 4) {
$yearl = date('Y').'-'.(date('Y')+1);
} else {
$yearl = (date('Y')-1).'-'.date('Y');
}
$ab=$yearl;
$fa=substr($ab,0,-5);
$aa=substr($ab,5,5);
?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
.btn-success {
background-color: #3c8dbc;
border-color: #3c8dbc;
}
</style>
<div class="content-wrapper">
<section class="content">
<div class="row" style="min-height: 600px;">
<div class="col-md-12">
<div class="box box-info">
<div class="box-header with-border">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook - Cumulative Monthwise Report
<!-- ( <?php echo $fa.'-'.$aa; ?> ) -->
<?php
if($this->input->post('client_name')){
$cl=$this->input->post('client_name');
echo '('.$cl.')';
}
if($this->input->post('financialyear')){
$ab=$this->input->post('financialyear');
echo '('.$ab.')';
}
?></b></p></h3></center>
</div>
<div class="panel-body">
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<div class="form-group has-feedback">
<div class="col-md-4">
<label for="client_name">
<?php echo 'Account Name'; ?>
</label>
<div class="input-group">
<select class="form-control" id="client_name" name="client_name">
<option value="">Select Account Name</option>
<?php
foreach($accountname as $item):
{?>
<option value="<?php echo $item->name;?>"><?php echo $item->name ; ?></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"></div>
<!-- <div class="col-md-2">
<br>
<label><input type="radio" name="colorRadio" id="value" onclick="toggleTables('2')" value="tab" checked> Recepit</label>
<label><input type="radio" name="colorRadio" id="qty" onclick="toggleTables('1')" value="ta" > Payment</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">
<div class = "table-responsive">
<table class="table table-bordered table-hover table-responsive" id="ccmonthwise" style="font-size:14px;">
<thead>
<tr>
<th style="text-align:center" rowspan="2">Account Name</th>
<th style="text-align:center" colspan="2">April</th>
<th style="text-align:center" colspan="2">May</th>
<th style="text-align:center" colspan="2">June</th>
<th style="text-align:center" colspan="2">July</th>
<th style="text-align:center" colspan="2">August</th>
<th style="text-align:center" colspan="2">September</th>
<th style="text-align:center" colspan="2">October</th>
<th style="text-align:center" colspan="2">November</th>
<th style="text-align:center" colspan="2">December</th>
<th style="text-align:center" colspan="2">January</th>
<th style="text-align:center" colspan="2">February</th>
<th style="text-align:center" colspan="2">March</th>
<th style="text-align:center" colspan="2">Total</th>
</tr>
<tr>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Recepit &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Recepit &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Recepit &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Receipt &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Recepit &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
<th style="text-align:center">Recepit &nbsp;(&#8377;)</th>
<th style="text-align:center">Payment &nbsp;(&#8377;)</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($datas)){
foreach($datas as $d)
{
?>
<tr>
<td><?php echo $d->name; ?></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'April' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tiapr= $tiapr + number_format($d->AprilIncome,2,'.',''); echo number_format($d->AprilIncome,2,'.',''); ?></span></a></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'April' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $teapr= $teapr + number_format($d->AprilExpense,2,'.',''); echo number_format($d->AprilExpense,2,'.',''); ?></span></a></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'May' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $timay= $timay + number_format($d->MayIncome,2,'.',''); echo number_format($d->MayIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'May' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $temay= $temay + number_format($d->MayExpense,2,'.',''); echo number_format($d->MayExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'June' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tijun= $tijun + number_format($d->JuneIncome,2,'.',''); echo number_format($d->JuneIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'June' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tejun= $tejun + number_format($d->JuneExpense,2,'.',''); echo number_format($d->JuneExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'July' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tijul= $tijul + number_format($d->JulyIncome,2,'.',''); echo number_format($d->JulyIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'July' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tejul= $tejul + number_format($d->JulyExpense,2,'.',''); echo number_format($d->JulyExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'August' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tiaug= $tiaug + number_format($d->AugustIncome,2,'.',''); echo number_format($d->AugustIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'August' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $teaug= $teaug + number_format($d->AugustExpense,2,'.',''); echo number_format($d->AugustExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'September' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tisep= $tisep + number_format($d->SepIncome,2,'.',''); echo number_format($d->SepIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'September' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tesep= $tesep + number_format($d->SepExpense,2,'.',''); echo number_format($d->SepExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'October' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tioct= $tioct + number_format($d->OctIncome,2,'.',''); echo number_format($d->OctIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'October' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $teoct= $teoct + number_format($d->OctExpense,2,'.',''); echo number_format($d->OctExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'November' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinov= $tinov + number_format($d->NovIncome,2,'.',''); echo number_format($d->NovIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'November' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tenov= $tenov + number_format($d->NovExpense,2,'.',''); echo number_format($d->NovExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'December' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tidec= $tidec + number_format($d->DecIncome,2,'.',''); echo number_format($d->DecIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'December' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tedec= $tedec + number_format($d->DecExpense,2,'.',''); echo number_format($d->DecExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'January' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinjan= $tinjan + number_format($d->JanIncome,2,'.',''); echo number_format($d->JanIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'January' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $texjan= $texjan + number_format($d->JanExpense,2,'.',''); echo number_format($d->JanExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'February' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinfeb= $tinfeb + number_format($d->FebIncome,2,'.',''); echo number_format($d->FebIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'February' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $texfeb= $texfeb + number_format($d->FebExpense,2,'.',''); echo number_format($d->FebExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'March' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $tinmar= $tinmar + number_format($d->MarIncome,2,'.',''); echo number_format($d->MarIncome,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&d=<?php echo 'March' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $texmar= $texmar + number_format($d->MarExpense,2,'.',''); echo number_format($d->MarExpense,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><?php $rowwiseincome = $rowwiseincome + number_format($d->receiptoverall,2,'.',''); echo number_format($d->receiptoverall,2,'.',''); ?></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $d->account_code;?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><?php $rowwiseexpense = $rowwiseexpense + number_format($d->paymentoverall,2,'.',''); echo number_format($d->paymentoverall,2,'.',''); ?></span></td>
</tr>
<?php } ?>
</tbody>
<tfoot width="100%">
<tr>
<td><b><?php echo "TOTAL" ?></b></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'April' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tiapr,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'April' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($teapr,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'May' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($timay,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'May' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($temay,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'June' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tijun,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'June' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tejun,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'July' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tijul,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'July' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tejul,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'August' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tiaug,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'August' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($teaug,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'September' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tisep,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'September' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tesep,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'October' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tioct,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'October' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($teoct,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'November' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinov,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'November' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tenov,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'December' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tidec,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'December' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tedec,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'January' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinjan,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'January' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($texjan,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'February' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinfeb,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'February' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($texfeb,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'March' ?>&c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($tinmar,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?d=<?php echo 'March' ?>&c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($texmar,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?c=<?php echo 'RECEIPT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($rowwiseincome,2,'.',''); ?></b></span></td>
<td><a href="<?php echo base_url(); ?>report/cashbookdepartment?c=<?php echo 'PAYMENT'; ?>&finyear=<?php echo $ab ?>"><span><b><?php echo number_format($rowwiseexpense,2,'.',''); ?></b></span></td>
</tr>
</tfoot>
<?php } ?>
</table>
</div>
</div>
</div><!-- /.box -->
</div><!-- /.col -->
</div>
</section>
</div>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
table = $('#ccmonthwise').DataTable( {
"language": {
"emptyTable": "<center> Data Not Found ! </center>"
},
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
//messageTop: $('h3').text(),
title: $('h3').text(),
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>