b2m-utils 0.0.258 → 0.0.260

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.
@@ -915,6 +915,25 @@ var getFilteredFeesToAudit = function (_a) {
915
915
  var lane = _a.lane, ratecard = _a.ratecard, cte = _a.cte;
916
916
  var filteredFees = (_b = lane === null || lane === void 0 ? void 0 : lane.RatecardLaneFee) === null || _b === void 0 ? void 0 : _b.filter(function (i) {
917
917
  var _a, _b, _c, _d, _e, _f, _g;
918
+ // Verificar se o fee está dentro do período de vigência
919
+ if (i.startsAt && i.endsAt) {
920
+ if (!cte.emissionDate) {
921
+ return false;
922
+ }
923
+ var emissionDate = new Date(cte.emissionDate);
924
+ if (i.startsAt) {
925
+ var startsAt = new Date(i.startsAt);
926
+ if (emissionDate < startsAt) {
927
+ return false;
928
+ }
929
+ }
930
+ if (i.endsAt) {
931
+ var endsAt = new Date(i.endsAt);
932
+ if (emissionDate > endsAt) {
933
+ return false;
934
+ }
935
+ }
936
+ }
918
937
  var defaultConditionalFees = [
919
938
  FeeEnum.EMEX_COMMODITY_VALUE,
920
939
  FeeEnum.EMEX_MIN_VALUE,
Binary file