[FIX] report_hd_case_detail:time in topic2 get data not work

fix1
SPP 2018-06-07 17:03:50 +07:00
parent 9de345409c
commit 21ad40d97d
1 changed files with 7 additions and 7 deletions

View File

@ -165,8 +165,8 @@ class ReportHDCaseDetail(Model):
title=titles.get(report_type,'no title')
title+=' '+prev_month_str
prev_weekday, prev_total_day=monthrange(prev_year, prev_month)
reg_date='%s-%s-%s'%(prev_year,str(prev_month).zfill(2),str(prev_total_day).zfill(2))
print('topic2 ', reg_date)
reg_date='%s-%s-%s 23:59:59'%(prev_year,str(prev_month).zfill(2),str(prev_total_day).zfill(2))
#print('topic2 ', reg_date)
dom=[]
dom.append(['walkin','=',"no"])
if branch_id:
@ -252,7 +252,7 @@ class ReportHDCaseDetail(Model):
total+=1
# all patient who are in hospital on select month
elif report_type=='topic5':
print('topic5 ', time_stop)
#print('topic5 ', time_stop)
title=titles.get(report_type,'no title')
title+=' '+next_month_str
dom=[]
@ -292,7 +292,7 @@ class ReportHDCaseDetail(Model):
total+=1
# find patient movement
elif report_type=='topic6':
print('topic6')
#print('topic6')
ptype=None
if patient_type_id:
ptype=get_model('clinic.patient.type').browse(patient_type_id)
@ -449,7 +449,7 @@ class ReportHDCaseDetail(Model):
title+=' '+prev_month_str
prev_weekday, prev_total_day=monthrange(prev_year, prev_month)
reg_date='%s-%s-%s'%(prev_year,str(prev_month).zfill(2),str(prev_total_day).zfill(2))
print('topic2 ', reg_date)
#print('topic2 ', reg_date)
dom=[]
dom.append(['reg_date','<=',reg_date])
dom.append(['walkin','=',"no"])
@ -531,7 +531,7 @@ class ReportHDCaseDetail(Model):
total+=1
# all patient who are in hospital on select month
elif report_type=='topic5':
print('topic5 ', time_stop)
#print('topic5 ', time_stop)
title=titles.get(report_type,'no title')
title+=' '+next_month_str
dom=[]
@ -566,7 +566,7 @@ class ReportHDCaseDetail(Model):
total+=1
# find patient movement
elif report_type=='topic6':
print('topic6')
#print('topic6')
ptype=None
if patient_type_id:
ptype=get_model('clinic.patient.type').browse(patient_type_id)