cancel
Showing results for 
Search instead for 
Did you mean: 

Applying Discount on SalesItem but not reflected on UI

0 Kudos

I am applying a discount on a SalesItem already on a receipt using a plugin.

Discount is applied successfully on the item and the discounted price is reflected on the receipt's gross amount to be paid.

However the discount field and the gross amount of the Sales Item on the receipt is not changed on the UI itself (And the item already is affected by that discount while debugging).

Any idea how i reflect these changes on the UI of the Sales Item itself ?

Accepted Solutions (0)

Answers (2)

Answers (2)

raulcampo
Explorer
0 Kudos

try this

sie.setDiscountManuallyChanged(true);

sie.setItemDiscountChanged(true);

sie.setPercentageDiscount(false);

sie.setDiscountPercentage(new BigDecimal(0));

sie.setDiscountAmount(amountdisc));

sie.setMarkChanged(true);

calcPosService.recalculateReceipt(receipt);

BroadcasterHolder.INSTANCE.getBroadcaster().broadcastPluginEventForPath("RECEIPT_REFRESH", null);

alexchab
Discoverer
0 Kudos

We have same issue in US tax configuration in FP16 PL01
Here is our code
receipt.setPercentageDiscount(false);

receipt.setDiscountAmount(discount);

calculationPosService.recalculateReceipt(receipt);

It is working fine for EU tax system settings, but does not for USThanks