mycheck = False
for i in doc.deductions:
if i.salary_component == "Attendance Violation":
mycheck = True
i.amount = doc.deduction_amount
if mycheck:
pass
else:
row = doc.append('deductions', {})
row.salary_component = "Attendance Violation"
row.amount =doc.deduction_amount
doc.reload()
for i in doc.deductions:
if i.salary_component == "Attendance Violation":
mycheck = True
i.amount = doc.deduction_amount
if mycheck:
pass
else:
row = doc.append('deductions', {})
row.salary_component = "Attendance Violation"
row.amount =doc.deduction_amount
doc.reload()
No comments:
Post a Comment