diff --git a/netforce_clinic/models/labor_cost.py b/netforce_clinic/models/labor_cost.py index 8606871..1a09a25 100644 --- a/netforce_clinic/models/labor_cost.py +++ b/netforce_clinic/models/labor_cost.py @@ -140,7 +140,8 @@ class LaborCost(Model): for line in item.lines: nurse=line.nurse_id - level=line.level_id or nurse.level_id + #level=line.level_id or nurse.level_id + level=nurse.level_id if not level: raise Exception("Please specify level %s for %s"%(nurse.name,item.name)) levels[level.id]['total']+=1 @@ -281,7 +282,10 @@ class LaborCost(Model): # cost's nurses for line in item.lines: nurse=line.nurse_id - level=line.level_id or nurse.level_id + #level=line.level_id or nurse.level_id + level=nurse.level_id + if not level: + raise Exception("Please specify level for %s"%nurse.name) vals=levels.get(level.id) rate,amt,qty=0.0,0.0,0 level_id=level.id