I am trying to pull the data for the commission report into Business Central. I did this through the Customer Ledger Entries table, but the profit doesn't match to the commissions report. Looking into this, it appears that it is due to the commission report being based on the Invoice Statistics Adjusted amount, but the Profit amount in the Customer Ledger Entries is different. How can I determine the adjusted profit amount? I know the invoice statistics page 397 can be set as a web service, but is there a table that has the cost, or profit percentage or something to let me calculate the profit, or can I link the customer Ledger entry table to this page web service since the 397 doesn't give much information except the stats of the invoice.
For example, I have invoice IN1000095 in the customer ledger table for sale of $99,867.32 and a profit of $28,257.45. When I run the salesperson commission report, this invoice shows for $27,931.33. I can find that on the invoice statistics report or web service I created for page 397, but not anywhere else. Any guidance/ideas?
Thanks,
Kevin