Mve Vendor Balance Page

I'm kind of confused by the vendor balance page (companies.balance).

Issue 1:
The docs state that the Sales Period is either the period in which the commission was posted (I.e. the order date) or the payout date. But the column is blank. The query has:

IF(payouts.order_id <> 0, payouts.end_date, '') AS date

which would imply that it should be blank if a payout for that line item has not been made (but that seems rather silly). But this is contradictory to the docs. I think the docs are right.

Issue 2:
The docs say the Payment Amount should be the amount due (if not yet paid) or the amount that was paid if the item was paid out. But the query is substituting the order_amount if there's been no payment.

IF(payouts.order_id <> 0,, payouts.payout_amount) AS payout_amount,

So how is one to scan this listing and see about what amounts are due to be paid on a specific order or set of orders? Since unpaid items show the order_total instead of the payout_amount, there's no way to see what's due. So I believe both the docs and the code is incorrect.

So to me, the payout_amount should be the same whether the item is paid or not (maybe highlighted in red if not yet paid) and the Sales period should be either the order_date (for unpaid orders) or the date paid for paid orders.

And the balances don't seem to add up either:

Balance carried forward: $0.00
Sales period total: $360.00
Total sales period payout: $0.00
Total amount due: $227.00
Total unpaid balance: $227.00

If nothing has been paid, how can the Sales Period Total be one value and the Total amount due and Total unpaid balance be another value?

What am I missing? Maybe some of you MVE admin types can comment since I'm assuming you use this all the time.

Well, I guess no one actually uses this then.... Maybe I'm not so confused after all! :-)

I am getting this issue during refill balance by vendor even Vendor-to-admin payments and Direct Customer-to-Vendor Payments addons are enabled