Broadleaf Microservices
  • v1.0.0-latest-prod

Order Operation Release Notes for 1.8.9-GA

Bug Fixes

  • Fixed fulfillment cancellation issue that could lead to refunding payment amounts that were captured for other fulfillments. In these scenarios, the captured amount for a fulfilled item could have been unintentionally refunded due to the cancellation of a different fulfillment.

    • This fix involves leveraging the new TransactionSummary concept from PaymentTransactionServices to avoid refunding amounts that were captured due to any other fulfillment. To gather TransactionSummary data, your OrderOps Auth client will need to be updated to include the SYSTEM_TRANSACTION_SUMMARY scope and ALL_SYSTEM_TRANSACTION_SUMMARY permission. See the AuthenticationServices 1.8.12-GA release notes for more details.

  • Introduced the ability to declare fee & included tax totals on TransactionExecutionRequests.

    • The intention of this to allow PaymentTransactionServices to accept & persist these amount detail fields to serve as a parallel representation to what is determined for the order’s fulfillment & return-related transactions.

    • The payment & transaction total remains the only required amount field.

    • It’s 100% up to the calling service to determine the values for these optional fields.

    • PaymentTransactionServices does nothing with these values other than persist them to the Payment or PaymentTransactions.

  • Fix bug where an OrderFulfillment grandTotal would have the wrong value if there was an included tax (VAT) on the fulfillment fee.

  • Fix bug in refund calculation when items have tax included in price.

  • Improved handling of fulfillment taxes and included taxes

    • Fixed issue where fulfillment taxes end up doubling when VAT taxes are not removed from the item price

    • Fixed issue where fulfillment taxes can be negative when VAT taxes are removed from the item price

    • Fixed tax calculations for inclusive tax in return generation

Upgrade Guide

Method Signature Changes

PaymentReversalFulfillmentCancelledListener#getAmountToRefund

Old Signature

MonetaryAmount getAmountToRefund(PaymentReversalDto reversalDto, PaymentSummary payment, ContextInfo contextInfo)

New Signature

TransactionAmountDetails getAmountToRefund(PaymentReversalDto reversalDto, PaymentSummary payment, ContextInfo contextInfo)

PaymentReversalFulfillmentCancelledListener#getAmountToReverseAuthorize

Old Signature

MonetaryAmount getAmountToReverseAuthorize(PaymentReversalDto reversalDto, PaymentSummary payment, ContextInfo contextInfo)

New Signature

TransactionAmountDetails getAmountToReverseAuthorize(PaymentReversalDto reversalDto, PaymentSummary payment, ContextInfo contextInfo)

New Features & Notable Changes

Inclusive Taxes and Fulfillment Taxes

This release improves OrderOperationsServices' tax tracking in a few areas:

  • prices that include tax

  • taxes on fulfillment fees

  • isRemoveVatFromItemPrice consistency

Included Tax

Operations that aggregate tax values across an OrderFulfillment are more precise in which tax values they operate on.

InclusiveTaxHelper has been added to facilitate getting different kinds of tax subtotals. For instance, calculating all included taxes across an OrderFulfillment, or calculating only the fulfillment taxes.

Fulfillment Taxes

The framework now properly differentiates between merchandise and fulfillment taxes when generating OrderFulfillments. Since 1.8.1, the tax service has marked taxes on fulfillment prices with the TaxDetail name "FULFILLMENT/SHIPPING/HANDLING", and now that is checked when calculating OrderFulfillment merchandise and tax totals.

isRemoveVatFromItemPrice improvements

When the property broadleaf.orderoperation.ordergeneration.remove-vat-from-item-price is true (OrderGenerationProperties.removeVatFromItemPrice), OrderOps now properly handles included taxes for both merchandise and fulfillment taxes.

Setting that property to true will subtract any included taxes (TaxDetail.isVat=true) from the merchandise amounts and fulfillment amount on the OrderFulfillment. This effectively converts the included tax to excluded tax.

Since the tax is now removed from the retail price, OrderFulfillmentItemTaxDetails.isVat will be set to false when the Order is generated. This ensures that any future calculations are consistent.