improve report pdf
parent
2c3f578cc6
commit
776859f7bf
|
@ -24,9 +24,10 @@ class ReportCycleItem(Model):
|
|||
def default_get(self,field_names=None,context={},**kw):
|
||||
defaults=context.get("defaults",{})
|
||||
date=defaults.get('date',time.strftime("%Y-%m-%d"))
|
||||
year,month=time.strftime("%Y-%m").split("-")
|
||||
date_from=defaults.get('date_from','%s-%s-01'%(year,month))
|
||||
date_to=defaults.get('date_to','%s-%s-01'%(year,month))
|
||||
#year,month=time.strftime("%Y-%m").split("-")
|
||||
datenow=time.strftime("%Y-%m-%d")
|
||||
date_from=defaults.get('date_from',datenow)
|
||||
date_to=defaults.get('date_to',datenow)
|
||||
branch_id=defaults.get('branch_id')
|
||||
if branch_id:
|
||||
branch_id=int(branch_id)
|
||||
|
@ -63,6 +64,7 @@ class ReportCycleItem(Model):
|
|||
branch_id=defaults.get("branch_id")
|
||||
department_id=defaults.get("department_id")
|
||||
ptype_id=defaults.get("ptype_id")
|
||||
print('date_from ', date_from)
|
||||
month=date_from.split("-")[1]
|
||||
cycle_id=None
|
||||
if ids:
|
||||
|
@ -122,9 +124,14 @@ class ReportCycleItem(Model):
|
|||
dpt=hdcase.department_id
|
||||
dlz_use=hdcase.dlz_use or 0
|
||||
dlz_drop=False
|
||||
if dlz_use==hdcase.dlz_max:
|
||||
dlz_use="%sทิ้ง"%dlz_use
|
||||
dlz_drop=True
|
||||
#if dlz_use==hdcase.dlz_max:
|
||||
#dlz_use="%sทิ้ง"%dlz_use
|
||||
#dlz_drop=True
|
||||
for dlz_line in hdcase.dialyzers:
|
||||
dlz=dlz_line.dialyzer_id
|
||||
if dlz.state in ('drop','expire'):
|
||||
dlz_use="%sทิ้ง"%dlz_use
|
||||
dlz_drop=True
|
||||
cancel=False
|
||||
row_color=''
|
||||
if hdcase.state not in ('paid', 'waiting_payment'):
|
||||
|
@ -146,7 +153,7 @@ class ReportCycleItem(Model):
|
|||
'date': hdcase.date,
|
||||
'epo': hdcase.epo,
|
||||
'mdc': hdcase.mdc,
|
||||
'mdc_name': hdcase.mdc_name,
|
||||
'mdc_name': hdcase.mdc_name or hdcase.epo,
|
||||
'fee': abs(hdcase.fee),
|
||||
'dlz_name': hdcase.dlz_name,
|
||||
'dlz_use': dlz_use,
|
||||
|
|
|
@ -4,7 +4,7 @@ import urllib.parse as urllib
|
|||
from datetime import datetime
|
||||
from calendar import monthrange
|
||||
from netforce.model import Model, fields, get_model
|
||||
from netforce.access import get_active_company
|
||||
from netforce.access import get_active_company, get_active_user
|
||||
|
||||
from . import utils
|
||||
|
||||
|
@ -271,7 +271,10 @@ class ReportHDCaseSummary(Model):
|
|||
plines=medicals['plines']
|
||||
prod_titles=medicals['prod_titles']
|
||||
date_print=time.strftime("%m/%d/%Y %H:%M:%S")
|
||||
user_id=get_active_user()
|
||||
user=get_model('base.user').browse(user_id)
|
||||
data={
|
||||
'user_name': user.name,
|
||||
'hdcase_type': hdcase_type,
|
||||
'branch_id': branch_id,
|
||||
'department_id': department_id,
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
<center>
|
||||
<h3>{{company_name}}</h3>
|
||||
<h4>
|
||||
ระหว่างวันที่ {{date_from}} ถึง {{date_to}}
|
||||
รายชื่อผู้ป่วยระหว่างวันที่ {{date_from}} ถึง {{date_to}}
|
||||
</h4>
|
||||
</center>
|
||||
<table class="table table-condensed table-striped" style="margin-bottom:0px;">
|
||||
|
@ -12,14 +12,10 @@
|
|||
<th>ชื่อ-สกุล</th>
|
||||
<th>แพทย์</th>
|
||||
<th>สิทธ์</th>
|
||||
<!--
|
||||
<th style="text-align:right">จ.น.เงิน</th>
|
||||
-->
|
||||
<th style="text-align:left">ยาฉีด</th>
|
||||
<th>DZ</th>
|
||||
<th>N/U</th>
|
||||
<th>พยาบาล</th>
|
||||
<!--<th>หมายเหตุ</th>-->
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each lines }}
|
||||
|
@ -53,9 +49,6 @@
|
|||
<td><a href="/ui#name=clinic_patient&active_id={{pid}}&mode=form">{{pname}}</a></td>
|
||||
<td><a href="/ui#name=clinic_staff&active_id={{did}}&mode=form">{{dname}}</a></td>
|
||||
<td><a href="/ui#name=clinic_patient_type&active_id={{tid}}&mode=form">{{tname}}</a></td>
|
||||
<!--
|
||||
<td style="text-align:right">{{currency fee zero=""}}</td>
|
||||
-->
|
||||
<td style="text-align:left">{{mdc_name}}</td>
|
||||
<td><a href="/ui#name=clinic_dialyzer&active_id={{dlz_id}}&mode=form">{{dlz_name}}</a></td>
|
||||
<td>{{dlz_use}}</td>
|
||||
|
|
Loading…
Reference in New Issue