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