Skip to Content
avatar image
Former Member

Disabling Document Discount Field

Hi All

I want to disable the document the discount field on the sales order document.

How can I achieve this ? I don't want the users to be able to change the discount value in the document level.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 03, 2008 at 08:45 AM

    Hi Bongani

    You must use Form settings for this. Unfortunately each user that you want to remove it for must be logged on and you must do it in their session.

    Kind regards

    Peter Juby

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      add there

      if @object_type = '17' and @transaction_type in (N'A', N'U')
      begin
          if 1 = (select count(docentry) from ordr with(nolock) where docentry =@list_of_cols_val_tab_del and discsum > 0)
      		begin
      			select @error =1
      		select @error_message = 'Discount is filled.'
      
      		end
      
      end

  • avatar image
    Former Member
    Sep 03, 2008 at 11:36 AM

    Hi Bongani,

    I have the same as matter about disable discount changing. I use set Form Setting and untick in active column. After that, please right on click to menu bar so user can not change this discount.

    I hope it will work.

    Regards,

    Agung

    Add comment
    10|10000 characters needed characters exceeded

    • I would request you to try the following options:

      Option 1. Use Authorization:

      Step1: Access Authorization window. To access the Authorizations window, choose Administration -> System Initialization -> Authorizations .

      Step2: for users (who are not superusers), set Max Discount to 0.01 (as per your max decimal places configured in General Settings-> Display).

      Max. Discount: Specify the maximum discount that the user is authorized to enter in customer master records or sales documents.

      Please note, this option will not work for superusers and will restrict discount entry in all sales documents (not only sales order as you require).

      Option 2. Use Stored Procedure:

      Step1: Access Authorization window. To access the Authorizations window, choose Administration -> System Initialization -> Authorizations .

      Step2: for users (who are not superusers), set Max Discount to 0.01 (as per your max decimal places configured in General Settings-> Display).

      Max. Discount: Specify the maximum discount that the user is authorized to enter in customer master records or sales documents.

      Please note, this option will not work for superusers and will restrict discount entry in all sales documents (not only in sales order as you require).

      *Option 2. SBOSP_TransactionNotification*:_

      IF(@object_type='17') -- Sales Order object value: 17

      BEGIN

      -- if transaction type is equal to 'add' (please note this line is sql comment)

      IF(@transaction_type='A')

      BEGIN

      -- if current business partner master - website field is having null/ less than 3 characters, then show error (please note this line is sql comment)

      IF Exists (SELECT T0.cardcode FROM ORDR T0 where (T0.DocEntry=@list_of_cols_val_tab_del) and (T0.DiscPrcnt > 0))

      BEGIN

      set @error = 2001

      set @error_message = N'You are not authorized to edit/ enter discount.'

      END

      ELSE

      -- show successful message (please note this line is sql comment)

      BEGIN

      set @error = 0

      set @error_message = N'Ok'

      END

      END

      END

      Hope the information is helpful to resolve your issue.

      Good Luck.

      Thanks & Regards

      Satish

  • avatar image
    Former Member
    Sep 10, 2008 at 12:28 PM

    You could easily hide this field using the Boyum IT product

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 11, 2008 at 10:14 AM

    You can manage all fields visibility with the help of Softline Solutions add-on "Interface Extension"

    Add comment
    10|10000 characters needed characters exceeded