@heartinz/price_total_gst_bill_calculator
v2.0.1
Published
## Copyright Copyright (c) 2024 Kiran Morais (Heartinz Technologies Private Limited,India) All Rights Reserved. Unauthorized use, distribution, or modification of this code is prohibited.NegoBill
Downloads
245
Readme
Price Total GST Bill Calculator
Copyright
Copyright (c) 2024 Kiran Morais (Heartinz Technologies Private Limited,India) All Rights Reserved. Unauthorized use, distribution, or modification of this code is prohibited.NegoBill
Overview
The Price Total GST Bill Calculator is a comprehensive npm module designed for calculating the total product prices including multiple financial metrics like MRP, sale price, base price, tax percentage, tax amount, and quantity. It is particularly useful for businesses that need to manage detailed financial operations.
Installation
npm install @heartinz/price_total_gst_bill_calculator
Usage
To integrate this module into your project, simply import the totalProdPrice
function, and supply the necessary parameters.
Parameters
| Parameter | Type | Description |
|--------------|--------|----------------------------------------------------|
| mrp
| Number | The maximum retail price of the product. |
| salePrice
| Number | The sale price of the product. |
| basePrice
| Number | The base price of the product. |
| taxPercent
| Number | The tax percentage applicable to the product. |
| taxAmount
| Number | The tax amount per unit of the product. |
| quantity
| Number | The quantity of the product being calculated. |
Function Call
const { totalProdPrice } = require('@heartinz/price_total_gst_bill_calculator');
const pricingDetails = totalProdPrice(500, 450, 400, 10, 50, 10);
console.log(pricingDetails);
Output
The function outputs an object detailing financial metrics based on the given parameters:
| Property | Type | Description |
|-----------------------|--------|-----------------------------------------------------|
| mrp
| Number | The provided maximum retail price. |
| salePrice
| Number | The provided sale price. |
| taxPercentage
| Number | The tax percentage applicable. |
| discount
| Number | Calculated discount per unit (MRP - salePrice). |
| basePrice
| Number | The provided base price. |
| taxAmount
| Number | The provided tax amount per unit. |
| quantity
| Number | The quantity of product being calculated. |
| lineTotalMrp
| Number | Total MRP (MRP * quantity). |
| lineTotalSalePrice
| Number | Total sale price (salePrice * quantity). |
| lineTotalDiscount
| Number | Total discount for the quantity. |
| lineTotalBasePrice
| Number | Total base price (basePrice * quantity). |
| lineTotalTaxAmount
| Number | Total amount after tax (basePrice + taxAmount). |
Testing
Currently, there are no tests specified for this module. Testing can be implemented as needed based on the project requirements.
Author
Kiran Morais, Heartinz