Hỏi Đáp

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

Lỗi "Wrong python code defined for salary rule"

Ảnh đại diện
Phạm Quang Lân

Trong salary rules mình tạo một rule với điều kiện "Always True", computation là result = inputs.DST * 0.07
Ở phần input của salary rules mình tạo input code DST.
Trong salary structure mình đã tạo một salary structure chứa salary rules này.
Tuy nhiên khi compute sheet cho employee thì có báo lỗi "Wrong python code defined for salary rule". Mình đã sửa computation cho rules là result = DST * 0.07 vẫn bị.
Các bạn giúp mình xem lỗi ở đâu với!
Cám ơn các bạn,:D

Wrong python code defined for salary rule

Wrong python code defined for salary rule

Wrong python code defined for salary rule

Wrong python code defined for salary rule

Ảnh đại diện
Huỷ bỏ
1 Trả lời
1
Ảnh đại diện
Nguyễn Thị Liên
Bài trả lời tốt nhất

Chào bạn,

Bạn tham khảo tài iệu này nhé: Cấu trúc lương theo ngày công

TH này bạn sửa như sau: result = inputs.DST.amount * 0.07
Bạn phải có thêm .amount vì đây là trường thể hiện giá trị của inputs đó. Bạn có thể kích hoạt phần chế độ cho người phát triển lên để xem tên trường.

Thân!

1 Bình luận
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
ViindooBot
-

Cám ơn bạn, mình đã xử lý được! :)