Always Use Last Cost as PO's Default FOB Cost
Currently, Elliott decide PO's Default FOB Cost base on the following priority sequence:
(1) If Vendor Item record exist and set to use "Price Table", then Price Table will be used;
(2) If PO Setup "20. Default FOB Std Cost On PO's" is set to "Y", then default to Item Std Cost;
(3) If Vendor Item Record Exist, use the Vendor Item Last Purchase Cost;
(4) Use Item's Last Cost.
It had been suggested that we should modify the flag "20. Default FOB Std Cost On PO's ?" to "20. Default PO FOB Cost Method ?" and the possible value can be:
Y=Std Cost; L=Last Cost; N=Vendor Item Last PO Cost before Last Cost
Y or N value follow the priority sequence (1) - (4) above. If user choose "L", then it will affect the priority sequence for (2) - (4).
In addition, we should change the logic that we use to update item vendor last cost field. Currently, the logic is update it when a PO is added, or the line item is added. But we don't update it if the PO or line item changed. This is to prevent an PO changed, canceled from updating the item vendor last cost field. But it some case, we could update the PO line item expected cost and like new cost be reflected in PO item vendor file. So it is suggested that we should add a new field ITEM-VEND-LAST-COST-FROM-PO which is an 8 bytes field to store the PO# that cause the update of ITEM-VEND-LAST-PUR-COST. Then during PO printing for change PO (& line items), we will compare the vendor item file ITEM-VEND-LAST-COST-FROM-PO if match with the current printing PO. If yes, then proceed with the update if ITEM-VEND-LAST-PUR-COST, otherwise skip it.