on 2021 Mar 09 1:56 PM
Hi,
I am trying to build a plugin for CCO Retail UI where i have catch the event on "addSalesItems" where position before.
like:
@PluginAt(pluginClass = IReceiptManager.class, method = "addSalesItems", where = POSITION.AFTER) public void checkSalesItem(Object proxy, Object[] args, Object ret, StackTraceElement Caller) {}
getting the itemcode as
saleseItem.getMaterial().getExternalID()
and query this item from a user table in CCO where i am saving the discount values, after selecting the item i am applying discount percentage but its not caluluating the Gross Amount and Discount Amount auto.
Best Regards,
Request clarification before answering.
Hi usman.jamil,
you need to let CCO recalculate the receipt. What is the Feature Pack are you using?
Regards
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear rzieschang ,
I have tried to do the same but not able to reflect the discount.
I am using CCO FP 11 PL 02 Quick Service UI
@PluginAt(pluginClass = ReceiptPosService.class, method = "addSalesItem", where = POSITION.AFTER)
public void checkSalesItem(Object proxy, Object[] args, Object ret, StackTraceElement Caller) {
ReceiptEntity receipt=(ReceiptEntity) args[0];
for (SalesItemEntity item : receipt.getSalesItems()) {
item.setDiscountPercentage(new BigDecimal("10") );
item.setDiscountPurposeCode("1000");
item.setMarkChanged(true);
item.setDiscountManuallyChanged(true);
}
UIEventDispatcher.INSTANCE.dispatchAction(CConst.UIEventsIds.RECEIPT_REFRESH, null, receipt);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.