Skip to content

Commit

Permalink
Fixing rounding mode to floor
Browse files Browse the repository at this point in the history
  • Loading branch information
vlaskhilkevich committed Jul 26, 2024
1 parent 92cc0db commit 89d86d3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ private InvoiceItem createTaxInvoiceItem(final InvoiceItem taxableItem, final UU

if (taxRate == null) {
logger.warn("The tax rate is not provided in the Vertex response for the tax item with ID: {} and calculated tax: {}", taxItem.getId(), calculatedTax);
taxRate = calculatedTax.divide(taxableItem.getAmount(), 5, RoundingMode.HALF_DOWN).doubleValue();
taxRate = calculatedTax.divide(taxableItem.getAmount(), 5, RoundingMode.FLOOR).doubleValue();
}

final String taxItemDetails = createTaxItemDetails(ImmutableMap.of("taxRate", taxRate));
Expand Down

0 comments on commit 89d86d3

Please sign in to comment.