bankstatement bugs resolved
This commit is contained in:
parent
c205c2355b
commit
dccab08aaf
@ -953,6 +953,13 @@ class cashbook extends BaseController
|
||||
$tdate = $this->input->post('to_date');
|
||||
$bankid= $_GET['d'];
|
||||
$data['clearbalance']= $_GET['clearbalance'];
|
||||
if($data['clearbalance']==0)
|
||||
{
|
||||
echo "<script>alert('No Mapped Amount!')</script>";
|
||||
redirect('Bankingstatement','refresh');
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['balancetoclear'] =$_GET['balancetoclear'];
|
||||
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
|
||||
$data['mapping'] = $this->cashbook_model->debitpolist($bankid);
|
||||
@ -961,6 +968,7 @@ class cashbook extends BaseController
|
||||
$data['paidpoamount'] = $this->cashbook_model->poamonut($bankid);
|
||||
$data['supplier'] = $this->cashbook_model->getsupplier();
|
||||
$this->loadViews("banksettlement", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
}
|
||||
public function mappinginvoice()
|
||||
@ -974,6 +982,13 @@ class cashbook extends BaseController
|
||||
$tdate = $this->input->post('to_date');
|
||||
$bankid= $_GET['d'];
|
||||
$data['clearbalance']=$_GET['cb'];
|
||||
if($data['clearbalance']==0)
|
||||
{
|
||||
echo "<script>alert('No Mapped Amount!')</script>";
|
||||
redirect('Bankingstatement','refresh');
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['balancetoclear']=$_GET['btc'];
|
||||
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
|
||||
$data['mappingiv'] = $this->cashbook_model->creditinvoicelist($bankid);
|
||||
@ -982,7 +997,7 @@ class cashbook extends BaseController
|
||||
$data['supplier'] = $this->cashbook_model->getsupplier();
|
||||
//redirect('Bankingstatement','refresh');
|
||||
$this->loadViews("bankinvoicesettlement", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
}
|
||||
public function mappingdebit()
|
||||
{
|
||||
|
||||
@ -46,6 +46,7 @@ class cashbook_model extends CI_Model
|
||||
$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code','left');
|
||||
$this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId','left');
|
||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left');
|
||||
$this->db->where('t_income_expense.IsActive',1);
|
||||
$this->db->order_by("date","desc");
|
||||
if(!empty($i))
|
||||
{
|
||||
@ -62,7 +63,7 @@ class cashbook_model extends CI_Model
|
||||
$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code','left');
|
||||
$this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId','left');
|
||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left');
|
||||
|
||||
$this->db->where('t_income_expense.IsActive',1);
|
||||
if ($firstyear and $secondyear != ''){
|
||||
$finyear = "t_income_expense.date >= '".$firstyear."-04-01' and t_income_expense.date <= '".$secondyear."-03-31'";
|
||||
$this->db->where($finyear);
|
||||
@ -276,7 +277,7 @@ function bankstatement($fdate,$tdate,$fa,$aa){
|
||||
}
|
||||
function clearedbalance(){
|
||||
|
||||
$sql = 'SELECT SUM(cbalancetocleared) as credit,SUM(Balancetocleared) as debit FROM T_bankreport';
|
||||
$sql = 'SELECT SUM(cclearbalance) as credit,SUM(Clearbalance) as debit FROM T_bankreport';
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
@ -308,7 +309,8 @@ function clearedbalance(){
|
||||
if ($Supplierid != ''){
|
||||
$this->db->where('supp.SupplierID',$Supplierid);
|
||||
}
|
||||
$this->db->where_in('pom.Status',[ST044,ST056]);
|
||||
$this->db->where_in('igr.IGRStatus','ST027');
|
||||
//$this->db->where_in('pom.Status',[ST044,ST056]);
|
||||
$this->db->where('igrli.BankStatus !=','ST070');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
@ -627,7 +627,6 @@ function GetAmount(i)
|
||||
var tot11=0
|
||||
for(l=1;l<j;l++)
|
||||
{
|
||||
alert('hai');
|
||||
var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val());
|
||||
tot11= parseFloat(tot11)+parseFloat(Payingamount);
|
||||
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
||||
|
||||
@ -55,7 +55,7 @@ foreach($financialyear as $item)
|
||||
if(!empty($mappingiv)){
|
||||
foreach($mappingiv as $ap)
|
||||
{
|
||||
$bankid=$ap->id;
|
||||
$bankid=$ap->bankid;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user