When processing sales order, or purchase order, posting you can control the summary updates. If you go into Accounts receivable->Setup->Accounts receivable parameters, then go to the tab, summary update, and press the summary update parameters, you can change the summary update fields.
If however the field you want is not present, you can add additional fields. This is done from the AOT, under the table SalesTable for sales orders, and PurchTable for purchase orders. Add the additional fields to what to use under the field group ‘SummaryUpdate’.

*This post is locked for comments