diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index 33ecb4c0..0f9b43c4 100755 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -949,6 +949,11 @@ class cashbook extends BaseController $data['balancetoclear'] =$_GET['balancetoclear']; $data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid); $data['mapping'] = $this->cashbook_model->debitpolist($bankid); + //print_r($data['mapping']); + //die(); + $data['mappingimage'] = $this->cashbook_model->debitimage($bankid); + //print_r( $data['mappingimage']);die(); + $data['paidcbook'] = $this->cashbook_model->cashbookamount($bankid); $data['paidpoamount'] = $this->cashbook_model->poamonut($bankid); $data['supplier'] = $this->cashbook_model->getsupplier(); diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 442c8720..2ff80d6f 100755 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -370,12 +370,12 @@ function receiptdata() function debitpolist($bankid) { $this->db->select('bp.id,bp.mid,bp.Podate,bp.PONO,bp.Suppliername,bp.Totalpoamount, - bp.Balancetopay,bp.Amountpaid,bp.IGRNO,bp.IGRLineItemNo'); + bp.Balancetopay,bp.Amountpaid,bp.IGRNO,bp.IGRLineItemNo,igrm.file'); $this->db->from ('T_Bankmappingpo bp'); - //$this->db->join ('T_IGR_Master igrm','igrm.IGRNO = bp.IGRNO','left'); + $this->db->join ('T_IGR_Master igrm','bp.IGRNO = igrm.IGRNO'); //$this->db->join ('T_IGR_Details igrde','igrde.IGRNO=igrm.IGRNO','left'); - //$this->db->join ('T_PurchaseOrder_BillUpload bu','bu.PONO = bp.PONO','left'); + // $this->db->join ('T_PurchaseOrder_BillUpload bu','bu.PONO = bp.PONO','left'); $this->db->where('bp.IsActive',1); $this->db->where('bp.mid',$bankid); // $this->db->where('igrde.BankStatus !=','ST072'); @@ -383,17 +383,33 @@ function debitpolist($bankid) $query = $this->db->get(); return $query->result(); - } + } + + //function for image + + function debitimage($bankid){ + $this->db->select('bp.PONO,bp.mid,bu.FilePath,bu.BillNo,bu.IGRNO'); + $this->db->from ('T_Bankmappingpo bp'); + $this->db->join ('T_PurchaseOrder_BillUpload bu','bp.PONO = bu.PONO'); + $this->db->where('bp.mid',$bankid); + $this->db->group_by('bu.BillNo'); + $query = $this->db->get(); + return $query->result(); + + } + + function debitpolistfilter($SupplierName,$fdate,$tdate) { $this->db->select('bm.id,bm.mid,bm.Podate,bm.PONO,bm.Suppliername,bm.Totalpoamount, - bm.Balancetopay,bm.Amountpaid,bm.IGRNO,igrm.file,igrde.IGRItemNo,br.Clearbalance,br.Balancetocleared'); + bm.Balancetopay,bm.Amountpaid,bm.IGRNO,igrm.file,igrde.IGRItemNo,br.Clearbalance,br.Balancetocleared,bu.FilePath,bu.BillNo,bu.IGRNO'); $this->db->from ('T_Bankmappingpo bm'); $this->db->join ('T_IGR_Master igrm','igrm.IGRNO = bm.IGRNO'); $this->db->join ('T_IGR_Details igrde','igrde.IGRNO=igrm.IGRNO'); $this->db->join ('T_SupplierDetailsN sd','sd.SupplierName = bm.Suppliername'); - $this->db->join ('T_bankreport br','br.ID=bm.mid'); + $this->db->join ('T_bankreport br','br.ID=bm.mid'); + $this->db->join ('T_PurchaseOrder_BillUpload bu','bm.PONO=bu.PONO'); if($fdate!='' && $tdate!='') { $this->db->where('bm.Podate BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"'); diff --git a/application/views/bankamountpaid.php b/application/views/bankamountpaid.php index f5d074d9..9f1abe1e 100644 --- a/application/views/bankamountpaid.php +++ b/application/views/bankamountpaid.php @@ -59,6 +59,76 @@ if(!empty($amountpaid))
+ @@ -137,6 +207,8 @@ if(!empty($amountpaid)) Balance To Pay (₹) Amount Paid (₹) + IGR File + PO File Action @@ -170,6 +242,33 @@ if(!empty($amountpaid)) Totalpoamount?> Balancetopay?> Amountpaid?> + file=='') + { + ?> + N/A + + + FilePath=='') + { + ?> + N/A + + +     diff --git a/application/views/banksettlement.php b/application/views/banksettlement.php index 8b736bb2..3251e177 100644 --- a/application/views/banksettlement.php +++ b/application/views/banksettlement.php @@ -64,6 +64,78 @@ if(!empty($mapping)) + + + + + Advance PO Amount (₹)--> Balance To Pay (₹) Amount Paid (₹) - File + IGR File + PO File Action @@ -233,7 +306,8 @@ if(!empty($mapping)) $tvt=0.00; if(!empty($mapping)){ foreach($mapping as $ap) - { + { + // print_r($mapping );die(); ?> @@ -252,7 +326,7 @@ if(!empty($mapping)) Balancetopay?> Amountpaid?> FilePath=='') + if($ap->file=='') { ?> No File @@ -264,13 +338,35 @@ if(!empty($mapping)) ?> - + + - + + FilePath=='') + { + ?> + N/A + + + + + +