on 11-28-2017 5:10 AM
Hi to All
little bit confusion on my Stored procedure please correct it ..
if @object_type='46' and @transaction_type='A'
BEGIN
if exists(SELECT DISTINCT 'TRUE' FROM OVPM T0 INNER JOIN VPM2 T1 ON T0.[DocEntry] = T1.[DocNum] INNER JOIN ODPO T2 ON T0.[DocEntry] = T2.[DepositNum] WHERE T1.[SumApplied]<=T2.[DocTotal] OR T1.[SumApplied]>=T2.[DocTotal] AND T1.[InvType] ='204' AND T0.DocEntry= @list_of_cols_val_tab_del
)
begin
set @error = '-253'
set @error_message = 'sHOULD YOU CHOOSE ADV BILL AMT ONLY'
end
END
---
my requirement is when we want to give payment against ap down payment advice total and ovpm payment should be same if not system has to raise on alert ,,,
thanks for advance help
---Ramudu
hi
this one is worked but i want this on approval, it means like draft
if @object_type='140' and @transaction_type='A'
BEGIN
if exists(SELECT distinct 'TRUE'
FROM OPDF T3 INNER JOIN OVPM T0 ON T3.[DocEntry] = T0.[DraftKey]inner JOIN VPM2 T1 ON T0.[DocEntry] = T1.[DocNum]
left JOIN ODPO T2 ON T1.DocEntry=T2.DocEntry and T1.InvType=T2.ObjType
WHERE T2.DocTotal<>(Case when isnull(T0.CheckSum,0)=0 then T0.CashSum else T0.CheckSum End)
and T3.DocEntry= @list_of_cols_val_tab_del
)
begin
set @error = '-253'
set @error_message = 'you have to give Adv. Only'
end
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any updates please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.