based on inward
This commit is contained in:
parent
f907137cc4
commit
ee394e1e87
@ -1145,8 +1145,7 @@ class cashbook extends BaseController
|
|||||||
$bankdate = date_create($bankdate);//,'Y-m-d');
|
$bankdate = date_create($bankdate);//,'Y-m-d');
|
||||||
$bankdate = date_format($bankdate,'Y-m-d');
|
$bankdate = date_format($bankdate,'Y-m-d');
|
||||||
$pono = $this->input->post('pono');
|
$pono = $this->input->post('pono');
|
||||||
$igrno=$this->input->post('igrno');
|
$igrno=$this->input->post('igrno');
|
||||||
// $igrlineitem=$this->input->post('igrlineitem');
|
|
||||||
|
|
||||||
$sname = $this->input->post('sname');
|
$sname = $this->input->post('sname');
|
||||||
$sid = $this->input->post('sid');
|
$sid = $this->input->post('sid');
|
||||||
@ -1205,7 +1204,7 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
$earlypaid = 0;
|
$earlypaid = 0;
|
||||||
//echo $earlypaid;
|
//echo $earlypaid;
|
||||||
$earlypaid = $this->cashbook_model->getearlyamount($pono);
|
$earlypaid = $this->cashbook_model->getearlyamount($igrno);
|
||||||
if(empty($earlypaid))
|
if(empty($earlypaid))
|
||||||
{
|
{
|
||||||
$ePay=0;
|
$ePay=0;
|
||||||
@ -1227,26 +1226,26 @@ class cashbook extends BaseController
|
|||||||
$IsActive=1;
|
$IsActive=1;
|
||||||
|
|
||||||
|
|
||||||
$podata1 = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IsActive'=>$IsActive,'BankDate'=>$bankdate);
|
$igrdata1 = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IsActive'=>$IsActive,'BankDate'=>$bankdate);
|
||||||
|
|
||||||
$resultn = $this->cashbook_model->mappingpo($podata1);
|
$resultn = $this->cashbook_model->mappingpo($igrdata1);
|
||||||
//print_r($podata1);
|
//print_r($podata1);
|
||||||
$podata = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IsActive'=>$IsActive,'BankDate'=>$bankdate);
|
$igrdata = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IsActive'=>$IsActive,'BankDate'=>$bankdate);
|
||||||
//die();
|
//die();
|
||||||
|
|
||||||
$result3 = $this->cashbook_model->getpono($pono);
|
$result3 = $this->cashbook_model->getigrno($igrno);
|
||||||
|
|
||||||
|
|
||||||
if(count($result3)<=0)
|
if(count($result3)<=0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$result = $this->cashbook_model->podata($podata);
|
$result = $this->cashbook_model->bankporeportdata($igrdata);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//echo "update";
|
//echo "update";
|
||||||
$result3 = $this->cashbook_model->poupdate($podata,$pono);
|
$result3 = $this->cashbook_model->bankporeportupdate($igrdata,$igrno);
|
||||||
|
|
||||||
}
|
}
|
||||||
if($rw == $rowcount)
|
if($rw == $rowcount)
|
||||||
@ -1258,17 +1257,17 @@ class cashbook extends BaseController
|
|||||||
$now = date('Y-m-d H:i:s');
|
$now = date('Y-m-d H:i:s');
|
||||||
if($balancetopay==0)
|
if($balancetopay==0)
|
||||||
{
|
{
|
||||||
$postatus=AMOUNT_PAIDIGR;
|
$igrpaidstatus=AMOUNT_PAIDIGR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$postatus=PARTIALLY_PAIDIGR;
|
$igrpaidstatus=PARTIALLY_PAIDIGR;
|
||||||
|
|
||||||
}
|
}
|
||||||
$igrdetails=array('Paymentstatus'=>$postatus,'StatusUpdatedDate'=>$now);
|
$igrmaster=array('Paymentstatus'=>$igrpaidstatus,'StatusUpdatedDate'=>$now);
|
||||||
//$podetails=array('Paymentstatus'=>$postatus);
|
//$podetails=array('Paymentstatus'=>$postatus);
|
||||||
//$result1 = $this->cashbook_model->igrdetailstatus($podetails,$pono);
|
//$result1 = $this->cashbook_model->igrdetailstatus($podetails,$pono);
|
||||||
$result1 = $this->cashbook_model->poamountstatus($igrdetails,$igrno);
|
$result1 = $this->cashbook_model->igrstatus($igrmaster,$igrno);
|
||||||
$this->loadViews("bankstatement", $this->global,$data, NULL);
|
$this->loadViews("bankstatement", $this->global,$data, NULL);
|
||||||
}
|
}
|
||||||
public function invoiceamount1()
|
public function invoiceamount1()
|
||||||
@ -1626,7 +1625,59 @@ class cashbook extends BaseController
|
|||||||
$this->loadViews("bankpaidsupp", $this->global,$data, NULL);
|
$this->loadViews("bankpaidsupp", $this->global,$data, NULL);
|
||||||
//$this->loadViews("bankamountpaid", $this->global,$data, NULL);
|
//$this->loadViews("bankamountpaid", $this->global,$data, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// function supplierledger()
|
||||||
|
// {
|
||||||
|
// $this->global['pageTitle'] = 'Siddharth : Bank Report - Amount Payment Details';
|
||||||
|
// //$suppliername= $_GET['sid'];
|
||||||
|
// if ($this->input->post('btn_submit'))
|
||||||
|
// {
|
||||||
|
// $ab=$this->input->post('financialyear');
|
||||||
|
// $fa=substr($ab,0,-5);
|
||||||
|
// $aa=substr($ab,5,5);
|
||||||
|
// $m=$this->input->post('month');
|
||||||
|
// $fdate = $this->input->post('from_date');
|
||||||
|
// $tdate = $this->input->post('to_date');
|
||||||
|
// $supplierID= $this->input->post('supplier');
|
||||||
|
// $data['supplierid']=$supplierID;
|
||||||
|
// $suppliername= $this->input->post('suppliername');
|
||||||
|
// $data['suppliername']=$suppliername;
|
||||||
|
// $data['fa']=$fa;
|
||||||
|
// $data['aa']=$aa;
|
||||||
|
// $data['m']=$m;
|
||||||
|
// $data['fdate']=$fdate;
|
||||||
|
// $data['tdate']=$tdate;
|
||||||
|
// $data['suppliername']= $suppliername;
|
||||||
|
// $data['bankdebit'] = $this->cashbook_model->debitpolistfilter($supplierID,$fa,$aa,$m,$fdate,$tdate);
|
||||||
|
// //print_r($data['bankdebit']);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
|
||||||
|
// $fa=$_GET['fa'];
|
||||||
|
// $aa=$_GET['aa'];
|
||||||
|
// $m=$_GET['m'];
|
||||||
|
// $fdate=$_GET['fdate'];
|
||||||
|
// $tdate=$_GET['tdate'];
|
||||||
|
// $data['fa']=$fa;
|
||||||
|
// $data['aa']=$aa;
|
||||||
|
// $data['m']=$m;
|
||||||
|
// $data['fdate']=$fdate;
|
||||||
|
// $data['tdate']=$tdate;
|
||||||
|
// $supplierid= $_GET['sid'];
|
||||||
|
// $data['supplierid']= $supplierid;
|
||||||
|
// $suppliername= $_GET['sn'];
|
||||||
|
// $data['suppliername']=$suppliername;
|
||||||
|
// $data['bankdebit'] = $this->cashbook_model->paided($supplierid,$fa,$aa,$m,$fdate,$tdate);
|
||||||
|
// }
|
||||||
|
// $data['finyear']=$this->cashbook_model->report_amountpaid();
|
||||||
|
// $this->loadViews("banksupplierledger", $this->global,$data, NULL);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function amountunpaid()
|
public function amountunpaid()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -2130,7 +2181,8 @@ public function Deletemappingpo()
|
|||||||
// echo "<script>alert('Deleted Successfully!');window.location.href='Bankingstatement';</script>";
|
// echo "<script>alert('Deleted Successfully!');window.location.href='Bankingstatement';</script>";
|
||||||
redirect('Bankingstatement','refresh');
|
redirect('Bankingstatement','refresh');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function convertNumber($amt){
|
public function convertNumber($amt){
|
||||||
//echo $amt;die();
|
//echo $amt;die();
|
||||||
|
|||||||
@ -1174,9 +1174,9 @@ function receiptdata()
|
|||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
function podata($podata)
|
function bankporeportdata($igrdata)
|
||||||
{
|
{
|
||||||
$this->db->insert('T_Bankporeport',$podata);
|
$this->db->insert('T_Bankporeport',$igrdata);
|
||||||
// $this->db->where('PONO',$pono);
|
// $this->db->where('PONO',$pono);
|
||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
return $r;
|
||||||
@ -1187,10 +1187,10 @@ function receiptdata()
|
|||||||
// $r = $this->db->affected_rows();
|
// $r = $this->db->affected_rows();
|
||||||
// return $r;
|
// return $r;
|
||||||
// }
|
// }
|
||||||
function mappingpo($podata1)
|
function mappingpo($igrdata1)
|
||||||
{
|
{
|
||||||
print_r($podata1);
|
|
||||||
$this->db->insert('T_Bankmappingpo',$podata1);
|
$this->db->insert('T_Bankmappingpo',$igrdata1);
|
||||||
// $this->db->where('PONO',$pono);
|
// $this->db->where('PONO',$pono);
|
||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
return $r;
|
||||||
@ -1204,11 +1204,11 @@ function receiptdata()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getpono($igrlineitem)
|
public function getigrno($igrno)
|
||||||
{
|
{
|
||||||
$this->db->select('IGRLineItemNo');
|
$this->db->select('igrno');
|
||||||
$this->db->from('T_Bankporeport');
|
$this->db->from('T_Bankporeport');
|
||||||
$this->db->where('IGRLineItemNo ',$igrlineitem);
|
$this->db->where('IGRNO',$igrno);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
// print_r( $this->db->last_query());
|
// print_r( $this->db->last_query());
|
||||||
return $query->result();
|
return $query->result();
|
||||||
@ -1267,11 +1267,11 @@ function receiptdata()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
public function getearlyamount($igrlineitem)
|
public function getearlyamount($igrno)
|
||||||
{
|
{
|
||||||
$this->db->select('Amountpaid');
|
$this->db->select('Amountpaid');
|
||||||
$this->db->from('T_Bankporeport');
|
$this->db->from('T_Bankporeport');
|
||||||
$this->db->where('IGRLineItemNo ',$igrlineitem);
|
$this->db->where('IGRNO ',$igrno);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
// print_r( $this->db->last_query());
|
// print_r( $this->db->last_query());
|
||||||
return $query->result();
|
return $query->result();
|
||||||
@ -1319,11 +1319,11 @@ function receiptdata()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function poupdate($podata,$pono)
|
public function bankporeportupdate($igrdata,$igrno)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->where('PONO',$pono);
|
$this->db->where('IGRNO',$igrno);
|
||||||
$this->db->update('T_Bankporeport',$podata);
|
$this->db->update('T_Bankporeport',$igrdata);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1733,10 +1733,10 @@ function receiptdata()
|
|||||||
return $r;
|
return $r;
|
||||||
|
|
||||||
}
|
}
|
||||||
function poamountstatus($igrdetails,$igrno)
|
function igrstatus($igrmaster,$igrno)
|
||||||
{
|
{
|
||||||
$this->db->where('IGRNO',$igrno);
|
$this->db->where('IGRNO',$igrno);
|
||||||
$this->db->update('T_IGR_Master',$igrdetails);
|
$this->db->update('T_IGR_Master',$igrmaster);
|
||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
return $r;
|
||||||
|
|
||||||
|
|||||||
@ -647,6 +647,8 @@ function Save()
|
|||||||
var date =$('#hidedate'+number).val();
|
var date =$('#hidedate'+number).val();
|
||||||
var pono =$('#hidepono'+number).val();
|
var pono =$('#hidepono'+number).val();
|
||||||
var igrno =$('#hideigrno'+number).val();
|
var igrno =$('#hideigrno'+number).val();
|
||||||
|
|
||||||
|
|
||||||
// var igrlineitem =$('#hideigrline'+number).val();
|
// var igrlineitem =$('#hideigrline'+number).val();
|
||||||
|
|
||||||
var suppliername=$('#hidesupname'+number).val();
|
var suppliername=$('#hidesupname'+number).val();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user