on 06-30-2023 11:15 AM
Hi Experts,
I Need a validation query to block outgoing payment- if bank charges is given in OP then UDF(Bank)) field is mandatory.
Thanks
Ram
HI,
Try this Transaction Notification
IF @object_type = '46' and @transaction_type in ('A', 'U')
BEGIN
IF EXISTS (SELECT 1 FROM OVPM T0
WHERE isnull (T0.BcgSum,0)<>0 and isnull(T0.U_UDF,'')='' and T0.DocEntry = @list_of_cols_val_tab_del
)
BEGIN
SET @error = 4601
SET @error_message = N'Bank charge exists, input info into UDF!'
END
END<br>
Hope this helps,
Son Tran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
IF @object_type = '46' AND (@transaction_type = 'A' or @transaction_type = 'U')
Begin
Declare @BnkChg Decimal (19,2);
Declare @BnkUDF nvarchar(100);
Select @BnkChg = IsNull(T0."BkChgAmt",0) , @BnkUDF = IsNull(T2.CounterRef,'') from OBCG t0
inner join OCRD T1 on T1."CardCode" = T0."CardCode"
INNER JOIN OVPM T2 ON T2."CardCode" = T1."CardCode" AND T2.DocEntry = @list_of_cols_val_tab_del;
If(@BnkUDF = '')
Begin
Set @Error = '-202';
Set @error_message = 'Please Enter An Information.';
End
End
For testing, header level reference field is taken. You can change this.Note: - I don't find any link between obcg and ovpm tables apart from cardcode. Please check all the scenarios.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
9 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.