Skip to content

Commit

Permalink
Filter Option Ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
KaushikOP committed Jul 12, 2021
2 parents 574f1f2 + a8a0a3f commit 7d6734b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions JS/fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ $(document).ready(function() {
url: "getInvoiceNo.php",
data: 'firmId='+firmId,
success: function(result){
$('#invoiceNumber').val(result[0]);
$('#NinvoiceNumber').val(result[0]);
$('#invoiceNumber').val(result);
$('#NinvoiceNumber').val(result);
}
});
});
Expand Down
5 changes: 5 additions & 0 deletions Receivables.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,13 @@ <h5 class="col-2">Select client:</h5>
<td class="text-center">
<?php echo $row_count; ?>
</td>
<<<<<<< HEAD
<td class="text-left" >
<?php echo $row['shortform']; ?>
=======
<td class="text-left">
<?php echo $row['shortForm']; ?>
>>>>>>> a8a0a3f66eb451500d7427ad9dd77833af5d539b
</td>
<td class="text-left">
<?php echo $row['invoice_no']; ?>
Expand Down
6 changes: 3 additions & 3 deletions getInvoiceNo.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
if(isset($_GET)){
$firmId = $_GET['firmId'];
setcookie("firmId",$firmId); //firmId for bill_master insertion
$query = "select invoice_no from bill_master where firm_id =".$firmId." order by invoice_no DESC";
$query = "select invoice_no from bill_master where firm_id =".$firmId." order by invoice_no DESC limit 1";
$result = mysqli_query($con,$query);
$lastInvoiceNo = 0;
$lastInvoiceNo = '2021-22/0';
if($result->num_rows>0){
while($row=mysqli_fetch_assoc($result)){
$lastInvoiceNo = $row['invoice_no']+1;
$lastInvoiceNo = '2021-22/'.(((int)(explode('/',$row['invoice_no'])[1]))+1);
}
}

Expand Down
1 change: 0 additions & 1 deletion insertInvoiceData.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
$tax_amount = 0;
if($firmId==3){
$tax_amount = $pAmount + $pAmount*0.18;
echo $tax_amount;
}
$queryBillDetails = "insert into bill_details (bill_master_id,firm_id,service_id,taxable_amount,tax_amount)
values('".$formData[0]."','".$firmId."',".$pID.",".$pAmount.",".$tax_amount.")";
Expand Down

0 comments on commit 7d6734b

Please sign in to comment.