EXPERTS I NEED PROFIT ACCORDING TO BATCH """""""PLEASE I WANT THE COST OF BATCH NOT THE AVG COST RATE OF STOCK ITEM"""""""" cost rate (14619.5 mtr * 70.78)) sell rate ( 14619.5 * 75) profit is 61,694 but is showing 56,006 Code: [#Object: Inventory Entry] TotalCost : $BilledQty * $ClosingRate:StockItem:$StockItemName VProfit : $Amount - $TotalCost [#Line: DSP VchAccTitles] Add : Right Field : Before : DSP VchTypeTitle : ProfitNew Local : Field : ProfitNew : Type : String Local : Field : ProfitNew : Set as : "Profit On Sale" Local : Field : ProfitNew : Inactive : $$InPrintMode OR ($$IsPurchase:$VoucherTypeName OR $ $IsPurcOrder:$VoucherTypeName) [#Line: DSP VchDetail] Add : Right Fields : Before : DSP VchType : ProfitNew [Field : ProfitNew] Use : Amount Field Set as : $$CollAmtTotal:InventoryEntries:$VProfit Align : Right Color : Blue Style : Small Bold Inactive : ($$IsPurchase:$VoucherTypeName OR $$IsPurcOrder:$VoucherTypeName) OR $$InPrintMode [#Form: Ledger Vouchers] Add: Bottom Button:Profit Show [#Form: Default] Add: Bottom Button:Profit Show [Button : Profit Show] Title : "Profit Show" Key : Alt + S Action : NOT ##ProfitNew
$ClosingRate will return rate configured for Stock Item which is in Advance Entries part in Stock Item master entry form. By default it will be Avg. Cost that why you are getting difference. I dont know what you should do but I know that what you are doing is wrong.
what collection or function will get me the cost of particular batch..... the previous $ClosingRate is getting me the RATE OF STOCK ITEM