Skip to content

Commit

Permalink
PR-1876 Add item ID to fee in barcode
Browse files Browse the repository at this point in the history
  • Loading branch information
JanisSaldabols committed Aug 13, 2024
1 parent b3634f7 commit 376772b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/folio/ncip/FolioRemoteServiceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,10 @@ protected JsonObject addDefaultPatronFee(FiscalTransactionInformation fiscalTran
charge.put("feeFineOwner", ownersArray.getJsonObject(0).getString("owner"));
charge.put("userId", userId);
charge.put("id", UUID.randomUUID().toString());
if (fiscalTransactionInformation.getItemDetails() != null && fiscalTransactionInformation.getItemDetails().getItemId() != null &&
fiscalTransactionInformation.getItemDetails().getItemId().getItemIdentifierValue() != null) {
charge.put("barcode", fiscalTransactionInformation.getItemDetails().getItemId().getItemIdentifierValue());
}
return new JsonObject(callApiPost(baseUrl + Constants.ACCOUNT_URL, charge));
} catch (Exception e) {
logger.error("Failed to add default patron fee", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
<ns1:Amount>
<ns1:MonetaryValue>0</ns1:MonetaryValue>
</ns1:Amount>
<ns1:ItemDetails>
<ns1:ItemId>
<ns1:ItemIdentifierValue>i-123</ns1:ItemIdentifierValue>
</ns1:ItemId>
<ns1:BibliographicDescription></ns1:BibliographicDescription>
</ns1:ItemDetails>
</ns1:FiscalTransactionInformation>
</ns1:CreateUserFiscalTransaction>
</ns1:NCIPMessage>

0 comments on commit 376772b

Please sign in to comment.