CLEAR(Qty); IF Item.Inventory <> 0 THEN BEGIN ItemLedgEntry.RESET; ItemLedgEntry.SETCURRENTKEY("Entry Type","Item No.","Variant Code","Drop Shipment","Location Code","Posting Date"); ItemLedgEntry.SETRANGE("Entry Type",ItemLedgEntry."Entry Type" :: Consumption); ItemLedgEntry.SETRANGE("Item No.",Item."No."); IF ItemLedgEntry.FIND('-') THEN BEGIN REPEAT Qty += ItemLedgEntry.Quantity; UNTIL ItemLedgEntry.NEXT = 0; END; END; ItemAmount.INIT; ItemAmount."Item No." := "No."; IF ShowType = ShowType::"Sales (LCY)" THEN BEGIN ItemAmount.Amount := "Sales (LCY)"; ItemAmount."Amount 2" := Qty; END ELSE BEGIN ItemAmount.Amount := Qty; ItemAmount."Amount 2" := "Sales (LCY)"; END;
Comments
2) Are you sure, that you calc the value Item.Inventory before you use it? (Item.Calcfields(Inventory))
3) It is same - it means still 0 or something other?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Greetz
Nicole
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks for the hint!
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
now It's work well
Thank a lot for Arhontis and kine.
klum