fix accounting
This commit is contained in:
		@@ -56,6 +56,7 @@ class Client(models.Model):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def accounting_for(self, desk_no, pht, pnt):
 | 
					    def accounting_for(self, desk_no, pht, pnt):
 | 
				
			||||||
        t = Accounting.objects.filter(client_id=self.id, desk_no=desk_no)[:3][::-1]
 | 
					        t = Accounting.objects.filter(client_id=self.id, desk_no=desk_no)[:3][::-1]
 | 
				
			||||||
 | 
					        if t.__len__() > 0:
 | 
				
			||||||
            a = t[t.__len__() - 1]
 | 
					            a = t[t.__len__() - 1]
 | 
				
			||||||
            if a.time_to is None:
 | 
					            if a.time_to is None:
 | 
				
			||||||
                prize = utils.get_prize_for(start=a.time_from, end=datetime.now(timezone.utc), pph=pht)
 | 
					                prize = utils.get_prize_for(start=a.time_from, end=datetime.now(timezone.utc), pph=pht)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user