cancel
Showing results for 
Search instead for 
Did you mean: 

To restrict Sales Order if account balane is less than SO balance

former_member232093
Participant
0 Kudos

hi Srujal Patel,

I want to restrict some customers sales order which are less account balance.

example:

ABC customer account balance is 100. now they ordered 150. now this SO document will not be posted until approval from superior. how can i do restrict this?

Please help regarding this

IF @transaction_type IN ('A','U') AND @Object_type = '17'
BEGIN

IF EXISTS (select 'A','U' FROM ORDR T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode


WHERE @Object_type = '17' and T1.Balance < 100 AND T0.DocEntry = @list_of_cols_val_tab_del)

BEGIN
select @error = 1,@error_message = 'Customer Balance is below RS/-100 1You are not allowed to post SO'
END

END

If i follow you your instruction it will work for all customers. but i need sales person can not add this document but superior can add this. and i also need credit customer is not allowed to add SO and debit customer is allowed

to add SO.

Regards,

Mizan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mizan,

Use Approval Procedures instead of Stored Procedure.

JS

Former Member
0 Kudos

Hi Mizan,

For achive your target need help of SDK.

Thanks,

Srujal Patel