bank statement
This commit is contained in:
parent
ad33ca1aac
commit
43fbc25491
@ -204,23 +204,17 @@ class cashbook extends BaseController
|
|||||||
{
|
{
|
||||||
|
|
||||||
$bankdate = $this->input->post('bankdate');
|
$bankdate = $this->input->post('bankdate');
|
||||||
$bankid = $this->input->post('bankid');
|
$bankid = $this->input->post('bakid');
|
||||||
$amount = $this->input->post('bankamount');
|
$amount = $this->input->post('bankamount');
|
||||||
$amounttype = $this->input->post('type');
|
$amounttype = $this->input->post('type');
|
||||||
//echo $amounttype;
|
|
||||||
$totalbankamount = $this->input->post('totalbankamount');
|
$totalbankamount = $this->input->post('totalbankamount');
|
||||||
//$totalbankcreditamount
|
|
||||||
//echo $totalbankamount;
|
|
||||||
$alreadypaid=$this->input->post('alreadypaid');
|
$alreadypaid=$this->input->post('alreadypaid');
|
||||||
$directamount = $this->input->post('totalamount');
|
$directamount = $this->input->post('totalamount');
|
||||||
//echo $alreadypaid;
|
|
||||||
$debitamount=$this->input->post('debitamount');
|
$debitamount=$this->input->post('debitamount');
|
||||||
$alreadycreditpaid=$this->input->post('alreadycreditpaid');
|
$alreadycreditpaid=$this->input->post('alreadycreditpaid');
|
||||||
$bankorcash=$this->input->post('borc');
|
$bankorcash=$this->input->post('borc');
|
||||||
|
|
||||||
$total=$directamount+$alreadypaid;
|
$total=$directamount+$alreadypaid;
|
||||||
$ctotal=$directamount+$alreadycreditpaid;
|
$ctotal=$directamount+$alreadycreditpaid;
|
||||||
//echo $totalbankamount;
|
|
||||||
if($amounttype==CREDIT)
|
if($amounttype==CREDIT)
|
||||||
{
|
{
|
||||||
$type=RECEIPT;
|
$type=RECEIPT;
|
||||||
@ -330,14 +324,11 @@ class cashbook extends BaseController
|
|||||||
if($amounttype=='CREDIT')
|
if($amounttype=='CREDIT')
|
||||||
{
|
{
|
||||||
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu);
|
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu);
|
||||||
//print_r($cashbookstatus1);
|
|
||||||
//die();
|
|
||||||
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cashbookstatus = array('Clearbalance'=>$total,'Status'=>$stat);
|
$cashbookstatus = array('Clearbalance'=>$total,'Status'=>$stat);
|
||||||
//print_r($cashbookstatus);
|
|
||||||
$res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
$res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,7 +87,7 @@ class cashbook_model extends CI_Model
|
|||||||
}
|
}
|
||||||
function viewdepartment($sid='')
|
function viewdepartment($sid='')
|
||||||
{
|
{
|
||||||
$sql="SELECT ie.*,br.ID,ie.totalbankamount,ac.name,ie.id,date_format(ie.date,'%d-%m-%Y')as date FROM t_income_expense ie
|
$sql="SELECT ie.*,br.*,br.ID,ie.totalbankamount,ac.name,ie.id,date_format(ie.date,'%d-%m-%Y')as date FROM t_income_expense ie
|
||||||
left join t_accountcode ac on ac.code=ie.account_code
|
left join t_accountcode ac on ac.code=ie.account_code
|
||||||
left join T_bankreport br on br.ID=ie.bankid
|
left join T_bankreport br on br.ID=ie.bankid
|
||||||
WHERE ie.id = ?";
|
WHERE ie.id = ?";
|
||||||
@ -155,11 +155,11 @@ class cashbook_model extends CI_Model
|
|||||||
$status='ST057';
|
$status='ST057';
|
||||||
//echo $tdate;
|
//echo $tdate;
|
||||||
//die();
|
//die();
|
||||||
$this->db->distinct();
|
$this->db->distinct();
|
||||||
$this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,
|
$this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,
|
||||||
POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid,
|
POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid,
|
||||||
POM.PODate,POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status,
|
POM.PODate,POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status,
|
||||||
PUADV.AdvanceAmount');
|
PUADV.AdvanceAmount');
|
||||||
$this->db->from ('T_PurchaseOrder_Master POM');
|
$this->db->from ('T_PurchaseOrder_Master POM');
|
||||||
|
|
||||||
$this->db->join('T_SupplierDetailsN supp','supp.SupplierID = POM.SupplierID');
|
$this->db->join('T_SupplierDetailsN supp','supp.SupplierID = POM.SupplierID');
|
||||||
@ -189,7 +189,7 @@ class cashbook_model extends CI_Model
|
|||||||
$this->db->join ('ip_invoices iv','iv.invoice_id = iva.invoice_id','left');
|
$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 ('ip_clients ic','ic.client_id = iv.client_id','left');
|
||||||
$this->db->join ('T_Bankinvoicereport BI','BI.invoiceno = iva.invoice_id','left');
|
$this->db->join ('T_Bankinvoicereport BI','BI.invoiceno = iva.invoice_id','left');
|
||||||
$this->db->where('iva.receivedstatus !=','ST065');
|
$this->db->where('iva.receivedstatus !=','ST065');
|
||||||
$this->db->where('ic.client_name',$Customer);
|
$this->db->where('ic.client_name',$Customer);
|
||||||
$this->db->or_where('iv.invoice_date_created BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
$this->db->or_where('iv.invoice_date_created BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
||||||
$this->db->group_by('iva.invoice_id');
|
$this->db->group_by('iva.invoice_id');
|
||||||
@ -296,7 +296,7 @@ function debitpolist($bankid)
|
|||||||
|
|
||||||
function mappingcash($SupplierName,$fdate,$tdate,$bankid)
|
function mappingcash($SupplierName,$fdate,$tdate,$bankid)
|
||||||
{
|
{
|
||||||
$this->db->select('date,bankid,cashtype,amounttype,total,account_code');
|
$this->db->select('date,bankid,cashtype,amounttype,total,account_code,totalbankamount');
|
||||||
$this->db->from ('t_income_expense');
|
$this->db->from ('t_income_expense');
|
||||||
//$this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left');
|
//$this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left');
|
||||||
$this->db->where('bankid',$bankid);
|
$this->db->where('bankid',$bankid);
|
||||||
|
|||||||
@ -1,18 +1,13 @@
|
|||||||
|
|
||||||
<?php //print_r($dropdownvalues);?>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
?>
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
var t = [];
|
var t = [];
|
||||||
var ex = [];
|
var ex = [];
|
||||||
var inc = [];
|
var inc = [];
|
||||||
t= <?php echo json_encode($dropdownvalues)?>;
|
t= <?php echo json_encode($dropdownvalues)?>;
|
||||||
|
//alert(t+'t');
|
||||||
$.each(t,function(i,item){
|
$.each(t,function(i,item){
|
||||||
if(item.type == 'RECEIPT')
|
if(item.type == 'RECEIPT')
|
||||||
{
|
{
|
||||||
@ -20,6 +15,7 @@ $(function() {
|
|||||||
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -72,10 +68,60 @@ function isNumberKey(evt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//$(document).ready(function()
|
//$(document).ready(function()
|
||||||
function loadAccountType(id)
|
// function loadAccountType(id)
|
||||||
{
|
// {
|
||||||
//alert('called'+id);
|
// //alert('called'+id);
|
||||||
var id=id;
|
// var id=id;
|
||||||
|
// var t = [];
|
||||||
|
// var ex = [];
|
||||||
|
// var inc = [];
|
||||||
|
// t= <?php echo json_encode($dropdownvalues)?>;
|
||||||
|
|
||||||
|
// if(id == 'myradio1')
|
||||||
|
// {
|
||||||
|
// //alert('INCOME clicked');
|
||||||
|
|
||||||
|
// $('#accode').find('option').remove().end().append('<option value="-1">Select Account Name</option>').val('Select Account Code');
|
||||||
|
|
||||||
|
// $.each(t,function(i,item){
|
||||||
|
// if(item.type == 'RECEIPT')
|
||||||
|
// {
|
||||||
|
// $('#towhom').text('Received From:');
|
||||||
|
// $("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if(id == 'myradio2')
|
||||||
|
// {
|
||||||
|
// //alert('expense clicked');
|
||||||
|
|
||||||
|
// $('#accode').find('option').remove().end().append('<option value="-1">Select Account Name</option>').val('Select Account Code');
|
||||||
|
|
||||||
|
// $.each(t,function(i,item){
|
||||||
|
// if(item.type == 'PAYMENT')
|
||||||
|
// {
|
||||||
|
// $('#towhom').text('Paid To:');
|
||||||
|
// $("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// }
|
||||||
|
// //alert('final alert');
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
var amounttype=localStorage.getItem('typeamount');
|
||||||
|
//alert(amounttype+'atp');
|
||||||
|
if(amounttype==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
id='myradio1';
|
||||||
|
var id=id;
|
||||||
var t = [];
|
var t = [];
|
||||||
var ex = [];
|
var ex = [];
|
||||||
var inc = [];
|
var inc = [];
|
||||||
@ -90,6 +136,9 @@ function loadAccountType(id)
|
|||||||
$.each(t,function(i,item){
|
$.each(t,function(i,item){
|
||||||
if(item.type == 'RECEIPT')
|
if(item.type == 'RECEIPT')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$('#receipt').show();
|
||||||
|
$('#payment').hide();
|
||||||
$('#towhom').text('Received From:');
|
$('#towhom').text('Received From:');
|
||||||
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||||
}
|
}
|
||||||
@ -97,8 +146,19 @@ function loadAccountType(id)
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(id == 'myradio2')
|
//return true;
|
||||||
{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
id='myradio2';
|
||||||
|
var id=id;
|
||||||
|
var t = [];
|
||||||
|
var ex = [];
|
||||||
|
var inc = [];
|
||||||
|
t= <?php echo json_encode($dropdownvalues)?>;
|
||||||
|
if(id == 'myradio2')
|
||||||
|
{
|
||||||
//alert('expense clicked');
|
//alert('expense clicked');
|
||||||
|
|
||||||
$('#accode').find('option').remove().end().append('<option value="-1">Select Account Name</option>').val('Select Account Code');
|
$('#accode').find('option').remove().end().append('<option value="-1">Select Account Name</option>').val('Select Account Code');
|
||||||
@ -106,47 +166,91 @@ function loadAccountType(id)
|
|||||||
$.each(t,function(i,item){
|
$.each(t,function(i,item){
|
||||||
if(item.type == 'PAYMENT')
|
if(item.type == 'PAYMENT')
|
||||||
{
|
{
|
||||||
|
$('#payment').show();
|
||||||
|
$('#receipt').hide();
|
||||||
$('#towhom').text('Paid To:');
|
$('#towhom').text('Paid To:');
|
||||||
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
//alert('final alert');
|
//return true;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
if(!empty($cashbanking))
|
|
||||||
{
|
|
||||||
//print_r($cashbanking);
|
|
||||||
foreach($cashbanking as $cb)
|
|
||||||
{
|
|
||||||
$amounttype=$cb->amounttype;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$(document).ready(function()
|
//alert(amounttype+'atrtgsg');
|
||||||
{
|
if(amounttype==0)
|
||||||
amounttype= <?php echo json_encode($amounttype)?>;
|
{
|
||||||
//alert(amounttype);
|
atype='CREDIT';
|
||||||
if(amounttype=='CREDIT')
|
}
|
||||||
{
|
else
|
||||||
|
{
|
||||||
|
atype='DEBIT';
|
||||||
|
}
|
||||||
|
var bankiddebit=localStorage.getItem('bankiddebit');
|
||||||
|
var bankidcredit=localStorage.getItem('bankidcredit');
|
||||||
|
|
||||||
|
$('#batype').val(atype);
|
||||||
|
$('#borc').val('Bank');
|
||||||
|
//alert(alreadyreceived+'arrr');
|
||||||
|
var bankiddebit = bankiddebit.split(',');
|
||||||
|
if(amounttype==1)
|
||||||
|
{
|
||||||
|
//id='myradio2';
|
||||||
|
//loadAccountType(id);
|
||||||
|
|
||||||
|
$.each(bankiddebit, function( index, value )
|
||||||
|
{
|
||||||
|
var type='DEBIT';
|
||||||
|
var bankiddebit = value.split('-');
|
||||||
|
var bid=bankiddebit[0];
|
||||||
|
$('#bakid').val(bid);
|
||||||
|
//alert(bid+'ighhhhhhhhhhhhh');
|
||||||
|
var bamd=bankiddebit[1];
|
||||||
|
var alreadypaid=localStorage.getItem('paidedamount');
|
||||||
|
//alert(alreadypaid+'aap');
|
||||||
|
$('#alreadypaid').val(alreadypaid);
|
||||||
|
var banktotaldebit=localStorage.getItem('debitamount');
|
||||||
|
$('#totalbankamount').val(banktotaldebit);
|
||||||
|
document.getElementById("bankid").innerHTML='Payment ID:'+bid;
|
||||||
|
document.getElementById("bamount").innerHTML='Payment Amount:'+bamd+'Rs';
|
||||||
|
$('#totalamount').val(bamd);
|
||||||
|
document.getElementById("type").innerHTML='Payment Type:'+type;
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//alert('receipt');
|
||||||
|
//id='myradio1';
|
||||||
|
//loadAccountType(id);
|
||||||
|
|
||||||
|
var bankidcredit = bankidcredit.split(',');
|
||||||
|
//var i;
|
||||||
|
$.each(bankidcredit, function( index, value )
|
||||||
|
{
|
||||||
|
var type='CREDIT';
|
||||||
|
var bankidcredit = value.split('-');
|
||||||
|
var bidc=bankidcredit[0];
|
||||||
|
$('#bakid').val(bidc);
|
||||||
|
var bamc=bankidcredit[1];
|
||||||
|
var totcredit=localStorage.getItem('totcredit');
|
||||||
|
$('#totalbankamount').val(totcredit);
|
||||||
|
var alreadyreceived=localStorage.getItem('alreadyreceived');
|
||||||
|
$('#alreadycreditpaid').val(alreadyreceived);
|
||||||
|
//for showing text box//
|
||||||
|
document.getElementById("bankid").innerHTML='Payment ID:'+bidc;
|
||||||
|
$('#totalamount').val(bamc);
|
||||||
|
document.getElementById("bamount").innerHTML='Payment Amount:'+bamc+'Rs';
|
||||||
|
document.getElementById("type").innerHTML='Payment Type:'+type;
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
id='myradio1'
|
|
||||||
loadAccountType(id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//alert('debit')
|
|
||||||
id='myradio2'
|
|
||||||
loadAccountType(id);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="content-wrapper" style="min-height: 537px;">
|
<div class="content-wrapper" style="min-height: 537px;">
|
||||||
@ -177,39 +281,32 @@ loadAccountType(id);
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<?php
|
|
||||||
$type=$cb->amounttype;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if($type==DEBIT)
|
|
||||||
{
|
<div id="payment">
|
||||||
?>
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3" >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<b><span for="Accountcode">Select Account type:</span> </b> </br></br>
|
<b><span for="Accountcode">Select Account type:</span></b> </br></br>
|
||||||
|
|
||||||
<input type="radio" onclick = loadAccountType(this.id); id="myradio2" name="myradio" value="2" checked>PAYMENT
|
<input type="radio" id="myradio2" name="myradio" value="2" checked>PAYMENT
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
</div>
|
||||||
}
|
|
||||||
else{
|
<div id="receipt">
|
||||||
?>
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<b><span for="Accountcode">Select Account type:</span> </b> </br></br>
|
<b><span for="Accountcode">Select Account type:</span> </b> </br></br>
|
||||||
<input type="radio" onclick = loadAccountType(this.id); id="myradio1" name="myradio" value="1" checked>RECEIPT
|
<input type="radio" id="myradio1" name="myradio" value="1" checked>RECEIPT
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -241,6 +338,17 @@ loadAccountType(id);
|
|||||||
<span for="towhome" id="towhom">AAA</span></b><span style="color:red">*</span></br></br>
|
<span for="towhome" id="towhom">AAA</span></b><span style="color:red">*</span></br></br>
|
||||||
<input type="text" class="form-control required" id="towhome" name="towhome">
|
<input type="text" class="form-control required" id="towhome" name="towhome">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -55px;font-size:14px;background-color:#ccc;">
|
||||||
|
<p style="margin-left:62px;padding-top:25px;" id="bankid" value="">Payment ID: <b></p>
|
||||||
|
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
||||||
|
<p style="margin-left:41px;" id="bamount" value="">Payment Amount: <b></b></p>
|
||||||
|
<p style="margin-left:41px;" id="type" value="">Payment Amount Type: <b><?php echo $cb->amounttype?></b></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -347,15 +455,15 @@ loadAccountType(id);
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<b><span for="Total">Total Amount:</span></b><span style="color:red">*</span>
|
<b><span for="Total">Total Amount:</span></b><span style="color:red">*</span>
|
||||||
|
|
||||||
<input type="text" class="form-control" id="totalamount" name="totalamount" onkeypress="return isNumberKey(event)" style="text-align:right;" value="<?php echo $cb->mappingamount?>">
|
<input type="text" class="form-control" id="totalamount" name="totalamount" onkeypress="return isNumberKey(event)" style="text-align:right;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="type" name="type" value="<?php echo $cb->amounttype?>">
|
<input type="hidden" id="bakid" name="bakid">
|
||||||
<input type="hidden" id="bankid" name="bankid" value="<?php echo $cb->mid?>">
|
<input type="hidden" id="batype" name="type">
|
||||||
<input type="hidden" id="alreadypaid" name="alreadypaid" value="<?php echo $cb->amount?>">
|
<input type="hidden" id="alreadypaid" name="alreadypaid">
|
||||||
<input type="hidden" id="alreadycreditpaid" name="alreadycreditpaid" value="<?php echo $cb->alreadycreditpaid?>">
|
<input type="hidden" id="alreadycreditpaid" name="alreadycreditpaid">
|
||||||
<input type="hidden" id="totalbankamount" name="totalbankamount" value="<?php echo $cb->totalamount?>">
|
<input type="hidden" id="totalbankamount" name="totalbankamount">
|
||||||
<input type="hidden" id="borc" name="borc" value="<?php echo $cb->boption?>">
|
<input type="hidden" id="borc" name="borc">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -421,22 +529,17 @@ loadAccountType(id);
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
// $(document).ready(function() {
|
|
||||||
// var amounttype=$('#type').val();
|
|
||||||
// alert(amounttype);
|
|
||||||
// if (amounttype=='DEBIT')
|
|
||||||
// {
|
|
||||||
// $('#towhom').text('Paid To:');
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// $('#towhom').text('Received From:');
|
|
||||||
// }
|
|
||||||
// } );
|
|
||||||
function amountcheck()
|
function amountcheck()
|
||||||
{
|
{
|
||||||
var bankamount=$('#totalbankamount').val();
|
|
||||||
|
var bankamount=$('#bamount').text();
|
||||||
|
|
||||||
|
var b= bankamount.split(':');
|
||||||
|
var bankamount = b[1].replace(/[^0-9]+/ig,"");
|
||||||
|
// alert(number+'number');
|
||||||
var total = $('#totalamount').val();
|
var total = $('#totalamount').val();
|
||||||
|
//alert(total);
|
||||||
if(parseFloat(bankamount)>=parseFloat(total))
|
if(parseFloat(bankamount)>=parseFloat(total))
|
||||||
{
|
{
|
||||||
validate();
|
validate();
|
||||||
|
|||||||
@ -136,26 +136,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
|
||||||
<label for="from_date">
|
|
||||||
<?php echo 'Bank Debit Amount'; ?>
|
|
||||||
</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" id="debitamount" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<label for="from_date">
|
|
||||||
<?php echo 'Bank Id'; ?>
|
|
||||||
</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" id="bankid" value="" readonly>
|
|
||||||
|
|
||||||
</div>
|
<input type="hidden" id="debitamount" readonly>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
<input type="hidden" id="bankid" value="" readonly>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -55px;font-size:14px;background-color:#ccc;">
|
||||||
|
<p style="margin-left:25px;" id="bid" value="">Payment ID: </p>
|
||||||
|
<!--<p style="margin-left:25px;" id="debit1amount" value="">Total Amount: </p>-->
|
||||||
|
<p style="margin-left:25px;">Payment Mode: Bank</p>
|
||||||
|
<p style="margin-left:25px;" id="bamount" value="">Payment Amount: </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<br>
|
<br>
|
||||||
@ -296,7 +299,12 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var res=localStorage.getItem('test1');
|
var res=localStorage.getItem('test1');
|
||||||
|
var amount=localStorage.getItem('test');
|
||||||
|
var debamount=localStorage.getItem('damount');
|
||||||
$('#debitamount').val(localStorage.getItem('test'));
|
$('#debitamount').val(localStorage.getItem('test'));
|
||||||
|
//$('#bamount').val(localStorage.getItem('test'));
|
||||||
|
document.getElementById("bamount").innerHTML='Payment Amount:'+amount;
|
||||||
|
//document.getElementById("debit1amount").innerHTML='Total Amount:'+debamount;
|
||||||
//alert(res.length);
|
//alert(res.length);
|
||||||
//alert(localStorage.getItem('test1'));
|
//alert(localStorage.getItem('test1'));
|
||||||
var res1 = res.split(',');
|
var res1 = res.split(',');
|
||||||
@ -310,6 +318,7 @@
|
|||||||
//alert(bid);
|
//alert(bid);
|
||||||
//alert(bam);
|
//alert(bam);
|
||||||
$('#bankid').val(bid);
|
$('#bankid').val(bid);
|
||||||
|
document.getElementById("bid").innerHTML='Payment ID:' +bid;
|
||||||
});
|
});
|
||||||
|
|
||||||
//alert(res2);
|
//alert(res2);
|
||||||
@ -632,7 +641,7 @@ function GetAmount(i)
|
|||||||
function Save()
|
function Save()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$('#content').loader('show');
|
||||||
var rowCount= $('#Rowid').val();
|
var rowCount= $('#Rowid').val();
|
||||||
var check= 0;
|
var check= 0;
|
||||||
var rw= 0;
|
var rw= 0;
|
||||||
|
|||||||
@ -79,6 +79,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||||
|
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Invoice Report</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Invoice Report</b></p></h3></center>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
|
||||||
@ -135,26 +136,29 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
|
||||||
<label for="from_date">
|
|
||||||
<?php echo 'Bank Debit Amount'; ?>
|
|
||||||
</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" id="debitamount" value="<?php echo $cash; ?>" readonly>
|
|
||||||
|
|
||||||
</div>
|
<input type="hidden" id="debitamount" value="<?php echo $cash; ?>" readonly>
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label for="from_date">
|
|
||||||
<?php echo 'Bank ID'; ?>
|
|
||||||
</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" id="bankid" value="<?php echo $bankid; ?>" readonly>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
<input type="hidden" id="bankid" value="<?php echo $bankid; ?>" readonly>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -55px;font-size:14px;background-color:#ccc;">
|
||||||
|
<p style="margin-left:25px;" id="bid" value=""</b>>Payment ID: </p>
|
||||||
|
<p style="margin-left:25px;">Payment Mode: Bank</p>
|
||||||
|
<p style="margin-left:25px;" id="bamount" value="">Payment Amount: </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<br>
|
<br>
|
||||||
@ -286,6 +290,10 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var res=localStorage.getItem('test2');
|
var res=localStorage.getItem('test2');
|
||||||
$('#debitamount').val(localStorage.getItem('tes'));
|
$('#debitamount').val(localStorage.getItem('tes'));
|
||||||
|
var amount=localStorage.getItem('tes');
|
||||||
|
alert(amount);
|
||||||
|
//$('#bamount').val(localStorage.getItem('test'));
|
||||||
|
document.getElementById("bamount").innerHTML='Payment Amount:'+amount+'Rs';
|
||||||
//alert(res.length);
|
//alert(res.length);
|
||||||
//alert(localStorage.getItem('test1'));
|
//alert(localStorage.getItem('test1'));
|
||||||
var res1 = res.split(',');
|
var res1 = res.split(',');
|
||||||
@ -299,6 +307,7 @@
|
|||||||
//alert(bid);
|
//alert(bid);
|
||||||
//alert(bam);
|
//alert(bam);
|
||||||
$('#bankid').val(bid);
|
$('#bankid').val(bid);
|
||||||
|
document.getElementById("bid").innerHTML='Payment ID:' +bid;
|
||||||
});
|
});
|
||||||
//alert($data['cash']);
|
//alert($data['cash']);
|
||||||
// $('#debitamount').val('10');
|
// $('#debitamount').val('10');
|
||||||
@ -577,6 +586,7 @@ function GetAmount(i)
|
|||||||
|
|
||||||
function Save()
|
function Save()
|
||||||
{
|
{
|
||||||
|
$('#content').loader('show');
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
|
|
||||||
var rowCount= $('#Rowid').val();
|
var rowCount= $('#Rowid').val();
|
||||||
|
|||||||
@ -111,13 +111,18 @@ if(!empty($debitmapping))
|
|||||||
?>
|
?>
|
||||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
<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>
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Credit Amount Paid Report</b></p></h3></center>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div style="border-style: solid;width:40%;height:30%;margin-left:30%;font-size:18px;background-color:#ccc;">
|
<div class="col-md-3 col-md-offset-9">
|
||||||
<p style="margin-left:10px;"><b>Payment ID: <?php echo $bankid?></b></p>
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -55px;font-size:14px;background-color:#ccc;">
|
||||||
<p style="margin-left:10px;"><b>Payment Mode: Bank</b></p>
|
<p style="margin-left:62px;padding-top:30px;">Payment ID: <b><?php echo $bankid?></b></p>
|
||||||
<p style="margin-left:10px;"><b>Payment Amount: <?php echo $totalamount ?></b></p>
|
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
||||||
|
<p style="margin-left:41px;">Payment Amount: <b><?php echo $totalamount ?></b></p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!--<div class="row">
|
<!--<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label for="from_date">
|
<label for="from_date">
|
||||||
@ -165,8 +170,7 @@ if(!empty($debitmapping))
|
|||||||
|
|
||||||
</div>-->
|
</div>-->
|
||||||
</form>
|
</form>
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
|
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -78,6 +78,7 @@ if(!empty($mapping))
|
|||||||
foreach($mappingcashbook as $mc)
|
foreach($mappingcashbook as $mc)
|
||||||
{
|
{
|
||||||
$bankid=$mc->bankid;
|
$bankid=$mc->bankid;
|
||||||
|
// $totalbankamount=$mc->totalbankamount;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,6 +87,7 @@ if(!empty($mapping))
|
|||||||
{
|
{
|
||||||
$bankid=$ap->mid;
|
$bankid=$ap->mid;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,14 +115,19 @@ if(!empty($mapping))
|
|||||||
$paymentamount=$pcamount+$poamount;
|
$paymentamount=$pcamount+$poamount;
|
||||||
?>
|
?>
|
||||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||||
|
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Amount Paid Report</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Amount Paid Report</b></p></h3></center>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3 col-sm-offset-9">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div style="border-style: solid;width:40%;height:30%;margin-left:30%;font-size:18px;background-color:#ccc;">
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -55px;font-size:14px;background-color:#ccc;">
|
||||||
<p style="margin-left:10px;"><b>Payment ID: <?php echo $bankid?></b></p>
|
<p style="margin-left:62px;padding-top:30px;">Payment ID: <?php echo $bankid?></p>
|
||||||
<p style="margin-left:10px;"><b>Payment Mode: Bank</b></p>
|
<p style="margin-left:41px;">Payment Mode: Bank</p>
|
||||||
<p style="margin-left:10px;"><b>Payment Amount: <?php echo $paymentamount ?></b></p>
|
<p style="margin-left:41px;">Payment Amount: <?php echo $paymentamount ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="row">
|
<!--<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -359,7 +366,7 @@ if(!empty($mapping))
|
|||||||
</tfoot>-->
|
</tfoot>-->
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -72,10 +72,10 @@
|
|||||||
|
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Report</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Report</b></p></h3></center>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<?php
|
<?php
|
||||||
$attributes = array('class' => 'form-label-left bankdata ','name' => 'bankdata','id' => 'bankdata');
|
// $attributes = array('class' => 'form-label-left bankdata ','name' => 'bankdata','id' => 'bankdata');
|
||||||
|
|
||||||
echo form_open($this->config->base_url().'/cashbook/bankdebitdata/',$attributes); ?>
|
// echo form_open($this->config->base_url().'/cashbook/bankdebitdata/',$attributes); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
@ -146,7 +146,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" style="padding:0px;">
|
<div class="col-md-12" style="padding:0px;">
|
||||||
<div class="col-md-2" style="padding-bottom:10px;">
|
<div class="col-md-2" style="padding-bottom:10px;">
|
||||||
<select style="height:35px;" name="selectedId" id="selectedId<?php echo $i?>" onchange="checkscreen();" title="Select Your Option">
|
<select style="height:35px;" name="selectedId" id="selectedId<?php echo $i?>" onchange="checkscreen(<?php echo $i?>);" title="Select Your Option">
|
||||||
<option value="-1" style="color:#FFF;">Select Option</option>
|
<option value="-1" style="color:#FFF;">Select Option</option>
|
||||||
<option value="1">Invoice</option>
|
<option value="1">Invoice</option>
|
||||||
<option value="2">Po screen</option>
|
<option value="2">Po screen</option>
|
||||||
@ -212,7 +212,7 @@
|
|||||||
{
|
{
|
||||||
$type = 1;
|
$type = 1;
|
||||||
}
|
}
|
||||||
//print_r($t);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
@ -285,11 +285,11 @@
|
|||||||
|
|
||||||
<td align="left" id="credit2<?php echo $i ?>"><a href="<?php echo base_url() ?>cashbook/mappinginvoice?d=<?php echo $t->ID?>"><span><?php echo $clearbalance;?></span></td>
|
<td align="left" id="credit2<?php echo $i ?>"><a href="<?php echo base_url() ?>cashbook/mappinginvoice?d=<?php echo $t->ID?>"><span><?php echo $clearbalance;?></span></td>
|
||||||
|
|
||||||
<td align="left" id="credit<?php echo $i ?>"><span><?php echo ($t->Credit)-($t->cclearbalance);?></span></td>
|
<td align="left" id="credited<?php echo $i ?>"><span><?php echo ($t->Credit)-($t->cclearbalance);?></span></td>
|
||||||
|
|
||||||
|
|
||||||
<td><?php echo $t->cstatus;?></th>
|
<td><?php echo $t->cstatus;?></th>
|
||||||
<!--<td align="left" id="credit<?php echo $i ?>"><a href="<?php echo base_url() ?>cashbook/cashreceipt?sid=<?php echo $t->Credit;?>&d=<?php echo $t->ID?>"><span><?php echo $t->Credit?></a></span></td>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -351,7 +351,7 @@
|
|||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
<form>
|
<form>
|
||||||
<input type="hidden" name="bankid1" id="bankid1">
|
<input type="hidden" name="bankid1" id="bankid1">
|
||||||
<input type="hidden" id="addvalue1" name="addvalue1">
|
<!--<input type="hidden" id="addvalue1" name="addvalue1">-->
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
@ -380,18 +380,33 @@ var tpaid='';
|
|||||||
var debit1='';
|
var debit1='';
|
||||||
var credit1='';
|
var credit1='';
|
||||||
var tcpaid='';
|
var tcpaid='';
|
||||||
function checkamount(t,i)
|
|
||||||
|
// function checkamount2(type,id)
|
||||||
|
// {
|
||||||
|
// var type = type;
|
||||||
|
// var id =id;
|
||||||
|
// alert('Statemenet tYpe and id'+type+'-'+id);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
function checkamount(type,ide)
|
||||||
{
|
{
|
||||||
value=i;
|
var value=ide;
|
||||||
|
//alert('row id'+value);
|
||||||
i1=value;
|
i1=value;
|
||||||
type= t;
|
type2= type;
|
||||||
amounttype=type;
|
amounttype=type2;
|
||||||
|
//alert(amounttype);
|
||||||
|
//alert('Type of row'+type2+'-'+amounttype);
|
||||||
var totalpaid= document.getElementById("totalpaid"+value).innerText;
|
var totalpaid= document.getElementById("totalpaid"+value).innerText;
|
||||||
tpaid=totalpaid;
|
tpaid=totalpaid;
|
||||||
|
//alert('Paid Amount'+tpaid);
|
||||||
var totalcreditpaid= document.getElementById("credit2"+value).innerText;
|
var totalcreditpaid= document.getElementById("credit2"+value).innerText;
|
||||||
tcpaid=totalcreditpaid;
|
tcpaid=totalcreditpaid;
|
||||||
|
//alert(tcpaid);
|
||||||
var btp=document.getElementById ("btc"+value).innerText;
|
var btp=document.getElementById ("btc"+value).innerText;
|
||||||
var x = document.getElementById('checkboxcheckbox'+value).checked;
|
var x = document.getElementById('checkboxcheckbox'+value).checked;
|
||||||
|
//alert('checkbox staus'+x);
|
||||||
|
|
||||||
if (x==true)
|
if (x==true)
|
||||||
{
|
{
|
||||||
@ -399,37 +414,51 @@ if (x==true)
|
|||||||
|
|
||||||
if(overalltype == type || overalltype == undefined) {
|
if(overalltype == type || overalltype == undefined) {
|
||||||
|
|
||||||
if(type==1){
|
if(type==1){ // 1 means Debit, 0 means Credit
|
||||||
|
|
||||||
overalltype = 1;
|
overalltype = 1;
|
||||||
row= parseInt(row)+1;
|
row= parseInt(row)+1;
|
||||||
$('#Rowid').val(row);
|
$('#Rowid').val(row);
|
||||||
var id=document.getElementById ("bankid"+value).innerText;
|
var id=document.getElementById ("bankid"+value).innerText;
|
||||||
var debit=document.getElementById ("btc"+value ).innerText;
|
|
||||||
debit1=debit;
|
|
||||||
|
|
||||||
|
var debit=document.getElementById ("btc"+value ).innerText;
|
||||||
|
// alert(debit+'hd');
|
||||||
|
debit1=debit;
|
||||||
|
//alert('bal to pay'+ debit);
|
||||||
//alert('You have selected bankid=' +id+ '\n and your amount is=' +debit+ '\n Please select Poscreen');
|
//alert('You have selected bankid=' +id+ '\n and your amount is=' +debit+ '\n Please select Poscreen');
|
||||||
var idvalue = id+'-'+debit;
|
var idvalue = id+'-'+debit;
|
||||||
tempidvalue.push(idvalue);
|
tempidvalue.push(idvalue);
|
||||||
tot11=parseFloat(tot11)
|
tot11=parseFloat(tot11)
|
||||||
|
//alert('tot11'+tot11);
|
||||||
tot11=parseFloat(tot11)+parseFloat(debit)
|
tot11=parseFloat(tot11)+parseFloat(debit)
|
||||||
|
//alert('afetr add tot11'+tot11);
|
||||||
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
||||||
if(debit==0)
|
if(debit==0)
|
||||||
{
|
{
|
||||||
alert('status is closed');
|
alert('status is closed');
|
||||||
|
document.getElementById('checkboxcheckbox'+value).checked = false;
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
overalltype = 0;
|
overalltype = 0;
|
||||||
var id=document.getElementById ("bankid"+value).innerText;
|
var id=document.getElementById ("bankid"+value).innerText;
|
||||||
var credit=document.getElementById ("credit"+value ).innerText;
|
//alert('value of current row id'+value);
|
||||||
|
// var amount=document.getElementById ("credited"+value).innerText;
|
||||||
|
// alert(amount+'rk');
|
||||||
|
var tempid = "credited"+value;
|
||||||
|
// alert(tempid+'creditlatest');
|
||||||
|
//alert('Tempid ='+tempid)
|
||||||
|
var credit=parseFloat(document.getElementById(tempid).innerText);
|
||||||
credit1=credit;
|
credit1=credit;
|
||||||
//alert('You have selected bankid=' +id+ '\n and your amount is=' +credit+ '\n Please select Invoice screen');
|
//alert('You have selected bankid=' +id+ '\n and your amount is=' +credit+ '\n Please select Invoice screen');
|
||||||
var idvalue1 = id+'-'+credit;
|
var idvalue1 = id+'-'+credit;
|
||||||
tempcredit.push(idvalue1);
|
tempcredit.push(idvalue1);
|
||||||
tot11=parseFloat(tot11)
|
tot11=parseFloat(tot11);
|
||||||
|
//alert('tot11-'+tot11);
|
||||||
tot11=parseFloat(tot11)+parseFloat(credit)
|
tot11=parseFloat(tot11)+parseFloat(credit)
|
||||||
|
//alert('afetr add tot11-'+tot11);
|
||||||
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -448,7 +477,7 @@ if (x==true)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
//alert('uncheck');
|
|
||||||
//$('#addvalue').val('0.00');
|
//$('#addvalue').val('0.00');
|
||||||
delamount= document.getElementById ( "debit"+i ).innerText;
|
delamount= document.getElementById ( "debit"+i ).innerText;
|
||||||
var tote= $('#addvalue').val();
|
var tote= $('#addvalue').val();
|
||||||
@ -468,35 +497,41 @@ if (x==true)
|
|||||||
{
|
{
|
||||||
|
|
||||||
var i=i1;
|
var i=i1;
|
||||||
//alert(i);
|
|
||||||
var avalue= $('#addvalue').val();
|
var avalue= $('#addvalue').val();
|
||||||
|
|
||||||
//alert(avalue);
|
//alert(avalue);
|
||||||
localStorage.setItem('test',avalue);
|
localStorage.setItem('test',avalue);
|
||||||
var damount =$('#debit'+i).val();
|
|
||||||
var e = document.getElementById("selectedId");
|
var e = document.getElementById("selectedId");
|
||||||
var value = e.options[e.selectedIndex].value;
|
var value = e.options[e.selectedIndex].value;
|
||||||
//alert(value+'dd');
|
|
||||||
var text = e.options[e.selectedIndex].text;
|
var text = e.options[e.selectedIndex].text;
|
||||||
var id=document.getElementById ("bankid"+i).innerText;
|
var id=$('#bankid'+i).text();
|
||||||
var date=document.getElementById ("date"+i).innerText;
|
var date=$('#date'+i).text();
|
||||||
var debit=document.getElementById ("debit"+i).innerText;
|
var debit=$('#debit'+i).text();
|
||||||
//var camount =document.getElementById ("#credit"+i).innerText;
|
var alreadypaid=$('#totalpaid'+i).text();
|
||||||
|
var credit=$('#credit1'+i).text();
|
||||||
|
localStorage.setItem('totcredit', credit);
|
||||||
|
var alreadycredit=$('#credit2'+i).text();
|
||||||
|
localStorage.setItem('alreadyreceived',alreadycredit);
|
||||||
|
localStorage.setItem('paidedamount',alreadypaid);
|
||||||
var RowCount= $('#Rowid').val();
|
var RowCount= $('#Rowid').val();
|
||||||
|
var idvalue = id+'-'+debit;
|
||||||
|
|
||||||
var idvalue = id+'-'+debit;
|
|
||||||
//var credit=$('#credit'+i).val();
|
|
||||||
if(avalue=='')
|
if(avalue=='')
|
||||||
{
|
{
|
||||||
//alert(avalue);
|
//alert(avalue);
|
||||||
alert('you have select debit or credit');
|
alert('you have select debit or credit');
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
else if(value=='2' && type=='1')
|
else if(value=='2' && amounttype=='1')
|
||||||
{
|
{
|
||||||
|
|
||||||
if(avalue>0)
|
if(avalue>0)
|
||||||
{
|
{
|
||||||
|
$('#content').loader('show');
|
||||||
localStorage.setItem('test1',tempidvalue);
|
localStorage.setItem('test1',tempidvalue);
|
||||||
localStorage.setItem('test', avalue);
|
localStorage.setItem('test', avalue);
|
||||||
|
localStorage.setItem('debitamount',debit);
|
||||||
|
|
||||||
window.location.href="Debitstatement";
|
window.location.href="Debitstatement";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -505,11 +540,12 @@ if (x==true)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(value=='1' && type=='0')
|
else if(value=='1' && amounttype=='0')
|
||||||
{
|
{
|
||||||
|
//alert(avalue);
|
||||||
if(avalue>0)
|
if(avalue>0)
|
||||||
{
|
{
|
||||||
|
$('#content').loader('show');
|
||||||
//alert(tempidvalue);
|
//alert(tempidvalue);
|
||||||
localStorage.setItem('test2',tempcredit);
|
localStorage.setItem('test2',tempcredit);
|
||||||
localStorage.setItem('tes', avalue);
|
localStorage.setItem('tes', avalue);
|
||||||
@ -519,37 +555,48 @@ if (x==true)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert('your amount is empty');
|
alert('your amount is empty');
|
||||||
|
document.getElementById('checkboxcheckbox'+i).checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(value=='3')
|
else if(value=='3')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//alert(avalue)
|
||||||
if(avalue>0)
|
if(avalue>0)
|
||||||
{
|
{
|
||||||
$('#content').loader('show');
|
localStorage.setItem('typeamount',amounttype);
|
||||||
$.ajax({
|
localStorage.setItem('bankiddebit',tempidvalue);
|
||||||
data:{bankdate:date,bankid:id,type:amounttype,bankamount:avalue,forstatus:avalue,alreadypaid:tpaid,alreadycreditpaid:tcpaid,debitamount:debit1,creditamount:credit1},
|
localStorage.setItem('test',avalue);
|
||||||
type:"POST",
|
localStorage.setItem('debitamount',debit);
|
||||||
url:"<?php echo base_url() ?>Payment",
|
localStorage.setItem('bankidcredit',tempcredit);
|
||||||
success:function(data)
|
|
||||||
{
|
|
||||||
|
|
||||||
window.location.href="Bankcash";
|
window.location.href="Bankcash";
|
||||||
content.loader.show();
|
// alert(tcpaid+'tc');
|
||||||
// if(data)
|
// $('#content').loader('show');
|
||||||
// {
|
// $.ajax({
|
||||||
// alert(data);
|
// data:{bankdate:date,bankid:id,type:amounttype,bankamount:avalue,forstatus:avalue,alreadypaid:tpaid,alreadycreditpaid:tcpaid,debitamount:debit1,creditamount:credit1},
|
||||||
// //location.reload();
|
// type:"POST",
|
||||||
|
// url:"<?php echo base_url() ?>Payment",
|
||||||
|
// success:function(data)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// window.location.href="Bankcash";
|
||||||
|
// content.loader.show();
|
||||||
|
// // if(data)
|
||||||
|
// // {
|
||||||
|
// // alert(data);
|
||||||
|
// // //location.reload();
|
||||||
|
|
||||||
|
|
||||||
// }
|
// // }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert('your amount is empty');
|
alert('your amount is empty');
|
||||||
|
document.getElementById('checkboxcheckbox'+i).checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user