hvp-shared 6.45.1 → 6.46.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.
|
@@ -25,8 +25,6 @@ export declare enum PricePolicy {
|
|
|
25
25
|
EXT_COST = "EXT_COST",
|
|
26
26
|
/** Internal services (priced by market study / competition) */
|
|
27
27
|
COMP_SVC = "COMP_SVC",
|
|
28
|
-
/** Diagnostic tests (TBD — no formula yet) */
|
|
29
|
-
TEST = "TEST",
|
|
30
28
|
/** Individual formula per item */
|
|
31
29
|
SPECIAL = "SPECIAL",
|
|
32
30
|
/** Fixed manual price (no formula) */
|
|
@@ -37,8 +37,6 @@ var PricePolicy;
|
|
|
37
37
|
PricePolicy["EXT_COST"] = "EXT_COST";
|
|
38
38
|
/** Internal services (priced by market study / competition) */
|
|
39
39
|
PricePolicy["COMP_SVC"] = "COMP_SVC";
|
|
40
|
-
/** Diagnostic tests (TBD — no formula yet) */
|
|
41
|
-
PricePolicy["TEST"] = "TEST";
|
|
42
40
|
/** Individual formula per item */
|
|
43
41
|
PricePolicy["SPECIAL"] = "SPECIAL";
|
|
44
42
|
/** Fixed manual price (no formula) */
|
|
@@ -65,7 +63,6 @@ exports.PRICE_POLICY_LABELS = {
|
|
|
65
63
|
[PricePolicy.COST]: 'Insumos / Artículos (por costo)',
|
|
66
64
|
[PricePolicy.EXT_COST]: 'Servicios externos',
|
|
67
65
|
[PricePolicy.COMP_SVC]: 'Servicios internos (estudio de mercado)',
|
|
68
|
-
[PricePolicy.TEST]: 'Pruebas diagnósticas',
|
|
69
66
|
[PricePolicy.SPECIAL]: 'Fórmula individual',
|
|
70
67
|
[PricePolicy.MANUAL]: 'Precio manual',
|
|
71
68
|
[PricePolicy.NONE]: 'No se vende',
|
|
@@ -105,7 +102,6 @@ exports.AUTO_TIER_POLICIES = [
|
|
|
105
102
|
/** Policies that have no formula (recommendedPrice = null) */
|
|
106
103
|
exports.NO_FORMULA_POLICIES = [
|
|
107
104
|
PricePolicy.COMP_SVC,
|
|
108
|
-
PricePolicy.TEST,
|
|
109
105
|
PricePolicy.SPECIAL,
|
|
110
106
|
PricePolicy.MANUAL,
|
|
111
107
|
PricePolicy.NONE,
|
|
@@ -139,7 +135,7 @@ exports.ALLOWED_POLICIES_BY_SECTION = {
|
|
|
139
135
|
[qvet_catalog_1.QVET_SECTIONS.FARMACIA_INTERNA]: [PricePolicy.PHARM, PricePolicy.PHARM_FRAC, PricePolicy.COST_ML, PricePolicy.SPECIAL, PricePolicy.MANUAL],
|
|
140
136
|
[qvet_catalog_1.QVET_SECTIONS.INSUMOS_MEDICOS]: [PricePolicy.COST, PricePolicy.SPECIAL, PricePolicy.MANUAL],
|
|
141
137
|
[qvet_catalog_1.QVET_SECTIONS.OTROS_ARTICULOS]: [PricePolicy.COST, PricePolicy.SPECIAL, PricePolicy.MANUAL],
|
|
142
|
-
[qvet_catalog_1.QVET_SECTIONS.SERVICIOS_MEDICOS]: [PricePolicy.COMP_SVC, PricePolicy.
|
|
138
|
+
[qvet_catalog_1.QVET_SECTIONS.SERVICIOS_MEDICOS]: [PricePolicy.COMP_SVC, PricePolicy.SPECIAL, PricePolicy.MANUAL],
|
|
143
139
|
[qvet_catalog_1.QVET_SECTIONS.OTROS_SERVICIOS]: [PricePolicy.COMP_SVC, PricePolicy.SPECIAL, PricePolicy.MANUAL],
|
|
144
140
|
[qvet_catalog_1.QVET_SECTIONS.SERVICIOS_EXTERNOS]: [PricePolicy.EXT_COST, PricePolicy.SPECIAL, PricePolicy.MANUAL],
|
|
145
141
|
};
|
|
@@ -100,7 +100,6 @@ describe('getMarkupFactor', () => {
|
|
|
100
100
|
});
|
|
101
101
|
it('should return null for policies without a formula', () => {
|
|
102
102
|
expect((0, pricing_constants_1.getMarkupFactor)(pricing_constants_1.PricePolicy.COMP_SVC, pricing_constants_1.PricingTier.HIGH_MARGIN)).toBeNull();
|
|
103
|
-
expect((0, pricing_constants_1.getMarkupFactor)(pricing_constants_1.PricePolicy.TEST, pricing_constants_1.PricingTier.HIGH_MARGIN)).toBeNull();
|
|
104
103
|
expect((0, pricing_constants_1.getMarkupFactor)(pricing_constants_1.PricePolicy.SPECIAL, pricing_constants_1.PricingTier.HIGH_MARGIN)).toBeNull();
|
|
105
104
|
expect((0, pricing_constants_1.getMarkupFactor)(pricing_constants_1.PricePolicy.MANUAL, pricing_constants_1.PricingTier.HIGH_MARGIN)).toBeNull();
|
|
106
105
|
expect((0, pricing_constants_1.getMarkupFactor)(pricing_constants_1.PricePolicy.NONE, pricing_constants_1.PricingTier.HIGH_MARGIN)).toBeNull();
|
|
@@ -265,15 +264,6 @@ describe('calculateRecommendedPricePVP', () => {
|
|
|
265
264
|
});
|
|
266
265
|
expect(result).toBeNull();
|
|
267
266
|
});
|
|
268
|
-
it('should return null for TEST', () => {
|
|
269
|
-
const result = (0, pricing_constants_1.calculateRecommendedPricePVP)({
|
|
270
|
-
pricePolicy: pricing_constants_1.PricePolicy.TEST,
|
|
271
|
-
pricingTier: pricing_constants_1.PricingTier.HIGH_MARGIN,
|
|
272
|
-
unitPurchasePriceBI: 100,
|
|
273
|
-
vatSalePercent: 16,
|
|
274
|
-
});
|
|
275
|
-
expect(result).toBeNull();
|
|
276
|
-
});
|
|
277
267
|
it('should return null for SPECIAL', () => {
|
|
278
268
|
const result = (0, pricing_constants_1.calculateRecommendedPricePVP)({
|
|
279
269
|
pricePolicy: pricing_constants_1.PricePolicy.SPECIAL,
|