softseti-sale-calculator-library 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +21 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "softseti-sale-calculator-library",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "Sales calculation engine by Softseti",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -86,18 +86,26 @@ declare module 'softseti-sale-calculator-library' {
86
86
  */
87
87
  export function appliedWholesaleLevels(sale: any): WholesaleLevel[];
88
88
 
89
- /**
90
- * Calculates all applicable taxes for the sale and returns them in API format
91
- * @param {Object} sale - Sale object
92
- * @returns {Array} Array of tax objects with id, abbreviation, and amount
93
- */
94
- export function getApplicableDwTaxes(sale: any): any[];
89
+ /**
90
+ * Calculates all applicable taxes for the sale and returns them in API format
91
+ * @param {Object} sale - Sale object
92
+ * @returns {Array} Array of tax objects with id, abbreviation, and amount
93
+ */
94
+ export function getApplicableDwTaxes(sale: any): any[];
95
95
 
96
- /**
97
- * Calculates comprehensive sale totals
98
- * @param {Sale} sale - Sale object
99
- * @returns {SaleTotals} Sale totals
96
+
97
+ /**
98
+ * Gets getConsolidatedTaxes taxes by merging taxes with same id, abbreviation and rate
99
+ * @param {Object} sale - Sale data object
100
+ * @returns {Array} Array of unified tax objects with id, abbreviation, rate and total amount
100
101
  */
102
+ export function getConsolidatedTaxes(sale: any): any[];
103
+
104
+ /**
105
+ * Calculates comprehensive sale totals
106
+ * @param {Sale} sale - Sale object
107
+ * @returns {SaleTotals} Sale totals
108
+ */
101
109
  export function calculateSaleTotals(sale: any): SaleTotals;
102
110
 
103
111
  /**
@@ -109,19 +117,19 @@ declare module 'softseti-sale-calculator-library' {
109
117
  * @internal
110
118
  */
111
119
  calcDwSaleProductSum: (saleProduct: any, sale: Sale) => number;
112
-
120
+
113
121
  /**
114
122
  * Calculates sale product discount
115
123
  * @internal
116
124
  */
117
125
  calcDwSaleProductDiscount: (product: any, sale: Sale) => number;
118
-
126
+
119
127
  /**
120
128
  * Gets applicable product taxes
121
129
  * @internal
122
130
  */
123
131
  getApplicableProductTaxes: (saleProduct: any, productSum: number, sale: Sale) => number;
124
-
132
+
125
133
  /**
126
134
  * Currency exchange calculation
127
135
  * @internal