Notifications
Clear all

Chặn trường hợp hạch toán chỉ toàn bên nợ hoặc chỉ toàn bên có

1 Posts
1 Users
0 Reactions
184 Views
admin
Posts: 557
Admin
Topic starter
(@admin)
Knight3
Joined: 4 years ago

Trong quá trình hỗ trợ có trường hợp người dùng hạch toán kế toán (JE) với nội dung phát sinh chỉ toàn bên nợ (Debit) hoặc toàn bên có (Credit)

Sau đây là câu Transaction Notification để chặn 

if :object_type = '30' and (:transaction_type = 'A') then
	begin		
		--Kiem tra JE chi phat sinh ben no hoac ben co
		if exists (select "TransId" from JDT1 
					where "TransType"='30' and "TransId" = :list_of_cols_val_tab_del or ("Debit"<>0 or "Credit"<>0)
					group by "TransId" 
					having (sum("Debit")=0 or sum("Credit")=0)
					)
		then
			begin
				error := 3090;
				error_message :=  N'Không được phép hạch toán chỉ toàn bên nợ hoặc chỉ toàn bên có.';
			end;
		end if;
		
		--Kiem tra JE chi phat sinh ben no hoac ben co
	end;
end if;

Reply
Share:
x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security