Adjustment and MiscCharges

Hi there, I need help to calculate total cost for every Item. Every Item has CostAmountAdjustment in InventTrans and if there is any VendInvoiceTrans, we can look for MarkUpTrans. So what is relation between MarkupTrans.value for purchasetransaction and cost adjustment.Let me brief problem: PO only: $Purch + $Adjustment = $TotCost and $TotCost / Tot Qty = UnitCost Does UnitCost matchs InventTableModule.price for inventory? to solve this problem I should know relation between: $Adjust and $MiscCharge. Who knows it? Thanks