Skip to Content
0
Former Member
Nov 25, 2011 at 02:18 PM

Stored Procedure notification for document posting date

901 Views

Hello all,

I created a stored procedure for a customer to prevent him from posting a journal entry in a date earlier to the last posted entry. however he wanted this procedure to prevent him from posting any document that creates automatic journal entry as well (he doesnt use perpetual inventory so the transaction are: A/R Invoice, A/R credit Memo/ A/P Invoice, A/P credit memo, incoming/outgoing payment and deposit)

I'm having a difficulty to amend it so I would appreciate any help how to create such procedure

below is the original procedure i created for journal entries:

Block if Journal entry posting date is less than most recent entry

if (@object_type='30' )

begin

if @transaction_type in ('A')

if(( select max(refdate) from ojdt) > (select (refdate) from ojdt

where transid = @list_of_cols_val_tab_del ))

begin

set @error = '110'

set @error_message='Please check posting date'

end

end