cancel
Showing results for 
Search instead for 
Did you mean: 

Need to block user when the user try to sell items above 20% then the price list amount

pvinod_kumar
Participant
0 Kudos

Dear Experts

I had made a ST to block the user's who try to sell items below the Item Cost.

Now what i need is

i need to block the user's when they try to sell an item above 20% than price list assign to Customer

Means a user should only sell the items up 20% increase which is mentioned in Price list

Pls help me to sort it out

pls find my attachment ST for selling item below price list

Regards

IF EXISTS (  
     SELECT T0.DocNum From ODLN T0
  INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry 


  WHERE 
  T1.Price <= T1.stockprice  
  AND T0.DocEntry = @list_of_cols_val_tab_del
       )
   BEGIN 


    SELECT @Error = 99, @error_message ='Please Check the Sale Price' 
END


<br>

Accepted Solutions (0)

Answers (2)

Answers (2)

pvinod_kumar
Participant
0 Kudos

Hi experts

Any one can give a Solution

Regards

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this,

IFEXISTS(SELECT T0.DocNum From ODLN T0
  INNERJOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry 
  WHERE 
  T1.Price <= (T1.stockprice * 0.2) 
  AND T0.DocEntry =@list_of_cols_val_tab_del
       )BEGINSELECT@Error =99,@error_message ='Please Check the Sale Price'END<br>

Regards,

Nagarajan

pvinod_kumar
Participant
0 Kudos

Hi rajan

Thanks for the Support

Actually i need to block the user who try to sell item above 20 % the price which is mentioned in Price list

not stock price(Item cost),

any way i change from T1.StockPrice to T1.Price

for eg: item No 1 its sales price list price is 17 and item cost is 10

and if the user try to sell above (17*0.2) 17+3.4 = 20.4, then he should be blocked

Regards