fix report

conv_bal
watcha.h@almacom.co.th 2015-03-11 10:52:45 +07:00
parent 50be363ce0
commit 372ddb6c3c
3 changed files with 17 additions and 7 deletions

View File

@ -1,8 +1,14 @@
dom=[['patient_id.field_bool','=',True]] => not working dom=[['patient_id.field_bool','=',True]] => not working
pattern id card: 3 3013 00180 19 0 pattern id card: 3 3013 00180 19 0
-edit hdcase
1. description not show because permission
--- receipt -- --- receipt --
date should be the same date should be the same -> ok
size of table should be fix per page force to print table for 1 page ->ok
!!! bug:
print multi page
---- visit --- ---- visit ---
should check key - check duplicate visit

View File

@ -964,6 +964,8 @@ class HDCase(Model):
cust_addr='' cust_addr=''
if cust.addresses: if cust.addresses:
cust_addr=cust.addresses[0].address_text cust_addr=cust.addresses[0].address_text
if 'your' in cust_addr:
cust_addr=''
if cust.walkin_cust: if cust.walkin_cust:
cust_name=payment.ref or '' cust_name=payment.ref or ''
no=1 no=1
@ -1030,8 +1032,8 @@ class HDCase(Model):
context['payment_id']=payment.id context['payment_id']=payment.id
data=self.get_report_payment_data(context=context) data=self.get_report_payment_data(context=context)
#XXX #XXX
count=15-len(data['lines']) limit_item=15
for i in range(count): for i in range(len(data['lines']),limit_item):
data['lines'].append({ data['lines'].append({
'no': '', 'no': '',
'product_name': '', 'product_name': '',

View File

@ -500,6 +500,8 @@ class Shop(Model):
cust_addr='' cust_addr=''
if cust.addresses: if cust.addresses:
cust_addr=cust.addresses[0].address_text cust_addr=cust.addresses[0].address_text
if 'your' in cust_addr:
cust_addr=''
if cust.walkin_cust: if cust.walkin_cust:
cust_name=shop.ref or '' cust_name=shop.ref or ''
@ -571,8 +573,8 @@ class Shop(Model):
context['refer_id']=obj.id context['refer_id']=obj.id
data=get_model('clinic.shop').get_page(context=context) data=get_model('clinic.shop').get_page(context=context)
#XXX fix 15 per page #XXX fix 15 per page
count=15-len(data['lines']) limit_item=15
for i in range(count): for i in range(len(data['lines']),limit_item):
data['lines'].append({ data['lines'].append({
'no': '', 'no': '',
'product_name': '', 'product_name': '',