format thoundsan
							parent
							
								
									4d6ebbfec6
								
							
						
					
					
						commit
						b778aa3aad
					
				| 
						 | 
				
			
			@ -151,9 +151,10 @@ class ReportHDCaseSummary(Model):
 | 
			
		|||
        dom_txt=set_default(dom,topic)
 | 
			
		||||
        ctx=set_ctx(dom,topic) 
 | 
			
		||||
        items={}
 | 
			
		||||
        qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total']
 | 
			
		||||
        item_vals={
 | 
			
		||||
                'month': month_str,
 | 
			
		||||
                'qty': get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'],
 | 
			
		||||
                'qty': "{0:,.0f}".format(qty),
 | 
			
		||||
                'link': 'clinic_report_cycle_item&%s'%dom_txt,
 | 
			
		||||
            }
 | 
			
		||||
        if hdcase_type!='completed':
 | 
			
		||||
| 
						 | 
				
			
			@ -165,9 +166,10 @@ class ReportHDCaseSummary(Model):
 | 
			
		|||
        topic='topic2'
 | 
			
		||||
        dom_txt=set_default(dom,topic)
 | 
			
		||||
        ctx=set_ctx(dom,topic) 
 | 
			
		||||
        qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total']
 | 
			
		||||
        items[topic]={
 | 
			
		||||
                'month': prev_month_str,
 | 
			
		||||
                'qty': get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'],
 | 
			
		||||
                'qty': "{0:,.0f}".format(qty),
 | 
			
		||||
                'link': 'clinic_report_hd_case_detail&%s'%dom_txt,
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -175,9 +177,10 @@ class ReportHDCaseSummary(Model):
 | 
			
		|||
        dom_txt=set_default(dom,topic)
 | 
			
		||||
        ctx=set_ctx(dom,topic) 
 | 
			
		||||
        # new patient of this month
 | 
			
		||||
        qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total']
 | 
			
		||||
        items[topic]={
 | 
			
		||||
                'month': month_str,
 | 
			
		||||
                'qty': get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'],
 | 
			
		||||
                'qty': "{0:,.0f}".format(qty),
 | 
			
		||||
                'action': 'clinic_patient',
 | 
			
		||||
                'link': 'clinic_report_hd_case_detail&%s'%dom_txt,
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -189,7 +192,7 @@ class ReportHDCaseSummary(Model):
 | 
			
		|||
        resign_qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total']
 | 
			
		||||
        items[topic]={
 | 
			
		||||
                'month': month_str,
 | 
			
		||||
                'qty': resign_qty,
 | 
			
		||||
                'qty': "{0:,.0f}".format(resign_qty),
 | 
			
		||||
                'action': 'clinic_patient',
 | 
			
		||||
                'link': 'clinic_report_hd_case_detail&%s'%dom_txt,
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -198,11 +201,9 @@ class ReportHDCaseSummary(Model):
 | 
			
		|||
        dom_txt=set_default(dom,topic)
 | 
			
		||||
        ctx=set_ctx(dom,topic) 
 | 
			
		||||
        total_qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total']
 | 
			
		||||
 | 
			
		||||
        items[topic]={
 | 
			
		||||
                'month': next_month_str,
 | 
			
		||||
                #'qty': total_qty-resign_qty,
 | 
			
		||||
                'qty': total_qty,
 | 
			
		||||
                'qty': "{0:,.0f}".format(total_qty),
 | 
			
		||||
                'action': 'clinic_patient',
 | 
			
		||||
                'link': 'clinic_report_hd_case_detail&%s'%dom_txt,
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -223,7 +224,7 @@ class ReportHDCaseSummary(Model):
 | 
			
		|||
            qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total']
 | 
			
		||||
            items[topic]={
 | 
			
		||||
                    'month': '',
 | 
			
		||||
                    'qty': qty,
 | 
			
		||||
                    'qty': "{0:,.0f}".format(qty),
 | 
			
		||||
                    'action': 'clinic_patient',
 | 
			
		||||
                    'link': 'clinic_report_hd_case_detail&%s'%dom_txt,
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,19 +23,14 @@
 | 
			
		|||
                <td>{{topic}}</td>
 | 
			
		||||
                <td>{{month}}</td>
 | 
			
		||||
                <td>เท่ากับ</td>
 | 
			
		||||
                {{#if qty}}
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <!--
 | 
			
		||||
                        {{view "link" string=qty action=action action_options=action_options}}
 | 
			
		||||
                        -->
 | 
			
		||||
                {{#ifeq qty '0'}}
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                {{else}}
 | 
			
		||||
                    <td style="text-align:right;width:5%">
 | 
			
		||||
                        <a href='/ui#name={{link}}' target="_blank">{{qty}}</a>
 | 
			
		||||
                    </td>
 | 
			
		||||
                {{else}}
 | 
			
		||||
                    <td>
 | 
			
		||||
                        0
 | 
			
		||||
                    </td>
 | 
			
		||||
                {{/if}}
 | 
			
		||||
                <td>{{unit}}</td>
 | 
			
		||||
                {{/ifeq}}
 | 
			
		||||
                <td style="text-align:center">{{unit}}</td>
 | 
			
		||||
            </tr>
 | 
			
		||||
        {{/each}}
 | 
			
		||||
    </tbody>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue