Calculating the cost of inventory kits: Difference between revisions
From DataFlex Wiki
Jump to navigationJump to search
Calculating the cost of inventory kits (view source)
Revision as of 12:42, 25 March 2020
, 25 March 2020Added to Tutorials category
(New page: Below is the logic which can be used to calculate the cost of an inventory item (kit) which is made up of other inventory items. The cost of these kits will change when the parts used to m...) |
Hsymington (talk | contribs) m (Added to Tutorials category) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 5: | Line 5: | ||
== Code Sample == | == Code Sample == | ||
<source lang="dataflex"> | |||
Function GetPartCost Integer iPartNum Returns Number | Function GetPartCost Integer iPartNum Returns Number | ||
Number nCost nTotal | Number nCost nTotal | ||
Line 37: | Line 38: | ||
End | End | ||
End_Function | End_Function | ||
</source> | |||
== Example == | == Example == | ||
Line 71: | Line 73: | ||
1 tsp Ingredient G | 1 tsp Ingredient G | ||
== Summary == | |||
So, by calling the GetPartCost of the main menu item, it will automatically traverse all kits to get to the root items and return their cost. | So, by calling the GetPartCost of the main menu item, it will automatically traverse all kits to get to the root items and return their cost. | ||
Line 95: | Line 98: | ||
GetPartCost Steak Fries | GetPartCost Steak Fries | ||
GetPartCost Pickle Wedge | GetPartCost Pickle Wedge | ||
[[Category: DataFlex]] | |||
[[Category: How To]] | |||
[[Category:Tutorials]] |