update KillRequestViewSet

This commit is contained in:
2026-01-19 15:43:47 +03:30
parent e3dcffbe02
commit 0aaf646d23

View File

@@ -3176,7 +3176,8 @@ class KillRequestViewSet(viewsets.ModelViewSet):
recive_date = datetime.strptime(str(request.data['recive_date']), '%Y-%m-%d %H:%M:%S').date()
total_unpaid_wage = get_finance_info(kill_house)['total_price']
slaughter_transactions = InternalTransaction.objects.filter(
kill_house=kill_house, status='completed',
Q(kill_house=kill_house) | Q(parent_kill_house=kill_house),
status='completed',
trash=False)
total_paid_wage += slaughter_transactions.aggregate(total=Sum('amount'))[