diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index c18ca78b..df8d8e9f 100644 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -329,11 +329,11 @@ class cashbook extends BaseController } else { - + $cstatus='OPEN'; } // $IsActive=0; - $filedataupload= array('reportdate'=>$Date1,'valuedate'=>$Date2,'chequeNo'=>$cod,'Narration'=>$narration,'Cod'=> $chqno,'Debit'=>$debit,'Credit'=>$credit,'cbalancetocleared'=>$credit,'Balance'=>$balance,'Bankname'=>$bank); + $filedataupload= array('reportdate'=>$Date1,'valuedate'=>$Date2,'chequeNo'=>$cod,'Narration'=>$narration,'Cod'=> $chqno,'Debit'=>$debit,'Credit'=>$credit,'cbalancetocleared'=>$credit,'Balance'=>$balance,'Bankname'=>$bank,'Status'=>$Status,'cstatus'=>$cstatus); diff --git a/application/logs/log-2018-11-17.php b/application/logs/log-2018-11-17.php new file mode 100644 index 00000000..0d770722 --- /dev/null +++ b/application/logs/log-2018-11-17.php @@ -0,0 +1,104 @@ + + +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 2 +ERROR - 2018-11-17 16:17:36 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 2 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 237 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 243 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:36 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:17:37 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:18:22 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 2 +ERROR - 2018-11-17 16:18:22 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 2 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 2 +ERROR - 2018-11-17 16:18:29 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 2 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 237 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 243 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:29 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 236 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: aa C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: m C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: fdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 +ERROR - 2018-11-17 16:18:30 --> Severity: Notice --> Undefined variable: tdate C:\xampp\htdocs\siddharth_application\application\views\bankpaidsupp.php 311 diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 4e5e029d..82012e48 100644 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -309,10 +309,10 @@ function report_amountpaid(){ $sql="SELECT -CASE WHEN MONTH(Podate)>=4 THEN - concat(YEAR(Podate), '-',YEAR(Podate)+1) -ELSE concat(YEAR(Podate)-1,'-', YEAR(Podate)) END AS financial_year -FROM T_Bankporeport +CASE WHEN MONTH(reportdate)>=4 THEN + concat(YEAR(reportdate), '-',YEAR(reportdate)+1) +ELSE concat(YEAR(reportdate)-1,'-', YEAR(reportdate)) END AS financial_year +FROM T_bankreport GROUP BY financial_year"; $query = $this->db->query($sql); return $query->result(); @@ -1020,7 +1020,7 @@ function receiptdata() function debitpolistfilter($supplierID,$fa,$aa,$m,$fdate,$tdate) { - $this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,bm.Podate, + $this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,bm.Podate,bm.BankDate, bm.Balancetopay,bm.Amountpaid,bm.IGRNO,bm.IGRLineItemNo,br.Balancetocleared,br.Clearbalance, inward.FilePath as igrfile,bu.FilePath pofile'); $this->db->from ('T_Bankmappingpo bm'); @@ -1035,12 +1035,12 @@ function receiptdata() if ($fa and $aa != ''){ //$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')"; - $year="(bm.Podate >= '".$fa."-04-01' and bm.Podate <= '".$aa."-03-31')"; + $year="(bm.BankDate >= '".$fa."-04-01' and bm.BankDate <= '".$aa."-03-31')"; $this->db->where($year); } if ($m!= ''){ //$this->db->where('MONTH(pel.tgl_pembelian)',$bulan); - $month="monthname(bm.Podate) = '".$m."'"; + $month="monthname(bm.BankDate) = '".$m."'"; $this->db->where($month); // $sql.="and monthname(bm.Podate) = '".$m."'"; @@ -1048,8 +1048,8 @@ function receiptdata() if ($fdate and $tdate != ''){ $fromdate= date("Y-m-d",strtotime($fdate)); $todate=date("Y-m-d",strtotime($tdate)); - $date = "date(bm.Podate) >= '".$fromdate."' - and date(bm.Podate) <= '".$todate."'"; + $date = "date(bm.BankDate) >= '".$fromdate."' + and date(bm.BankDate) <= '".$todate."'"; $this->db->where($date); } $this->db->group_by('bm.IGRLineItemNo'); @@ -1123,7 +1123,7 @@ function receiptdata() $this->db->join('T_Inwardgateregister_fileupload inward','inward.IGRNO =igrm.IGRNO','left'); $this->db->join ('T_bankreport br','br.ID=bp.mid'); $this->db->where('bp.IsActive',1); - $this->db->where('bp.mid',$bankid); + $this->db->where('bp.mid',(int)$bankid); // $this->db->where('igrde.BankStatus !=','ST072'); $this->db->group_by('bp.id'); $query = $this->db->get(); @@ -1676,7 +1676,7 @@ function receiptdata() function paided($supplierid,$fa,$aa,$m,$fdate,$tdate) { - $this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,bm.Podate, + $this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.Totalpoamount,bm.Podate,bm.BankDate, bm.Balancetopay,bm.Amountpaid,bm.IGRNO,bm.IGRLineItemNo,br.Balancetocleared,br.Clearbalance, inward.FilePath as igrfile,bu.FilePath pofile'); $this->db->from ('T_Bankmappingpo bm'); @@ -1686,17 +1686,17 @@ function receiptdata() $this->db->join('T_bankreport br','br.ID=bm.mid','left'); $this->db->where('bm.SupplierID',$supplierid); $this->db->where('bm.IsActive',1); - $this->db->where('igr.BankStatus !=',ST072); + // $this->db->where('igr.BankStatus !=',ST072); //$this->db->group_by('bm.mid'); if ($fa and $aa != ''){ //$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')"; - $year="(bm.Podate >= '".$fa."-04-01' and bm.Podate <= '".$aa."-03-31')"; + $year="(bm.BankDate >= '".$fa."-04-01' and bm.BankDate <= '".$aa."-03-31')"; $this->db->where($year); } if ($m!= ''){ //$this->db->where('MONTH(pel.tgl_pembelian)',$bulan); - $month="monthname(bm.Podate) = '".$m."'"; + $month="monthname(bm.BankDate) = '".$m."'"; $this->db->where($month); // $sql.="and monthname(bm.Podate) = '".$m."'"; @@ -1704,11 +1704,11 @@ function receiptdata() if ($fdate and $tdate != ''){ $fromdate= date("Y-m-d",strtotime($fdate)); $todate=date("Y-m-d",strtotime($tdate)); - $date = "date(bm.Podate) >= '".$fromdate."' - and date(bm.Podate) <= '".$todate."'"; + $date = "date(bm.BankDate) >= '".$fromdate."' + and date(bm.BankDate) <= '".$todate."'"; $this->db->where($date); } - //$this->db->group_by('bm.IGRLineItemNo'); + $this->db->group_by('bm.id'); $query = $this->db->get(); return $query->result(); @@ -1718,9 +1718,9 @@ function receiptdata() $this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.SupplierID,bm.Totalpoamount,bm.Podate, bm.Balancetopay,sum(bm.Amountpaid) as Amountpaid,bm.IGRNO,bm.IGRLineItemNo'); $this->db->from ('T_Bankmappingpo bm'); - $this->db->join('T_IGR_Details igr','igr.IGRItemNo=bm.IGRLineItemNo'); + //$this->db->join('T_IGR_Details igr','igr.IGRItemNo=bm.IGRLineItemNo'); $this->db->where('bm.IsActive',1); - $this->db->where('igr.BankStatus !=',ST072); + // $this->db->where('igr.BankStatus !=',ST072); $this->db->group_by('bm.SupplierID'); $query = $this->db->get(); return $query->result(); @@ -1824,23 +1824,25 @@ function receiptdata() function amountpaidsupplierwisefilter($fa,$aa,$m,$fdate,$tdate) { + $this->db->select('bm.id,bm.mid,bm.PONO,bm.Suppliername,bm.SupplierID,sum(bm.Totalpoamount)as Totalpoamount, - bm.Balancetopay,sum(bm.Amountpaid) as Amountpaid,bm.Podate,bm.IGRLineItemNo'); + bm.Balancetopay,sum(bm.Amountpaid) as Amountpaid,bm.Podate,bm.BankDate,bm.IGRLineItemNo,bm.BankDate'); $this->db->from ('T_Bankmappingpo bm'); - $this->db->join('T_IGR_Details igr','igr.IGRItemNo=bm.IGRLineItemNo'); - $this->db->where('igr.BankStatus !=',ST072); + $this->db->join('T_bankreport br','br.ID=bm.mid'); + //$this->db->join('T_IGR_Details igr','igr.IGRItemNo=bm.IGRLineItemNo'); + //$this->db->where('igr.BankStatus !=',ST072); $this->db->where('bm.IsActive',1); if ($fa and $aa != ''){ //$sql.=" and (im.CreatedDate >= '".$fa."-04-01' and im.CreatedDate <= '".$aa."-03-31')"; - $year="(bm.Podate >= '".$fa."-04-01' and bm.Podate <= '".$aa."-03-31')"; + $year="(bm.BankDate >= '".$fa."-04-01' and bm.BankDate <= '".$aa."-03-31')"; $this->db->where($year); } if ($m!= ''){ //$this->db->where('MONTH(pel.tgl_pembelian)',$bulan); - $month="monthname(bm.Podate) = '".$m."'"; + $month="monthname(bm.BankDate) = '".$m."'"; $this->db->where($month); // $sql.="and monthname(bm.Podate) = '".$m."'"; @@ -1848,8 +1850,8 @@ function receiptdata() if ($fdate and $tdate != ''){ $fromdate= date("Y-m-d",strtotime($fdate)); $todate=date("Y-m-d",strtotime($tdate)); - $date = "date(bm.Podate) >= '".$fromdate."' - and date(bm.Podate) <= '".$todate."'"; + $date = "date(bm.BankDate) >= '".$fromdate."' + and date(bm.BankDate) <= '".$todate."'"; $this->db->where($date); } diff --git a/application/views/banksettlement.php b/application/views/banksettlement.php index 8ae553fd..a6b66cdc 100644 --- a/application/views/banksettlement.php +++ b/application/views/banksettlement.php @@ -267,13 +267,14 @@ if(!empty($mapping))
Amountpaid; //print_r($ap); ?>Cashbook Reports