I want to display my fare details as below.
Faredetails
-------------------
Price : 1000
VAT : 20(+)
GST : 15(+)
Discount : 100(-)
---------------
Total : 1065
html code:
<div class="div-active faredet">
<h3 style="text-align:center;border-bottom: 1px solid #ccc;">Fare Details</h3>
<table>
<tr>
<td>Fare </td>
<td>₹1,000.00</td>
</tr>
<tr>
<td>Discuount </td>
<td>₹10.00<span style="color:red;"> (-)</span></td>
</tr>
<tr style="border-bottom: 1px solid #ccc;"></tr>
<tr>
<td>Net Payable </td>
<td>₹900.00</td>
</tr>
</table>
</div>
All these values will come dynamically. so can any one let me how to style these values. Thanks in advance.
We can do with accounting.js library.
<script src="path/to/accounting.js"></script>
<script type="text/javascript">
// Library ready to use:
accounting.formatMoney(5318008);
</script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.