How to set the UnitPrice for OrderDtl records with DMT?
The DMT Template Builder says the UnitPrice field is actually calculated (see below).
How can I override this?
If it’s a valid item in the Part table the unit price is defaulted using the following logic:
- Determine if a price break is effective. The basic idea is to see if you can find a record in the OPrice table and then adjust the unit price retrieved from the Part table.
Price breaks can exist with the following configurations:
- Part/Customer
- Part/Price level
- Part
- Product group/Customer
- Product group/level
- Product Group
The search logic is done in the above order. If a OPrice is found and it has an EndDate of zeros or the EndDate is >= OrderDate then consider that a price break has been found and the search quits. Use the Order quantity to determine which element of the QtyBreak array should be used. Then either a fixed unit price is selected (unitprices) or a discount percent is selected (discountPercents) and applied to the Unit Price retrieved from the Part table.