Skip to content

Commit

Permalink
[Karthi] | BAH-3547 | Refactor. Product Expiration report report code…
Browse files Browse the repository at this point in the history
… alignment issue fixed. (#110)
  • Loading branch information
karthikeyansp91 authored Mar 21, 2024
1 parent 06d19db commit 5ef184e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bahmni_reports/report/product_expiration_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ def get_xlsx_report(self, data, response):
format12_b = workbook.add_format({'font_size': 10, 'align': 'right', 'border': 1,'font_name': 'Calibri'})

product_list = []
if len(rec_obj.product_id) == 0:
product_names = 'All'
elif len(rec_obj.product_id) <= 3:
for product in rec_obj.product_id:
product_list.append(product.name)
product_names = ', '.join(product_list)
else:
product_names = 'Limited'
if len(rec_obj.product_id) == 0:
product_names = 'All'
elif len(rec_obj.product_id) <= 3:
for product in rec_obj.product_id:
product_list.append(product.name)
product_names = ', '.join(product_list)
else:
product_names = 'Limited'

sheet.merge_range(0, 0, 0, 11,(rec_obj.env.user.company_id.name +", "+ rec_obj.env.user.company_id.street +", "+ rec_obj.env.user.company_id.state_id.name +"."), format1)
sheet.merge_range(1, 0, 1, 11,'Product Expiration Register', format1)
Expand Down

0 comments on commit 5ef184e

Please sign in to comment.