I can make some suggestions on where to look in the code to make this change.
On the table PurchLine, the methods .accountReceipt() and .ledgerDimensionReceipt() reference the field .LedgerDimension as follows.
if (this.LedgerDimension && InventMovement::construct(this).mustBeBookedBalanceSheet())
{
ledgerDimension = this.LedgerDimension;
ledgerAccount = DimensionStorage::ledgerDimension2AccountNum(this.LedgerDimension);
}
else
{
..
The idea here is that if the LedgerDimension field is used (not 0) and the Inventory movement must be booked to the balance sheet (code-speak for carries Inventory on-hand value or "must be booked physically/financially"), then use the Main account specified on the Purchase order line, otherwise fall back to the configuration according to the Inventory posting setup.
I suspect what you want to do is similar but could be implemented in a different method on PurchLine. Most of the Main account logic is found there in methods similar to what I've already referenced.
Have you made any progress on this yet?