rerobe-js-orm 2.7.23 → 2.7.25
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default class ReRobeProductHelpers {
|
|
2
2
|
static calculateProductionFee(commission: number): number;
|
|
3
3
|
static calculateFulfillmentFee(commission: number): number;
|
|
4
|
+
static isValidCommission(commission: any): boolean;
|
|
4
5
|
static commissionFixer(commisssion: any): string;
|
|
5
6
|
static buildReRobeEarnings(arrayLike: CompleteProduct | CompleteProduct[]): number[];
|
|
6
7
|
static materialCompJoinedString(materialComposition?: MaterialComposition): string;
|
|
@@ -20,6 +20,15 @@ class ReRobeProductHelpers {
|
|
|
20
20
|
}
|
|
21
21
|
return 0;
|
|
22
22
|
}
|
|
23
|
+
static isValidCommission(commission) {
|
|
24
|
+
if (typeof commission === 'string' &&
|
|
25
|
+
!!commission &&
|
|
26
|
+
Number(commission) * 100 >= 0 &&
|
|
27
|
+
Number(commission) * 100 <= 100) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
23
32
|
static commissionFixer(commisssion) {
|
|
24
33
|
let fix = String(commisssion);
|
|
25
34
|
if (fix.includes(',')) {
|