cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order should not be created when user exceeds his credit limit

Former Member
0 Kudos

Hi All,

How can I stop the user, to create Sales Order if customer exceeds his credit limit. Right now Business One is giving warning message. But it is creating the sales order document. I have tried using Approval Procedure. It is working fine. But it is comparing against threshold value. The thresholdvalue is the same for all customers. It should validate against customer credit limit. Because each customer has different credit limit. kindly let me know the solution.

Regards,

Sravan Kumar Pothu

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

you have two options, the first is make a formatted search like this

DECLARE @CreditLine Numeric(16,2)

DECLARE @Balance NUMERIC(16,2)

DECLARE @Disponible NUMERIC(16,2)

DECLARE @Diferencia NUMERIC(16,2)

-- Extracción de Limite de Crédito y Balance del Cliente

SELECT @CreditLine = T0.CreditLine FROM OCRD T0 WHERE T0.CardCode = $[$4.1.0]

SELECT @Balance = T0.Balance FROM OCRD T0 WHERE T0.CardCode = $[$4.1.0]

SET @Disponible = @CreditLine - @Balance

SET @Diferencia = @Disponible - $[$22.85.Number]

SELECT 'TRUE' WHERE @Diferencia > 0

now you should create an aproval procedure with this search.

the other way is with the transaction notificaton store procedure, where you can block the invoice creation.

Oscar

former_member583013
Active Contributor
0 Kudos

What are you referring to by Threshold Value? Are you looking to have different threshold value for different customers ?

Former Member
0 Kudos

Jimmy's response is correct. The approval template actually checks against each customer's credit limit. The threshhold value is actually just the deviation from the credit limit. If you use $1 deviation, then the approval kicks in when the customer's credit limit is exceeded by one dollar. So if the credit limit is $1000, the approval kicks in after $1001.

PK

former_member186095
Active Contributor
0 Kudos

Hello,

in approval template setup --> tab terms --> select when the following terms apply --> tick deviation from credit limit then define the ratio and value.

There is no other way out except you use query that also available in the setup.

It will solve your problem

Rgds,