on 02-13-2017 11:56 AM
Hi ,
How to set authorization for the following scenario .
Some of the users put AP Invoice without P.O & GRPO.How can i prevent it ? A users shouldn't directly post AP Invoices without P.O & GRPO.
Hello,
This is the code for Stand Alone GRPO Not Allowed Copy from PO is Required With Line Total Allow Rs.3000 Limit Only.
IF EXISTS (
SELECT OPDN.DocEntry FROM OPDN inner join PDN1 on OPDN.DocEntry=PDN1.DocEntry WHERE OPDN.DocEntry=@list_of_cols_val_tab_del and PDn1.BaseType='-1'
--and (select isnull(U_pendingpay_opn_dp,'N') from ocrd where cardcode=(SELECT CardCode FROM OPDN C WHERE C.DocEntry=@list_of_cols_val_tab_del))='N'
group by opdn.docentry having sum(PDN1.LineTotal)>3000
)
BEGIN
Set @error =1
set @error_message = 'Stand Alone GRPO is not Allowed..Copy from PO required'
END<br>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
This is the code for you
If @object_type = '18' And @transaction_type in ('A','U')
BEGIN
DECLARE @intError INT
SELECT @intError = COUNT(*) FROM dbo.PCH1 T0
WHERE T0.DocEntry = @list_of_cols_val_tab_del
AND t0.BaseType NOT IN (22,20)
IF @intError > 0
BEGIN
SET @error = 1004
SET @error_message = 'A/P Invoice -- You can not make A/P Invoice without base document PO or GRPO'
select @error, @error_message
END
END
Thanks
Engr. Taseeb Saeed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
No authorization setting for AP invoice without base document. If you have only one line in AP Invoice, then you can use approval procedure.
If multiple lines, you can use Transaction notification.
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You can achieve it by writing a SQL code in Transaction Notification which will block the user when he will enter AP Invoice without a base entry. You need to just check BaseType for PCH1 table. BaseType should be either 22 (PO) or 20 (GRPO)
Regards,
Engr. Taseeb Saeed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
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.