There was a requirements as per given below:
There will be a agent who will give us sales. For e.g ship to party and bill to party is customer A.
Agent is vendor B.
Now this agent has to be linked with sales order. The commission to this agent will be paid through MM Invoice.
While passing the invoice the system should check whether the MR (Payment) has been received for the sales then only it should allow to pass the MM Invoice.
Please suggest me this process an Asap.