on 2019 Nov 12 1:12 PM
I need help implementing a transaction notification for Outgoing Payments (OVPM) under the Payment Methods (VPM1) menu. I need an error message for when the user tries to set a Due Date prior to the current date. Thanks.
IF object_type = '46' AND transaction_type in ('A','U') THEN
SELECT T1."DueDate" INTO Fecha1 FROM VPM1 T1 INNER JOIN OVPM T0 ON T1."DocNum" = T0."DocEntry"
WHERE T0."DocEntry" = list_of_cols_val_tab_del;
IF DAYS_BETWEEN(CURRENT_DATE,Date1) < 0 THEN
error := 90008;
error_message := N'You are trying to set a prior date';
END IF;
END IF;
Request clarification before answering.
PLEASE TRY THIS
IF :Object_type ='46' and ( :transaction_type ='A' OR :transaction_type ='U') THEN
Declare temp_var_0 integer;
SELECT
(SELECT Count(*)
FROM OVPM T0
INNER JOIN VPM1 T1 ON T0."DocEntry" = T1."DocNum"
WHERE DAYS_BETWEEN(T1."DueDate", CURRENT_DATE)>1 and T0."DocEntry" = :list_of_cols_val_tab_del ) INTO temp_var_0 FROM DUMMY;
IF :temp_var_0 > 0 THEN
SELECT 1, 'You are trying to set a prior date' INTO Error, error_message FROM DUMMY;
END IF;
END IF;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
39 | |
8 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.