bankstatement issues solved
This commit is contained in:
parent
1065d15390
commit
30a0063409
@ -231,6 +231,9 @@ class cashbook extends BaseController
|
||||
|
||||
|
||||
$accounttype = $this->input->post('myradio');
|
||||
//$accounttype1 = $this->input->post('myrad');
|
||||
//echo $accounttype;
|
||||
//echo $accounttype1;
|
||||
if($accounttype == 1)
|
||||
{
|
||||
$accounttype = 'RECEIPT';
|
||||
@ -239,6 +242,7 @@ class cashbook extends BaseController
|
||||
{
|
||||
$accounttype = 'PAYMENT';
|
||||
}
|
||||
|
||||
$accountcode = $this->input->post('accode');
|
||||
$date = $this->input->post('Date');
|
||||
$date = date_create($date);//,'Y-m-d');
|
||||
@ -564,6 +568,7 @@ class cashbook extends BaseController
|
||||
{
|
||||
$id1=$this->input->post('id1');
|
||||
$myradio1= $this->input->post('myradio');
|
||||
//$myradio2= $this->input->post('myrad');
|
||||
$option='';
|
||||
if($myradio1==1)
|
||||
{
|
||||
@ -724,7 +729,7 @@ class cashbook extends BaseController
|
||||
$fdate = $this->input->post('from_date');
|
||||
$tdate = $this->input->post('to_date');
|
||||
$data['bankinvoicedata'] = $this->cashbook_model->bankinvoice($Customer,$fdate,$tdate);
|
||||
$data['supplier'] = $this->cashbook_model->getsupplier();
|
||||
//$data['supplier'] = $this->cashbook_model->getsupplier();
|
||||
}
|
||||
$data['getcustomer'] = $this->cashbook_model->getcustomer();
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ class cashbook_model extends CI_Model
|
||||
}
|
||||
function getAccounTypes1()
|
||||
{
|
||||
$this->db->select('name');
|
||||
$this->db->select('name.type');
|
||||
$r = $this->db->get('t_accountcode');
|
||||
return $r->result();
|
||||
|
||||
@ -184,11 +184,12 @@ class cashbook_model extends CI_Model
|
||||
{
|
||||
|
||||
$this->db->distinct();
|
||||
$this->db->select('iva.invoice_id,iva.invoice_total,iv.invoice_date_created,iva.invoice_paid,ic.client_name,BI.balancetoreceived,BI.amountreceived');
|
||||
$this->db->select('iva.invoice_id,iva.invoice_total,iv.invoice_date_created,iv.invoice_number,iva.invoice_paid,ic.client_name,BI.balancetoreceived,BI.amountreceived');
|
||||
$this->db->from ('ip_invoice_amounts iva');
|
||||
$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 = iva.invoice_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('iva.receivedstatus !=','ST065');
|
||||
$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)).'"');
|
||||
@ -438,7 +439,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
||||
}
|
||||
public function cashbankupdate($cashbookstatus,$bankid)
|
||||
{
|
||||
echo $bankid;
|
||||
// echo $bankid;
|
||||
$this->db->where('ID',$bankid);
|
||||
$this->db->update('T_bankreport',$cashbookstatus);
|
||||
return TRUE;
|
||||
@ -547,8 +548,8 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
||||
}
|
||||
function poamountstatus($pomaster,$pono)
|
||||
{
|
||||
echo $pomaster;
|
||||
echo $pono;
|
||||
//echo $pomaster;
|
||||
//echo $pono;
|
||||
$this->db->where('PONO', $pono);
|
||||
$this->db->update('T_PurchaseOrder_Master',$pomaster);
|
||||
$r = $this->db->affected_rows();
|
||||
|
||||
@ -1,5 +1,12 @@
|
||||
|
||||
|
||||
<?php
|
||||
foreach($dropdownvalues as $type)
|
||||
{
|
||||
$atype =$type->type;
|
||||
//print_r($atype);
|
||||
}
|
||||
|
||||
?>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
@ -7,6 +14,7 @@ $(function() {
|
||||
var ex = [];
|
||||
var inc = [];
|
||||
t= <?php echo json_encode($dropdownvalues)?>;
|
||||
|
||||
//alert(t+'t');
|
||||
$.each(t,function(i,item){
|
||||
if(item.type == 'RECEIPT')
|
||||
@ -67,50 +75,7 @@ function isNumberKey(evt)
|
||||
return true;
|
||||
}
|
||||
|
||||
//$(document).ready(function()
|
||||
// function loadAccountType(id)
|
||||
// {
|
||||
// //alert('called'+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()
|
||||
@ -166,6 +131,7 @@ else
|
||||
$.each(t,function(i,item){
|
||||
if(item.type == 'PAYMENT')
|
||||
{
|
||||
$("#myradio2").prop("checked", true);
|
||||
$('#payment').show();
|
||||
$('#receipt').hide();
|
||||
$('#towhom').text('Paid To:');
|
||||
@ -196,8 +162,6 @@ else
|
||||
var bankiddebit = bankiddebit.split(',');
|
||||
if(amounttype==1)
|
||||
{
|
||||
//id='myradio2';
|
||||
//loadAccountType(id);
|
||||
|
||||
$.each(bankiddebit, function( index, value )
|
||||
{
|
||||
@ -282,21 +246,20 @@ else
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="payment">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3" >
|
||||
<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" id="myradio2" name="myradio" value="2" checked>PAYMENT
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="receipt">
|
||||
<div id="receipt">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
@ -308,7 +271,6 @@ else
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group"><b>
|
||||
@ -346,7 +308,7 @@ else
|
||||
<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>
|
||||
<p style="margin-left:41px;" id="type" value="">Payment Amount Type: <b></b></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
<input type="hidden" id="bankid" value="" readonly>
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<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>-->
|
||||
|
||||
@ -150,7 +150,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<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>
|
||||
@ -170,7 +170,7 @@
|
||||
<th>Select</th>
|
||||
|
||||
<th>Date</th>
|
||||
<th>Invoice ID</th>
|
||||
<th>Invoice Number</th>
|
||||
<th>Customer Name</th>
|
||||
<th>Invoice Amount<?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th>Balance To Received</th>
|
||||
@ -189,9 +189,13 @@
|
||||
//print_r($bankdepit);
|
||||
//die();
|
||||
foreach($bankinvoicedata as $t)
|
||||
//print_r($bankinvoicedata);
|
||||
{
|
||||
$status=$t->Paymentstatus;
|
||||
$balancetopay=$t->Balancetopay;
|
||||
// $invoice_total=$t->invoice_total;
|
||||
// $amountreceived=$t->amountreceived;
|
||||
// $balancetoreceived=$invoice_total-$amountreceived
|
||||
//print_r($$status);
|
||||
if($status !='ST057')
|
||||
{
|
||||
@ -202,10 +206,10 @@
|
||||
|
||||
<td data-name="sell"><input type="checkbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
|
||||
<td align="left" id="invoicedate<?php echo $i ?>"><span><?php echo $t->invoice_date_created?></span></td>
|
||||
<td align="left" id="invoice_id<?php echo $i ?>"><span><?php echo $t->invoice_id?></span></td>
|
||||
<td align="left" id="invoice_id<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $t->invoice_number;?>"><span><?php echo $t->invoice_number?></span></td>
|
||||
<td align="left" id="client_name<?php echo $i ?>"><span><?php echo $t->client_name?></span></td>
|
||||
<td align="left" id="invoice_paid<?php echo $i ?>"><span><?php echo $t->invoice_total?></span></td>
|
||||
<td align="left" id="invoice_balance<?php echo $i ?>"><span><?php echo $t->invoice_total-$t->amountreceived?></span></td>
|
||||
<td align="left" id="invoice_balance<?php echo $i ?>"><span><?php echo ($t->invoice_total)-($t->amountreceived)?></span></td>
|
||||
<td data-name="sel"><input type="text" onkeypress="return isNumberKey(event)" onchange="GetAmount(<?php echo $i ?>)" id="invoicereceived<?php echo $i ?>"></td>
|
||||
|
||||
|
||||
@ -291,11 +295,7 @@
|
||||
var res=localStorage.getItem('test2');
|
||||
$('#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(localStorage.getItem('test1'));
|
||||
var res1 = res.split(',');
|
||||
var i;
|
||||
$.each(res1, function(index, value)
|
||||
|
||||
@ -38,6 +38,9 @@ if(!empty($DepDetails))
|
||||
$amounttype=$ded->amounttype;
|
||||
$alreadypaid=$ded->Clearbalance;
|
||||
$alreadyreceived=$ded->cclearbalance;
|
||||
//echo $alreadypaid;
|
||||
//echo $alreadyreceived;
|
||||
$typeofmap=$ded->cashtype;
|
||||
$type1=$ded->type;
|
||||
$viewdep=$ded->total;
|
||||
$dropdown=$ded->name;
|
||||
@ -52,16 +55,29 @@ if(!empty($DepDetails))
|
||||
$IGST1=$ded->igst;
|
||||
$Description1=$ded->description;
|
||||
$towhom1=$ded->towhom;
|
||||
$balancetoupdate=($bankamount)-($alreadypaid+$alreadyreceived);
|
||||
//$file1=$ded->document;
|
||||
//echo $file1;
|
||||
}}
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
||||
//var drop=$("input[type=radio][name='range']:checked").val()
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
var typeofmap = "<?php echo $typeofmap;?>";
|
||||
//alert(typeofmap+'tom');
|
||||
if(typeofmap=='Cash')
|
||||
|
||||
{
|
||||
$('#detail').hide();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#detail').show();
|
||||
}
|
||||
var type = "<?php echo $type1;?>";
|
||||
//alert(type);
|
||||
if(type == "RECEIPT")
|
||||
@ -204,13 +220,24 @@ function loadAccountType(id)
|
||||
|
||||
<div class="content-wrapper" style="min-height: 537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Edit Receipt and Payment</center>
|
||||
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Siddharth Industries - Edit Receipt and Payment</b></p></h3></center>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<div id="detail">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<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:30px;">Payment ID: <b><?php echo $bankid;?></b></p>
|
||||
<p style="margin-left:41px;">Total Amount: <b><?php echo $bankamount; ?></b>Rs</p>
|
||||
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
||||
<p style="margin-left:41px;">Remaining Balance: <b><?php echo $balancetoupdate; ?></b>Rs</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php base_url() ?>incomeExpenseList" class="btn btn-primary" value="Back"/>Back</a>
|
||||
@ -244,11 +271,23 @@ function loadAccountType(id)
|
||||
|
||||
<td><?php echo form_label('PAYMENT', 'PAYMENT') ." ". form_radio(array("name"=>"Range","id"=>"PAYMENT","value"=>"PAYMENT", 'checked'=>('PAYMENT' == $type1) ? TRUE : FALSE,'onchange'=>'SetVatorCST();')); ?>
|
||||
</td> -->
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<?php
|
||||
if($type1=='RECEIPT')
|
||||
{
|
||||
?>
|
||||
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio1" name="myradio" value="1" >RECEIPT
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
|
||||
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio2" name="myradio" value="2" >PAYMENT
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -486,7 +525,10 @@ function loadAccountType(id)
|
||||
function amountcheck()
|
||||
{
|
||||
var bankamount = $('#bankamount').val();
|
||||
//alert(bankamount+'total');
|
||||
|
||||
var cashamount = $('#totalamount').val();
|
||||
//alert(cashamount+'mam');
|
||||
if(parseFloat(bankamount)>=parseFloat(cashamount))
|
||||
{
|
||||
validate();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user