Skip to Content

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

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>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 02 at 07:38 AM

    Hi experts

    Any one can give a Solution

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 31, 2017 at 08:49 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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