Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using existing program?
Message
From
26/03/2007 23:29:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
26/03/2007 15:17:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01207621
Message ID:
01208711
Views:
25
>PartNum QtyPer TotalOnHand QtyRequired NetQty CurQty
>100000    2        100          20        80    10
>100001    1        100          10        90    10
>100002    3        100          30        70    10
>The above Part Numbers are under a Parent Part Number = 102031. Also, in one sales order, there are multiple parent part numbers...
>
>I am hoping to insert the CurQty per every part number in the parent part number.
>
>Where:
>
>QtyRequired = QtyPer * CurQty
>NetQty = TotalOnHand - (QtyPer * CurQty)

Is CurQty actually ordered quantity? The variable name suggests it's a current quantity, which has thrown me off a bit.

It all depends on what you have in your warehouse, i.e. what are you selling. If you have ready assembled parts, then you need not break them into components - they're manufactured already. If you're keeping only base components, then it's also not necessary to break them like this on a sales order - but on a manufacturing order yes. You go recursively from the assemblies to base components, multiplying qty-to-make with qty-per, totalling per base component in the end, and that's how much you need to pull from the warehouse.

Calculating how much you would have in the warehouse after a sales order is tentative at best; sales order is not final, and besides you may be having several such orders entered by different people, and if you don't update the quantity on stock each time, at least one of these will show wrong NetQty. And since these are tentative, in case they are canceled you'd need to return the qty.

Another point: the same base component may be a part of multiple assemblies on the same order. How would you calculate the TotalOnHand for it then, if you wanted to show assemblies broken down into components?

My advice is to not even bother with TotalOnHand and NetQty on the sales order. If you want, you may have an extended view of the stock which would include a "pending S.O." column, that would be simpler and cleaner.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform