b2m-utils 0.0.229 → 0.0.231
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.
- package/build/functions/calculateIcms/index.d.ts +20 -0
- package/build/functions/getAllFeesForCalculation/index.d.ts +6 -0
- package/build/functions/getCteLaneFeesTotal/index.d.ts +1 -1
- package/build/functions/getCtesFeesResult/index.d.ts +2 -2
- package/build/functions/index.d.ts +2 -0
- package/build/index.esm.js +368 -248
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +369 -247
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calcula o valor do ICMS baseado no total das outras taxas
|
|
3
|
+
*
|
|
4
|
+
* @param totalFromAllFees - Array com os valores das outras taxas
|
|
5
|
+
* @param icmsRate - Alíquota do ICMS (ex: 0.12 para 12%)
|
|
6
|
+
* @returns Objeto com o valor calculado e detalhes do cálculo
|
|
7
|
+
*/
|
|
8
|
+
export declare const calculateIcms: (totalFromAllFees: number[], icmsRate: number) => {
|
|
9
|
+
total: number;
|
|
10
|
+
totalValueFromAllFees: number;
|
|
11
|
+
valueToDivide: number;
|
|
12
|
+
firstTotal: number;
|
|
13
|
+
isValid: boolean;
|
|
14
|
+
} | {
|
|
15
|
+
total: number;
|
|
16
|
+
totalValueFromAllFees: number;
|
|
17
|
+
valueToDivide: string;
|
|
18
|
+
firstTotal: number;
|
|
19
|
+
isValid: boolean;
|
|
20
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Cte, RatecardLaneFee } from "../../types";
|
|
2
|
-
export declare const getCteLaneFeesTotal: (feesToCalc: RatecardLaneFee[], cte: Cte) => number | undefined;
|
|
2
|
+
export declare const getCteLaneFeesTotal: (feesToCalc: RatecardLaneFee[], cte: Cte, allFeesForCalc?: RatecardLaneFee[]) => number | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Cte, RatecardLaneFee } from "../../types";
|
|
2
|
-
export declare const getCtesFeesResult: (feesToCalc: RatecardLaneFee[], cte: Cte) => {
|
|
2
|
+
export declare const getCtesFeesResult: (feesToCalc: RatecardLaneFee[], cte: Cte, allFeesForCalc?: RatecardLaneFee[]) => {
|
|
3
3
|
total: number;
|
|
4
4
|
resultFee: string;
|
|
5
5
|
feeValue: number;
|
|
6
|
-
feeId: number
|
|
6
|
+
feeId: number;
|
|
7
7
|
}[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './applyRedeliveryMultiplier';
|
|
2
2
|
export * from './calculateFee';
|
|
3
|
+
export * from './calculateIcms';
|
|
3
4
|
export * from './convertNumberToCurrency';
|
|
4
5
|
export * from './filterSiblingFees';
|
|
6
|
+
export * from './getAllFeesForCalculation';
|
|
5
7
|
export * from './getAuditTotalFromCte';
|
|
6
8
|
export * from './getContractFromFreight';
|
|
7
9
|
export * from './getContractRouteFromFreight';
|