Skip to content

Commit

Permalink
Version 1
Browse files Browse the repository at this point in the history
  • Loading branch information
KaushikOP committed Oct 29, 2021
1 parent 6b9703e commit 299d3f6
Show file tree
Hide file tree
Showing 9 changed files with 587 additions and 188 deletions.
270 changes: 146 additions & 124 deletions HMistryBill.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions JS/fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ $(document).ready(function() {
success: function(result) {
if (result) {
obj = JSON.parse(result);
console.log(obj[3]);
$("#clientAddr").val(obj[0]);
$("#clientGST").val(obj[1]);
$("#stateCode").val(obj[3]);
}
},
});
Expand All @@ -199,6 +201,7 @@ $(document).ready(function() {
success: function(result) {
if (result) {
var obj = JSON.parse(result);
console.log(obj + " DataN");
$("#NclientAddr").val(obj[0]);
$("#NclientGST").val(obj[1]);
}
Expand Down
11 changes: 10 additions & 1 deletion Receivables.html
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,19 @@ <h5>Select Client Group:</h5>
<td class="text-left">
<?php echo $row['shortForm']; ?>
</td>
<?php if ($row['amount_received'] != 1){ ?>
<td class="text-left text-decoration-underline text-primary pointer" onClick='billDetails( "<?php echo $row['firmNameId'].':'.$row['invoice_no']; ?>" )'>
<?php echo $row['invoice_no']; ?>
<form id="<?php echo $row['firmNameId'].':'.$row['invoice_no']; ?>" method="POST" action="billDetails.html"><input type="hidden" name="id" value="<?php echo $row['firmNameId'].':'.$row['invoice_no'] ?>"></form>
<form id="<?php echo $row['firmNameId'].':'.$row['invoice_no']; ?>" method="GET" action="billDetails.html"><input type="hidden" name="id" value="<?php echo $row['firmNameId'].':'.$row['invoice_no'] ?>"></form>
</td>
<?php }
else{
?>
<td class="text-left">
<?php echo $row['invoice_no']; ?>
</td>
<?php
} ?>
<td class="text-right">
<?php echo $row['invoice_date']; ?>
</td>
Expand Down
322 changes: 300 additions & 22 deletions billDetails.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion exportToExcel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function filterData(&$str){

}

header("Content-Type: application/ms-excel;charset=utf-8");
header("Content-Type: application/vnd.ms-excel;charset=utf-8");
header("Content-Disposition: attachment; filename=\"$fileName\"");
header("Expires: 0");
// Render excel data
Expand Down
2 changes: 2 additions & 0 deletions fetchClientList.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
}

}
$state_code = (int)substr($clientDetails[1], 0,2);
array_push($clientDetails,$state_code);
echo json_encode($clientDetails);
}
?>
2 changes: 2 additions & 0 deletions insertInvoiceData.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
$tax_amount = 0;
if($firmId==3){
$tax_amount = $pAmount + $pAmount*0.18;
}else{
$tax_amount = $pAmount;
}
$queryBillDetails = "insert into bill_details (bill_master_id,firm_id,service_id,taxable_amount,tax_amount,service_note)
values('".$formData[0]."','".$firmId."',".$pID.",".$pAmount.",".$tax_amount.",'".$notes[$pID]."')";
Expand Down
97 changes: 72 additions & 25 deletions jinalWaghelaBill.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<?php
require_once 'connect.php';

$var = explode(":",$_POST['id']);

$sql1="select * from bill_master bm inner join firmname f inner join clientlist c on bm.firm_id=f.firmNameId and bm.client_id=c.clientId where bm.firm_id=$var[0] and bm.invoice_no = '$var[1]'";
$result1=mysqli_query($con,$sql1) or die($con->error);
$row1;
if($result1->num_rows==1){
$row1=$result1->fetch_assoc();
//print_r($row1);
}
?>
<!DOCTYPE html>
<html>

Expand All @@ -15,72 +28,106 @@
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.3.1/jspdf.umd.min.js"></script>
<script src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.print/1.6.2/jQuery.print.min.js" integrity="sha512-t3XNbzH2GEXeT9juLjifw/5ejswnjWWMMDxsdCg4+MmvrM+MwqGhxlWeFJ53xN/SBHPDnW0gXYvBx/afZZfGMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="JS/numToWord.js"></script>

<script>
$(document).ready(function(){
$("#numToWord").html($("#numToWord").html() + convert(<?php echo $row1['total_amount']; ?>)+" Only.");

$('#printPage').click(function (){
$("#printArea").print();
});
});
</script>
</head>

<body>
<div class="container bg-muted border border-dark">
<div class="row col-12 mt-3">
<div class="col-2">
<img src="images/CA.png" class="img-thumbnail border-0" width="150" alt="">
</div>
<div class="col-10" style="color:darkmagenta">
<h2 class="text-center">Jinal Waghela & Associates</h2>
<h4 class="text-center">Proprietor: Jinal Mistry</h4>
</div>

<center><button id="printPage" class="btn btn-success mt-5 m-5 text-center">Print page</button></center>
<div id="printArea" class="container bg-muted border border-dark">
<div class="row col-12 mt-3" style="color:darkmagenta">
<div class="col-auto"><img src="images/CA.png" class="img-thumbnail border-0" width="150" alt=""></div>
<div class="col-9"><h2 class="text-center">Jinal Waghela & Associates</h2>
<h4 class="text-center">Proprietor: Jinal Mistry</h4></div>
<div class="col-auto"></div>
</div>

<div class="row col-12 mt-2">
<div class="col-2"></div>
<div class="col-8 text-center">
<div class="col-7 text-center">
<h3 class="text-center" style="color:darkmagenta">Invoice</h3>
</div>
<div class="col-2">
<div class="col-3">
<div class="col-12 border border-muted">
<b>Date:</b>
<h6>April 7, 2021</h6>
<h6 class="text-center"><b>Date:</b>
<?php echo $row1['invoice_date']; ?></h6>
</div>
<div class="col-12 border border-muted">
<b>Invoice:</b>
<h6>2021-22/002</h6>
<h6 class="text-center"><b>Invoice:</b>
<?php echo $row1['invoice_no']; ?></h6>
</div>
</div>
</div>
<div class="col-12">
<h5 style="background:darkmagenta" class="text-light p-2 mt-2">Bill to:</h5>
<table class="table border-5 table-striped table-bordered">
<table class="table table-light table-bordered">
<tr>
<th>Name:</th>
<td>Shilpi Daniel</td>
<td><?php echo $row1['clientName']; ?></td>
</tr>
<tr>
<th>Address:</th>
<td>Desadla House, Plot No. A-55, Puru Co-operative Housing Society Ltd., New Airport Road, Lohegaon</td>
<td><?php echo $row1['clientAddress']; ?></td>
</tr>
</table>
</div>

<div class="mt-4 col-12">
<h5 style="background:darkmagenta" class="text-light p-2 mt-2">Perticulars:</h5>
<table align="center" class="table border-5 table-bordered table table-responsive-sm table-striped">
<table align="center" class="table table-bordered table table-responsive-sm table-light">
<thead>
<tr>
<th>Sr. No.</th>
<th>Description</th>
<th>Service</th>
<th>Service Note</th>
<th>Amount</th>
</tr>
</thead>


<?php
$sql="select * from bill_details bd inner join services s inner join bill_master bm on bd.service_id=s.serviceId and bm.firm_id=bd.firm_id and bm.invoice_no=bd.bill_master_id where bd.firm_id = $var[0] and bd.bill_master_id = '$var[1]'";
$result=mysqli_query($con,$sql) or die($con->error);
if($result->num_rows>0){
$row_count=0;
while($row=$result->fetch_assoc()){
$row_count+=1;
//print_r($row);
?>


<tbody>
<tr>
<td>1</td>
<td>Reply to Notice & Submission</td>
<td>2000.00</td>
<td><?php echo $row['serviceName']; ?></td>
<td><?php echo $row['service_note']; ?></td>
<td><?php echo $row['taxable_amount']; ?></td>
</tr>
</tbody>
<?php
}
}
?>
</table>
</div>
<h6 class="ml-5">Amount in Words: Rupees Two Thousand Only</h6>
<h6 id="numToWord" class="ml-3">Amount in Words: </h6>
<div class="row col-12 mt-3">
<div class="col-4">
<table width="90%" class="text-left border border-5">
<table width="90%" class="text-left border border-1">
<tr><th class="text-light" style="background:darkmagenta">&nbsp;&nbsp;&nbsp;Bank Details: Jinal Mistry</th></tr>
<tr><td>&nbsp;&nbsp;&nbsp;Bank: Indusind Bank</td></tr>
<tr><td>&nbsp;&nbsp;&nbsp;Branch: Pune Camp</td></tr>
Expand All @@ -97,7 +144,7 @@ <h6 class="ml-5">Amount in Words: Rupees Two Thousand Only</h6>
<table width="80%" align="right">
<th>Total Rs.</th>
<td></td>
<td class="text-right">2000.00</td>
<td class="text-right"><?php echo ' ₹ '.$row1['total_amount'].' /-' ; ?></td>
</table>

<h5 class="mt-5 pt-5">For</h5>
Expand Down
66 changes: 51 additions & 15 deletions moneySphereBill.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<!DOCTYPE html>
<?php
require_once 'connect.php';

$var = explode(":",$_POST['id']);
?>

<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
Expand All @@ -24,68 +29,101 @@
$(document).ready(function(){
$('#printPage').click(function (){
console.log("1");
$("#printArea").save();
$("#printArea").print();
});
});
</script>

</head>
<body>
<center><button id="printPage" class="btn btn-success mt-5 m-5 text-center">Print page</button></center>
<div id="printArea" class="container bg-muted border border-dark">
<div class="row col-12">
<div class="col-8">
<h1 class="text-center mt-5 pt-3" style="color:darkblue;">MONEYSPHERE SOLUTIONS</h1>
</div>
<div class="col-2"></div>


<?php
$sql1="select * from bill_master bm inner join firmname f inner join clientlist c on bm.firm_id=f.firmNameId and bm.client_id=c.clientId where bm.firm_id=$var[0] and bm.invoice_no = '$var[1]'";
$result1=mysqli_query($con,$sql1) or die($con->error);
$row1;
if($result1->num_rows==1){
$row1=$result1->fetch_assoc();
//print_r($row1);
}
?>


<div class="col-2">
<h3 class="text-center text-decoration-underline pt-5" style="color:darkblue;"><i>INVOICE</i></h3>
<div class="col-12 p-1 border border-muted">
<h6><b>Date:</b> April 7, 2021</h6>
<h6><b>Date:</b> <?php echo $row1['invoice_date']; ?></h6>
</div>
<div class="col-12 p-1 border border-muted">
<h6><b>Invoice:</b> 2021-22/002</h6>
<h6><b>Invoice:</b> <?php echo $row1['invoice_no']; ?></h6>
</div>
</div>
</div>

<div class="col-12 pt-5">
<h5 style="background:darkblue" class="text-light p-2 mt-2">Bill to:</h5>
<table class="table border-5 table-striped table-bordered">
<table class="table table-light table-bordered">
<tr>
<th>Name:</th>
<td>Sansui Electronics Pvt. Ltd.</td>
<td><?php echo $row1['clientName']; ?></td>
</tr>
<tr>
<th>Address:</th>
<td>Plot No E-59, Sansui House, Market Yard, Pune - 37</td>
<td><?php echo $row1['clientAddress']; ?></td>
</tr>
</table>
</div>


<div class="mt-4 col-12">
<h5 style="background:darkblue" class="text-light p-2 mt-2">Perticulars:</h5>
<table align="center" class="table border-5 table-bordered table table-responsive-sm table-striped">
<table align="center" class="table table-bordered table-responsive-sm table-light">
<thead>
<tr>
<th>Sr. No.</th>
<th>Description</th>
<th>Service</th>
<th>Service Note</th>
<th>Amount</th>
</tr>
</thead>


<?php
$sql="select * from bill_details bd inner join services s inner join bill_master bm on bd.service_id=s.serviceId and bm.firm_id=bd.firm_id and bm.invoice_no=bd.bill_master_id where bd.firm_id = $var[0] and bd.bill_master_id = '$var[1]'";
$result=mysqli_query($con,$sql) or die($con->error);
if($result->num_rows>0){
$row_count=0;
while($row=$result->fetch_assoc()){
$row_count+=1;
//print_r($row);
?>


<tbody>
<tr>
<td>1</td>
<td>Filing/ Reconciliation of GSTR 2A - April-20 to Dec - 20</td>
<td>15 000.00</td>
<td><?php echo $row['serviceName']; ?></td>
<td><?php echo $row['service_note']; ?></td>
<td><?php echo $row['taxable_amount']; ?></td>
</tr>
</tbody>
<?php
}
}
?>
</table>
</div>

<div class="row col-12 mt-3">
<div class="col-4">
<table width="90%" class="text-left border border-5">
<table width="90%" class="text-left border border-1">
<tr><th class="text-light" style="background:darkblue">&nbsp;&nbsp;&nbsp;Bank Info: MONEYSPHERE SOLUTIONS</th></tr>
<tr><td>&nbsp;&nbsp;&nbsp;Bank: Indusind Bank</td></tr>
<tr><td>&nbsp;&nbsp;&nbsp;Branch: Pune Camp</td></tr>
Expand All @@ -102,7 +140,7 @@ <h5 style="background:darkblue" class="text-light p-2 mt-2">Perticulars:</h5>
<table width="80%" align="right">
<th>Total Rs.</th>
<td></td>
<td class="text-right">15000.00</td>
<td class="text-right"><?php echo ' ₹ '.$row1['total_amount'].' /-' ; ?></td>
</table>

<h5 class="mt-5 pt-5">For</h5>
Expand All @@ -119,7 +157,5 @@ <h6 class="text-center">If you have any enquiries concerning this invoice, pleas
<h6 class="text-center font-weight-bold">802, Ratna building, Sujay Garden, Mukundnagar, Pune 411037</h6>
<h6 class="text-center">Tel: +91-7666570182/+91-992124004 Office: (020)-4861 0391 E-mail:[email protected]/ [email protected]</h6>
</div>

<center><button id="printPage" class="btn btn-success mt-5 m-5 text-center">Print page</button></center>
</body>
</html>

0 comments on commit 299d3f6

Please sign in to comment.