From 372ddb6c3c00159535ca2c34251588222f98dab6 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Wed, 11 Mar 2015 10:52:45 +0700 Subject: [PATCH] fix report --- netforce_clinic/fixme.txt | 12 +++++++++--- netforce_clinic/models/hd_case.py | 6 ++++-- netforce_clinic/models/shop.py | 6 ++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/netforce_clinic/fixme.txt b/netforce_clinic/fixme.txt index 3c2e041..e352738 100644 --- a/netforce_clinic/fixme.txt +++ b/netforce_clinic/fixme.txt @@ -1,8 +1,14 @@ dom=[['patient_id.field_bool','=',True]] => not working pattern id card: 3 3013 00180 19 0 +-edit hdcase +1. description not show because permission + --- receipt -- -date should be the same -size of table should be fix per page +date should be the same -> ok +force to print table for 1 page ->ok + !!! bug: + print multi page + ---- visit --- -should check key +- check duplicate visit diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index a4aae52..77b0588 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -964,6 +964,8 @@ class HDCase(Model): cust_addr='' if cust.addresses: cust_addr=cust.addresses[0].address_text + if 'your' in cust_addr: + cust_addr='' if cust.walkin_cust: cust_name=payment.ref or '' no=1 @@ -1030,8 +1032,8 @@ class HDCase(Model): context['payment_id']=payment.id data=self.get_report_payment_data(context=context) #XXX - count=15-len(data['lines']) - for i in range(count): + limit_item=15 + for i in range(len(data['lines']),limit_item): data['lines'].append({ 'no': '', 'product_name': '', diff --git a/netforce_clinic/models/shop.py b/netforce_clinic/models/shop.py index e271224..925c6ab 100644 --- a/netforce_clinic/models/shop.py +++ b/netforce_clinic/models/shop.py @@ -500,6 +500,8 @@ class Shop(Model): cust_addr='' if cust.addresses: cust_addr=cust.addresses[0].address_text + if 'your' in cust_addr: + cust_addr='' if cust.walkin_cust: cust_name=shop.ref or '' @@ -571,8 +573,8 @@ class Shop(Model): context['refer_id']=obj.id data=get_model('clinic.shop').get_page(context=context) #XXX fix 15 per page - count=15-len(data['lines']) - for i in range(count): + limit_item=15 + for i in range(len(data['lines']),limit_item): data['lines'].append({ 'no': '', 'product_name': '',