[Fix] Expense claim showing status as Unpaid even if Total Advance Amount and Total Sanctioned Amount is same (#14311)
This commit is contained in:
		
							parent
							
								
									7e0e85912b
								
							
						
					
					
						commit
						2fa057e4ad
					
				| @ -45,8 +45,9 @@ class ExpenseClaim(AccountsController): | |||||||
| 		}[cstr(self.docstatus or 0)] | 		}[cstr(self.docstatus or 0)] | ||||||
| 
 | 
 | ||||||
| 		paid_amount = flt(self.total_amount_reimbursed) + flt(self.total_advance_amount) | 		paid_amount = flt(self.total_amount_reimbursed) + flt(self.total_advance_amount) | ||||||
|  | 		precision = self.precision("total_sanctioned_amount") | ||||||
| 		if (self.is_paid or (flt(self.total_sanctioned_amount) > 0 | 		if (self.is_paid or (flt(self.total_sanctioned_amount) > 0 | ||||||
| 			and flt(self.total_sanctioned_amount) ==  paid_amount)) \ | 			and flt(self.total_sanctioned_amount, precision) ==  flt(paid_amount, precision))) \ | ||||||
| 			and self.docstatus == 1 and self.approval_status == 'Approved': | 			and self.docstatus == 1 and self.approval_status == 'Approved': | ||||||
| 				self.status = "Paid" | 				self.status = "Paid" | ||||||
| 		elif flt(self.total_sanctioned_amount) > 0 and self.docstatus == 1 and self.approval_status == 'Approved': | 		elif flt(self.total_sanctioned_amount) > 0 and self.docstatus == 1 and self.approval_status == 'Approved': | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user