...
GL Account from the Account set on Document.account
Accrual
...
Payable
If Document.documentLine.variousText is set. And Document.documentAmount > 0. Asset Account Accrual from Various Text is used.
...
If Document.documentLine.variousText is null and Document.documentLine.portCostCode is null and Document.documentLine.handlingCostCode is null. And Document.documentAmount < 0. Liability Account Accrual from the Document.documentLine.account is used.
Accrual
...
Receivable
If Document.documentLine.variousText is set. And Document.documentAmount < 0. Asset Account Accrual from Various Text is used.
...