Notifications
Clear all
Mar 06, 2025 11:49 am
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;