hello all,
clover round discount to next decimal number.
for example
i have one line item with price 0.85$. and i am applying 10% discount on each line item in order.
discount amount is 0.09$ but we expecting it 0.085$.
now if i add one more same line item in order then total order amount goes to 1.70$
this time total discount amount is 0.18$ which should be 0.17$ and we are also expecting total discount to 0.17$
i am using the same code provided by clover.
Discount discount1 = new Discount();
discount1.setName(discountValue + "% Discount");
discount1.setPercentage(discountValue);
whereas discount object only accept long type in setPercentage Method
for (LineItem updatedLineItem : updatedLineItems) {
orderConnector.addLineItemDiscount(orderId, updatedLineItem.getId(), discount1);
}
can we modify discount amount without round to next decimal number ??
any help would be appreciated.