Dear Experts,
I want to create an approval procedure for Journal Vouchers.
I did the following:-
--------- Block unapproved Journal Voucher-----
if @object_type = '30' and @transaction_type IN ('A', 'U')
BEGIN
IF Exists (Select T0.TransID from dbo.OBTF T0
WHERE T0.TransId=@list_of_cols_val_tab_del and U_MD_APPROVAL <> 'Approved')
select @error = 101, @error_message = 'This Journal Voucher requires MD Approval'
End
The stored procedure above is not working and journal voucher are processed irrespective of the udf field status. Kindly review and let me know what is wrong with it.
Regards
George Njuguna