bankstatement bugs
This commit is contained in:
parent
8f0b886332
commit
b4bd0a9227
@ -1259,7 +1259,7 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$clearedblnce=($arec-(-$totalpaidamount));
|
$clearedblnce=-$totalpaidamount-(-$arec);
|
||||||
}
|
}
|
||||||
$balancetoreceived =($bankcreditamount-$totalpaidamount);
|
$balancetoreceived =($bankcreditamount-$totalpaidamount);
|
||||||
$check =1;
|
$check =1;
|
||||||
@ -1499,8 +1499,14 @@ class cashbook extends BaseController
|
|||||||
$totinvoiceamount = $this->input->post('totinvoiceamount');
|
$totinvoiceamount = $this->input->post('totinvoiceamount');
|
||||||
$balancetoreceived = $this->input->post('balancetoreceived');
|
$balancetoreceived = $this->input->post('balancetoreceived');
|
||||||
$updatebalancetoclear=$amountreceived+$bankingbalclear;
|
$updatebalancetoclear=$amountreceived+$bankingbalclear;
|
||||||
|
if($amountreceived<0)
|
||||||
|
{
|
||||||
|
$updateclearbalance=$bankingclear+$amountreceived;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$updateclearbalance=$bankingclear-$amountreceived;
|
$updateclearbalance=$bankingclear-$amountreceived;
|
||||||
|
}
|
||||||
|
|
||||||
//update Isactive field in T_Bankreport //////
|
//update Isactive field in T_Bankreport //////
|
||||||
$mapped=$balancetoreceived+$amountreceived;
|
$mapped=$balancetoreceived+$amountreceived;
|
||||||
@ -1523,15 +1529,18 @@ class cashbook extends BaseController
|
|||||||
$receivedstatus=PARTIALLY_RECEIVED;
|
$receivedstatus=PARTIALLY_RECEIVED;
|
||||||
}
|
}
|
||||||
$IsActive=0;
|
$IsActive=0;
|
||||||
// $data['$latestamount'] = $this->cashbook_model->getlatestamount($invoiceno);
|
//$data['$latestamount'] = $this->cashbook_model->getlatestamount($invoiceno);
|
||||||
//print_r($data['$latestamount']);
|
//print_r($data['$latestamount']);
|
||||||
//die();
|
//die();
|
||||||
$balancetoreceived=$data['$latestamount'][0]->balancetoreceived;
|
//$balancetoreceived1=$data['$latestamount'][0]->balancetoreceived;
|
||||||
$result1=$this->cashbook_model->UpdateIpinvoiceStatus($invoiceno,$receivedstatus);
|
$updatebalancetoreceived=$balancetoreceived+$amountreceived;
|
||||||
$result2= $this->cashbook_model->deletemappinginvoice($mappingid,$IsActive);
|
|
||||||
$updatebalancetoreceived=$balancetoreceived+$amountreceived;
|
|
||||||
$updateamountreceived=$totinvoiceamount-$updatebalancetoreceived;
|
$updateamountreceived=$totinvoiceamount-$updatebalancetoreceived;
|
||||||
$result3= $this->cashbook_model->updatebankinvoicereport($invoiceno,$bankid,$updatebalancetoreceived,$updateamountreceived);
|
$result3= $this->cashbook_model->updatebankinvoicereport($invoiceno,$bankid,$updatebalancetoreceived,$updateamountreceived);
|
||||||
|
if(count($result3)>0)
|
||||||
|
{
|
||||||
|
$result1=$this->cashbook_model->UpdateIpinvoiceStatus($invoiceno,$receivedstatus);
|
||||||
|
$result2= $this->cashbook_model->deletemappinginvoice($mappingid,$IsActive);
|
||||||
|
}
|
||||||
$this->loadViews("bankstatement", $this->global,$data, NULL);
|
$this->loadViews("bankstatement", $this->global,$data, NULL);
|
||||||
|
|
||||||
// if(count($result2)>0)
|
// if(count($result2)>0)
|
||||||
|
|||||||
@ -553,7 +553,7 @@ function GetAmount(i)
|
|||||||
{
|
{
|
||||||
//alert('text');
|
//alert('text');
|
||||||
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||||
alert(amount);
|
|
||||||
var negative=0;
|
var negative=0;
|
||||||
if(amount<0)
|
if(amount<0)
|
||||||
{
|
{
|
||||||
@ -620,7 +620,7 @@ function GetAmount(i)
|
|||||||
{
|
{
|
||||||
var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val());
|
var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val());
|
||||||
tot11= parseFloat(tot11)+parseFloat(Payingamount);
|
tot11= parseFloat(tot11)+parseFloat(Payingamount);
|
||||||
alert(tot11);
|
|
||||||
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -484,8 +484,6 @@ function GetAmount(i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(amount<=invoiceamount)//amount value is less than or equal to invoice received value means
|
|
||||||
{
|
|
||||||
|
|
||||||
$('#hideinvoicedate').val(date);
|
$('#hideinvoicedate').val(date);
|
||||||
$('#hideinvoiceid'+cid).val(invid);
|
$('#hideinvoiceid'+cid).val(invid);
|
||||||
@ -495,14 +493,7 @@ function GetAmount(i)
|
|||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
//alert(totalvalue);
|
//alert(totalvalue);
|
||||||
var bid=$('#bankid').val();
|
var bid=$('#bankid').val();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
alert('You are exceeding the payment get!!');
|
|
||||||
$('#invoicereceived'+i).val(amount)
|
|
||||||
location.reload();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$.each(tempinvoice, function( index, value )
|
$.each(tempinvoice, function( index, value )
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user