cancel
Showing results for 
Search instead for 
Did you mean: 

SBO_SP_TransactionNotification

Former Member
0 Kudos

I have one account code 151302010010006 with current balance 44000 and second account code 121302010020020 with current balance 47000. I have need SBO_SP_TransactionNotification when any user post the journal entry then system combine both account code balance & check the sum value of both code is greater than 100000 (one lak) then sytem not allow for entry

example 1. If I want post journal entry for any of one code(151302010010006 ,121302010020020) with amount 15000 then sum will increase from 1 lak and system not allow to post JE

44000+47000+15000=106000 It is more than one lakh (100000) and system will not allow

2. If I want post journal entry for any of one code(151302010010006 ,121302010020020) with amount 5000 then sum will not increase from 1 lak and system will allow to post JE 

44000+47000+5000=96000 It is not more than one lakh (100000) and system will  allow for post JE

Accepted Solutions (1)

Accepted Solutions (1)

KennedyT21
Active Contributor
0 Kudos

Hi

Try This

Declare @CurBAl as integer

IF @transaction_type = N'A' AND @Object_type = N'30'

    SELECT @CurBAl=sum(T0.currtotal+T1.Credit+T1.Debit) FROM oact T0

    inner join jdt1 T1 on T1.Account=T0.account

   WHERE To.acctcode in ('151302010010006','121302010020020')  and T1.TransId=@list_of_cols_val_tab_del

If @CurBAl >'100000'

   BEGIN

       SELECT @Error = 10, @error_message = 'Insufficient Amount check account!'

   END

END

its base modify according to your requirement

Hope Helpful

Regards

Kennedy

Former Member
0 Kudos

Thanks, It is working

Answers (0)