if no reimburse medical stock should set to CASH
							parent
							
								
									765a9884ed
								
							
						
					
					
						commit
						464470f2af
					
				| 
						 | 
				
			
			@ -93,6 +93,9 @@ class ReportMedicalSummary(Model):
 | 
			
		|||
        if ct_ids:
 | 
			
		||||
            dom.append(['categ_id.id','in',ct_ids])
 | 
			
		||||
        categ_ids=set()
 | 
			
		||||
        themself_id=0
 | 
			
		||||
        for type_id in get_model("clinic.patient.type").search([['code','=','CASH']]):
 | 
			
		||||
            themself_id=type_id
 | 
			
		||||
        for prod in get_model("product").search_browse(dom):
 | 
			
		||||
            prod_code=prod.code or ""
 | 
			
		||||
            categ=prod.categ_id
 | 
			
		||||
| 
						 | 
				
			
			@ -128,7 +131,10 @@ class ReportMedicalSummary(Model):
 | 
			
		|||
                    continue
 | 
			
		||||
                if categ and categ.id not in list(categ_ids):
 | 
			
		||||
                    continue
 | 
			
		||||
                products[prod_code][patient_type_id]['qty']+=line.qty
 | 
			
		||||
                if themself_id and patient_type_id!=themself_id and line.reimbursable=='no':
 | 
			
		||||
                    products[prod_code][themself_id]['qty']+=line.qty
 | 
			
		||||
                else:
 | 
			
		||||
                    products[prod_code][patient_type_id]['qty']+=line.qty
 | 
			
		||||
 | 
			
		||||
        lines=[]
 | 
			
		||||
        limit_char=25
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue