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);
|
$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);
|
$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();
|
//die();
|
||||||
|
|
||||||
@ -1323,21 +1324,21 @@ class cashbook extends BaseController
|
|||||||
$earlyreceived = 0;
|
$earlyreceived = 0;
|
||||||
//echo $earlypaid;
|
//echo $earlypaid;
|
||||||
$earlyreceived = $this->cashbook_model->getearlyamountcredit($invid);
|
$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))
|
// if(empty($earlyreceivedmappingiv))
|
||||||
{
|
// {
|
||||||
$eRec1=0;
|
// $eRec1=0;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
|
|
||||||
foreach($earlyreceived as $ar)
|
// foreach($earlyreceived as $ar)
|
||||||
{
|
// {
|
||||||
$eRec1 = $ar->amountreceived;
|
// $eRec1 = $ar->amountreceived;
|
||||||
}
|
// }
|
||||||
$updatenew=($invamount-($eRec1+$invoicetext));
|
// $updatenew=($invamount-($eRec1+$invoicetext));
|
||||||
}
|
// }
|
||||||
// echo $earlyreceivedmappingiv;
|
// echo $earlyreceivedmappingiv;
|
||||||
// die();
|
// die();
|
||||||
if(empty($earlyreceived))
|
if(empty($earlyreceived))
|
||||||
|
|||||||
@ -402,9 +402,6 @@ function bankstatement($fdate,$tdate,$fa,$aa){
|
|||||||
and date(reportdate) <= '".$tdate."'";
|
and date(reportdate) <= '".$tdate."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$sql.=" group by(br.ID) ";
|
$sql.=" group by(br.ID) ";
|
||||||
$sql.=" ORDER BY br.ID+0 DESC ";
|
$sql.=" ORDER BY br.ID+0 DESC ";
|
||||||
|
|
||||||
|
|||||||
@ -352,9 +352,10 @@ function GetPayment(i)
|
|||||||
var supname =document.getElementById ("sn"+i).innerText;//value taken from table col name : suppliername
|
var supname =document.getElementById ("sn"+i).innerText;//value taken from table col name : suppliername
|
||||||
var supid =document.getElementById ("sid"+i ).innerText;
|
var supid =document.getElementById ("sid"+i ).innerText;
|
||||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;//value taken from table col name : total po amount
|
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'
|
$('#invoicepaymet'+i).val(invoicepayment);//to copy the value from 'balance to pay' to 'amount paid'
|
||||||
|
//alert(invoicepayment);
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
@ -417,7 +418,7 @@ function GetPayment(i)
|
|||||||
//alert(poamount+'1');
|
//alert(poamount+'1');
|
||||||
var ponovalue = i+','+igrlineitem+','+poamount;
|
var ponovalue = i+','+igrlineitem+','+poamount;
|
||||||
temppo.push(ponovalue);
|
temppo.push(ponovalue);
|
||||||
//console.log(temppo);
|
console.log(temppo);
|
||||||
|
|
||||||
calculategrandtotal();
|
calculategrandtotal();
|
||||||
|
|
||||||
@ -458,7 +459,7 @@ else
|
|||||||
if(a != -1){
|
if(a != -1){
|
||||||
//sconsole.log('if');
|
//sconsole.log('if');
|
||||||
temppo.splice(a,1);
|
temppo.splice(a,1);
|
||||||
//console.log(temppo);
|
console.log(temppo);
|
||||||
}
|
}
|
||||||
if(b!=-1)
|
if(b!=-1)
|
||||||
{
|
{
|
||||||
@ -469,7 +470,7 @@ else
|
|||||||
|
|
||||||
calculategrandtotal();
|
calculategrandtotal();
|
||||||
|
|
||||||
//$('#invoicepaymet'+i).val('');
|
$('#invoicepaymet'+i).val('');
|
||||||
|
|
||||||
|
|
||||||
$('#Rowid').val(row);
|
$('#Rowid').val(row);
|
||||||
@ -514,7 +515,7 @@ function GetAmount(i)
|
|||||||
|
|
||||||
//alert("onchnage function getamount"+i);
|
//alert("onchnage function getamount"+i);
|
||||||
var amount = parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
var amount = parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||||
|
//alert(amount+'amount');
|
||||||
var negative=0;
|
var negative=0;
|
||||||
if(amount<0)
|
if(amount<0)
|
||||||
{
|
{
|
||||||
@ -649,33 +650,24 @@ function Save()
|
|||||||
|
|
||||||
// alert('igrnoval'+'-'+igrno);
|
// alert('igrnoval'+'-'+igrno);
|
||||||
|
|
||||||
var igrlineitem1 =$('#hideigrline'+number).val();
|
var igrlineitem =$('#hideigrline'+number).val();
|
||||||
var igrlineitem=igrlineitem1.trim();
|
|
||||||
|
|
||||||
var suppliername=$('#hidesupname'+number).val();
|
var suppliername=$('#hidesupname'+number).val();
|
||||||
|
|
||||||
var supplierid=$('#hidesupid'+number).val();
|
var supplierid=$('#hidesupid'+number).val();
|
||||||
|
|
||||||
// alert('suppliernameval'+'-'+suppliername);
|
|
||||||
|
|
||||||
var totalordervalue=$('#hidettlPoamt'+number).val();
|
var totalordervalue=$('#hidettlPoamt'+number).val();
|
||||||
// alert('totalordervalueval'+'-'+totalordervalue);
|
|
||||||
|
|
||||||
var amountpaid=$('#hideamtpaid'+number).val();
|
var amountpaid=$('#hideamtpaid'+number).val();
|
||||||
// alert('amountpaidval'+'-'+amountpaid);
|
|
||||||
|
|
||||||
var invoicepaymet=$('#invoicepaymet'+number).val();
|
var invoicepaymet=$('#invoicepaymet'+number).val();
|
||||||
//alert(invoicepaymet);
|
|
||||||
|
|
||||||
|
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
// alert('totalvalueval'+'-'+totalvalue);
|
|
||||||
|
|
||||||
var payment = parseFloat(amountpaid);
|
var payment = parseFloat(amountpaid);
|
||||||
//alert('paymentval'+'-'+payment);
|
|
||||||
|
|
||||||
var balnceamount=bankdebitamount-totalvalue;
|
var balnceamount=bankdebitamount-totalvalue;
|
||||||
// alert('balnceamountval'+'-'+balnceamount);
|
|
||||||
|
|
||||||
|
|
||||||
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
||||||
@ -683,7 +675,8 @@ function Save()
|
|||||||
|
|
||||||
$.ajax(
|
$.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",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>cashbook/receipt",
|
url:"<?php echo base_url() ?>cashbook/receipt",
|
||||||
success:function(data)
|
success:function(data)
|
||||||
|
|||||||
@ -624,7 +624,7 @@ function Save()
|
|||||||
|
|
||||||
var invoiceamount1=$('#hideinvoiceamount'+number).val();
|
var invoiceamount1=$('#hideinvoiceamount'+number).val();
|
||||||
var invoiceamount=invoiceamount1.trim();
|
var invoiceamount=invoiceamount1.trim();
|
||||||
|
//alert()
|
||||||
var amountreceived=$('#hideinvoicerecd'+number).val();
|
var amountreceived=$('#hideinvoicerecd'+number).val();
|
||||||
|
|
||||||
var invoicereceived=$('#invoicereceived'+number).val();
|
var invoicereceived=$('#invoicereceived'+number).val();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user