ecotransac-shared-js 1.2.23 → 1.2.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.
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -127,7 +127,7 @@ var getNetPrice = (mandate) => {
|
|
|
127
127
|
return netOwnerPrice;
|
|
128
128
|
};
|
|
129
129
|
var getAgencyFeesPercentage = (mandate) => {
|
|
130
|
-
const netPrice = getNetPrice(mandate);
|
|
130
|
+
const netPrice = getNetPrice(mandate) || 0;
|
|
131
131
|
const agencyFees = mandate.agencyFees || 0;
|
|
132
132
|
return Number((agencyFees / netPrice * 100).toFixed(2));
|
|
133
133
|
};
|
|
@@ -1475,6 +1475,10 @@ var mandateFormFields = [
|
|
|
1475
1475
|
name: "netOwnerPrice",
|
|
1476
1476
|
fieldType: "number",
|
|
1477
1477
|
label: "Prix de vente net vendeur",
|
|
1478
|
+
condition: or(
|
|
1479
|
+
not("isForProfessionalUse"),
|
|
1480
|
+
and(only("isForProfessionalUse"), only("isCommercialWallsSale"))
|
|
1481
|
+
),
|
|
1478
1482
|
requiredFor: ["MANDATE_CREATION"],
|
|
1479
1483
|
props: {
|
|
1480
1484
|
suffix: "\u20AC net vendeur",
|
package/dist/index.mjs
CHANGED
|
@@ -34,7 +34,7 @@ var getNetPrice = (mandate) => {
|
|
|
34
34
|
return netOwnerPrice;
|
|
35
35
|
};
|
|
36
36
|
var getAgencyFeesPercentage = (mandate) => {
|
|
37
|
-
const netPrice = getNetPrice(mandate);
|
|
37
|
+
const netPrice = getNetPrice(mandate) || 0;
|
|
38
38
|
const agencyFees = mandate.agencyFees || 0;
|
|
39
39
|
return Number((agencyFees / netPrice * 100).toFixed(2));
|
|
40
40
|
};
|
|
@@ -1382,6 +1382,10 @@ var mandateFormFields = [
|
|
|
1382
1382
|
name: "netOwnerPrice",
|
|
1383
1383
|
fieldType: "number",
|
|
1384
1384
|
label: "Prix de vente net vendeur",
|
|
1385
|
+
condition: or(
|
|
1386
|
+
not("isForProfessionalUse"),
|
|
1387
|
+
and(only("isForProfessionalUse"), only("isCommercialWallsSale"))
|
|
1388
|
+
),
|
|
1385
1389
|
requiredFor: ["MANDATE_CREATION"],
|
|
1386
1390
|
props: {
|
|
1387
1391
|
suffix: "\u20AC net vendeur",
|