Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing Stock Value
Message
 
 
À
06/07/2010 15:07:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Divers
Thread ID:
01471551
Message ID:
01471573
Vues:
39
>
>openingamount + nvl(purchaseamount,0) - nvl(soldamount,0) as [ClosingAmount] ;
>
>
>Nomi, thanks for helping but I want to draw you attention to above line of codes
>
>the closing qty will multiply by purchase rate
>
>The last purchase rate of 1401 is 14.775
>so closing amount of 1401=?
>
>closing amount=closing qty*last purchase rate
>14.775*6=88.65
>
>so closing amount of 1401=88.65
>
>But your query displays 59.70

I assumed that Closing Amount is the difference between amounts. If no, we want to get Closing Qty and multply by the latest rate. If so, the problem becomes a bit more complex. Do you need one select statement or multiple select statements are OK?

In other words, do you want to apply the latest rate for the amounts or you want to use the rates at the moment of purchase? If so, how will you know which exact items you sold? You match them by rate then?

If that's the case, I'll need to re-write the query and may be we need to use scan based solution here instead.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform