Cho mình hỏi có các...
 
Notifications
Clear all

Cho mình hỏi có cách nào ngăn không cho người dùng Post Voucher không?

7 Posts
2 Users
5 Likes
291 Views
Posts: 6
Topic starter
(@penruler)
Active Member
Joined: 2 years ago

Yêu cầu cần chặn user sử dụng nút Post Voucher trong màn hình Journal Voucher. Xin được chia sẻ cách thực hiện.

Reply
6 Replies
admin
Posts: 338
Admin
(@admin)
Prominent Member
Joined: 3 years ago

Bạn có thể sử dụng chức năng UI Configuration Template để ẩn nút Post Voucher, sau đó gán Template cho những user nào không được quyền post voucher.

Chi tiết thực hiện như sau:

1. Administration >>> Utilities >>> UI Configuration Template

2. Tạo mới template với tên Journal Voucher

3. Trong Tab Form, chọn chứng từ Journal Voucher. Nhấn nút Add để thêm template.

4. Chọn dòng Journal Voucher trong khu vực Forms >>> nhấn nút Edit Form UI >>> hệ thống sẽ mở ra cửa sổ cho phép bạn chỉnh sửa

5. Click chuột phải vào nút Post Voucher >>> chọn Hide

6. Trong Tab Assigned Users >>> tick chọn các user sẽ được áp dụng template này

7. Nhấn nút Update để lưu

 

Kết quả

User manager khi làm việc với Journal Voucher sẽ không thể thao tác Post Voucher. 

Reply
1 Reply
(@penruler)
Joined: 2 years ago

Active Member
Posts: 6

@admin thanks ad!

Reply
admin
Posts: 338
Admin
(@admin)
Prominent Member
Joined: 3 years ago

Cách 2: sử dụng chức năng phân quyền của hệ thống.

  • Journal Entry: Read Only / No Authorization
  • Journal Voucher: Full Authorization

Kết quả:

Khi người dùng thao tác chọn nút Post Voucher, hệ thống sẽ thông báo "You are not permitted to perform this action " (Bạn không có quyền thực hiện thao tác này)

Reply
admin
Posts: 338
Admin
(@admin)
Prominent Member
Joined: 3 years ago

Cách 3: sử dụng Transaction Notification để chặn người dùng Post Voucher

if @object_type = '30' and @transaction_type in ('A', 'U')
begin
	IF EXISTS (SELECT T0.TransId FROM OJDT T0 inner join JDT1 T1 on T0.TransId=T1.TransId
				WHERE isnull(T0.BatchNum,'')<>'' and T0.UserSign=1 and T0.TransId = @list_of_cols_val_tab_del
				)
		BEGIN
			set @error = 3092
			set @error_message =  N'You are not allowed to post voucher.'
					
		END
end

Kết quả

Reply
Posts: 6
Topic starter
(@penruler)
Active Member
Joined: 2 years ago

Chà, đã quá.

Hỏi 1 câu mà được giải đáp tận 3 cách luôn. 

Cảm ơn nhiều nhé.

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