Hmm, ok, hmm. Now, let me first put forward a key issue that is the core of the matter, then i will try to paint the scenario around it best to my understanding. Correct me if my assumptions are way off. At the end of it, i will indicate how much this consultancy will cost ya and what extra development if viable that can be done to Compiere.
The key to the solution is the Charge. You create a Charge giving it a name, say Commission, which you can put into the InvoiceLine during Invoice (Vendor). The first line is of course the Vendor's qty and priceAmt that was eventually sold.
The most important thing is defining the default Accounts Posting of that Charge to the SAME account, which has to be a revenue account element under Trade Revenue. Thus it is not a charge in the strict sense of the word. We are just making use of the concept. Its like giving a negative discount.
Now the scenario your client goes through, based on version 251e:
1) Client receives goods from Vendor. Let's say its 100 bottles.
2) Client just make the usual Material Receipts but need not Generate a Invoice (Vendor).
2.1) On-Hand Qty is updated to 100 bottles automatically.
3) Client moves goods from Locator to Sales (Org) Locator.
4) Client sells goods. Let's say 15 bottles.
4.1) Client generates a Sales Order of 15 bottles.
5) Client now go to Invoice(Vendor) and Create Lines From from Material Receipts. (the only way if in version 251d, not so in 251e where u have two ways)
5.1) Go into the InvoiceLine and adjust the qty to 15.
5.2) Create another InvoiceLine with the Charge (negative amt).
5.3) Print that and give to the Vendor.
You can modify the look and feel to fit the terms and wordings used for that Print Format.
The main advantage of the Charge model is that the commission revenue is recognised during Invoice to Vendor.
I also assume you know the present Compiere's accounting consequences.
Automation to develop:
A) Make the Sales Order control the Vendor Invoice generation.
B) Constrain the Matching so as not to take the Vendor figure but instead the Sales figure.
I will advice against modifying Compiere's codes too fast, but instead test out the scenario and mature the understanding of processes involved and see whether they jive to the big picture. Once business processes issues crop up then they can be reviewed, so that a final solution is clear. Then only, should we look at the gaps and plan the development.
Now please pay to my Swiss Account ************, with the amount of ##,###,###.##
Otherwise just sign my guestbook.

Become a member here so that i can post you my latest articles.
red1