on 03-06-2009 10:50 AM
Hi All,
I am trying to apply a formatted seach to run a query, but I am struggling so any advise would be greatly appreciated.
I am trying to accomplish the following;
When the quantity field has been populated in a purchase order I want to multiply that with the amount displayed in the 'Items Per Purchase Unit' field on the OITM of the item selected.
The query I currently have return various values which doesnt even make sense. So obviously there is something wrong with my query;
{SELECT T0.[NumInBuy] * $[$38.U_QTY.0] FROM OITM T0 WHERE T0.[ItemCode] = $[$38.1.0]}
If anyone could assist I would appreciate it.
Thanks,
Wynand Cilliers.
DECLARE @A NUMERIC (16,2)
DECLARE @B NUMERIC (16,2)
SET @A=$[$38.11.0]
SET @B=$[$38.213.0]
SELECT @A*@B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can do the same behaviour without FS, using Factor 1 field under item master data, Purchase Tab..
Regards,
Giovanni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wynand
Any reason why you are multiplying by U_Qty and not the standard quantity field? Surely the result must be in U_Qty and not the formula based on this field. This is causing your problem.
Kind regards
Peter Juby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
The U_QTY field is where the user will enter their qty (I wrongly stated in my 1st post), and then the actual quantity should be calculated in the Quantity field. The reason for this is that we are calculating back to KG's if you only know the quantity in Litres that you want to order.
Hope this explains a bit better.
Regards,
Wynand
User | Count |
---|---|
92 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.