bankstatement

This commit is contained in:
gayathri1990 2018-05-10 18:43:23 +05:30
parent 1e0bf0cdbf
commit 7cbafd5994
6 changed files with 3999 additions and 17 deletions

View File

@ -844,7 +844,7 @@ class cashbook extends BaseController
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
$data['mappingiv'] = $this->cashbook_model->creditinvoicelist($bankid);
$data['paidcbook'] = $this->cashbook_model->cashbookamount($bankid);
$data['invoiceramount'] = $this->cashbook_model->invoiceamonut($bankid);
$data['invoiceramount'] = $this->cashbook_model->invoiceamonut($bankid);
$data['supplier'] = $this->cashbook_model->getsupplier();
$this->loadViews("bankinvoicesettlement", $this->global,$data,NULL);

File diff suppressed because it is too large Load Diff

View File

@ -242,7 +242,7 @@ function bankstatement($fdate,$tdate,$fa,$aa){
$this->db->join ('ip_invoices iv','iv.invoice_id = iva.invoice_id','left');
$this->db->join ('ip_clients ic','ic.client_id = iv.client_id','left');
$this->db->join ('T_Bankinvoicereport BI','BI.invoiceno = iv.invoice_number','left');
$this->db->where('iv.invoice_status_id','2');
$this->db->where_in('iv.invoice_status_id','2');
$this->db->where('iva.receivedstatus !=','ST065');
$this->db->where('iv.invoice_date_created BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
$this->db->or_where('ic.client_id',$Customer);
@ -344,7 +344,7 @@ function debitpolist($bankid)
//for cashbook edit screen and update bankreport//
function invoiceamonut($bankid)
{
$this->db->select('sum(amountreceived)as amountreceived');
$this->db->select('sum(amountreceived)as amountreceived');
$this->db->from ('T_Bankmappingiv');
$this->db->where('bankid',$bankid);
//$this->db->group_by('invoiceno');

View File

@ -367,6 +367,7 @@ var total=0;
function GetPayment(i)
{
//alert('check');
var value=i;
var bankdebitamount=$('#debitamount').val();
var totalvalue=$('#addvalue').val();
var balanceamount=bankdebitamount-totalvalue;
@ -374,7 +375,7 @@ function GetPayment(i)
var x = document.getElementById('checkboxcheckbox'+i).checked;
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
//alert(amount);
//alert(amount+'inv');
var negative=0;
if(amount<0)
{
@ -410,18 +411,23 @@ function GetPayment(i)
var date= document.getElementById ( "date"+i ).innerText;
var pono =document.getElementById ( "pono"+i ).innerText;
var poamount =document.getElementById ( "qw"+i ).innerText;
//alert(invoicepayment+'amny');
//alert(invoicepayment+'amny1');
var ponovalue = pono+'-'+poamount;
var tempid = "debited"+value;
//var credit=parseFloat(document.getElementById(tempid).innerText);
var t = '#invoicepaymet'+i;
var poamount1 =$(t).val();
alert(poamount1+'amt');
var ponovalue = pono+','+poamount;
temppo.push(ponovalue);
//var res1 = temppo.split('-');
console.log(temppo);
var total=0;
$.each(temppo, function( index, value )
{
var res2 = value.split('-');
var res2 = value.split(',');
var pono=res2[0];
//alert(pono+'pono');
var bam=res2[1];
//alert(bam+'bam');
total=parseFloat(bam)+parseFloat(total);
$('#addvalue').val(parseFloat(total).toFixed(2));
});
@ -434,28 +440,28 @@ function GetPayment(i)
var RowCount= $('#Rowid').val();
$('<input>').attr({
type:'hidden',
type:'text',
name:'date1'+j,
id:'date1'+j,
value:date
}).appendTo('#date1');
$('<input>').attr({
type:'hidden',
type:'text',
name:'purchaseono'+j,
id:'purchaseono'+j,
value:pono
}).appendTo('#purchaseono');
$('<input>').attr({
type:'hidden',
type:'text',
name:'supname'+j,
id:'supname'+j,
value:supname
}).appendTo('#supname');
$('<input>').attr({
type:'hidden',
type:'text',
name:'totala'+j,
id:'totala'+j,
value:invoicepayment
@ -463,7 +469,7 @@ function GetPayment(i)
$('<input>').attr({
type:'hidden',
type:'text',
name:'ttamnt'+j,
id:'ttamnt'+j,
value:totalordervalue
@ -508,7 +514,7 @@ else
var Payment= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val());
var Inid = document.getElementById ('pono'+i ).innerText
var ponovalue = Inid+'-'+Payment;
var ponovalue = Inid+','+Payment;
//alert(Inid+'else');
//temppo.pull(Inid);
var a = temppo.indexOf(ponovalue);

View File

@ -109,6 +109,7 @@ if(!empty($debitmapping))
$totalamount=$pcamount+$inamount;
//echo $totalamount;
?>
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Credit Amount Paid Report</b></p></h3></center>

View File

@ -161,7 +161,7 @@
</div>
<div class="col-md-2">
<input type="text" id="addvalue" name="addvalue">
<input type="hidden" id="addvalue" name="addvalue">
</div>
</div>
@ -492,6 +492,12 @@ if (x==true)
window.location.reload();
document.getElementById('checkboxcheckbox'+value).checked = false;
}
if(credit==0)
{
alert('status is closed');
document.getElementById('checkboxcheckbox'+value).checked = false;
window.location.reload();
}
@ -566,7 +572,7 @@ if (x==true)
var i=i1;
var avalue= $('#addvalue').val();
//alert(avalue);
alert(avalue);
localStorage.setItem('test',avalue);
var e = document.getElementById("selectedId");
var value = e.options[e.selectedIndex].value;