Error vieuwing data in a custmize field
Remco Tersteeg
Dear Sir / Madam,We got a problem by a customer of us we maked calculation to calculate a price shared by the dicount etc en show this in a new made field in the article records.
but when we have a item creater then 9999 say 10.000 the it gives a error. if we do the query just in a analyzer then it works perfect. so that means the filed should be to small so we have made this bigger as well with no result.we Think this problem is coming from customize because it works in the query analyzer
hope you can help us
this is the query we use
SELECT case when T3.discount<>0 and T0.Currency<>'EUR' then 'EUR ' + ISNULL(CAST(CONVERT(decimal(6,2),(T0.Price - ((T0.Price * T3.Discount) / 100))/T4.Rate) AS VARCHAR), 0.00)
when T3.discount=0 and T0.Currency<>'EUR' then 'EUR ' + ISNULL(CAST(CONVERT(decimal(6,2),T0.Price /T4.Rate) AS VARCHAR), 0.00)
when T3.discount<>0 and T0.Currency='EUR'then 'EUR ' + ISNULL(CAST(CONVERT(decimal(6,2),T0.Price - ((T0.Price * T3.Discount) / 100)) AS VARCHAR), 0.00)
when T0.Currency<>'EUR' then 'EUR ' + ISNULL(CAST(CONVERT(decimal(6,2),T0.Price /T4.Rate) AS VARCHAR), 0.00)
Else 'EUR ' + ISNULL(CAST(CONVERT(decimal(6,2),T0.Price) AS VARCHAR), 0.00)END
FROM ITM1 AS T0 INNER JOIN
OITM AS T1 ON T0.ItemCode = T1.ItemCode LEFT OUTER JOIN
OCRD AS T2 ON T1.CardCode = T2.CardCode LEFT OUTER JOIN
OSPG AS T3 ON T2.CardCode = T3.CardCode AND T1.ItmsGrpCod = T3.ObjKey LEFT OUTER JOIN
ORTT AS T4 ON T0.Currency = T4.Currency AND T4.RateDate =(CAST(YEAR(CURRENT_TIMESTAMP)AS varchar)+ '-' + CAST(MONTH(CURRENT_TIMESTAMP)AS varchar)+ '-' + CAST(DAY(CURRENT_TIMESTAMP)AS varchar)+ ' ' + '00:00:00.000')
WHERE (T0.ItemCode = '[%G;5]') AND (T0.PriceList = 5)
Kind Regards
Remco Tersteeg
Channel Concepts
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/r-tersteeg/Error Sfob field.bmp]Error Sfob field.bmp[/url]
Michael Egloff
Hello,could you please post the whole customize rule (*.cocu -File)? That would help a lot.
You can easy export the rule and post it here in the forum.
Thanks
Remco Tersteeg
Hello Michael,I have attached the cocu for you
Kind Regards
Remco Tersteeg
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-file-uploads/r-tersteeg/Prices.cocu]Prices.cocu[/url]
0
Please sign in to leave a comment.
Comments
0 comments