diff --git a/netforce_clinic/models/print_labor_cost.py b/netforce_clinic/models/print_labor_cost.py index 06d5de6..dc2d389 100644 --- a/netforce_clinic/models/print_labor_cost.py +++ b/netforce_clinic/models/print_labor_cost.py @@ -238,11 +238,10 @@ class PrintLaborCost(Model): for line in obj.lines: staff=line.staff_id for report_line in report_lines: - #name=staff.number or staff.name or staff.id - name=staff.number+"-"+(staff.name or staff.id) + name='%s-%s'%(staff.first_name,staff.number) + name=name.replace(" ","-") fname='%s-%s.xlsx'%(name,report_line['report_file']) print('fname ---> ', fname) - #report_file=report_line['report_file'] report_model=report_line['model'] report_template=report_model.replace(".","_").replace("clinic_","") report_id=report_line['report_id'] @@ -282,11 +281,18 @@ class PrintLaborCost(Model): db.commit() os.system("cp -rf %s ."%tmp_dir) + + os.system("cp merge.py labor_cost/") + os.system("python labor_cost/merge.py labor_cost") + os.system("rm labor_cost/*.py") + os.system("rm labor_cost/*.xlsx") + os.system("mv labor_cost %s"%obj.name) os.system("zip %s.zip %s/*"%(obj.name,obj.name)) os.system("mv %s.zip %s/"%(obj.name,fdir)) os.system("rm -r %s*"%(obj.name)) os.system("rm %s/*"%tmp_dir) + obj.write({ 'zip_file': '%s.zip'%obj.name, 'state': 'done', diff --git a/netforce_clinic/reports/report_labor_cost_detail.xlsx b/netforce_clinic/reports/report_labor_cost_detail.xlsx index d98c749..ff777bf 100644 Binary files a/netforce_clinic/reports/report_labor_cost_detail.xlsx and b/netforce_clinic/reports/report_labor_cost_detail.xlsx differ diff --git a/netforce_clinic/reports/report_labor_cost_sub_detail.xlsx b/netforce_clinic/reports/report_labor_cost_sub_detail.xlsx index dd20236..00ca316 100644 Binary files a/netforce_clinic/reports/report_labor_cost_sub_detail.xlsx and b/netforce_clinic/reports/report_labor_cost_sub_detail.xlsx differ diff --git a/netforce_clinic/reports/report_labor_cost_summary.xlsx b/netforce_clinic/reports/report_labor_cost_summary.xlsx index 8abc1cb..086c18b 100644 Binary files a/netforce_clinic/reports/report_labor_cost_summary.xlsx and b/netforce_clinic/reports/report_labor_cost_summary.xlsx differ