@litusarchieve18/agricore-utils 1.0.28 → 1.0.29
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/README.md +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,7 +183,7 @@ Run the publish command:
|
|
|
183
183
|
Bash
|
|
184
184
|
npm publish --access public
|
|
185
185
|
📝 Version History
|
|
186
|
-
V1.0.29 —
|
|
186
|
+
V1.0.29 — altered filtering logic from validFrom_lte: targetIso to validFrom: { $lte: targetIso }
|
|
187
187
|
|
|
188
188
|
V1.0.28 — altered the logic and added scope aware filtering and write-time validation in priceHelpers.ts
|
|
189
189
|
|
package/dist/index.js
CHANGED
|
@@ -400,7 +400,7 @@ function createBase44PricingAdapter(db, scope) {
|
|
|
400
400
|
productId,
|
|
401
401
|
contractReferenceNumber,
|
|
402
402
|
matrixType: "procurement_buy",
|
|
403
|
-
|
|
403
|
+
validFrom: { $lte: targetIso }
|
|
404
404
|
},
|
|
405
405
|
SORT_MOST_RECENT_FIRST,
|
|
406
406
|
ACTIVE_ROW_LOOKBACK
|
|
@@ -412,7 +412,7 @@ function createBase44PricingAdapter(db, scope) {
|
|
|
412
412
|
async findAccountPrice({ productId, accountCode, targetDate }) {
|
|
413
413
|
const targetIso = targetDate.toISOString();
|
|
414
414
|
const rows = await db.ProductPriceMatrix.filter(
|
|
415
|
-
{ ...scopeFilter, productId, accountCode,
|
|
415
|
+
{ ...scopeFilter, productId, accountCode, validFrom: { $lte: targetIso } },
|
|
416
416
|
SORT_MOST_RECENT_FIRST,
|
|
417
417
|
ACTIVE_ROW_LOOKBACK
|
|
418
418
|
);
|
|
@@ -421,7 +421,7 @@ function createBase44PricingAdapter(db, scope) {
|
|
|
421
421
|
async findDefaultPrice({ productId, targetDate }) {
|
|
422
422
|
const targetIso = targetDate.toISOString();
|
|
423
423
|
const rows = await db.ProductPriceMatrix.filter(
|
|
424
|
-
{ ...scopeFilter, productId, accountCode: "INTERNAL_DEFAULT",
|
|
424
|
+
{ ...scopeFilter, productId, accountCode: "INTERNAL_DEFAULT", validFrom: { $lte: targetIso } },
|
|
425
425
|
SORT_MOST_RECENT_FIRST,
|
|
426
426
|
ACTIVE_ROW_LOOKBACK
|
|
427
427
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -340,7 +340,7 @@ function createBase44PricingAdapter(db, scope) {
|
|
|
340
340
|
productId,
|
|
341
341
|
contractReferenceNumber,
|
|
342
342
|
matrixType: "procurement_buy",
|
|
343
|
-
|
|
343
|
+
validFrom: { $lte: targetIso }
|
|
344
344
|
},
|
|
345
345
|
SORT_MOST_RECENT_FIRST,
|
|
346
346
|
ACTIVE_ROW_LOOKBACK
|
|
@@ -352,7 +352,7 @@ function createBase44PricingAdapter(db, scope) {
|
|
|
352
352
|
async findAccountPrice({ productId, accountCode, targetDate }) {
|
|
353
353
|
const targetIso = targetDate.toISOString();
|
|
354
354
|
const rows = await db.ProductPriceMatrix.filter(
|
|
355
|
-
{ ...scopeFilter, productId, accountCode,
|
|
355
|
+
{ ...scopeFilter, productId, accountCode, validFrom: { $lte: targetIso } },
|
|
356
356
|
SORT_MOST_RECENT_FIRST,
|
|
357
357
|
ACTIVE_ROW_LOOKBACK
|
|
358
358
|
);
|
|
@@ -361,7 +361,7 @@ function createBase44PricingAdapter(db, scope) {
|
|
|
361
361
|
async findDefaultPrice({ productId, targetDate }) {
|
|
362
362
|
const targetIso = targetDate.toISOString();
|
|
363
363
|
const rows = await db.ProductPriceMatrix.filter(
|
|
364
|
-
{ ...scopeFilter, productId, accountCode: "INTERNAL_DEFAULT",
|
|
364
|
+
{ ...scopeFilter, productId, accountCode: "INTERNAL_DEFAULT", validFrom: { $lte: targetIso } },
|
|
365
365
|
SORT_MOST_RECENT_FIRST,
|
|
366
366
|
ACTIVE_ROW_LOOKBACK
|
|
367
367
|
);
|