From 93f315a91f6c58012141d7dd32a354f44b7755a3 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 18 Mar 2015 17:35:49 +0700 Subject: [PATCH] fix --- netforce_clinic/models/account_payment.py | 1 - netforce_clinic/models/hd_case.py | 14 ++++++++++---- netforce_clinic/models/import_payment.py | 1 - netforce_clinic/models/report_cycle_item.py | 7 +++++++ .../reports/report_cycle_item.xlsx | Bin 5176 -> 5167 bytes .../templates/report_cycle_item.hbs | 6 +++++- netforce_clinic/todo.txt | 11 +++++++---- 7 files changed, 29 insertions(+), 11 deletions(-) diff --git a/netforce_clinic/models/account_payment.py b/netforce_clinic/models/account_payment.py index 1a4b701..e8f1172 100644 --- a/netforce_clinic/models/account_payment.py +++ b/netforce_clinic/models/account_payment.py @@ -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 diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 4df3ce9..4e260de 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -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, diff --git a/netforce_clinic/models/import_payment.py b/netforce_clinic/models/import_payment.py index 358b16f..9911102 100644 --- a/netforce_clinic/models/import_payment.py +++ b/netforce_clinic/models/import_payment.py @@ -350,5 +350,4 @@ class ImportPayment(Model): data['is_uc']=is_uc return data - ImportPayment.register() diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index 734d207..c7784e0 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -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, diff --git a/netforce_clinic/reports/report_cycle_item.xlsx b/netforce_clinic/reports/report_cycle_item.xlsx index dc677d6ee7fcf0a48b0350a56f6dbf664061e617..52d8efcc6a2250bba6c8c17ffed1c71f41129a03 100644 GIT binary patch delta 1561 zcmY+Edo8x@-RSAQ4vrl zMwO{-0_UuPJXjQg=)u{7(|OlUW!0*ha0mi4cVd`tQGTo~NVO&5I`9JVwlO?r{qAdSe+>oM%&+2Ctyn7(oQ&OHkI_J zSWm^6G+-*+=E3Mmx@(I^%qxL+mzK||pl0o-{S1@Jko|Mfij*6-@^QxF)p`i5D(&*i zCng?2&nPfGA`a(E^?rX6a;~T_s40Gl)0H z${p&-C7FMa;F|id-DtLBD*$oMbC^d_!nt0~?Tz}*x;(m|Lr3ELVEGyl*Wv&^hO`l|UvxYC1w~diW{M@eFhcPZ@$C-VGkOO+>nrrA zX*bk~Gg}TmW0R(QrErZK`VXMfB73zB9;32plDos8(F?Lfih3oeoRq)=u+>@FDk6v&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DtxE3We1-LP6}w45UF&d+T^! zVZP9rLGZ>1jQJ%W(nGrz_To5|EvczD!3MfQHl7xHVOhS3smifUtOJt9J`W$?v z%5-a)(8YqcwCio~oZMw_OI&ps+0c?u%npir)zs!);NV z5@|TyUJ^HdwEy+>mhNh!W$h$T2I~m6QebmyV>TVpBYjYKcs3nVh|_)S=%uO`UBm2^ zei|IcO6Pi4%d;NS8lXFjm{dAWcZ77!Jfu@cHA!ObYb&btHp*Fez0b=M4+P7PaKtX3 z2JOUw%?hRtI84n>5wc@ z;+zxDiJ#P#m`nRwd-K3jV#Tu3@vLR>o2({5ch5eiVYQZbXUZ7h1DaCQ&H+Wb*9##=p&b zoK{8V^n{eaf!jP!?(PD|^lP?8?tUX}*!hx<&oMdNseH}1MBkzByNy>goXB8>sOA^% zM&tp2F$e(gKP$8a{0#On@W7fYns4Y^YoJQAax$NkQ~lR45o#W5P?UPansa`DnEs$J z(NG%|X|?@t6Z16GOop(a2%rbE8;U{wz&SIAd-H$*K(`zKp!RdOteP=ZVLCF!Z!iQ< zl}UynWmB+pT4g4~P%`~C)L<7vs{bxc=`p{A29pQVm2tilmnIOTxQFy&*e?tKAcDCL KuD^a {{#each lines }} + {{#if cancel}} + + {{else}} + {{/if}} {{no}} {{date}} {{cname}} {{pname}} {{dname}} {{tname}} - {{currency fee zero=""}} + {{fee}} {{epo}} {{dlz_name}} {{dlz_use}} diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index 83a1ba0..7a920c0 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -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