Skip to Content

CCO Plugin Developement, Clear Items in Sales Screen

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 02 at 09:13 AM

    Hello Mohamed,

    I will try to solve this issue with you. But first, can you please provide a broader background about your topic? What are you trying to achieve exactly and why do you need to clear the sales item grid?

    Best regards,

    Sebastian

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 05 at 08:50 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Feb 04 at 08:13 AM

    Hi Sebastian,

    Thanks for your replay.

    I just want to clean the sales items in the main grid after posting the document

    Thanks

    Add comment
    10|10000 characters needed characters exceeded