...
If DocumentLine is a handling cost, meaning DocumentLine.handlingCostCode is set. Accrual Profit/ Loss Account from the related Handling Cost Code account is used.
If DocumentLine has no variousText, portCostCode or handlingCostCode. Accrual Profit/ Loss Account from the related Account is used.
Commission deducted from hire payable
...