minor fix

This commit is contained in:
wilson gomez 2021-08-13 09:30:30 -05:00
parent ebe7367e02
commit 6a1841449b

View file

@ -475,8 +475,9 @@ class Payroll(metaclass=PoolMeta):
unit_value = wage.compute_unit_price(salary_args)
res = self.get_line(wage, qty_pay, unit_value)
lines = PayrollLine.create([res])
event.line_payroll = lines[0]
event.save()
if lines:
event.line_payroll = lines[0]
event.save()
if event.category.wage_type_discount and event.quantity_discount:
id_wt_event = event.category.wage_type_discount.id
if id_wt_event not in discounts.keys():