iMIS 15.1.3.8850: PK error generated in Pre Posting Accrual dues stagewhile Dues Billing.

I noticed that the PK error was due to the process not generating a IN AR line item for an ID but creating it in the next transaction number. In the next transaction number the value for line ID was twice that of what it should be.

To explain further, we are billing 10 line items, based on special prices. Process picks up all ten items in insert statement but does not add the 11th line as the IN AR line to give total due. Then next ID transaction number is correct from 1 to 10 line numbers but has a IN AR item with line number as 21 and not 11.

The error then randomly keeps popping up.

Anyone experienced this or would like to give likely cause.