Skip to content

Commit

Permalink
[MODEBSNET-42] Release Morning Glory R2 2022 v1.3.2 (#63)
Browse files Browse the repository at this point in the history
[MODEBSNET-44]. Prepare for Morning Glory R2 2022 v1.3.2 release
  • Loading branch information
SerhiiNosko authored Sep 7, 2022
1 parent f0f19e1 commit 95075f2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## 1.4.0 - Unreleased

## 1.3.2 (Morning Glory R2 2022 Bug Fix) - Released
This release focused on fixing issue with missing permission and changing fund distribution type for ebsconet orders to percentage

[Full Changelog](https://github.com/folio-org/mod-orders/compare/v1.3.1...v1.3.2)

### Bug Fixes
* [MODEBSNET-43](https://issues.folio.org/browse/MODEBSNET-43) - Missed permission notes.item.delete
* [MODEBSNET-42](https://issues.folio.org/browse/MODEBSNET-42) - Verify calculation logic for handling mixed orders for ebsconet


## 1.3.1 (Bug Fix) - Released
This release focused on fixing issue when renewal note becomes blank after Gobi order update

Expand Down
1 change: 1 addition & 0 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"orders.po-lines.item.get",
"orders.po-lines.item.put",
"notes.item.post",
"notes.item.delete",
"notes.collection.get.by.status",
"note.types.collection.get",
"notes.domain.all"
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/folio/ebsconet/mapper/OrdersMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public abstract class OrdersMapper {
"Order line was not automatically canceled because it is already complete.";
static final String CANNOT_CANCEL_BECAUSE_ALREADY_CANCELED =
"Order line was not automatically canceled because it is already canceled.";
private static final BigDecimal ONE_HUNDRED_PERCENT = BigDecimal.valueOf(100);

@Mapping(target = "vendor", source = "vendor.code")
@Mapping(target = "cancellationRestriction", source = "line.cancellationRestriction")
Expand Down Expand Up @@ -103,8 +104,8 @@ public void ebsconetToFolio(MappingDataHolder mappingDataHolder) {
.fundId(fund.getId())
.code(fund.getCode())
.expenseClassId(mappingDataHolder.getExpenseClass())
.distributionType(FundDistribution.DistributionTypeEnum.AMOUNT)
.value(ebsconetOrderLine.getUnitPrice().multiply(BigDecimal.valueOf(ebsconetOrderLine.getQuantity())));
.distributionType(FundDistribution.DistributionTypeEnum.PERCENTAGE)
.value(ONE_HUNDRED_PERCENT);

poLine.fundDistribution(Collections.singletonList(fundDistribution));
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/folio/ebsconet/service/NotesService.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.Objects;
import java.util.UUID;

@Service
Expand Down Expand Up @@ -50,8 +51,8 @@ public void linkCustomerNote(MappingDataHolder mappingDataHolder) {
}
createNote(note);
}
else if(note != null){
deleteNote(note.getId());
else if (Objects.nonNull(note)) {
deleteNote(note.getId());
}

}
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/folio/ebsconet/OrdersServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ void updatePEMixLineWithNewQuantity(int ebsconetQuantity, int currentPQuantity,
var updatedCompLine = argumentCaptor.getValue();

assertEquals(expectedEQuantity , updatedCompLine.getLocations().get(0).getQuantityElectronic());
assertEquals("percentage" , updatedCompLine.getFundDistribution().get(0).getDistributionType().getValue());
assertEquals(expectedPQuantity, updatedCompLine.getLocations().get(0).getQuantityPhysical());

assertEquals(expectedEQuantity, updatedCompLine.getCost().getQuantityElectronic());
Expand Down Expand Up @@ -415,7 +416,7 @@ void updatePEMixLineWithNewPrice(BigDecimal ebscoPrice, BigDecimal currentPPrice

assertEquals(expectedEPrice.doubleValue(), updatedCompLine.getCost().getListUnitPriceElectronic().doubleValue(), 2);
assertEquals(expectedPPrice.doubleValue(), updatedCompLine.getCost().getListUnitPrice().doubleValue(), 2);

assertEquals("percentage" , updatedCompLine.getFundDistribution().get(0).getDistributionType().getValue());
}

@ParameterizedTest
Expand Down

0 comments on commit 95075f2

Please sign in to comment.