on 2018 Feb 01 8:39 AM
Dear CCO Experts
I am using the main sales screen as different TAB in CCO for posting Stock requests.
Is there any standard method to clear the materials selected in the sales data grid and refresh the sales screen ?
Thanks for your support.
Mohamed,
Request clarification before answering.
Hello Mohamed,
ok, so all you want to do is get back to an empty receipt after posting a stock transfer with your special logic. Unfortunately, there is no way to completely remove a sales item that was added to a receipt. Due to legal requirements we cannot allow something like this.
One way to clear the sales item grid anyways would be to void the receipt. In order to this you can call the "voidReceipt"-action on the "ReceiptController". This can easily be done from the UI.
I hope this answer will help you complete your plugin.
Best regards,
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohamed,
If you intend to cancel the receipt from Javascript, I recommend you to jump into the Chrome DevTools and check what happens once you click on the Cancel button on the UI. The button's id is #cancelBtn.
In case you intend to trigger the cancellation from Java you want to do it like this:
ReceiptEntity receiptEntity = receiptManager.retrieveEntityByKey(receiptKey);
if (receiptEntity != null) {
receiptManager.voidReceipt(receiptEntity);
}
Best regards,
Sebastian
User | Count |
---|---|
13 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.