remove changes
This commit is contained in:
parent
5f3a4f6b50
commit
92d2e8937a
@ -1213,6 +1213,7 @@ class cashbook extends BaseController
|
||||
|
||||
$podata1 = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IGRLineItemNo'=>$igrlineitem,'IsActive'=>$IsActive);
|
||||
|
||||
//print_r($podata1);
|
||||
$podata = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IGRLineItemNo'=>$igrlineitem,'IsActive'=>$IsActive);
|
||||
//die();
|
||||
|
||||
@ -1323,21 +1324,21 @@ class cashbook extends BaseController
|
||||
$earlyreceived = 0;
|
||||
//echo $earlypaid;
|
||||
$earlyreceived = $this->cashbook_model->getearlyamountcredit($invid);
|
||||
$earlyreceivedmappingiv = $this->cashbook_model->getearlymappingiv($invid);//new change
|
||||
//$earlyreceivedmappingiv = $this->cashbook_model->getearlymappingiv($invid);//new change
|
||||
|
||||
if(empty($earlyreceivedmappingiv))
|
||||
{
|
||||
$eRec1=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if(empty($earlyreceivedmappingiv))
|
||||
// {
|
||||
// $eRec1=0;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
foreach($earlyreceived as $ar)
|
||||
{
|
||||
$eRec1 = $ar->amountreceived;
|
||||
}
|
||||
$updatenew=($invamount-($eRec1+$invoicetext));
|
||||
}
|
||||
// foreach($earlyreceived as $ar)
|
||||
// {
|
||||
// $eRec1 = $ar->amountreceived;
|
||||
// }
|
||||
// $updatenew=($invamount-($eRec1+$invoicetext));
|
||||
// }
|
||||
// echo $earlyreceivedmappingiv;
|
||||
// die();
|
||||
if(empty($earlyreceived))
|
||||
|
||||
@ -402,10 +402,7 @@ function bankstatement($fdate,$tdate,$fa,$aa){
|
||||
and date(reportdate) <= '".$tdate."'";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$sql.=" group by(br.ID) ";
|
||||
$sql.=" group by(br.ID) ";
|
||||
$sql.=" ORDER BY br.ID+0 DESC ";
|
||||
|
||||
|
||||
|
||||
@ -326,7 +326,7 @@ function GetPayment(i)
|
||||
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
||||
|
||||
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||
|
||||
|
||||
var negative=0;
|
||||
if(amount<0)
|
||||
{
|
||||
@ -352,9 +352,10 @@ function GetPayment(i)
|
||||
var supname =document.getElementById ("sn"+i).innerText;//value taken from table col name : suppliername
|
||||
var supid =document.getElementById ("sid"+i ).innerText;
|
||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;//value taken from table col name : total po amount
|
||||
var invoicepayment =document.getElementById ("qw"+i).innerText;//value taken from table col name : Balance to pay
|
||||
var invoicepayment1 =document.getElementById ("qw"+i).innerText;//value taken from table col name : Balance to pay
|
||||
var invoicepayment=invoicepayment1.trim();
|
||||
$('#invoicepaymet'+i).val(invoicepayment);//to copy the value from 'balance to pay' to 'amount paid'
|
||||
|
||||
//alert(invoicepayment);
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
@ -417,7 +418,7 @@ function GetPayment(i)
|
||||
//alert(poamount+'1');
|
||||
var ponovalue = i+','+igrlineitem+','+poamount;
|
||||
temppo.push(ponovalue);
|
||||
//console.log(temppo);
|
||||
console.log(temppo);
|
||||
|
||||
calculategrandtotal();
|
||||
|
||||
@ -458,7 +459,7 @@ else
|
||||
if(a != -1){
|
||||
//sconsole.log('if');
|
||||
temppo.splice(a,1);
|
||||
//console.log(temppo);
|
||||
console.log(temppo);
|
||||
}
|
||||
if(b!=-1)
|
||||
{
|
||||
@ -469,7 +470,7 @@ else
|
||||
|
||||
calculategrandtotal();
|
||||
|
||||
//$('#invoicepaymet'+i).val('');
|
||||
$('#invoicepaymet'+i).val('');
|
||||
|
||||
|
||||
$('#Rowid').val(row);
|
||||
@ -514,7 +515,7 @@ function GetAmount(i)
|
||||
|
||||
//alert("onchnage function getamount"+i);
|
||||
var amount = parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||
|
||||
//alert(amount+'amount');
|
||||
var negative=0;
|
||||
if(amount<0)
|
||||
{
|
||||
@ -636,7 +637,7 @@ function Save()
|
||||
// alert('rwval'+'-'+rw);
|
||||
check = parseFloat(check)+1;
|
||||
var bankdebitamount=$('#debitamount').val();
|
||||
|
||||
|
||||
// alert('bankdebitamountval'+'-'+bankdebitamount);
|
||||
var bid =$('#bankid').val();
|
||||
|
||||
@ -649,33 +650,24 @@ function Save()
|
||||
|
||||
// alert('igrnoval'+'-'+igrno);
|
||||
|
||||
var igrlineitem1 =$('#hideigrline'+number).val();
|
||||
var igrlineitem=igrlineitem1.trim();
|
||||
var igrlineitem =$('#hideigrline'+number).val();
|
||||
|
||||
var suppliername=$('#hidesupname'+number).val();
|
||||
|
||||
var supplierid=$('#hidesupid'+number).val();
|
||||
|
||||
// alert('suppliernameval'+'-'+suppliername);
|
||||
|
||||
var totalordervalue=$('#hidettlPoamt'+number).val();
|
||||
// alert('totalordervalueval'+'-'+totalordervalue);
|
||||
|
||||
|
||||
var amountpaid=$('#hideamtpaid'+number).val();
|
||||
// alert('amountpaidval'+'-'+amountpaid);
|
||||
|
||||
|
||||
var invoicepaymet=$('#invoicepaymet'+number).val();
|
||||
//alert(invoicepaymet);
|
||||
|
||||
|
||||
var totalvalue=$('#addvalue').val();
|
||||
// alert('totalvalueval'+'-'+totalvalue);
|
||||
|
||||
var payment = parseFloat(amountpaid);
|
||||
//alert('paymentval'+'-'+payment);
|
||||
|
||||
|
||||
var balnceamount=bankdebitamount-totalvalue;
|
||||
// alert('balnceamountval'+'-'+balnceamount);
|
||||
|
||||
|
||||
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
||||
@ -683,7 +675,8 @@ function Save()
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
data:{podate:date,pono:pono,igrno:igrno,igrlineitem:igrlineitem,sname:suppliername,sid:supplierid,tot:totalordervalue,aa:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
||||
data:{podate:date,pono:pono,igrno:igrno,igrlineitem:igrlineitem,sname:suppliername,sid:supplierid,tot:totalordervalue,aa:amountpaid,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
||||
//alert(data);
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>cashbook/receipt",
|
||||
success:function(data)
|
||||
|
||||
@ -624,7 +624,7 @@ function Save()
|
||||
|
||||
var invoiceamount1=$('#hideinvoiceamount'+number).val();
|
||||
var invoiceamount=invoiceamount1.trim();
|
||||
|
||||
//alert()
|
||||
var amountreceived=$('#hideinvoicerecd'+number).val();
|
||||
|
||||
var invoicereceived=$('#invoicereceived'+number).val();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user