test case fixes

This fixes an important COGS issue when AR is posted before AP and a bad test for payments.