The Average Cost and/or Last Cost fields are updated from the Purchase Transaction line item Cost.
The Shipping is not included when calculating the Average Cost or Last Cost.
See:
Purchase Manager - Parameters - Update - Distribute Shipping
Purchase Manager - Parameters - Update
Purchase Manager Contents