conv_bal
watcha.h 2015-03-18 17:35:49 +07:00
parent 954dcedd66
commit 93f315a91f
7 changed files with 29 additions and 11 deletions

View File

@ -80,7 +80,6 @@ class AccountPayment(Model):
'partner_id': partner_id
}
res[account_id]['credit']+=amt
settings=get_model("settings").browse(1)
if obj.type=="in":
journal_id=obj.journal_id.id or settings.pay_in_journal_id.id

View File

@ -82,19 +82,25 @@ class HDCase(Model):
for dlz in obj.dialyzers:
dz=dlz.dialyzer_id
dlz_id=dz.id
name=dz.name or ""
name=name.split()[-1]
prod=dz.product_id
#name=dz.name or ""
#name=name.split()[-1]
name=prod.description
dlz_name.append(name)
dlz_use+=dlz.use_time or 0
dlz_max+=dlz.max_use_time or 0
dlz_name=','.join([dlz for dlz in dlz_name])
names=[]
fee=0
sign=1
if obj.state=='waiting_payment':
sign=-1
for line in obj.lines:
amt=line.amount or 0
prod=line.product_id
categ=line.product_categ_id
if categ and prod and line.reimbursable=='yes':
if categ and prod:
#if categ and prod and line.reimbursable=='yes':
if categ.code=='EPO':
name=prod.name or ""
name=name.split("-") #XXX
@ -102,7 +108,7 @@ class HDCase(Model):
name=name[0].title()
names.append(name)
elif categ.code=='FEE':
fee+=amt
fee+=amt*sign
res[obj.id]={
'epo': ','.join([n for n in names]),
'fee': fee,

View File

@ -350,5 +350,4 @@ class ImportPayment(Model):
data['is_uc']=is_uc
return data
ImportPayment.register()

View File

@ -92,9 +92,16 @@ class ReportCycleItem(Model):
cycle=hdcase.cycle_id
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
cancel=False
if hdcase.state=='cancelled':
cancel=True
lines.append({
'dlz_drop': dlz_drop,
'cancel': cancel,
'pname': patient.name or '',
'pid': patient.id or '',
'hn': patient.hn_no,

View File

@ -21,14 +21,18 @@
</thead>
<tbody>
{{#each lines }}
{{#if cancel}}
<tr style="background-color:#b6b6b6;">
{{else}}
<tr>
{{/if}}
<td>{{no}}</td>
<td><a href="/ui#name=clinic_hd_case&active_id={{hdcase_id}}&mode=form">{{date}}</a></td>
<td>{{cname}}</td>
<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>{{currency fee zero=""}}</td>
<td>{{fee}}</td>
<td>{{epo}}</td>
<td><a href="/ui#name=clinic_dialyzer&active_id={{dlz_id}}&mode=form">{{dlz_name}}</a></td>
<td>{{dlz_use}}</td>

View File

@ -1,11 +1,14 @@
- report
- walkin
- receipt
- merge data
- receipt **
-
- updaete & merge data
- patient
- doctor
- *** template:
- change company name in all report template
====
ต้องมี เมนู
improvement:
1. ย้ายผู้ป่วย
2. ปรับ level