ShwetankJoshi
Coder
Creating a Invoice maker website using HTML , CSS and JS , which is my clg mini project , i hava to create a JS funcition that will multiply the unit cost and quantity to give price and another function that will give the total of the price of each item at last row of the table. the refrence image of my project is attached
HTML:
<body>
<div class="container">
<header>
<div id="primary_header">
<div class="logo">
<img src="/images/logo.png" alt="">
</div>
<h2 id="invoice">INVOICE</h2>
</div>
<div class="secondary_header">
<div class="left">
<div class="info">
<p id="c_name">Company Name- Lorem, ipsum.</p>
<p> <b>Address- </b>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Pariatur, itaque.</p>
<p>
<b>Contact us- </b>02582298439</p>
</div>
</div>
<div class="right">
<table id="meta">
<tr>
<td class="meta-head">Invoice No #
</td>
<td>001</td>
</tr>
<tr>
<td class="meta-head">Date</td>
<td id="date"></td>
</tr>
</table>
</div>
</header>
<div class="customer">
<p><b>Bill To:</b><br></p>
<textarea id="address" placeholder="Customer Info...."></textarea>
</div>
<table id="items">
<tr>
<th>Item</th>
<th>Description</th>
<th>Unit Cost</th>
<th>Quantity</th>
<th>Price</th>
<td>
<div class="action_container">
<button class="success" onclick="create_tr('table_body')">
<i class="fa fa-plus"></i>
</button>
</div>
</td>
</tr>
<tbody id="table_body">
<tr class="item-row">
<td class="item-name">
<div class="Item"><input type="text" name="" placeholder="Enter Item..."><br>
</div>
</td>
<td class="description">
<textarea id=" description " type="text " name=" " placeholder="Enter Description... "></textarea></td>
<td class="cost "><input type="number" name=" " placeholder="Enter Cost... "></td>
<td class="qty "><input type="number" name=" " placeholder="Enter Quantity... "></td>
<td><span class="price ">0.00</span></td>
<td>
<div class="action_container">
<button class="danger" onclick="remove_tr()">
<i class="fa fa-close"></i>
</button>
</div>
</td>
</tr>
<tr id="ref_Node">
<td colspan="2 " class="blank "> </td>
<td colspan="2 " class="total-line ">Subtotal</td>
<td class="total-value ">
<div id="subtotal ">0.00</div>
</td>
</tr>
<tr>
<td colspan="2 " class="blank "></td>
<td colspan="2 " class="total-line ">Total</td>
<td class="total-value ">
<div id="total ">0.00</div>
</td>
</tr>
</tbody>
</table>
</table>
<div class="terms ">
Terms and Conditions are Applied.
</div>
</div>
<footer id="footer "></footer>
</div>
</body>